blob: d9e98e07caacc7f9318ba4ad0a77254d913e4a06 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisa5f09072002-10-11 05:37:59 +00002# From configure.in Revision: 1.356 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwis11437992002-04-12 09:54:03 +00004# Generated by GNU Autoconf 2.53.
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.
Guido van Rossum627b2d71993-12-24 10:39:16 +000010
Martin v. Löwis11437992002-04-12 09:54:03 +000011if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
18## --------------------- ##
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
30# NLS nuisances.
31# 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
38(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; }
62
63
64# Name of the executable.
65as_me=`(basename "$0") 2>/dev/null ||
66$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
89 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
90 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.
230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
231
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.
256PACKAGE_NAME=
257PACKAGE_TARNAME=
258PACKAGE_VERSION=
259PACKAGE_STRING=
260PACKAGE_BUGREPORT=
261
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
764\`configure' configures this package to adapt to many kinds of systems.
765
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
820
821 cat <<\_ACEOF
822
823Optional Features:
824 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
825 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
826 --enable-framework=INSTALLDIR Build (MacOSX|Darwin) framework
827 --enable-shared disable/enable building shared python library
828 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
829 --enable-ipv6 Enable ipv6 (with ipv4) support
830 --disable-ipv6 Disable ipv6 support
831 --enable-unicode=ucs2,ucs4 Enable Unicode strings (default is yes)
832
833Optional Packages:
834 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
835 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
836 --without-gcc never use gcc
837 --with-cxx=<compiler> enable C++ support
838 --with-suffix=.exe set executable suffix
839 --with-pydebug build with Py_DEBUG defined
840 --with-libs='lib1 ...' link against additional libs
841 --with-signal-module disable/enable signal module
842 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
843 --with(out)-threads=DIRECTORY disable/enable thread support
844 --with(out)-thread=DIRECTORY deprecated; use --with(out)-threads
845 --with-pth use GNU pth threading libraries
Jack Jansen7b8c7542002-04-14 20:12:41 +0000846 --with(out)-universal-newlines disable/enable foreign newlines
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +0000847 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 --with(out)-pymalloc disable/enable specialized mallocs
849 --with-wctype-functions use wctype.h functions
850 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
851 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking
852 --with-fpectl enable SIGFPE catching
853 --with-libm=STRING math library
854 --with-libc=STRING C library
855
856Some influential environment variables:
857 CC C compiler command
858 CFLAGS C compiler flags
859 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
860 nonstandard directory <lib dir>
861 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
862 headers in a nonstandard directory <include dir>
863 CPP C preprocessor
864
865Use these variables to override the choices made by `configure' or to help
866it to find libraries and programs with nonstandard names/locations.
867
868_ACEOF
869fi
870
871if test "$ac_init_help" = "recursive"; then
872 # If there are subdirs, report their specific --help.
873 ac_popdir=`pwd`
874 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
875 test -d $ac_dir || continue
876 ac_builddir=.
877
878if test "$ac_dir" != .; then
879 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
880 # A "../" for each directory in $ac_dir_suffix.
881 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
882else
883 ac_dir_suffix= ac_top_builddir=
884fi
885
886case $srcdir in
887 .) # No --srcdir option. We are building in place.
888 ac_srcdir=.
889 if test -z "$ac_top_builddir"; then
890 ac_top_srcdir=.
891 else
892 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
893 fi ;;
894 [\\/]* | ?:[\\/]* ) # Absolute path.
895 ac_srcdir=$srcdir$ac_dir_suffix;
896 ac_top_srcdir=$srcdir ;;
897 *) # Relative path.
898 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
899 ac_top_srcdir=$ac_top_builddir$srcdir ;;
900esac
901# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
902# absolute.
903ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisa5f09072002-10-11 05:37:59 +0000904ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000905ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
906ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
907
908 cd $ac_dir
909 # Check for guested configure; otherwise get Cygnus style configure.
910 if test -f $ac_srcdir/configure.gnu; then
911 echo
912 $SHELL $ac_srcdir/configure.gnu --help=recursive
913 elif test -f $ac_srcdir/configure; then
914 echo
915 $SHELL $ac_srcdir/configure --help=recursive
916 elif test -f $ac_srcdir/configure.ac ||
917 test -f $ac_srcdir/configure.in; then
918 echo
919 $ac_configure --help
920 else
921 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
922 fi
923 cd $ac_popdir
924 done
925fi
926
927test -n "$ac_init_help" && exit 0
928if $ac_init_version; then
929 cat <<\_ACEOF
930
931Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
932Free Software Foundation, Inc.
933This configure script is free software; the Free Software Foundation
934gives unlimited permission to copy, distribute and modify it.
935_ACEOF
936 exit 0
937fi
938exec 5>config.log
939cat >&5 <<_ACEOF
940This file contains any messages produced by compilers while
941running configure, to aid debugging if configure makes a mistake.
942
943It was created by $as_me, which was
944generated by GNU Autoconf 2.53. Invocation command line was
945
946 $ $0 $@
947
948_ACEOF
949{
950cat <<_ASUNAME
951## --------- ##
952## Platform. ##
953## --------- ##
954
955hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
956uname -m = `(uname -m) 2>/dev/null || echo unknown`
957uname -r = `(uname -r) 2>/dev/null || echo unknown`
958uname -s = `(uname -s) 2>/dev/null || echo unknown`
959uname -v = `(uname -v) 2>/dev/null || echo unknown`
960
961/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
962/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
963
964/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
965/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
966/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
967hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
968/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
969/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
970/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
971
972_ASUNAME
973
974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
975for as_dir in $PATH
976do
977 IFS=$as_save_IFS
978 test -z "$as_dir" && as_dir=.
979 echo "PATH: $as_dir"
980done
981
982} >&5
983
984cat >&5 <<_ACEOF
985
986
987## ----------- ##
988## Core tests. ##
989## ----------- ##
990
991_ACEOF
992
993
994# Keep a trace of the command line.
995# Strip out --no-create and --no-recursion so they do not pile up.
996# Also quote any args containing shell meta-characters.
997ac_configure_args=
998ac_sep=
999for ac_arg
1000do
1001 case $ac_arg in
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n ) continue ;;
1004 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1005 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1006 continue ;;
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1009 esac
1010 case " $ac_configure_args " in
1011 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1012 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1013 ac_sep=" " ;;
1014 esac
1015 # Get rid of the leading space.
1016done
1017
1018# When interrupted or exit'd, cleanup temporary files, and complete
1019# config.log. We remove comments because anyway the quotes in there
1020# would cause problems or look ugly.
1021# WARNING: Be sure not to use single quotes in there, as some shells,
1022# such as our DU 5.0 friend, will then `close' the trap.
1023trap 'exit_status=$?
1024 # Save into config.log some information that might help in debugging.
1025 {
1026 echo
1027 cat <<\_ASBOX
1028## ---------------- ##
1029## Cache variables. ##
1030## ---------------- ##
1031_ASBOX
1032 echo
1033 # The following way of writing the cache mishandles newlines in values,
1034{
1035 (set) 2>&1 |
1036 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1037 *ac_space=\ *)
1038 sed -n \
1039 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1040 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1041 ;;
1042 *)
1043 sed -n \
1044 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1045 ;;
1046 esac;
1047}
1048 echo
1049 if test -s confdefs.h; then
1050 cat <<\_ASBOX
1051## ----------- ##
1052## confdefs.h. ##
1053## ----------- ##
1054_ASBOX
1055 echo
1056 sed "/^$/d" confdefs.h
1057 echo
1058 fi
1059 test "$ac_signal" != 0 &&
1060 echo "$as_me: caught signal $ac_signal"
1061 echo "$as_me: exit $exit_status"
1062 } >&5
1063 rm -f core core.* *.core &&
1064 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1065 exit $exit_status
1066 ' 0
1067for ac_signal in 1 2 13 15; do
1068 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1069done
1070ac_signal=0
1071
1072# confdefs.h avoids OS command line length limits that DEFS can exceed.
1073rm -rf conftest* confdefs.h
1074# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1075echo >confdefs.h
1076
1077# Predefined preprocessor variables.
1078
1079cat >>confdefs.h <<_ACEOF
1080#define PACKAGE_NAME "$PACKAGE_NAME"
1081_ACEOF
1082
1083
1084cat >>confdefs.h <<_ACEOF
1085#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1086_ACEOF
1087
1088
1089cat >>confdefs.h <<_ACEOF
1090#define PACKAGE_VERSION "$PACKAGE_VERSION"
1091_ACEOF
1092
1093
1094cat >>confdefs.h <<_ACEOF
1095#define PACKAGE_STRING "$PACKAGE_STRING"
1096_ACEOF
1097
1098
1099cat >>confdefs.h <<_ACEOF
1100#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1101_ACEOF
1102
1103
1104# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Prefer explicitly selected file to automatically selected ones.
1106if test -z "$CONFIG_SITE"; then
1107 if test "x$prefix" != xNONE; then
1108 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1109 else
1110 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1111 fi
1112fi
1113for ac_site_file in $CONFIG_SITE; do
1114 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1116echo "$as_me: loading site script $ac_site_file" >&6;}
1117 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 . "$ac_site_file"
1119 fi
1120done
1121
1122if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # Some versions of bash will fail to source /dev/null (special
1124 # files actually), so we avoid doing that.
1125 if test -f "$cache_file"; then
1126 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1127echo "$as_me: loading cache $cache_file" >&6;}
1128 case $cache_file in
1129 [\\/]* | ?:[\\/]* ) . $cache_file;;
1130 *) . ./$cache_file;;
1131 esac
1132 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133else
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1135echo "$as_me: creating cache $cache_file" >&6;}
1136 >$cache_file
1137fi
1138
1139# Check that the precious variables saved in the cache have kept the same
1140# value.
1141ac_cache_corrupted=false
1142for ac_var in `(set) 2>&1 |
1143 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1144 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1145 eval ac_new_set=\$ac_env_${ac_var}_set
1146 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1147 eval ac_new_val="\$ac_env_${ac_var}_value"
1148 case $ac_old_set,$ac_new_set in
1149 set,)
1150 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1151echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1152 ac_cache_corrupted=: ;;
1153 ,set)
1154 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1155echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1156 ac_cache_corrupted=: ;;
1157 ,);;
1158 *)
1159 if test "x$ac_old_val" != "x$ac_new_val"; then
1160 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1161echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1162 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1163echo "$as_me: former value: $ac_old_val" >&2;}
1164 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1165echo "$as_me: current value: $ac_new_val" >&2;}
1166 ac_cache_corrupted=:
1167 fi;;
1168 esac
1169 # Pass precious variables to config.status.
1170 if test "$ac_new_set" = set; then
1171 case $ac_new_val in
1172 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1173 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1174 *) ac_arg=$ac_var=$ac_new_val ;;
1175 esac
1176 case " $ac_configure_args " in
1177 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1178 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1179 esac
1180 fi
1181done
1182if $ac_cache_corrupted; then
1183 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1184echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1185 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1186echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1187 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188fi
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1194ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195
Guido van Rossum627b2d71993-12-24 10:39:16 +00001196
Michael W. Hudson54241132001-12-07 15:38:26 +00001197
1198
Guido van Rossum627b2d71993-12-24 10:39:16 +00001199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213ac_config_headers="$ac_config_headers pyconfig.h"
1214
1215
1216# This is for stuff that absolutely must end up in pyconfig.h.
1217# Please use pyport.h instead, if possible.
1218
1219
1220
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001221# Set VERSION so we only need to edit in one place (i.e., here)
1222
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001223VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001224
Martin v. Löwis1142de32002-03-29 16:28:31 +00001225
1226SOVERSION=1.0
1227
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001228# The later defininition of _XOPEN_SOURCE disables certain features
1229# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1230
1231cat >>confdefs.h <<\_ACEOF
1232#define _GNU_SOURCE 1
1233_ACEOF
1234
1235
1236# The definition of _GNU_SOURCE potentially causes a change of the value
1237# of _XOPEN_SOURCE. So define it only conditionally.
1238
1239
1240cat >>confdefs.h <<\_ACEOF
1241#define _XOPEN_SOURCE 500
1242_ACEOF
1243
1244
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001245# Arguments passed to configure.
1246
1247CONFIG_ARGS="$ac_configure_args"
1248
Michael W. Hudson54241132001-12-07 15:38:26 +00001249
Jack Jansene578a632001-08-15 01:27:14 +00001250# Check whether --enable-framework or --disable-framework was given.
1251if test "${enable_framework+set}" = set; then
1252 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
Jack Jansene578a632001-08-15 01:27:14 +00001254 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001256 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001257 esac
1258 case $enableval in
1259 no)
1260 PYTHONFRAMEWORK=
1261 PYTHONFRAMEWORKDIR=no-framework
1262 PYTHONFRAMEWORKPREFIX=
1263 PYTHONFRAMEWORKINSTALLDIR=
1264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001265 ;;
1266 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001267 PYTHONFRAMEWORK=Python
1268 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001269 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001270 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1271 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001272 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Guido van Rossum563e7081996-09-10 18:20:48 +00001274else
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
Jack Jansene578a632001-08-15 01:27:14 +00001276 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001278 PYTHONFRAMEWORKPREFIX=
1279 PYTHONFRAMEWORKINSTALLDIR=
1280 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001283
1284
1285
1286
Jack Jansene578a632001-08-15 01:27:14 +00001287
1288##AC_ARG_WITH(dyld,
1289##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
1290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001291# Set name for machine-dependent library files
1292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293echo "$as_me:$LINENO: checking MACHDEP" >&5
1294echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001295if test -z "$MACHDEP"
1296then
Guido van Rossum563e7081996-09-10 18:20:48 +00001297 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001298 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001303 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001304 ac_md_system=`echo $ac_sys_system |
1305 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1306 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001307 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001308 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001309
Guido van Rossum07397971997-04-29 21:49:50 +00001310 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001311 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001312 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001313 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001314 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001315 esac
1316fi
Guido van Rossum91922671997-10-09 20:24:13 +00001317
1318#
1319# SGI compilers allow the specification of the both the ABI and the
1320# ISA on the command line. Depending on the values of these switches,
1321# different and often incompatable code will be generated.
1322#
1323# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1324# thus supply support for various ABI/ISA combinations. The MACHDEP
1325# variable is also adjusted.
1326#
1327
1328if test ! -z "$SGI_ABI"
1329then
1330 CC="cc $SGI_ABI"
1331 LDFLAGS="$SGI_ABI $LDFLAGS"
1332 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1333fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001334echo "$as_me:$LINENO: result: $MACHDEP" >&5
1335echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337# checks for alternative programs
Martin v. Löwis11437992002-04-12 09:54:03 +00001338echo "$as_me:$LINENO: checking for --without-gcc" >&5
1339echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001342if test "${with_gcc+set}" = set; then
1343 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001346 no) CC=cc
1347 without_gcc=yes;;
1348 yes) CC=gcc
1349 without_gcc=no;;
1350 *) CC=$withval
1351 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001353else
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001355 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001356 AIX*) CC=cc_r
1357 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001358 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001359 case $BE_HOST_CPU in
1360 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001361 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001362 without_gcc=yes
Mark Hammond8235ea12002-07-19 06:55:41 +00001363 OPT="-O -export pragma"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001364 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001365 ;;
1366 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001367 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001368 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +00001369 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001370 ;;
1371 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1373echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1374 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001375 ;;
1376 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001377 AR="\$(srcdir)/Modules/ar_beos"
1378 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001379 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001380 Monterey*)
1381 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001382 without_gcc=;;
1383 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001384 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001385fi;
1386echo "$as_me:$LINENO: result: $without_gcc" >&5
1387echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001388
1389
Guido van Rossum95012191999-12-16 17:50:52 +00001390
Fred Drakea1a84e72001-03-06 05:52:16 +00001391MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001392echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1393echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1394
Guido van Rossum95012191999-12-16 17:50:52 +00001395# Check whether --with-cxx or --without-cxx was given.
1396if test "${with_cxx+set}" = set; then
1397 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
Martin v. Löwis22352952000-12-13 17:37:02 +00001399 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001400 case $withval in
1401 no) CXX=
1402 with_cxx=no;;
1403 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001404 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001405 with_cxx=$withval;;
1406 esac
1407else
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
Guido van Rossum95012191999-12-16 17:50:52 +00001409 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001410 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001411
Martin v. Löwis11437992002-04-12 09:54:03 +00001412fi;
1413echo "$as_me:$LINENO: result: $with_cxx" >&5
1414echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001415
1416if test "$with_cxx" = "yes"
1417then
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1419echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1420 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001421fi
1422
1423
1424
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001427then
1428 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1429do
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 # 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 +00001431set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001432echo "$as_me:$LINENO: checking for $ac_word" >&5
1433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1434if test "${ac_cv_prog_CXX+set}" = set; then
1435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001436else
1437 if test -n "$CXX"; then
1438 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1439else
Martin v. Löwis11437992002-04-12 09:54:03 +00001440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1441for as_dir in $PATH
1442do
1443 IFS=$as_save_IFS
1444 test -z "$as_dir" && as_dir=.
1445 for ac_exec_ext in '' $ac_executable_extensions; do
1446 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1447 ac_cv_prog_CXX="$ac_prog"
1448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1449 break 2
1450 fi
1451done
1452done
1453
Martin v. Löwis22352952000-12-13 17:37:02 +00001454fi
1455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001456CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001457if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 echo "$as_me:$LINENO: result: $CXX" >&5
1459echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001460else
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 echo "$as_me:$LINENO: result: no" >&5
1462echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001463fi
1464
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001466done
1467test -n "$CXX" || CXX="notfound"
1468
1469 if test "$CXX" = "notfound"
1470 then
1471 CXX=
1472 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001474ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1478 cat >conftest.$ac_ext <<_ACEOF
1479#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001480#include "confdefs.h"
1481
Martin v. Löwis11437992002-04-12 09:54:03 +00001482#ifdef F77_DUMMY_MAIN
1483# ifdef __cplusplus
1484 extern "C"
1485# endif
1486 int F77_DUMMY_MAIN() { return 1; }
1487#endif
1488int
1489main ()
1490{
Michael W. Hudson54241132001-12-07 15:38:26 +00001491
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ;
1493 return 0;
1494}
1495_ACEOF
1496ac_clean_files_save=$ac_clean_files
1497ac_clean_files="$ac_clean_files a.out a.exe"
1498# Try to create an executable without -o first, disregard a.out.
1499# It will help us diagnose broken compilers, and finding out an intuition
1500# of exeext.
1501echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1502echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1503ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1504if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1505 (eval $ac_link_default) 2>&5
1506 ac_status=$?
1507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1508 (exit $ac_status); }; then
1509 # Find the output, starting from the most likely. This scheme is
1510# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1511# resort.
1512
1513# Be careful to initialize this variable, since it used to be cached.
1514# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1515ac_cv_exeext=
1516for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1517 ls a.out conftest 2>/dev/null;
1518 ls a.* conftest.* 2>/dev/null`; do
1519 case $ac_file in
1520 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
1521 a.out ) # We found the default executable, but exeext='' is most
1522 # certainly right.
1523 break;;
1524 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1525 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1526 export ac_cv_exeext
1527 break;;
1528 * ) break;;
1529 esac
1530done
1531else
1532 echo "$as_me: failed program was:" >&5
1533cat conftest.$ac_ext >&5
1534{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1535echo "$as_me: error: C++ compiler cannot create executables" >&2;}
1536 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
1539ac_exeext=$ac_cv_exeext
1540echo "$as_me:$LINENO: result: $ac_file" >&5
1541echo "${ECHO_T}$ac_file" >&6
1542
1543# Check the compiler produces executables we can run. If not, either
1544# the compiler is broken, or we cross compile.
1545echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1546echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1547# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1548# If not cross compiling, check that we can run a simple program.
1549if test "$cross_compiling" != yes; then
1550 if { ac_try='./$ac_file'
1551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1552 (eval $ac_try) 2>&5
1553 ac_status=$?
1554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1555 (exit $ac_status); }; }; then
1556 cross_compiling=no
1557 else
1558 if test "$cross_compiling" = maybe; then
1559 cross_compiling=yes
1560 else
1561 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1562If you meant to cross compile, use \`--host'." >&5
1563echo "$as_me: error: cannot run C++ compiled programs.
1564If you meant to cross compile, use \`--host'." >&2;}
1565 { (exit 1); exit 1; }; }
1566 fi
1567 fi
1568fi
1569echo "$as_me:$LINENO: result: yes" >&5
1570echo "${ECHO_T}yes" >&6
1571
1572rm -f a.out a.exe conftest$ac_cv_exeext
1573ac_clean_files=$ac_clean_files_save
1574# Check the compiler produces executables we can run. If not, either
1575# the compiler is broken, or we cross compile.
1576echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1577echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1578echo "$as_me:$LINENO: result: $cross_compiling" >&5
1579echo "${ECHO_T}$cross_compiling" >&6
1580
1581echo "$as_me:$LINENO: checking for suffix of executables" >&5
1582echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1583if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1584 (eval $ac_link) 2>&5
1585 ac_status=$?
1586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1587 (exit $ac_status); }; then
1588 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1589# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1590# work properly (i.e., refer to `conftest.exe'), while it won't with
1591# `rm'.
1592for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1593 case $ac_file in
1594 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1595 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1596 export ac_cv_exeext
1597 break;;
1598 * ) break;;
1599 esac
1600done
1601else
1602 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1603echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1604 { (exit 1); exit 1; }; }
1605fi
1606
1607rm -f conftest$ac_cv_exeext
1608echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1609echo "${ECHO_T}$ac_cv_exeext" >&6
1610
1611rm -f conftest.$ac_ext
1612EXEEXT=$ac_cv_exeext
1613ac_exeext=$EXEEXT
1614
1615 ac_ext=c
1616ac_cpp='$CPP $CPPFLAGS'
1617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1619ac_compiler_gnu=$ac_cv_c_compiler_gnu
1620
1621
Martin v. Löwis22352952000-12-13 17:37:02 +00001622
1623 fi
1624fi
1625
Guido van Rossum8b131c51995-03-09 14:10:13 +00001626# If the user switches compilers, we can't believe the cache
1627if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1628then
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1630(it is also a good idea to do 'make clean' before compiling)" >&5
1631echo "$as_me: error: cached CC is different -- throw away $cache_file
1632(it is also a good idea to do 'make clean' before compiling)" >&2;}
1633 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001634fi
1635
Martin v. Löwis11437992002-04-12 09:54:03 +00001636ac_ext=c
1637ac_cpp='$CPP $CPPFLAGS'
1638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1640ac_compiler_gnu=$ac_cv_c_compiler_gnu
1641if test -n "$ac_tool_prefix"; then
1642 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1643set dummy ${ac_tool_prefix}gcc; ac_word=$2
1644echo "$as_me:$LINENO: checking for $ac_word" >&5
1645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646if test "${ac_cv_prog_CC+set}" = set; then
1647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001648else
1649 if test -n "$CC"; then
1650 ac_cv_prog_CC="$CC" # Let the user override the test.
1651else
Martin v. Löwis11437992002-04-12 09:54:03 +00001652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1653for as_dir in $PATH
1654do
1655 IFS=$as_save_IFS
1656 test -z "$as_dir" && as_dir=.
1657 for ac_exec_ext in '' $ac_executable_extensions; do
1658 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1659 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1661 break 2
1662 fi
1663done
1664done
1665
Jack Jansendd19cf82001-12-06 22:36:17 +00001666fi
1667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001668CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001669if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 echo "$as_me:$LINENO: result: $CC" >&5
1671echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001672else
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 echo "$as_me:$LINENO: result: no" >&5
1674echo "${ECHO_T}no" >&6
1675fi
1676
1677fi
1678if test -z "$ac_cv_prog_CC"; then
1679 ac_ct_CC=$CC
1680 # Extract the first word of "gcc", so it can be a program name with args.
1681set dummy gcc; ac_word=$2
1682echo "$as_me:$LINENO: checking for $ac_word" >&5
1683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1684if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1685 echo $ECHO_N "(cached) $ECHO_C" >&6
1686else
1687 if test -n "$ac_ct_CC"; then
1688 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1689else
1690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1691for as_dir in $PATH
1692do
1693 IFS=$as_save_IFS
1694 test -z "$as_dir" && as_dir=.
1695 for ac_exec_ext in '' $ac_executable_extensions; do
1696 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1697 ac_cv_prog_ac_ct_CC="gcc"
1698 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1699 break 2
1700 fi
1701done
1702done
1703
1704fi
1705fi
1706ac_ct_CC=$ac_cv_prog_ac_ct_CC
1707if test -n "$ac_ct_CC"; then
1708 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1709echo "${ECHO_T}$ac_ct_CC" >&6
1710else
1711 echo "$as_me:$LINENO: result: no" >&5
1712echo "${ECHO_T}no" >&6
1713fi
1714
1715 CC=$ac_ct_CC
1716else
1717 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001718fi
1719
Jack Jansendd19cf82001-12-06 22:36:17 +00001720if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 if test -n "$ac_tool_prefix"; then
1722 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1723set dummy ${ac_tool_prefix}cc; ac_word=$2
1724echo "$as_me:$LINENO: checking for $ac_word" >&5
1725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1726if test "${ac_cv_prog_CC+set}" = set; then
1727 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001728else
1729 if test -n "$CC"; then
1730 ac_cv_prog_CC="$CC" # Let the user override the test.
1731else
Martin v. Löwis11437992002-04-12 09:54:03 +00001732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1733for as_dir in $PATH
1734do
1735 IFS=$as_save_IFS
1736 test -z "$as_dir" && as_dir=.
1737 for ac_exec_ext in '' $ac_executable_extensions; do
1738 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1739 ac_cv_prog_CC="${ac_tool_prefix}cc"
1740 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1741 break 2
1742 fi
1743done
1744done
1745
1746fi
1747fi
1748CC=$ac_cv_prog_CC
1749if test -n "$CC"; then
1750 echo "$as_me:$LINENO: result: $CC" >&5
1751echo "${ECHO_T}$CC" >&6
1752else
1753 echo "$as_me:$LINENO: result: no" >&5
1754echo "${ECHO_T}no" >&6
1755fi
1756
1757fi
1758if test -z "$ac_cv_prog_CC"; then
1759 ac_ct_CC=$CC
1760 # Extract the first word of "cc", so it can be a program name with args.
1761set dummy cc; ac_word=$2
1762echo "$as_me:$LINENO: checking for $ac_word" >&5
1763echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1764if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1765 echo $ECHO_N "(cached) $ECHO_C" >&6
1766else
1767 if test -n "$ac_ct_CC"; then
1768 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1769else
1770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1771for as_dir in $PATH
1772do
1773 IFS=$as_save_IFS
1774 test -z "$as_dir" && as_dir=.
1775 for ac_exec_ext in '' $ac_executable_extensions; do
1776 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1777 ac_cv_prog_ac_ct_CC="cc"
1778 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1779 break 2
1780 fi
1781done
1782done
1783
1784fi
1785fi
1786ac_ct_CC=$ac_cv_prog_ac_ct_CC
1787if test -n "$ac_ct_CC"; then
1788 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1789echo "${ECHO_T}$ac_ct_CC" >&6
1790else
1791 echo "$as_me:$LINENO: result: no" >&5
1792echo "${ECHO_T}no" >&6
1793fi
1794
1795 CC=$ac_ct_CC
1796else
1797 CC="$ac_cv_prog_CC"
1798fi
1799
1800fi
1801if test -z "$CC"; then
1802 # Extract the first word of "cc", so it can be a program name with args.
1803set dummy cc; ac_word=$2
1804echo "$as_me:$LINENO: checking for $ac_word" >&5
1805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1806if test "${ac_cv_prog_CC+set}" = set; then
1807 echo $ECHO_N "(cached) $ECHO_C" >&6
1808else
1809 if test -n "$CC"; then
1810 ac_cv_prog_CC="$CC" # Let the user override the test.
1811else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001812 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1814for as_dir in $PATH
1815do
1816 IFS=$as_save_IFS
1817 test -z "$as_dir" && as_dir=.
1818 for ac_exec_ext in '' $ac_executable_extensions; do
1819 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1820 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1821 ac_prog_rejected=yes
1822 continue
1823 fi
1824 ac_cv_prog_CC="cc"
1825 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1826 break 2
1827 fi
1828done
1829done
1830
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001831if test $ac_prog_rejected = yes; then
1832 # We found a bogon in the path, so make sure we never use it.
1833 set dummy $ac_cv_prog_CC
1834 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001835 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001836 # We chose a different compiler from the bogus one.
1837 # However, it has the same basename, so the bogon will be chosen
1838 # first if we set CC to just the basename; use the full file name.
1839 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 set dummy "$as_dir/$ac_word" ${1+"$@"}
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001841 shift
1842 ac_cv_prog_CC="$@"
1843 fi
1844fi
1845fi
1846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001847CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001848if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001849 echo "$as_me:$LINENO: result: $CC" >&5
1850echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001851else
Martin v. Löwis11437992002-04-12 09:54:03 +00001852 echo "$as_me:$LINENO: result: no" >&5
1853echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001854fi
1855
Martin v. Löwis11437992002-04-12 09:54:03 +00001856fi
1857if test -z "$CC"; then
1858 if test -n "$ac_tool_prefix"; then
1859 for ac_prog in cl
1860 do
1861 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1862set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1863echo "$as_me:$LINENO: checking for $ac_word" >&5
1864echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1865if test "${ac_cv_prog_CC+set}" = set; then
1866 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001867else
1868 if test -n "$CC"; then
1869 ac_cv_prog_CC="$CC" # Let the user override the test.
1870else
Martin v. Löwis11437992002-04-12 09:54:03 +00001871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1872for as_dir in $PATH
1873do
1874 IFS=$as_save_IFS
1875 test -z "$as_dir" && as_dir=.
1876 for ac_exec_ext in '' $ac_executable_extensions; do
1877 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1878 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1879 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1880 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001881 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001882done
1883done
1884
1885fi
1886fi
1887CC=$ac_cv_prog_CC
1888if test -n "$CC"; then
1889 echo "$as_me:$LINENO: result: $CC" >&5
1890echo "${ECHO_T}$CC" >&6
1891else
1892 echo "$as_me:$LINENO: result: no" >&5
1893echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001894fi
1895
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 test -n "$CC" && break
1897 done
1898fi
1899if test -z "$CC"; then
1900 ac_ct_CC=$CC
1901 for ac_prog in cl
1902do
1903 # Extract the first word of "$ac_prog", so it can be a program name with args.
1904set dummy $ac_prog; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="$ac_prog"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
1923 fi
1924done
1925done
Jack Jansendd19cf82001-12-06 22:36:17 +00001926
Martin v. Löwis11437992002-04-12 09:54:03 +00001927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001937
Martin v. Löwis11437992002-04-12 09:54:03 +00001938 test -n "$ac_ct_CC" && break
1939done
Michael W. Hudson54241132001-12-07 15:38:26 +00001940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 CC=$ac_ct_CC
1942fi
1943
1944fi
1945
1946
1947test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1948echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1949 { (exit 1); exit 1; }; }
1950
1951# Provide some information about the compiler.
1952echo "$as_me:$LINENO:" \
1953 "checking for C compiler version" >&5
1954ac_compiler=`set X $ac_compile; echo $2`
1955{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1956 (eval $ac_compiler --version </dev/null >&5) 2>&5
1957 ac_status=$?
1958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1959 (exit $ac_status); }
1960{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1961 (eval $ac_compiler -v </dev/null >&5) 2>&5
1962 ac_status=$?
1963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1964 (exit $ac_status); }
1965{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1966 (eval $ac_compiler -V </dev/null >&5) 2>&5
1967 ac_status=$?
1968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1969 (exit $ac_status); }
1970
1971cat >conftest.$ac_ext <<_ACEOF
1972#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001973#include "confdefs.h"
1974
Martin v. Löwis11437992002-04-12 09:54:03 +00001975#ifdef F77_DUMMY_MAIN
1976# ifdef __cplusplus
1977 extern "C"
1978# endif
1979 int F77_DUMMY_MAIN() { return 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001981int
1982main ()
1983{
1984
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989ac_clean_files_save=$ac_clean_files
1990ac_clean_files="$ac_clean_files a.out a.exe"
1991# Try to create an executable without -o first, disregard a.out.
1992# It will help us diagnose broken compilers, and finding out an intuition
1993# of exeext.
1994echo "$as_me:$LINENO: checking for C compiler default output" >&5
1995echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1996ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1997if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1998 (eval $ac_link_default) 2>&5
1999 ac_status=$?
2000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2001 (exit $ac_status); }; then
2002 # Find the output, starting from the most likely. This scheme is
2003# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2004# resort.
2005
2006# Be careful to initialize this variable, since it used to be cached.
2007# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2008ac_cv_exeext=
2009for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2010 ls a.out conftest 2>/dev/null;
2011 ls a.* conftest.* 2>/dev/null`; do
2012 case $ac_file in
2013 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2014 a.out ) # We found the default executable, but exeext='' is most
2015 # certainly right.
2016 break;;
2017 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2018 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2019 export ac_cv_exeext
2020 break;;
2021 * ) break;;
2022 esac
2023done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002024else
Martin v. Löwis11437992002-04-12 09:54:03 +00002025 echo "$as_me: failed program was:" >&5
2026cat conftest.$ac_ext >&5
2027{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2028echo "$as_me: error: C compiler cannot create executables" >&2;}
2029 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002030fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002031
Martin v. Löwis11437992002-04-12 09:54:03 +00002032ac_exeext=$ac_cv_exeext
2033echo "$as_me:$LINENO: result: $ac_file" >&5
2034echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
Martin v. Löwis11437992002-04-12 09:54:03 +00002036# Check the compiler produces executables we can run. If not, either
2037# the compiler is broken, or we cross compile.
2038echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2039echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2040# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2041# If not cross compiling, check that we can run a simple program.
2042if test "$cross_compiling" != yes; then
2043 if { ac_try='./$ac_file'
2044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2045 (eval $ac_try) 2>&5
2046 ac_status=$?
2047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2048 (exit $ac_status); }; }; then
2049 cross_compiling=no
2050 else
2051 if test "$cross_compiling" = maybe; then
2052 cross_compiling=yes
2053 else
2054 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2055If you meant to cross compile, use \`--host'." >&5
2056echo "$as_me: error: cannot run C compiled programs.
2057If you meant to cross compile, use \`--host'." >&2;}
2058 { (exit 1); exit 1; }; }
2059 fi
2060 fi
2061fi
2062echo "$as_me:$LINENO: result: yes" >&5
2063echo "${ECHO_T}yes" >&6
2064
2065rm -f a.out a.exe conftest$ac_cv_exeext
2066ac_clean_files=$ac_clean_files_save
2067# Check the compiler produces executables we can run. If not, either
2068# the compiler is broken, or we cross compile.
2069echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2070echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2071echo "$as_me:$LINENO: result: $cross_compiling" >&5
2072echo "${ECHO_T}$cross_compiling" >&6
2073
2074echo "$as_me:$LINENO: checking for suffix of executables" >&5
2075echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2077 (eval $ac_link) 2>&5
2078 ac_status=$?
2079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2080 (exit $ac_status); }; then
2081 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2082# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2083# work properly (i.e., refer to `conftest.exe'), while it won't with
2084# `rm'.
2085for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2086 case $ac_file in
2087 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2088 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2089 export ac_cv_exeext
2090 break;;
2091 * ) break;;
2092 esac
2093done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094else
Martin v. Löwis11437992002-04-12 09:54:03 +00002095 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2096echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2097 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002098fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002099
Martin v. Löwis11437992002-04-12 09:54:03 +00002100rm -f conftest$ac_cv_exeext
2101echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2102echo "${ECHO_T}$ac_cv_exeext" >&6
2103
2104rm -f conftest.$ac_ext
2105EXEEXT=$ac_cv_exeext
2106ac_exeext=$EXEEXT
2107echo "$as_me:$LINENO: checking for suffix of object files" >&5
2108echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2109if test "${ac_cv_objext+set}" = set; then
2110 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002111else
Martin v. Löwis11437992002-04-12 09:54:03 +00002112 cat >conftest.$ac_ext <<_ACEOF
2113#line $LINENO "configure"
2114#include "confdefs.h"
2115
2116#ifdef F77_DUMMY_MAIN
2117# ifdef __cplusplus
2118 extern "C"
2119# endif
2120 int F77_DUMMY_MAIN() { return 1; }
2121#endif
2122int
2123main ()
2124{
2125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130rm -f conftest.o conftest.obj
2131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2132 (eval $ac_compile) 2>&5
2133 ac_status=$?
2134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2135 (exit $ac_status); }; then
2136 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2137 case $ac_file in
2138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2139 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2140 break;;
2141 esac
2142done
2143else
2144 echo "$as_me: failed program was:" >&5
2145cat conftest.$ac_ext >&5
2146{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2147echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2148 { (exit 1); exit 1; }; }
2149fi
2150
2151rm -f conftest.$ac_cv_objext conftest.$ac_ext
2152fi
2153echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2154echo "${ECHO_T}$ac_cv_objext" >&6
2155OBJEXT=$ac_cv_objext
2156ac_objext=$OBJEXT
2157echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2158echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2159if test "${ac_cv_c_compiler_gnu+set}" = set; then
2160 echo $ECHO_N "(cached) $ECHO_C" >&6
2161else
2162 cat >conftest.$ac_ext <<_ACEOF
2163#line $LINENO "configure"
2164#include "confdefs.h"
2165
2166#ifdef F77_DUMMY_MAIN
2167# ifdef __cplusplus
2168 extern "C"
2169# endif
2170 int F77_DUMMY_MAIN() { return 1; }
2171#endif
2172int
2173main ()
2174{
2175#ifndef __GNUC__
2176 choke me
2177#endif
2178
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183rm -f conftest.$ac_objext
2184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2185 (eval $ac_compile) 2>&5
2186 ac_status=$?
2187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2188 (exit $ac_status); } &&
2189 { ac_try='test -s conftest.$ac_objext'
2190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2191 (eval $ac_try) 2>&5
2192 ac_status=$?
2193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2194 (exit $ac_status); }; }; then
2195 ac_compiler_gnu=yes
2196else
2197 echo "$as_me: failed program was:" >&5
2198cat conftest.$ac_ext >&5
2199ac_compiler_gnu=no
2200fi
2201rm -f conftest.$ac_objext conftest.$ac_ext
2202ac_cv_c_compiler_gnu=$ac_compiler_gnu
2203
2204fi
2205echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2206echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2207GCC=`test $ac_compiler_gnu = yes && echo yes`
2208ac_test_CFLAGS=${CFLAGS+set}
2209ac_save_CFLAGS=$CFLAGS
2210CFLAGS="-g"
2211echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2212echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2213if test "${ac_cv_prog_cc_g+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 cat >conftest.$ac_ext <<_ACEOF
2217#line $LINENO "configure"
2218#include "confdefs.h"
2219
2220#ifdef F77_DUMMY_MAIN
2221# ifdef __cplusplus
2222 extern "C"
2223# endif
2224 int F77_DUMMY_MAIN() { return 1; }
2225#endif
2226int
2227main ()
2228{
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234rm -f conftest.$ac_objext
2235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2236 (eval $ac_compile) 2>&5
2237 ac_status=$?
2238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239 (exit $ac_status); } &&
2240 { ac_try='test -s conftest.$ac_objext'
2241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2242 (eval $ac_try) 2>&5
2243 ac_status=$?
2244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247else
Martin v. Löwis11437992002-04-12 09:54:03 +00002248 echo "$as_me: failed program was:" >&5
2249cat conftest.$ac_ext >&5
2250ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002251fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002252rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002254echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2255echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002256if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002258elif test $ac_cv_prog_cc_g = yes; then
2259 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002260 CFLAGS="-g -O2"
2261 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002262 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263 fi
2264else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002265 if test "$GCC" = yes; then
2266 CFLAGS="-O2"
2267 else
2268 CFLAGS=
2269 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002271# Some people use a C++ compiler to compile C. Since we use `exit',
2272# in C++ we need to declare it. In case someone uses the same compiler
2273# for both compiling C and C++ we need to have the C++ compiler decide
2274# the declaration of exit, since it's the most demanding environment.
2275cat >conftest.$ac_ext <<_ACEOF
2276#ifndef __cplusplus
2277 choke me
2278#endif
2279_ACEOF
2280rm -f conftest.$ac_objext
2281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2282 (eval $ac_compile) 2>&5
2283 ac_status=$?
2284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2285 (exit $ac_status); } &&
2286 { ac_try='test -s conftest.$ac_objext'
2287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2288 (eval $ac_try) 2>&5
2289 ac_status=$?
2290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2291 (exit $ac_status); }; }; then
2292 for ac_declaration in \
2293 ''\
2294 '#include <stdlib.h>' \
2295 'extern "C" void std::exit (int) throw (); using std::exit;' \
2296 'extern "C" void std::exit (int); using std::exit;' \
2297 'extern "C" void exit (int) throw ();' \
2298 'extern "C" void exit (int);' \
2299 'void exit (int);'
2300do
2301 cat >conftest.$ac_ext <<_ACEOF
2302#line $LINENO "configure"
2303#include "confdefs.h"
2304#include <stdlib.h>
2305$ac_declaration
2306#ifdef F77_DUMMY_MAIN
2307# ifdef __cplusplus
2308 extern "C"
2309# endif
2310 int F77_DUMMY_MAIN() { return 1; }
2311#endif
2312int
2313main ()
2314{
2315exit (42);
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320rm -f conftest.$ac_objext
2321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2322 (eval $ac_compile) 2>&5
2323 ac_status=$?
2324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2325 (exit $ac_status); } &&
2326 { ac_try='test -s conftest.$ac_objext'
2327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); }; }; then
2332 :
2333else
2334 echo "$as_me: failed program was:" >&5
2335cat conftest.$ac_ext >&5
2336continue
2337fi
2338rm -f conftest.$ac_objext conftest.$ac_ext
2339 cat >conftest.$ac_ext <<_ACEOF
2340#line $LINENO "configure"
2341#include "confdefs.h"
2342$ac_declaration
2343#ifdef F77_DUMMY_MAIN
2344# ifdef __cplusplus
2345 extern "C"
2346# endif
2347 int F77_DUMMY_MAIN() { return 1; }
2348#endif
2349int
2350main ()
2351{
2352exit (42);
2353 ;
2354 return 0;
2355}
2356_ACEOF
2357rm -f conftest.$ac_objext
2358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2359 (eval $ac_compile) 2>&5
2360 ac_status=$?
2361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2362 (exit $ac_status); } &&
2363 { ac_try='test -s conftest.$ac_objext'
2364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2365 (eval $ac_try) 2>&5
2366 ac_status=$?
2367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2368 (exit $ac_status); }; }; then
2369 break
2370else
2371 echo "$as_me: failed program was:" >&5
2372cat conftest.$ac_ext >&5
2373fi
2374rm -f conftest.$ac_objext conftest.$ac_ext
2375done
2376rm -f conftest*
2377if test -n "$ac_declaration"; then
2378 echo '#ifdef __cplusplus' >>confdefs.h
2379 echo $ac_declaration >>confdefs.h
2380 echo '#endif' >>confdefs.h
2381fi
2382
2383else
2384 echo "$as_me: failed program was:" >&5
2385cat conftest.$ac_ext >&5
2386fi
2387rm -f conftest.$ac_objext conftest.$ac_ext
2388ac_ext=c
2389ac_cpp='$CPP $CPPFLAGS'
2390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2392ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002394
2395# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002396
2397ac_ext=c
2398ac_cpp='$CPP $CPPFLAGS'
2399ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2403echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002404# On Suns, sometimes $CPP names a directory.
2405if test -n "$CPP" && test -d "$CPP"; then
2406 CPP=
2407fi
2408if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 if test "${ac_cv_prog_CPP+set}" = set; then
2410 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002411else
Martin v. Löwis11437992002-04-12 09:54:03 +00002412 # Double quotes because CPP needs to be expanded
2413 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2414 do
2415 ac_preproc_ok=false
2416for ac_c_preproc_warn_flag in '' yes
2417do
2418 # Use a header file that comes with gcc, so configuring glibc
2419 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002420 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002421 # not just through cpp. "Syntax error" is here to catch this case.
2422 cat >conftest.$ac_ext <<_ACEOF
2423#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002424#include "confdefs.h"
2425#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002426 Syntax error
2427_ACEOF
2428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2430 ac_status=$?
2431 egrep -v '^ *\+' conftest.er1 >conftest.err
2432 rm -f conftest.er1
2433 cat conftest.err >&5
2434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435 (exit $ac_status); } >/dev/null; then
2436 if test -s conftest.err; then
2437 ac_cpp_err=$ac_c_preproc_warn_flag
2438 else
2439 ac_cpp_err=
2440 fi
2441else
2442 ac_cpp_err=yes
2443fi
2444if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002445 :
2446else
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002448 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 # Broken: fails on valid input.
2450continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002452rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 # OK, works on sane cases. Now check whether non-existent headers
2455 # can be detected and how.
2456 cat >conftest.$ac_ext <<_ACEOF
2457#line $LINENO "configure"
2458#include "confdefs.h"
2459#include <ac_nonexistent.h>
2460_ACEOF
2461if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2462 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2463 ac_status=$?
2464 egrep -v '^ *\+' conftest.er1 >conftest.err
2465 rm -f conftest.er1
2466 cat conftest.err >&5
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); } >/dev/null; then
2469 if test -s conftest.err; then
2470 ac_cpp_err=$ac_c_preproc_warn_flag
2471 else
2472 ac_cpp_err=
2473 fi
2474else
2475 ac_cpp_err=yes
2476fi
2477if test -z "$ac_cpp_err"; then
2478 # Broken: success on invalid input.
2479continue
2480else
2481 echo "$as_me: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 # Passes both tests.
2484ac_preproc_ok=:
2485break
2486fi
2487rm -f conftest.err conftest.$ac_ext
2488
2489done
2490# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2491rm -f conftest.err conftest.$ac_ext
2492if $ac_preproc_ok; then
2493 break
2494fi
2495
2496 done
2497 ac_cv_prog_CPP=$CPP
2498
2499fi
2500 CPP=$ac_cv_prog_CPP
2501else
2502 ac_cv_prog_CPP=$CPP
2503fi
2504echo "$as_me:$LINENO: result: $CPP" >&5
2505echo "${ECHO_T}$CPP" >&6
2506ac_preproc_ok=false
2507for ac_c_preproc_warn_flag in '' yes
2508do
2509 # Use a header file that comes with gcc, so configuring glibc
2510 # with a fresh cross-compiler works.
2511 # On the NeXT, cc -E runs the code through the compiler's parser,
2512 # not just through cpp. "Syntax error" is here to catch this case.
2513 cat >conftest.$ac_ext <<_ACEOF
2514#line $LINENO "configure"
2515#include "confdefs.h"
2516#include <assert.h>
2517 Syntax error
2518_ACEOF
2519if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2520 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2521 ac_status=$?
2522 egrep -v '^ *\+' conftest.er1 >conftest.err
2523 rm -f conftest.er1
2524 cat conftest.err >&5
2525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2526 (exit $ac_status); } >/dev/null; then
2527 if test -s conftest.err; then
2528 ac_cpp_err=$ac_c_preproc_warn_flag
2529 else
2530 ac_cpp_err=
2531 fi
2532else
2533 ac_cpp_err=yes
2534fi
2535if test -z "$ac_cpp_err"; then
2536 :
2537else
2538 echo "$as_me: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 # Broken: fails on valid input.
2541continue
2542fi
2543rm -f conftest.err conftest.$ac_ext
2544
2545 # OK, works on sane cases. Now check whether non-existent headers
2546 # can be detected and how.
2547 cat >conftest.$ac_ext <<_ACEOF
2548#line $LINENO "configure"
2549#include "confdefs.h"
2550#include <ac_nonexistent.h>
2551_ACEOF
2552if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2553 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2554 ac_status=$?
2555 egrep -v '^ *\+' conftest.er1 >conftest.err
2556 rm -f conftest.er1
2557 cat conftest.err >&5
2558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2559 (exit $ac_status); } >/dev/null; then
2560 if test -s conftest.err; then
2561 ac_cpp_err=$ac_c_preproc_warn_flag
2562 else
2563 ac_cpp_err=
2564 fi
2565else
2566 ac_cpp_err=yes
2567fi
2568if test -z "$ac_cpp_err"; then
2569 # Broken: success on invalid input.
2570continue
2571else
2572 echo "$as_me: failed program was:" >&5
2573 cat conftest.$ac_ext >&5
2574 # Passes both tests.
2575ac_preproc_ok=:
2576break
2577fi
2578rm -f conftest.err conftest.$ac_ext
2579
2580done
2581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2582rm -f conftest.err conftest.$ac_ext
2583if $ac_preproc_ok; then
2584 :
2585else
2586 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2587echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2588 { (exit 1); exit 1; }; }
2589fi
2590
2591ac_ext=c
2592ac_cpp='$CPP $CPPFLAGS'
2593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2595ac_compiler_gnu=$ac_cv_c_compiler_gnu
2596
2597
2598
2599echo "$as_me:$LINENO: checking for AIX" >&5
2600echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2601cat >conftest.$ac_ext <<_ACEOF
2602#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002603#include "confdefs.h"
2604#ifdef _AIX
2605 yes
2606#endif
2607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2610 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 echo "$as_me:$LINENO: result: yes" >&5
2612echo "${ECHO_T}yes" >&6
2613cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002614#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002615_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616
2617else
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo "$as_me:$LINENO: result: no" >&5
2619echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002620fi
2621rm -f conftest*
2622
Michael W. Hudson54241132001-12-07 15:38:26 +00002623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2625echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2626if test "${ac_cv_header_stdc+set}" = set; then
2627 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002628else
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 cat >conftest.$ac_ext <<_ACEOF
2630#line $LINENO "configure"
2631#include "confdefs.h"
2632#include <stdlib.h>
2633#include <stdarg.h>
2634#include <string.h>
2635#include <float.h>
2636
2637_ACEOF
2638if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2639 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2640 ac_status=$?
2641 egrep -v '^ *\+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } >/dev/null; then
2646 if test -s conftest.err; then
2647 ac_cpp_err=$ac_c_preproc_warn_flag
2648 else
2649 ac_cpp_err=
2650 fi
2651else
2652 ac_cpp_err=yes
2653fi
2654if test -z "$ac_cpp_err"; then
2655 ac_cv_header_stdc=yes
2656else
2657 echo "$as_me: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 ac_cv_header_stdc=no
2660fi
2661rm -f conftest.err conftest.$ac_ext
2662
2663if test $ac_cv_header_stdc = yes; then
2664 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2665 cat >conftest.$ac_ext <<_ACEOF
2666#line $LINENO "configure"
2667#include "confdefs.h"
2668#include <string.h>
2669
2670_ACEOF
2671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2672 egrep "memchr" >/dev/null 2>&1; then
2673 :
2674else
2675 ac_cv_header_stdc=no
2676fi
2677rm -f conftest*
2678
2679fi
2680
2681if test $ac_cv_header_stdc = yes; then
2682 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2683 cat >conftest.$ac_ext <<_ACEOF
2684#line $LINENO "configure"
2685#include "confdefs.h"
2686#include <stdlib.h>
2687
2688_ACEOF
2689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2690 egrep "free" >/dev/null 2>&1; then
2691 :
2692else
2693 ac_cv_header_stdc=no
2694fi
2695rm -f conftest*
2696
2697fi
2698
2699if test $ac_cv_header_stdc = yes; then
2700 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2701 if test "$cross_compiling" = yes; then
2702 :
2703else
2704 cat >conftest.$ac_ext <<_ACEOF
2705#line $LINENO "configure"
2706#include "confdefs.h"
2707#include <ctype.h>
2708#if ((' ' & 0x0FF) == 0x020)
2709# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2710# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2711#else
2712# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2713 || ('j' <= (c) && (c) <= 'r') \
2714 || ('s' <= (c) && (c) <= 'z'))
2715# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2716#endif
2717
2718#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2719int
2720main ()
2721{
2722 int i;
2723 for (i = 0; i < 256; i++)
2724 if (XOR (islower (i), ISLOWER (i))
2725 || toupper (i) != TOUPPER (i))
2726 exit(2);
2727 exit (0);
2728}
2729_ACEOF
2730rm -f conftest$ac_exeext
2731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2732 (eval $ac_link) 2>&5
2733 ac_status=$?
2734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2737 (eval $ac_try) 2>&5
2738 ac_status=$?
2739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2740 (exit $ac_status); }; }; then
2741 :
2742else
2743 echo "$as_me: program exited with status $ac_status" >&5
2744echo "$as_me: failed program was:" >&5
2745cat conftest.$ac_ext >&5
2746( exit $ac_status )
2747ac_cv_header_stdc=no
2748fi
2749rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
2750fi
2751fi
2752fi
2753echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2754echo "${ECHO_T}$ac_cv_header_stdc" >&6
2755if test $ac_cv_header_stdc = yes; then
2756
2757cat >>confdefs.h <<\_ACEOF
2758#define STDC_HEADERS 1
2759_ACEOF
2760
2761fi
2762
2763# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2774 inttypes.h stdint.h unistd.h
2775do
2776as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2777echo "$as_me:$LINENO: checking for $ac_header" >&5
2778echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2779if eval "test \"\${$as_ac_Header+set}\" = set"; then
2780 echo $ECHO_N "(cached) $ECHO_C" >&6
2781else
2782 cat >conftest.$ac_ext <<_ACEOF
2783#line $LINENO "configure"
2784#include "confdefs.h"
2785$ac_includes_default
2786
2787#include <$ac_header>
2788_ACEOF
2789rm -f conftest.$ac_objext
2790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2791 (eval $ac_compile) 2>&5
2792 ac_status=$?
2793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2794 (exit $ac_status); } &&
2795 { ac_try='test -s conftest.$ac_objext'
2796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2797 (eval $ac_try) 2>&5
2798 ac_status=$?
2799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2800 (exit $ac_status); }; }; then
2801 eval "$as_ac_Header=yes"
2802else
2803 echo "$as_me: failed program was:" >&5
2804cat conftest.$ac_ext >&5
2805eval "$as_ac_Header=no"
2806fi
2807rm -f conftest.$ac_objext conftest.$ac_ext
2808fi
2809echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2810echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2811if test `eval echo '${'$as_ac_Header'}'` = yes; then
2812 cat >>confdefs.h <<_ACEOF
2813#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2814_ACEOF
2815
2816fi
2817
2818done
2819
2820
2821if test "${ac_cv_header_minix_config_h+set}" = set; then
2822 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2823echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2824if test "${ac_cv_header_minix_config_h+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
2826fi
2827echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2828echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2829else
2830 # Is the header compilable?
2831echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2832echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2833cat >conftest.$ac_ext <<_ACEOF
2834#line $LINENO "configure"
2835#include "confdefs.h"
2836$ac_includes_default
2837#include <minix/config.h>
2838_ACEOF
2839rm -f conftest.$ac_objext
2840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2841 (eval $ac_compile) 2>&5
2842 ac_status=$?
2843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2844 (exit $ac_status); } &&
2845 { ac_try='test -s conftest.$ac_objext'
2846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2847 (eval $ac_try) 2>&5
2848 ac_status=$?
2849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2850 (exit $ac_status); }; }; then
2851 ac_header_compiler=yes
2852else
2853 echo "$as_me: failed program was:" >&5
2854cat conftest.$ac_ext >&5
2855ac_header_compiler=no
2856fi
2857rm -f conftest.$ac_objext conftest.$ac_ext
2858echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2859echo "${ECHO_T}$ac_header_compiler" >&6
2860
2861# Is the header present?
2862echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2863echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2864cat >conftest.$ac_ext <<_ACEOF
2865#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002866#include "confdefs.h"
2867#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002868_ACEOF
2869if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2870 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2871 ac_status=$?
2872 egrep -v '^ *\+' conftest.er1 >conftest.err
2873 rm -f conftest.er1
2874 cat conftest.err >&5
2875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2876 (exit $ac_status); } >/dev/null; then
2877 if test -s conftest.err; then
2878 ac_cpp_err=$ac_c_preproc_warn_flag
2879 else
2880 ac_cpp_err=
2881 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002882else
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 ac_cpp_err=yes
2884fi
2885if test -z "$ac_cpp_err"; then
2886 ac_header_preproc=yes
2887else
2888 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002889 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002892rm -f conftest.err conftest.$ac_ext
2893echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2894echo "${ECHO_T}$ac_header_preproc" >&6
2895
2896# So? What about this header?
2897case $ac_header_compiler:$ac_header_preproc in
2898 yes:no )
2899 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
2900echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
2901 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2902echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2903 no:yes )
2904 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
2905echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
2906 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
2907echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
2908 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
2909echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
2910esac
2911echo "$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
2915else
2916 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002918echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2919echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2920
2921fi
2922if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923 MINIX=yes
2924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002926fi
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002929if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
2931cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002933_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002934
Martin v. Löwis11437992002-04-12 09:54:03 +00002935
2936cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002937#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002938_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
2941cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002942#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002943_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002944
2945fi
2946
2947
Michael W. Hudson54241132001-12-07 15:38:26 +00002948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949echo "$as_me:$LINENO: checking for --with-suffix" >&5
2950echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002952# Check whether --with-suffix or --without-suffix was given.
2953if test "${with_suffix+set}" = set; then
2954 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00002956 case $withval in
2957 no) EXEEXT=;;
2958 yes) EXEEXT=.exe;;
2959 *) EXEEXT=$withval;;
2960 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002961fi;
2962echo "$as_me:$LINENO: result: $EXEEXT" >&5
2963echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002964
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002965# Test whether we're running on a non-case-sensitive system, in which
2966# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00002967
Martin v. Löwis11437992002-04-12 09:54:03 +00002968echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
2969echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen0b06be72002-06-21 14:48:38 +00002970if test -d "${srcdir}/python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002971then
Martin v. Löwis11437992002-04-12 09:54:03 +00002972 echo "$as_me:$LINENO: result: yes" >&5
2973echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00002974 BUILDEXEEXT=.exe
2975else
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 echo "$as_me:$LINENO: result: no" >&5
2977echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002978 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002979fi
Guido van Rossumff555e32000-09-22 15:38:21 +00002980
Guido van Rossumdd997f71998-10-07 19:58:26 +00002981case $MACHDEP in
2982bsdos*)
2983 case $CC in
2984 gcc) CC="$CC -D_HAVE_BSDI";;
2985 esac;;
2986esac
2987
Guido van Rossum24b1e751997-08-21 02:29:16 +00002988case $ac_sys_system in
2989hp*|HP*)
2990 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00002991 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00002992 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002993Monterey*)
2994 case $CC in
2995 cc) CC="$CC -Wl,-Bexport";;
2996 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00002997SunOS*)
2998 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
3000cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003001#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003002_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003003
3004 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003005esac
3006
Michael W. Hudson54241132001-12-07 15:38:26 +00003007
3008
Martin v. Löwis11437992002-04-12 09:54:03 +00003009echo "$as_me:$LINENO: checking LIBRARY" >&5
3010echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003011if test -z "$LIBRARY"
3012then
3013 LIBRARY='libpython$(VERSION).a'
3014fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003015echo "$as_me:$LINENO: result: $LIBRARY" >&5
3016echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003017
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003018# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003019# name of the library into which to insert object files). BLDLIBRARY is also
3020# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3021# is blank as the main program is not linked directly against LDLIBRARY.
3022# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3023# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3024# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3025# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003026#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003027# RUNSHARED is used to run shared python without installed libraries
3028#
3029# INSTSONAME is the name of the shared library that will be use to install
3030# on the system - some systems like version suffix, others don't
3031
3032
Michael W. Hudson54241132001-12-07 15:38:26 +00003033
3034
3035
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003036
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003037LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003038BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003039INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003040DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003041LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003042RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003043
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003044# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003045# If CXX is set, and if it is needed to link a main function that was
3046# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3047# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003048# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003049# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003050
Martin v. Löwis11437992002-04-12 09:54:03 +00003051echo "$as_me:$LINENO: checking LINKCC" >&5
3052echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003053if test -z "$LINKCC"
3054then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003055 if test -z "$CXX"; then
3056 LINKCC="\$(PURIFY) \$(CC)"
3057 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003058 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003059 $CXX -c conftest.$ac_ext 2>&5
3060 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3061 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3062 then
3063 LINKCC="\$(PURIFY) \$(CC)"
3064 else
3065 LINKCC="\$(PURIFY) \$(CXX)"
3066 fi
3067 rm -fr conftest*
3068 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003069 case $ac_sys_system in
3070 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003071 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003072 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003073 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003074 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003075 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003076 esac
3077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003078echo "$as_me:$LINENO: result: $LINKCC" >&5
3079echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081echo "$as_me:$LINENO: checking for --enable-shared" >&5
3082echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003083# Check whether --enable-shared or --disable-shared was given.
3084if test "${enable_shared+set}" = set; then
3085 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003086
Martin v. Löwis11437992002-04-12 09:54:03 +00003087fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088
3089if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003090then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003091 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003092 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003093 enable_shared="yes";;
3094 *)
3095 enable_shared="no";;
3096 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003098echo "$as_me:$LINENO: result: $enable_shared" >&5
3099echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003100
3101
Martin v. Löwis11437992002-04-12 09:54:03 +00003102echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3103echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003104
Guido van Rossumb8552162001-09-05 14:58:11 +00003105# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3106# library that we build, but we do not want to link against it (we
3107# will find it with a -framework option). For this reason there is an
3108# extra variable BLDLIBRARY against which Python and the extension
3109# modules are linked, BLDLIBRARY. This is normally the same as
3110# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003111if test "$enable_framework"
3112then
3113 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3114 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3115 BLDLIBRARY=''
3116else
3117 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003118fi
Jack Jansene578a632001-08-15 01:27:14 +00003119
Martin v. Löwis1142de32002-03-29 16:28:31 +00003120# Other platforms follow
3121if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003122
3123cat >>confdefs.h <<\_ACEOF
3124#define Py_ENABLE_SHARED 1
3125_ACEOF
3126
Martin v. Löwis1142de32002-03-29 16:28:31 +00003127 case $ac_sys_system in
3128 BeOS*)
3129 LDLIBRARY='libpython$(VERSION).so'
3130 ;;
3131 CYGWIN*)
3132 LDLIBRARY='libpython$(VERSION).dll.a'
3133 DLLLIBRARY='libpython$(VERSION).dll'
3134 ;;
3135 SunOS*)
3136 LDLIBRARY='libpython$(VERSION).so'
3137 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3139 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003140 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003141 LDLIBRARY='libpython$(VERSION).so'
3142 BLDLIBRARY='-L. -lpython$(VERSION)'
3143 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3144 INSTSONAME="$LDLIBRARY".$SOVERSION
3145 ;;
3146 hp*|HP*)
3147 LDLIBRARY='libpython$(VERSION).sl'
3148 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3149 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3150 ;;
3151 OSF*)
3152 LDLIBRARY='libpython$(VERSION).so'
3153 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3154 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3155 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003156 atheos*)
3157 LDLIBRARY='libpython$(VERSION).so'
3158 BLDLIBRARY='-L. -lpython$(VERSION)'
3159 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3160 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003161 esac
3162 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3163 case $MACHDEP in
3164 dguxR4)
3165 LDLIBRARY='libpython$(VERSION).so'
3166 OPT="$OPT -pic"
3167 ;;
3168 esac
3169fi
3170
Martin v. Löwis11437992002-04-12 09:54:03 +00003171echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3172echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173
Martin v. Löwis11437992002-04-12 09:54:03 +00003174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3177echo "$as_me:$LINENO: checking for $ac_word" >&5
3178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3179if test "${ac_cv_prog_RANLIB+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181else
3182 if test -n "$RANLIB"; then
3183 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
3190 for ac_exec_ext in '' $ac_executable_extensions; do
3191 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3192 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3193 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3194 break 2
3195 fi
3196done
3197done
3198
Guido van Rossum627b2d71993-12-24 10:39:16 +00003199fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003201RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003203 echo "$as_me:$LINENO: result: $RANLIB" >&5
3204echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206 echo "$as_me:$LINENO: result: no" >&5
3207echo "${ECHO_T}no" >&6
3208fi
3209
3210fi
3211if test -z "$ac_cv_prog_RANLIB"; then
3212 ac_ct_RANLIB=$RANLIB
3213 # Extract the first word of "ranlib", so it can be a program name with args.
3214set dummy ranlib; ac_word=$2
3215echo "$as_me:$LINENO: checking for $ac_word" >&5
3216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
3219else
3220 if test -n "$ac_ct_RANLIB"; then
3221 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3222else
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
3228 for ac_exec_ext in '' $ac_executable_extensions; do
3229 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3230 ac_cv_prog_ac_ct_RANLIB="ranlib"
3231 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3232 break 2
3233 fi
3234done
3235done
3236
3237 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3238fi
3239fi
3240ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3241if test -n "$ac_ct_RANLIB"; then
3242 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3243echo "${ECHO_T}$ac_ct_RANLIB" >&6
3244else
3245 echo "$as_me:$LINENO: result: no" >&5
3246echo "${ECHO_T}no" >&6
3247fi
3248
3249 RANLIB=$ac_ct_RANLIB
3250else
3251 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
3254
Guido van Rossum7f43da71994-08-01 12:15:30 +00003255for ac_prog in ar aal
3256do
Martin v. Löwis11437992002-04-12 09:54:03 +00003257 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003259echo "$as_me:$LINENO: checking for $ac_word" >&5
3260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3261if test "${ac_cv_prog_AR+set}" = set; then
3262 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263else
3264 if test -n "$AR"; then
3265 ac_cv_prog_AR="$AR" # Let the user override the test.
3266else
Martin v. Löwis11437992002-04-12 09:54:03 +00003267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
3272 for ac_exec_ext in '' $ac_executable_extensions; do
3273 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274 ac_cv_prog_AR="$ac_prog"
3275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3276 break 2
3277 fi
3278done
3279done
3280
Guido van Rossum7f43da71994-08-01 12:15:30 +00003281fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003285 echo "$as_me:$LINENO: result: $AR" >&5
3286echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287else
Martin v. Löwis11437992002-04-12 09:54:03 +00003288 echo "$as_me:$LINENO: result: no" >&5
3289echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003291
Martin v. Löwis11437992002-04-12 09:54:03 +00003292 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003293done
3294test -n "$AR" || AR="ar"
3295
Michael W. Hudson54241132001-12-07 15:38:26 +00003296
Neil Schemenauera42c8272001-03-31 00:01:55 +00003297case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003298bsdos*|hp*|HP*)
3299 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003300 if test -z "$INSTALL"
3301 then
3302 INSTALL="${srcdir}/install-sh -c"
3303 fi
3304esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003305ac_aux_dir=
3306for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3307 if test -f $ac_dir/install-sh; then
3308 ac_aux_dir=$ac_dir
3309 ac_install_sh="$ac_aux_dir/install-sh -c"
3310 break
3311 elif test -f $ac_dir/install.sh; then
3312 ac_aux_dir=$ac_dir
3313 ac_install_sh="$ac_aux_dir/install.sh -c"
3314 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 elif test -f $ac_dir/shtool; then
3316 ac_aux_dir=$ac_dir
3317 ac_install_sh="$ac_aux_dir/shtool install -c"
3318 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003319 fi
3320done
3321if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003322 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3323echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3324 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003325fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003326ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3327ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3328ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003329
3330# Find a good install program. We prefer a C program (faster),
3331# so one script is as good as another. But avoid the broken or
3332# incompatible versions:
3333# SysV /etc/install, /usr/sbin/install
3334# SunOS /usr/etc/install
3335# IRIX /sbin/install
3336# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003337# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003338# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3339# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3340# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3341# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003342echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3343echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003344if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003345if test "${ac_cv_path_install+set}" = set; then
3346 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003347else
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3349for as_dir in $PATH
3350do
3351 IFS=$as_save_IFS
3352 test -z "$as_dir" && as_dir=.
3353 # Account for people who put trailing slashes in PATH elements.
3354case $as_dir/ in
3355 ./ | .// | /cC/* | \
3356 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3357 /usr/ucb/* ) ;;
3358 *)
3359 # OSF1 and SCO ODT 3.0 have their own names for install.
3360 # Don't use installbsd from OSF since it installs stuff as root
3361 # by default.
3362 for ac_prog in ginstall scoinst install; do
3363 for ac_exec_ext in '' $ac_executable_extensions; do
3364 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3365 if test $ac_prog = install &&
3366 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3367 # AIX install. It has an incompatible calling convention.
3368 :
3369 elif test $ac_prog = install &&
3370 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3371 # program-specific install script used by HP pwplus--don't use.
3372 :
3373 else
3374 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3375 break 3
3376 fi
3377 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003378 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 done
3380 ;;
3381esac
3382done
3383
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003384
3385fi
3386 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003388 else
3389 # As a last resort, use the slow shell script. We don't cache a
3390 # path for INSTALL within a source directory, because that will
3391 # break other packages using the cache if that directory is
3392 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003394 fi
3395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003396echo "$as_me:$LINENO: result: $INSTALL" >&5
3397echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003398
3399# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3400# It thinks the first close brace ends the variable substitution.
3401test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3402
Martin v. Löwis11437992002-04-12 09:54:03 +00003403test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003404
3405test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3406
Michael W. Hudson54241132001-12-07 15:38:26 +00003407
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003408# Not every filesystem supports hard links
3409
3410if test -z "$LN" ; then
3411 case $ac_sys_system in
3412 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003413 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003414 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003415 *) LN=ln;;
3416 esac
3417fi
3418
Fred Drake109d9862001-07-11 06:27:56 +00003419# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003420echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3421echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3422
Fred Drake109d9862001-07-11 06:27:56 +00003423# Check whether --with-pydebug or --without-pydebug was given.
3424if test "${with_pydebug+set}" = set; then
3425 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003426
Fred Drake109d9862001-07-11 06:27:56 +00003427if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003428then
3429
3430cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003431#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003432_ACEOF
3433
3434 echo "$as_me:$LINENO: result: yes" >&5
3435echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003436 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003437else echo "$as_me:$LINENO: result: no" >&5
3438echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003439fi
3440else
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 echo "$as_me:$LINENO: result: no" >&5
3442echo "${ECHO_T}no" >&6
3443fi;
Fred Drake109d9862001-07-11 06:27:56 +00003444
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003446
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003447if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448then
Neal Norwitzd957f392002-09-25 21:26:19 +00003449 case $GCC in
Guido van Rossumedca74a1997-07-18 23:29:40 +00003450 yes)
3451 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003452 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003453 if test "$Py_DEBUG" = 'true' ; then
3454 # Optimization messes up debuggers, so turn it off for
3455 # debug builds.
3456 OPT="-g -Wall -Wstrict-prototypes"
3457 else
3458 OPT="-g -O3 -Wall -Wstrict-prototypes"
3459 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003460 *)
Fred Drake109d9862001-07-11 06:27:56 +00003461 OPT="-O3 -Wall -Wstrict-prototypes";;
3462 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003463 case $ac_sys_system in
3464 SCO_SV*) OPT="$OPT -m486 -DSCO5";;
3465 esac
Fred Drake109d9862001-07-11 06:27:56 +00003466 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003467 *)
3468 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003469 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003470 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003471 SCO_SV*)
3472 CFLAGS="$CFLAGS -belf"
3473 OPT="-belf -O -Ki486 -DSCO5";;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003474 *)
3475 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003476 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003477 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00003478 case $ac_sys_system in
3479 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00003480 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00003481 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003482fi
3483
Fred Drakee1ceaa02001-12-04 20:55:47 +00003484if test "$Py_DEBUG" = 'true'; then
3485 :
3486else
3487 OPT="-DNDEBUG $OPT"
3488fi
3489
Trent Mick635f6fb2000-08-23 21:33:05 +00003490# The current (beta) Monterey compiler dies with optimizations
3491case $ac_sys_system in
3492Monterey*) OPT="";;
3493esac
3494
Guido van Rossum563e7081996-09-10 18:20:48 +00003495if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003496then
3497 OPT="$OPT $ac_arch_flags"
3498fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3501echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3502if test "${ac_cv_opt_olimit_ok+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003504else
3505 ac_save_cc="$CC"
3506CC="$CC -OPT:Olimit=0"
3507if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003508 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003509else
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 cat >conftest.$ac_ext <<_ACEOF
3511#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003512#include "confdefs.h"
3513int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003514_ACEOF
3515rm -f conftest$ac_exeext
3516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3517 (eval $ac_link) 2>&5
3518 ac_status=$?
3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3522 (eval $ac_try) 2>&5
3523 ac_status=$?
3524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3525 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003526 ac_cv_opt_olimit_ok=yes
3527else
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 echo "$as_me: program exited with status $ac_status" >&5
3529echo "$as_me: failed program was:" >&5
3530cat conftest.$ac_ext >&5
3531( exit $ac_status )
3532ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003533fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003534rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003535fi
Guido van Rossum91922671997-10-09 20:24:13 +00003536CC="$ac_save_cc"
3537fi
3538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3540echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003541if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003542 case $ac_sys_system in
3543 Darwin*) OPT="$OPT" ;;
3544 *) OPT="$OPT -OPT:Olimit=0";;
3545 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3548echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3549 if test "${ac_cv_olimit_ok+set}" = set; then
3550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003551else
3552 ac_save_cc="$CC"
3553 CC="$CC -Olimit 1500"
3554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003555 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003556else
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 cat >conftest.$ac_ext <<_ACEOF
3558#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003559#include "confdefs.h"
3560int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
3562rm -f conftest$ac_exeext
3563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3564 (eval $ac_link) 2>&5
3565 ac_status=$?
3566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3567 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3569 (eval $ac_try) 2>&5
3570 ac_status=$?
3571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3572 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003573 ac_cv_olimit_ok=yes
3574else
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 echo "$as_me: program exited with status $ac_status" >&5
3576echo "$as_me: failed program was:" >&5
3577cat conftest.$ac_ext >&5
3578( exit $ac_status )
3579ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003581rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003582fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003583 CC="$ac_save_cc"
3584fi
3585
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3587echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003588 if test $ac_cv_olimit_ok = yes; then
3589 OPT="$OPT -Olimit 1500"
3590 fi
3591fi
3592
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003593# On some compilers, pthreads are available without further options
3594# (e.g. MacOS X). On some of these systems, the compiler will not
3595# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3596# So we have to see first whether pthreads are available without
3597# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3599echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3600if test "${ac_cv_pthread_is_default+set}" = set; then
3601 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003602else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003603 if test "$cross_compiling" = yes; then
3604 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 cat >conftest.$ac_ext <<_ACEOF
3607#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003608#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003609
Martin v. Löwis130fb172001-07-19 11:00:41 +00003610#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003611
3612void* routine(void* p){return NULL;}
3613
3614int main(){
3615 pthread_t p;
3616 if(pthread_create(&p,NULL,routine,NULL)!=0)
3617 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003618 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003619 return 0;
3620}
3621
Martin v. Löwis11437992002-04-12 09:54:03 +00003622_ACEOF
3623rm -f conftest$ac_exeext
3624if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3625 (eval $ac_link) 2>&5
3626 ac_status=$?
3627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3628 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3630 (eval $ac_try) 2>&5
3631 ac_status=$?
3632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3633 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003634 ac_cv_pthread_is_default=yes
3635else
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 echo "$as_me: program exited with status $ac_status" >&5
3637echo "$as_me: failed program was:" >&5
3638cat conftest.$ac_ext >&5
3639( exit $ac_status )
3640ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003643fi
3644
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003645fi
3646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3648echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649
Michael W. Hudson54241132001-12-07 15:38:26 +00003650
Martin v. Löwis11437992002-04-12 09:54:03 +00003651if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652then
3653 ac_cv_kpthread=no
3654else
3655# -Kpthread, if available, provides the right #defines
3656# and linker options to make pthread_create available
3657# Some compilers won't report that they do not support -Kpthread,
3658# so we need to run a program to see whether it really made the
3659# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003660echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3661echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3662if test "${ac_cv_kpthread+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664else
3665 ac_save_cc="$CC"
3666CC="$CC -Kpthread"
3667if test "$cross_compiling" = yes; then
3668 ac_cv_kpthread=no
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 cat >conftest.$ac_ext <<_ACEOF
3671#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003672#include "confdefs.h"
3673
3674#include <pthread.h>
3675
3676void* routine(void* p){return NULL;}
3677
3678int main(){
3679 pthread_t p;
3680 if(pthread_create(&p,NULL,routine,NULL)!=0)
3681 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003682 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003683 return 0;
3684}
3685
Martin v. Löwis11437992002-04-12 09:54:03 +00003686_ACEOF
3687rm -f conftest$ac_exeext
3688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3689 (eval $ac_link) 2>&5
3690 ac_status=$?
3691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3694 (eval $ac_try) 2>&5
3695 ac_status=$?
3696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3697 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698 ac_cv_kpthread=yes
3699else
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 echo "$as_me: program exited with status $ac_status" >&5
3701echo "$as_me: failed program was:" >&5
3702cat conftest.$ac_ext >&5
3703( exit $ac_status )
3704ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003707fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003708CC="$ac_save_cc"
3709fi
3710
Martin v. Löwis11437992002-04-12 09:54:03 +00003711echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3712echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003713fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003714
Michael W. Hudson54241132001-12-07 15:38:26 +00003715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003717echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3718echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3719if test "${ac_cv_header_stdc+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 cat >conftest.$ac_ext <<_ACEOF
3723#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003724#include "confdefs.h"
3725#include <stdlib.h>
3726#include <stdarg.h>
3727#include <string.h>
3728#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
3730_ACEOF
3731if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3732 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3733 ac_status=$?
3734 egrep -v '^ *\+' conftest.er1 >conftest.err
3735 rm -f conftest.er1
3736 cat conftest.err >&5
3737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); } >/dev/null; then
3739 if test -s conftest.err; then
3740 ac_cpp_err=$ac_c_preproc_warn_flag
3741 else
3742 ac_cpp_err=
3743 fi
3744else
3745 ac_cpp_err=yes
3746fi
3747if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003748 ac_cv_header_stdc=yes
3749else
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003752 ac_cv_header_stdc=no
3753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755
3756if test $ac_cv_header_stdc = yes; then
3757 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 cat >conftest.$ac_ext <<_ACEOF
3759#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003760#include "confdefs.h"
3761#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
3763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3765 egrep "memchr" >/dev/null 2>&1; then
3766 :
3767else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768 ac_cv_header_stdc=no
3769fi
3770rm -f conftest*
3771
3772fi
3773
3774if test $ac_cv_header_stdc = yes; then
3775 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 cat >conftest.$ac_ext <<_ACEOF
3777#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778#include "confdefs.h"
3779#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003780
3781_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3783 egrep "free" >/dev/null 2>&1; then
3784 :
3785else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003786 ac_cv_header_stdc=no
3787fi
3788rm -f conftest*
3789
3790fi
3791
3792if test $ac_cv_header_stdc = yes; then
3793 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796else
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 cat >conftest.$ac_ext <<_ACEOF
3798#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003799#include "confdefs.h"
3800#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003801#if ((' ' & 0x0FF) == 0x020)
3802# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3803# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3804#else
3805# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
3806 || ('j' <= (c) && (c) <= 'r') \
3807 || ('s' <= (c) && (c) <= 'z'))
3808# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3809#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3812int
3813main ()
3814{
3815 int i;
3816 for (i = 0; i < 256; i++)
3817 if (XOR (islower (i), ISLOWER (i))
3818 || toupper (i) != TOUPPER (i))
3819 exit(2);
3820 exit (0);
3821}
3822_ACEOF
3823rm -f conftest$ac_exeext
3824if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3825 (eval $ac_link) 2>&5
3826 ac_status=$?
3827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3830 (eval $ac_try) 2>&5
3831 ac_status=$?
3832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3833 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834 :
3835else
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 echo "$as_me: program exited with status $ac_status" >&5
3837echo "$as_me: failed program was:" >&5
3838cat conftest.$ac_ext >&5
3839( exit $ac_status )
3840ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00003841fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003842rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00003843fi
3844fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3847echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003848if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
3850cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003853
3854fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003894libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00003895signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00003896sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003897sys/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 +00003898sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00003899sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900do
Martin v. Löwis11437992002-04-12 09:54:03 +00003901as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3902if eval "test \"\${$as_ac_Header+set}\" = set"; then
3903 echo "$as_me:$LINENO: checking for $ac_header" >&5
3904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3905if eval "test \"\${$as_ac_Header+set}\" = set"; then
3906 echo $ECHO_N "(cached) $ECHO_C" >&6
3907fi
3908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003910else
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 # Is the header compilable?
3912echo "$as_me:$LINENO: checking $ac_header usability" >&5
3913echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3914cat >conftest.$ac_ext <<_ACEOF
3915#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00003917$ac_includes_default
3918#include <$ac_header>
3919_ACEOF
3920rm -f conftest.$ac_objext
3921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3922 (eval $ac_compile) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); } &&
3926 { ac_try='test -s conftest.$ac_objext'
3927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3928 (eval $ac_try) 2>&5
3929 ac_status=$?
3930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); }; }; then
3932 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003933else
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 echo "$as_me: failed program was:" >&5
3935cat conftest.$ac_ext >&5
3936ac_header_compiler=no
3937fi
3938rm -f conftest.$ac_objext conftest.$ac_ext
3939echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3940echo "${ECHO_T}$ac_header_compiler" >&6
3941
3942# Is the header present?
3943echo "$as_me:$LINENO: checking $ac_header presence" >&5
3944echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3945cat >conftest.$ac_ext <<_ACEOF
3946#line $LINENO "configure"
3947#include "confdefs.h"
3948#include <$ac_header>
3949_ACEOF
3950if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3951 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3952 ac_status=$?
3953 egrep -v '^ *\+' conftest.er1 >conftest.err
3954 rm -f conftest.er1
3955 cat conftest.err >&5
3956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3957 (exit $ac_status); } >/dev/null; then
3958 if test -s conftest.err; then
3959 ac_cpp_err=$ac_c_preproc_warn_flag
3960 else
3961 ac_cpp_err=
3962 fi
3963else
3964 ac_cpp_err=yes
3965fi
3966if test -z "$ac_cpp_err"; then
3967 ac_header_preproc=yes
3968else
3969 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003970 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003973rm -f conftest.err conftest.$ac_ext
3974echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3975echo "${ECHO_T}$ac_header_preproc" >&6
3976
3977# So? What about this header?
3978case $ac_header_compiler:$ac_header_preproc in
3979 yes:no )
3980 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3981echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3982 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3983echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3984 no:yes )
3985 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3986echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3987 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3988echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3989 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3990echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
3991esac
3992echo "$as_me:$LINENO: checking for $ac_header" >&5
3993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3994if eval "test \"\${$as_ac_Header+set}\" = set"; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4000echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4001
4002fi
4003if test `eval echo '${'$as_ac_Header'}'` = yes; then
4004 cat >>confdefs.h <<_ACEOF
4005#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4006_ACEOF
4007
4008fi
4009
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010done
4011
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013
4014
4015
4016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004018for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4019 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4020echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4021echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4022if eval "test \"\${$as_ac_Header+set}\" = set"; then
4023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004024else
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 cat >conftest.$ac_ext <<_ACEOF
4026#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027#include "confdefs.h"
4028#include <sys/types.h>
4029#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004030
4031#ifdef F77_DUMMY_MAIN
4032# ifdef __cplusplus
4033 extern "C"
4034# endif
4035 int F77_DUMMY_MAIN() { return 1; }
4036#endif
4037int
4038main ()
4039{
4040if ((DIR *) 0)
4041return 0;
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046rm -f conftest.$ac_objext
4047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4048 (eval $ac_compile) 2>&5
4049 ac_status=$?
4050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051 (exit $ac_status); } &&
4052 { ac_try='test -s conftest.$ac_objext'
4053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4054 (eval $ac_try) 2>&5
4055 ac_status=$?
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4057 (exit $ac_status); }; }; then
4058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004059else
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 echo "$as_me: failed program was:" >&5
4061cat conftest.$ac_ext >&5
4062eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004064rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004066echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4067echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4068if test `eval echo '${'$as_ac_Header'}'` = yes; then
4069 cat >>confdefs.h <<_ACEOF
4070#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4071_ACEOF
4072
4073ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076done
4077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4078if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4080echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4081if test "${ac_cv_search_opendir+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_func_search_save_LIBS=$LIBS
4085ac_cv_search_opendir=no
4086cat >conftest.$ac_ext <<_ACEOF
4087#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004090/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004091#ifdef __cplusplus
4092extern "C"
4093#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004094/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004095 builtin and then its argument prototype would still apply. */
4096char opendir ();
4097#ifdef F77_DUMMY_MAIN
4098# ifdef __cplusplus
4099 extern "C"
4100# endif
4101 int F77_DUMMY_MAIN() { return 1; }
4102#endif
4103int
4104main ()
4105{
4106opendir ();
4107 ;
4108 return 0;
4109}
4110_ACEOF
4111rm -f conftest.$ac_objext conftest$ac_exeext
4112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4113 (eval $ac_link) 2>&5
4114 ac_status=$?
4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4116 (exit $ac_status); } &&
4117 { ac_try='test -s conftest$ac_exeext'
4118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4119 (eval $ac_try) 2>&5
4120 ac_status=$?
4121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4122 (exit $ac_status); }; }; then
4123 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124else
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 echo "$as_me: failed program was:" >&5
4126cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004127fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004128rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4129if test "$ac_cv_search_opendir" = no; then
4130 for ac_lib in dir; do
4131 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4132 cat >conftest.$ac_ext <<_ACEOF
4133#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137#ifdef __cplusplus
4138extern "C"
4139#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004140/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 builtin and then its argument prototype would still apply. */
4142char opendir ();
4143#ifdef F77_DUMMY_MAIN
4144# ifdef __cplusplus
4145 extern "C"
4146# endif
4147 int F77_DUMMY_MAIN() { return 1; }
4148#endif
4149int
4150main ()
4151{
4152opendir ();
4153 ;
4154 return 0;
4155}
4156_ACEOF
4157rm -f conftest.$ac_objext conftest$ac_exeext
4158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4159 (eval $ac_link) 2>&5
4160 ac_status=$?
4161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4162 (exit $ac_status); } &&
4163 { ac_try='test -s conftest$ac_exeext'
4164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4165 (eval $ac_try) 2>&5
4166 ac_status=$?
4167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4168 (exit $ac_status); }; }; then
4169 ac_cv_search_opendir="-l$ac_lib"
4170break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 echo "$as_me: failed program was:" >&5
4173cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4176 done
4177fi
4178LIBS=$ac_func_search_save_LIBS
4179fi
4180echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4181echo "${ECHO_T}$ac_cv_search_opendir" >&6
4182if test "$ac_cv_search_opendir" != no; then
4183 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186
Michael W. Hudson54241132001-12-07 15:38:26 +00004187else
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4189echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4190if test "${ac_cv_search_opendir+set}" = set; then
4191 echo $ECHO_N "(cached) $ECHO_C" >&6
4192else
4193 ac_func_search_save_LIBS=$LIBS
4194ac_cv_search_opendir=no
4195cat >conftest.$ac_ext <<_ACEOF
4196#line $LINENO "configure"
4197#include "confdefs.h"
4198
4199/* Override any gcc2 internal prototype to avoid an error. */
4200#ifdef __cplusplus
4201extern "C"
4202#endif
4203/* We use char because int might match the return type of a gcc2
4204 builtin and then its argument prototype would still apply. */
4205char opendir ();
4206#ifdef F77_DUMMY_MAIN
4207# ifdef __cplusplus
4208 extern "C"
4209# endif
4210 int F77_DUMMY_MAIN() { return 1; }
4211#endif
4212int
4213main ()
4214{
4215opendir ();
4216 ;
4217 return 0;
4218}
4219_ACEOF
4220rm -f conftest.$ac_objext conftest$ac_exeext
4221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4222 (eval $ac_link) 2>&5
4223 ac_status=$?
4224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4225 (exit $ac_status); } &&
4226 { ac_try='test -s conftest$ac_exeext'
4227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4228 (eval $ac_try) 2>&5
4229 ac_status=$?
4230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4231 (exit $ac_status); }; }; then
4232 ac_cv_search_opendir="none required"
4233else
4234 echo "$as_me: failed program was:" >&5
4235cat conftest.$ac_ext >&5
4236fi
4237rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4238if test "$ac_cv_search_opendir" = no; then
4239 for ac_lib in x; do
4240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4241 cat >conftest.$ac_ext <<_ACEOF
4242#line $LINENO "configure"
4243#include "confdefs.h"
4244
4245/* Override any gcc2 internal prototype to avoid an error. */
4246#ifdef __cplusplus
4247extern "C"
4248#endif
4249/* We use char because int might match the return type of a gcc2
4250 builtin and then its argument prototype would still apply. */
4251char opendir ();
4252#ifdef F77_DUMMY_MAIN
4253# ifdef __cplusplus
4254 extern "C"
4255# endif
4256 int F77_DUMMY_MAIN() { return 1; }
4257#endif
4258int
4259main ()
4260{
4261opendir ();
4262 ;
4263 return 0;
4264}
4265_ACEOF
4266rm -f conftest.$ac_objext conftest$ac_exeext
4267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4268 (eval $ac_link) 2>&5
4269 ac_status=$?
4270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271 (exit $ac_status); } &&
4272 { ac_try='test -s conftest$ac_exeext'
4273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274 (eval $ac_try) 2>&5
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); }; }; then
4278 ac_cv_search_opendir="-l$ac_lib"
4279break
4280else
4281 echo "$as_me: failed program was:" >&5
4282cat conftest.$ac_ext >&5
4283fi
4284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4285 done
4286fi
4287LIBS=$ac_func_search_save_LIBS
4288fi
4289echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4290echo "${ECHO_T}$ac_cv_search_opendir" >&6
4291if test "$ac_cv_search_opendir" != no; then
4292 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294fi
4295
4296fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004298echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4299echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4300if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4301 echo $ECHO_N "(cached) $ECHO_C" >&6
4302else
4303 cat >conftest.$ac_ext <<_ACEOF
4304#line $LINENO "configure"
4305#include "confdefs.h"
4306#include <sys/types.h>
4307#ifdef F77_DUMMY_MAIN
4308# ifdef __cplusplus
4309 extern "C"
4310# endif
4311 int F77_DUMMY_MAIN() { return 1; }
4312#endif
4313int
4314main ()
4315{
4316return makedev(0, 0);
4317 ;
4318 return 0;
4319}
4320_ACEOF
4321rm -f conftest.$ac_objext conftest$ac_exeext
4322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4323 (eval $ac_link) 2>&5
4324 ac_status=$?
4325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4326 (exit $ac_status); } &&
4327 { ac_try='test -s conftest$ac_exeext'
4328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4329 (eval $ac_try) 2>&5
4330 ac_status=$?
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332 (exit $ac_status); }; }; then
4333 ac_cv_header_sys_types_h_makedev=yes
4334else
4335 echo "$as_me: failed program was:" >&5
4336cat conftest.$ac_ext >&5
4337ac_cv_header_sys_types_h_makedev=no
4338fi
4339rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4340
4341fi
4342echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4343echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4344
4345if test $ac_cv_header_sys_types_h_makedev = no; then
4346if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4347 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4348echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4349if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4350 echo $ECHO_N "(cached) $ECHO_C" >&6
4351fi
4352echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4353echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4354else
4355 # Is the header compilable?
4356echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4357echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4358cat >conftest.$ac_ext <<_ACEOF
4359#line $LINENO "configure"
4360#include "confdefs.h"
4361$ac_includes_default
4362#include <sys/mkdev.h>
4363_ACEOF
4364rm -f conftest.$ac_objext
4365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4366 (eval $ac_compile) 2>&5
4367 ac_status=$?
4368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4369 (exit $ac_status); } &&
4370 { ac_try='test -s conftest.$ac_objext'
4371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4372 (eval $ac_try) 2>&5
4373 ac_status=$?
4374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4375 (exit $ac_status); }; }; then
4376 ac_header_compiler=yes
4377else
4378 echo "$as_me: failed program was:" >&5
4379cat conftest.$ac_ext >&5
4380ac_header_compiler=no
4381fi
4382rm -f conftest.$ac_objext conftest.$ac_ext
4383echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4384echo "${ECHO_T}$ac_header_compiler" >&6
4385
4386# Is the header present?
4387echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4388echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4389cat >conftest.$ac_ext <<_ACEOF
4390#line $LINENO "configure"
4391#include "confdefs.h"
4392#include <sys/mkdev.h>
4393_ACEOF
4394if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4395 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4396 ac_status=$?
4397 egrep -v '^ *\+' conftest.er1 >conftest.err
4398 rm -f conftest.er1
4399 cat conftest.err >&5
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); } >/dev/null; then
4402 if test -s conftest.err; then
4403 ac_cpp_err=$ac_c_preproc_warn_flag
4404 else
4405 ac_cpp_err=
4406 fi
4407else
4408 ac_cpp_err=yes
4409fi
4410if test -z "$ac_cpp_err"; then
4411 ac_header_preproc=yes
4412else
4413 echo "$as_me: failed program was:" >&5
4414 cat conftest.$ac_ext >&5
4415 ac_header_preproc=no
4416fi
4417rm -f conftest.err conftest.$ac_ext
4418echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4419echo "${ECHO_T}$ac_header_preproc" >&6
4420
4421# So? What about this header?
4422case $ac_header_compiler:$ac_header_preproc in
4423 yes:no )
4424 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4425echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4426 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4427echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4428 no:yes )
4429 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4430echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4431 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4432echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4433 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4434echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4435esac
4436echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4437echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4438if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4439 echo $ECHO_N "(cached) $ECHO_C" >&6
4440else
4441 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4442fi
4443echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4444echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4445
4446fi
4447if test $ac_cv_header_sys_mkdev_h = yes; then
4448
4449cat >>confdefs.h <<\_ACEOF
4450#define MAJOR_IN_MKDEV 1
4451_ACEOF
4452
4453fi
4454
4455
4456
4457 if test $ac_cv_header_sys_mkdev_h = no; then
4458 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4459 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4460echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4461if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4462 echo $ECHO_N "(cached) $ECHO_C" >&6
4463fi
4464echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4465echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4466else
4467 # Is the header compilable?
4468echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4469echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4470cat >conftest.$ac_ext <<_ACEOF
4471#line $LINENO "configure"
4472#include "confdefs.h"
4473$ac_includes_default
4474#include <sys/sysmacros.h>
4475_ACEOF
4476rm -f conftest.$ac_objext
4477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4478 (eval $ac_compile) 2>&5
4479 ac_status=$?
4480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481 (exit $ac_status); } &&
4482 { ac_try='test -s conftest.$ac_objext'
4483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4484 (eval $ac_try) 2>&5
4485 ac_status=$?
4486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4487 (exit $ac_status); }; }; then
4488 ac_header_compiler=yes
4489else
4490 echo "$as_me: failed program was:" >&5
4491cat conftest.$ac_ext >&5
4492ac_header_compiler=no
4493fi
4494rm -f conftest.$ac_objext conftest.$ac_ext
4495echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4496echo "${ECHO_T}$ac_header_compiler" >&6
4497
4498# Is the header present?
4499echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4500echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4501cat >conftest.$ac_ext <<_ACEOF
4502#line $LINENO "configure"
4503#include "confdefs.h"
4504#include <sys/sysmacros.h>
4505_ACEOF
4506if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4507 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4508 ac_status=$?
4509 egrep -v '^ *\+' conftest.er1 >conftest.err
4510 rm -f conftest.er1
4511 cat conftest.err >&5
4512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4513 (exit $ac_status); } >/dev/null; then
4514 if test -s conftest.err; then
4515 ac_cpp_err=$ac_c_preproc_warn_flag
4516 else
4517 ac_cpp_err=
4518 fi
4519else
4520 ac_cpp_err=yes
4521fi
4522if test -z "$ac_cpp_err"; then
4523 ac_header_preproc=yes
4524else
4525 echo "$as_me: failed program was:" >&5
4526 cat conftest.$ac_ext >&5
4527 ac_header_preproc=no
4528fi
4529rm -f conftest.err conftest.$ac_ext
4530echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4531echo "${ECHO_T}$ac_header_preproc" >&6
4532
4533# So? What about this header?
4534case $ac_header_compiler:$ac_header_preproc in
4535 yes:no )
4536 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4537echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4538 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4539echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4540 no:yes )
4541 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4542echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4543 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4544echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4545 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4546echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4547esac
4548echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4549echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4550if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
4552else
4553 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4554fi
4555echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4556echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4557
4558fi
4559if test $ac_cv_header_sys_sysmacros_h = yes; then
4560
4561cat >>confdefs.h <<\_ACEOF
4562#define MAJOR_IN_SYSMACROS 1
4563_ACEOF
4564
4565fi
4566
4567
4568 fi
4569fi
4570
Michael W. Hudson54241132001-12-07 15:38:26 +00004571
Guido van Rossum627b2d71993-12-24 10:39:16 +00004572# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004573was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004574echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4575echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4576cat >conftest.$ac_ext <<_ACEOF
4577#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004578#include "confdefs.h"
4579#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004580
4581_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4583 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004584 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585else
Martin v. Löwis11437992002-04-12 09:54:03 +00004586
4587
4588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004590_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004592
Guido van Rossum627b2d71993-12-24 10:39:16 +00004593fi
4594rm -f conftest*
4595
Martin v. Löwis11437992002-04-12 09:54:03 +00004596echo "$as_me:$LINENO: result: $was_it_defined" >&5
4597echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004598
Neal Norwitz11690112002-07-30 01:08:28 +00004599# Check whether using makedev requires defining _OSF_SOURCE
4600echo "$as_me:$LINENO: checking for makedev" >&5
4601echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4602cat >conftest.$ac_ext <<_ACEOF
4603#line $LINENO "configure"
4604#include "confdefs.h"
4605 #include <sys/types.h>
4606#ifdef F77_DUMMY_MAIN
4607# ifdef __cplusplus
4608 extern "C"
4609# endif
4610 int F77_DUMMY_MAIN() { return 1; }
4611#endif
4612int
4613main ()
4614{
4615 makedev(0, 0)
4616 ;
4617 return 0;
4618}
4619_ACEOF
4620rm -f conftest.$ac_objext conftest$ac_exeext
4621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4622 (eval $ac_link) 2>&5
4623 ac_status=$?
4624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4625 (exit $ac_status); } &&
4626 { ac_try='test -s conftest$ac_exeext'
4627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4628 (eval $ac_try) 2>&5
4629 ac_status=$?
4630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4631 (exit $ac_status); }; }; then
4632 ac_cv_has_makedev=yes
4633else
4634 echo "$as_me: failed program was:" >&5
4635cat conftest.$ac_ext >&5
4636ac_cv_has_makedev=no
4637fi
4638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4639if test "$ac_cv_has_makedev" = "no"; then
4640 # we didn't link, try if _OSF_SOURCE will allow us to link
4641 cat >conftest.$ac_ext <<_ACEOF
4642#line $LINENO "configure"
4643#include "confdefs.h"
4644
4645 #define _OSF_SOURCE 1
4646 #include <sys/types.h>
4647
4648#ifdef F77_DUMMY_MAIN
4649# ifdef __cplusplus
4650 extern "C"
4651# endif
4652 int F77_DUMMY_MAIN() { return 1; }
4653#endif
4654int
4655main ()
4656{
4657 makedev(0, 0)
4658 ;
4659 return 0;
4660}
4661_ACEOF
4662rm -f conftest.$ac_objext conftest$ac_exeext
4663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4664 (eval $ac_link) 2>&5
4665 ac_status=$?
4666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4667 (exit $ac_status); } &&
4668 { ac_try='test -s conftest$ac_exeext'
4669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4670 (eval $ac_try) 2>&5
4671 ac_status=$?
4672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4673 (exit $ac_status); }; }; then
4674 ac_cv_has_makedev=yes
4675else
4676 echo "$as_me: failed program was:" >&5
4677cat conftest.$ac_ext >&5
4678ac_cv_has_makedev=no
4679fi
4680rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4681 if test "$ac_cv_has_makedev" = "yes"; then
4682
4683cat >>confdefs.h <<\_ACEOF
4684#define _OSF_SOURCE 1
4685_ACEOF
4686
4687 fi
4688fi
4689echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4690echo "${ECHO_T}$ac_cv_has_makedev" >&6
4691if test "$ac_cv_has_makedev" = "yes"; then
4692
4693cat >>confdefs.h <<\_ACEOF
4694#define HAVE_MAKEDEV 1
4695_ACEOF
4696
4697fi
4698
Martin v. Löwis399a6892002-10-04 10:22:02 +00004699# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4700# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4701# defined, but the compiler does not support pragma redefine_extname,
4702# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4703# structures (such as rlimit64) without declaring them. As a
4704# work-around, disable LFS on such configurations
4705
4706use_lfs=yes
4707echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4708echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4709cat >conftest.$ac_ext <<_ACEOF
4710#line $LINENO "configure"
4711#include "confdefs.h"
4712
4713#define _LARGEFILE_SOURCE 1
4714#define _FILE_OFFSET_BITS 64
4715#include <sys/resource.h>
4716
4717#ifdef F77_DUMMY_MAIN
4718# ifdef __cplusplus
4719 extern "C"
4720# endif
4721 int F77_DUMMY_MAIN() { return 1; }
4722#endif
4723int
4724main ()
4725{
4726struct rlimit foo;
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
4732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4733 (eval $ac_compile) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); } &&
4737 { ac_try='test -s conftest.$ac_objext'
4738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 (eval $ac_try) 2>&5
4740 ac_status=$?
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); }; }; then
4743 sol_lfs_bug=no
4744else
4745 echo "$as_me: failed program was:" >&5
4746cat conftest.$ac_ext >&5
4747sol_lfs_bug=yes
4748fi
4749rm -f conftest.$ac_objext conftest.$ac_ext
4750echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4751echo "${ECHO_T}$sol_lfs_bug" >&6
4752if test "$sol_lfs_bug" = "yes"; then
4753 use_lfs=no
4754fi
4755
4756if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004757# Two defines needed to enable largefile support on various platforms
4758# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004759
Martin v. Löwis11437992002-04-12 09:54:03 +00004760cat >>confdefs.h <<\_ACEOF
4761#define _LARGEFILE_SOURCE 1
4762_ACEOF
4763
4764
4765cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004766#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004767_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004768
Martin v. Löwis399a6892002-10-04 10:22:02 +00004769fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004770
Guido van Rossum84e7b241996-08-19 21:59:00 +00004771# Add some code to confdefs.h so that the test for off_t works on SCO
4772cat >> confdefs.h <<\EOF
4773#if defined(SCO_DS)
4774#undef _OFF_T
4775#endif
4776EOF
4777
Guido van Rossumef2255b2000-03-10 22:30:29 +00004778# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004779echo "$as_me:$LINENO: checking for mode_t" >&5
4780echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4781if test "${ac_cv_type_mode_t+set}" = set; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783else
Martin v. Löwis11437992002-04-12 09:54:03 +00004784 cat >conftest.$ac_ext <<_ACEOF
4785#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004787$ac_includes_default
4788#ifdef F77_DUMMY_MAIN
4789# ifdef __cplusplus
4790 extern "C"
4791# endif
4792 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004794int
4795main ()
4796{
4797if ((mode_t *) 0)
4798 return 0;
4799if (sizeof (mode_t))
4800 return 0;
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext
4806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4807 (eval $ac_compile) 2>&5
4808 ac_status=$?
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } &&
4811 { ac_try='test -s conftest.$ac_objext'
4812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4813 (eval $ac_try) 2>&5
4814 ac_status=$?
4815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4816 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00004817 ac_cv_type_mode_t=yes
4818else
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 echo "$as_me: failed program was:" >&5
4820cat conftest.$ac_ext >&5
4821ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00004822fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004823rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004824fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004825echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
4826echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4827if test $ac_cv_type_mode_t = yes; then
4828 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829else
Martin v. Löwis11437992002-04-12 09:54:03 +00004830
4831cat >>confdefs.h <<_ACEOF
4832#define mode_t int
4833_ACEOF
4834
4835fi
4836
4837echo "$as_me:$LINENO: checking for off_t" >&5
4838echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4839if test "${ac_cv_type_off_t+set}" = set; then
4840 echo $ECHO_N "(cached) $ECHO_C" >&6
4841else
4842 cat >conftest.$ac_ext <<_ACEOF
4843#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004845$ac_includes_default
4846#ifdef F77_DUMMY_MAIN
4847# ifdef __cplusplus
4848 extern "C"
4849# endif
4850 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004852int
4853main ()
4854{
4855if ((off_t *) 0)
4856 return 0;
4857if (sizeof (off_t))
4858 return 0;
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863rm -f conftest.$ac_objext
4864if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4865 (eval $ac_compile) 2>&5
4866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } &&
4869 { ac_try='test -s conftest.$ac_objext'
4870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871 (eval $ac_try) 2>&5
4872 ac_status=$?
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004875 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004876else
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 echo "$as_me: failed program was:" >&5
4878cat conftest.$ac_ext >&5
4879ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004880fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004881rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004883echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
4884echo "${ECHO_T}$ac_cv_type_off_t" >&6
4885if test $ac_cv_type_off_t = yes; then
4886 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887else
Martin v. Löwis11437992002-04-12 09:54:03 +00004888
4889cat >>confdefs.h <<_ACEOF
4890#define off_t long
4891_ACEOF
4892
4893fi
4894
4895echo "$as_me:$LINENO: checking for pid_t" >&5
4896echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4897if test "${ac_cv_type_pid_t+set}" = set; then
4898 echo $ECHO_N "(cached) $ECHO_C" >&6
4899else
4900 cat >conftest.$ac_ext <<_ACEOF
4901#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004903$ac_includes_default
4904#ifdef F77_DUMMY_MAIN
4905# ifdef __cplusplus
4906 extern "C"
4907# endif
4908 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004910int
4911main ()
4912{
4913if ((pid_t *) 0)
4914 return 0;
4915if (sizeof (pid_t))
4916 return 0;
4917 ;
4918 return 0;
4919}
4920_ACEOF
4921rm -f conftest.$ac_objext
4922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4923 (eval $ac_compile) 2>&5
4924 ac_status=$?
4925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4926 (exit $ac_status); } &&
4927 { ac_try='test -s conftest.$ac_objext'
4928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4929 (eval $ac_try) 2>&5
4930 ac_status=$?
4931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4932 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004933 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 echo "$as_me: failed program was:" >&5
4936cat conftest.$ac_ext >&5
4937ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004939rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004940fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004941echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4942echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4943if test $ac_cv_type_pid_t = yes; then
4944 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004945else
Martin v. Löwis11437992002-04-12 09:54:03 +00004946
4947cat >>confdefs.h <<_ACEOF
4948#define pid_t int
4949_ACEOF
4950
4951fi
4952
4953echo "$as_me:$LINENO: checking return type of signal handlers" >&5
4954echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
4955if test "${ac_cv_type_signal+set}" = set; then
4956 echo $ECHO_N "(cached) $ECHO_C" >&6
4957else
4958 cat >conftest.$ac_ext <<_ACEOF
4959#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004960#include "confdefs.h"
4961#include <sys/types.h>
4962#include <signal.h>
4963#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00004964# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00004965#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004966#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004967extern "C" void (*signal (int, void (*)(int)))(int);
4968#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004969void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004970#endif
4971
Martin v. Löwis11437992002-04-12 09:54:03 +00004972#ifdef F77_DUMMY_MAIN
4973# ifdef __cplusplus
4974 extern "C"
4975# endif
4976 int F77_DUMMY_MAIN() { return 1; }
4977#endif
4978int
4979main ()
4980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00004982 ;
4983 return 0;
4984}
4985_ACEOF
4986rm -f conftest.$ac_objext
4987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4988 (eval $ac_compile) 2>&5
4989 ac_status=$?
4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4991 (exit $ac_status); } &&
4992 { ac_try='test -s conftest.$ac_objext'
4993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4994 (eval $ac_try) 2>&5
4995 ac_status=$?
4996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004998 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00004999else
Martin v. Löwis11437992002-04-12 09:54:03 +00005000 echo "$as_me: failed program was:" >&5
5001cat conftest.$ac_ext >&5
5002ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005004rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005005fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005006echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5007echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005008
Martin v. Löwis11437992002-04-12 09:54:03 +00005009cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012
Michael W. Hudson54241132001-12-07 15:38:26 +00005013
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: checking for size_t" >&5
5015echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5016if test "${ac_cv_type_size_t+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005022$ac_includes_default
5023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005029int
5030main ()
5031{
5032if ((size_t *) 0)
5033 return 0;
5034if (sizeof (size_t))
5035 return 0;
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005052 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005053else
Martin v. Löwis11437992002-04-12 09:54:03 +00005054 echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005058rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005060echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5061echo "${ECHO_T}$ac_cv_type_size_t" >&6
5062if test $ac_cv_type_size_t = yes; then
5063 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064else
Martin v. Löwis11437992002-04-12 09:54:03 +00005065
5066cat >>confdefs.h <<_ACEOF
5067#define size_t unsigned
5068_ACEOF
5069
5070fi
5071
5072echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5073echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5074if test "${ac_cv_type_uid_t+set}" = set; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5076else
5077 cat >conftest.$ac_ext <<_ACEOF
5078#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079#include "confdefs.h"
5080#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005081
5082_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5084 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085 ac_cv_type_uid_t=yes
5086else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087 ac_cv_type_uid_t=no
5088fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005089rm -f conftest*
5090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005092echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5093echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005094if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005095
Martin v. Löwis11437992002-04-12 09:54:03 +00005096cat >>confdefs.h <<\_ACEOF
5097#define uid_t int
5098_ACEOF
5099
5100
5101cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005103_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104
5105fi
5106
Jack Jansendd19cf82001-12-06 22:36:17 +00005107
Michael W. Hudson54241132001-12-07 15:38:26 +00005108# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005109echo "$as_me:$LINENO: checking for int" >&5
5110echo $ECHO_N "checking for int... $ECHO_C" >&6
5111if test "${ac_cv_type_int+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
5113else
5114 cat >conftest.$ac_ext <<_ACEOF
5115#line $LINENO "configure"
5116#include "confdefs.h"
5117$ac_includes_default
5118#ifdef F77_DUMMY_MAIN
5119# ifdef __cplusplus
5120 extern "C"
5121# endif
5122 int F77_DUMMY_MAIN() { return 1; }
5123#endif
5124int
5125main ()
5126{
5127if ((int *) 0)
5128 return 0;
5129if (sizeof (int))
5130 return 0;
5131 ;
5132 return 0;
5133}
5134_ACEOF
5135rm -f conftest.$ac_objext
5136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5137 (eval $ac_compile) 2>&5
5138 ac_status=$?
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); } &&
5141 { ac_try='test -s conftest.$ac_objext'
5142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5143 (eval $ac_try) 2>&5
5144 ac_status=$?
5145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146 (exit $ac_status); }; }; then
5147 ac_cv_type_int=yes
5148else
5149 echo "$as_me: failed program was:" >&5
5150cat conftest.$ac_ext >&5
5151ac_cv_type_int=no
5152fi
5153rm -f conftest.$ac_objext conftest.$ac_ext
5154fi
5155echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5156echo "${ECHO_T}$ac_cv_type_int" >&6
5157
5158echo "$as_me:$LINENO: checking size of int" >&5
5159echo $ECHO_N "checking size of int... $ECHO_C" >&6
5160if test "${ac_cv_sizeof_int+set}" = set; then
5161 echo $ECHO_N "(cached) $ECHO_C" >&6
5162else
5163 if test "$ac_cv_type_int" = yes; then
5164 # The cast to unsigned long works around a bug in the HP C Compiler
5165 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5166 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5167 # This bug is HP SR number 8606223364.
5168 if test "$cross_compiling" = yes; then
5169 # Depending upon the size, compute the lo and hi bounds.
5170cat >conftest.$ac_ext <<_ACEOF
5171#line $LINENO "configure"
5172#include "confdefs.h"
5173$ac_includes_default
5174#ifdef F77_DUMMY_MAIN
5175# ifdef __cplusplus
5176 extern "C"
5177# endif
5178 int F77_DUMMY_MAIN() { return 1; }
5179#endif
5180int
5181main ()
5182{
5183static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5184test_array [0] = 0
5185
5186 ;
5187 return 0;
5188}
5189_ACEOF
5190rm -f conftest.$ac_objext
5191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5192 (eval $ac_compile) 2>&5
5193 ac_status=$?
5194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5195 (exit $ac_status); } &&
5196 { ac_try='test -s conftest.$ac_objext'
5197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5198 (eval $ac_try) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); }; }; then
5202 ac_lo=0 ac_mid=0
5203 while :; do
5204 cat >conftest.$ac_ext <<_ACEOF
5205#line $LINENO "configure"
5206#include "confdefs.h"
5207$ac_includes_default
5208#ifdef F77_DUMMY_MAIN
5209# ifdef __cplusplus
5210 extern "C"
5211# endif
5212 int F77_DUMMY_MAIN() { return 1; }
5213#endif
5214int
5215main ()
5216{
5217static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5218test_array [0] = 0
5219
5220 ;
5221 return 0;
5222}
5223_ACEOF
5224rm -f conftest.$ac_objext
5225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5226 (eval $ac_compile) 2>&5
5227 ac_status=$?
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
5230 { ac_try='test -s conftest.$ac_objext'
5231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232 (eval $ac_try) 2>&5
5233 ac_status=$?
5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5236 ac_hi=$ac_mid; break
5237else
5238 echo "$as_me: failed program was:" >&5
5239cat conftest.$ac_ext >&5
5240ac_lo=`expr $ac_mid + 1`
5241 if test $ac_lo -le $ac_mid; then
5242 ac_lo= ac_hi=
5243 break
5244 fi
5245 ac_mid=`expr 2 '*' $ac_mid + 1`
5246fi
5247rm -f conftest.$ac_objext conftest.$ac_ext
5248 done
5249else
5250 echo "$as_me: failed program was:" >&5
5251cat conftest.$ac_ext >&5
5252cat >conftest.$ac_ext <<_ACEOF
5253#line $LINENO "configure"
5254#include "confdefs.h"
5255$ac_includes_default
5256#ifdef F77_DUMMY_MAIN
5257# ifdef __cplusplus
5258 extern "C"
5259# endif
5260 int F77_DUMMY_MAIN() { return 1; }
5261#endif
5262int
5263main ()
5264{
5265static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5266test_array [0] = 0
5267
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272rm -f conftest.$ac_objext
5273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5274 (eval $ac_compile) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); } &&
5278 { ac_try='test -s conftest.$ac_objext'
5279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280 (eval $ac_try) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); }; }; then
5284 ac_hi=-1 ac_mid=-1
5285 while :; do
5286 cat >conftest.$ac_ext <<_ACEOF
5287#line $LINENO "configure"
5288#include "confdefs.h"
5289$ac_includes_default
5290#ifdef F77_DUMMY_MAIN
5291# ifdef __cplusplus
5292 extern "C"
5293# endif
5294 int F77_DUMMY_MAIN() { return 1; }
5295#endif
5296int
5297main ()
5298{
5299static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5300test_array [0] = 0
5301
5302 ;
5303 return 0;
5304}
5305_ACEOF
5306rm -f conftest.$ac_objext
5307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5308 (eval $ac_compile) 2>&5
5309 ac_status=$?
5310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5311 (exit $ac_status); } &&
5312 { ac_try='test -s conftest.$ac_objext'
5313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5314 (eval $ac_try) 2>&5
5315 ac_status=$?
5316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317 (exit $ac_status); }; }; then
5318 ac_lo=$ac_mid; break
5319else
5320 echo "$as_me: failed program was:" >&5
5321cat conftest.$ac_ext >&5
5322ac_hi=`expr '(' $ac_mid ')' - 1`
5323 if test $ac_mid -le $ac_hi; then
5324 ac_lo= ac_hi=
5325 break
5326 fi
5327 ac_mid=`expr 2 '*' $ac_mid`
5328fi
5329rm -f conftest.$ac_objext conftest.$ac_ext
5330 done
5331else
5332 echo "$as_me: failed program was:" >&5
5333cat conftest.$ac_ext >&5
5334ac_lo= ac_hi=
5335fi
5336rm -f conftest.$ac_objext conftest.$ac_ext
5337fi
5338rm -f conftest.$ac_objext conftest.$ac_ext
5339# Binary search between lo and hi bounds.
5340while test "x$ac_lo" != "x$ac_hi"; do
5341 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5342 cat >conftest.$ac_ext <<_ACEOF
5343#line $LINENO "configure"
5344#include "confdefs.h"
5345$ac_includes_default
5346#ifdef F77_DUMMY_MAIN
5347# ifdef __cplusplus
5348 extern "C"
5349# endif
5350 int F77_DUMMY_MAIN() { return 1; }
5351#endif
5352int
5353main ()
5354{
5355static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5356test_array [0] = 0
5357
5358 ;
5359 return 0;
5360}
5361_ACEOF
5362rm -f conftest.$ac_objext
5363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5364 (eval $ac_compile) 2>&5
5365 ac_status=$?
5366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367 (exit $ac_status); } &&
5368 { ac_try='test -s conftest.$ac_objext'
5369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5370 (eval $ac_try) 2>&5
5371 ac_status=$?
5372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373 (exit $ac_status); }; }; then
5374 ac_hi=$ac_mid
5375else
5376 echo "$as_me: failed program was:" >&5
5377cat conftest.$ac_ext >&5
5378ac_lo=`expr '(' $ac_mid ')' + 1`
5379fi
5380rm -f conftest.$ac_objext conftest.$ac_ext
5381done
5382case $ac_lo in
5383?*) ac_cv_sizeof_int=$ac_lo;;
5384'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5385echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5386 { (exit 1); exit 1; }; } ;;
5387esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005388else
5389 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005390 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5391echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5392 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005393else
Martin v. Löwis11437992002-04-12 09:54:03 +00005394 cat >conftest.$ac_ext <<_ACEOF
5395#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005396#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005397$ac_includes_default
5398long longval () { return (long) (sizeof (int)); }
5399unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005400#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005401#include <stdlib.h>
5402#ifdef F77_DUMMY_MAIN
5403# ifdef __cplusplus
5404 extern "C"
5405# endif
5406 int F77_DUMMY_MAIN() { return 1; }
5407#endif
5408int
5409main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005410{
Martin v. Löwis11437992002-04-12 09:54:03 +00005411
5412 FILE *f = fopen ("conftest.val", "w");
5413 if (! f)
5414 exit (1);
5415 if (((long) (sizeof (int))) < 0)
5416 {
5417 long i = longval ();
5418 if (i != ((long) (sizeof (int))))
5419 exit (1);
5420 fprintf (f, "%ld\n", i);
5421 }
5422 else
5423 {
5424 unsigned long i = ulongval ();
5425 if (i != ((long) (sizeof (int))))
5426 exit (1);
5427 fprintf (f, "%lu\n", i);
5428 }
5429 exit (ferror (f) || fclose (f) != 0);
5430
5431 ;
5432 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005433}
Martin v. Löwis11437992002-04-12 09:54:03 +00005434_ACEOF
5435rm -f conftest$ac_exeext
5436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5437 (eval $ac_link) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5442 (eval $ac_try) 2>&5
5443 ac_status=$?
5444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5445 (exit $ac_status); }; }; then
5446 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005447else
Martin v. Löwis11437992002-04-12 09:54:03 +00005448 echo "$as_me: program exited with status $ac_status" >&5
5449echo "$as_me: failed program was:" >&5
5450cat conftest.$ac_ext >&5
5451( exit $ac_status )
5452{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5453echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5454 { (exit 1); exit 1; }; }
5455fi
5456rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5457fi
5458fi
5459rm -f conftest.val
5460else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005461 ac_cv_sizeof_int=0
5462fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005463fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005464echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5465echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5466cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005467#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005468_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005469
5470
Martin v. Löwis11437992002-04-12 09:54:03 +00005471echo "$as_me:$LINENO: checking for long" >&5
5472echo $ECHO_N "checking for long... $ECHO_C" >&6
5473if test "${ac_cv_type_long+set}" = set; then
5474 echo $ECHO_N "(cached) $ECHO_C" >&6
5475else
5476 cat >conftest.$ac_ext <<_ACEOF
5477#line $LINENO "configure"
5478#include "confdefs.h"
5479$ac_includes_default
5480#ifdef F77_DUMMY_MAIN
5481# ifdef __cplusplus
5482 extern "C"
5483# endif
5484 int F77_DUMMY_MAIN() { return 1; }
5485#endif
5486int
5487main ()
5488{
5489if ((long *) 0)
5490 return 0;
5491if (sizeof (long))
5492 return 0;
5493 ;
5494 return 0;
5495}
5496_ACEOF
5497rm -f conftest.$ac_objext
5498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5499 (eval $ac_compile) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); } &&
5503 { ac_try='test -s conftest.$ac_objext'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; }; then
5509 ac_cv_type_long=yes
5510else
5511 echo "$as_me: failed program was:" >&5
5512cat conftest.$ac_ext >&5
5513ac_cv_type_long=no
5514fi
5515rm -f conftest.$ac_objext conftest.$ac_ext
5516fi
5517echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5518echo "${ECHO_T}$ac_cv_type_long" >&6
5519
5520echo "$as_me:$LINENO: checking size of long" >&5
5521echo $ECHO_N "checking size of long... $ECHO_C" >&6
5522if test "${ac_cv_sizeof_long+set}" = set; then
5523 echo $ECHO_N "(cached) $ECHO_C" >&6
5524else
5525 if test "$ac_cv_type_long" = yes; then
5526 # The cast to unsigned long works around a bug in the HP C Compiler
5527 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5528 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5529 # This bug is HP SR number 8606223364.
5530 if test "$cross_compiling" = yes; then
5531 # Depending upon the size, compute the lo and hi bounds.
5532cat >conftest.$ac_ext <<_ACEOF
5533#line $LINENO "configure"
5534#include "confdefs.h"
5535$ac_includes_default
5536#ifdef F77_DUMMY_MAIN
5537# ifdef __cplusplus
5538 extern "C"
5539# endif
5540 int F77_DUMMY_MAIN() { return 1; }
5541#endif
5542int
5543main ()
5544{
5545static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5546test_array [0] = 0
5547
5548 ;
5549 return 0;
5550}
5551_ACEOF
5552rm -f conftest.$ac_objext
5553if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5554 (eval $ac_compile) 2>&5
5555 ac_status=$?
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); } &&
5558 { ac_try='test -s conftest.$ac_objext'
5559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5560 (eval $ac_try) 2>&5
5561 ac_status=$?
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5563 (exit $ac_status); }; }; then
5564 ac_lo=0 ac_mid=0
5565 while :; do
5566 cat >conftest.$ac_ext <<_ACEOF
5567#line $LINENO "configure"
5568#include "confdefs.h"
5569$ac_includes_default
5570#ifdef F77_DUMMY_MAIN
5571# ifdef __cplusplus
5572 extern "C"
5573# endif
5574 int F77_DUMMY_MAIN() { return 1; }
5575#endif
5576int
5577main ()
5578{
5579static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5580test_array [0] = 0
5581
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586rm -f conftest.$ac_objext
5587if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5588 (eval $ac_compile) 2>&5
5589 ac_status=$?
5590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5591 (exit $ac_status); } &&
5592 { ac_try='test -s conftest.$ac_objext'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; }; then
5598 ac_hi=$ac_mid; break
5599else
5600 echo "$as_me: failed program was:" >&5
5601cat conftest.$ac_ext >&5
5602ac_lo=`expr $ac_mid + 1`
5603 if test $ac_lo -le $ac_mid; then
5604 ac_lo= ac_hi=
5605 break
5606 fi
5607 ac_mid=`expr 2 '*' $ac_mid + 1`
5608fi
5609rm -f conftest.$ac_objext conftest.$ac_ext
5610 done
5611else
5612 echo "$as_me: failed program was:" >&5
5613cat conftest.$ac_ext >&5
5614cat >conftest.$ac_ext <<_ACEOF
5615#line $LINENO "configure"
5616#include "confdefs.h"
5617$ac_includes_default
5618#ifdef F77_DUMMY_MAIN
5619# ifdef __cplusplus
5620 extern "C"
5621# endif
5622 int F77_DUMMY_MAIN() { return 1; }
5623#endif
5624int
5625main ()
5626{
5627static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5628test_array [0] = 0
5629
5630 ;
5631 return 0;
5632}
5633_ACEOF
5634rm -f conftest.$ac_objext
5635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5636 (eval $ac_compile) 2>&5
5637 ac_status=$?
5638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5639 (exit $ac_status); } &&
5640 { ac_try='test -s conftest.$ac_objext'
5641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5642 (eval $ac_try) 2>&5
5643 ac_status=$?
5644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645 (exit $ac_status); }; }; then
5646 ac_hi=-1 ac_mid=-1
5647 while :; do
5648 cat >conftest.$ac_ext <<_ACEOF
5649#line $LINENO "configure"
5650#include "confdefs.h"
5651$ac_includes_default
5652#ifdef F77_DUMMY_MAIN
5653# ifdef __cplusplus
5654 extern "C"
5655# endif
5656 int F77_DUMMY_MAIN() { return 1; }
5657#endif
5658int
5659main ()
5660{
5661static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5662test_array [0] = 0
5663
5664 ;
5665 return 0;
5666}
5667_ACEOF
5668rm -f conftest.$ac_objext
5669if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5670 (eval $ac_compile) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); } &&
5674 { ac_try='test -s conftest.$ac_objext'
5675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676 (eval $ac_try) 2>&5
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
5680 ac_lo=$ac_mid; break
5681else
5682 echo "$as_me: failed program was:" >&5
5683cat conftest.$ac_ext >&5
5684ac_hi=`expr '(' $ac_mid ')' - 1`
5685 if test $ac_mid -le $ac_hi; then
5686 ac_lo= ac_hi=
5687 break
5688 fi
5689 ac_mid=`expr 2 '*' $ac_mid`
5690fi
5691rm -f conftest.$ac_objext conftest.$ac_ext
5692 done
5693else
5694 echo "$as_me: failed program was:" >&5
5695cat conftest.$ac_ext >&5
5696ac_lo= ac_hi=
5697fi
5698rm -f conftest.$ac_objext conftest.$ac_ext
5699fi
5700rm -f conftest.$ac_objext conftest.$ac_ext
5701# Binary search between lo and hi bounds.
5702while test "x$ac_lo" != "x$ac_hi"; do
5703 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5704 cat >conftest.$ac_ext <<_ACEOF
5705#line $LINENO "configure"
5706#include "confdefs.h"
5707$ac_includes_default
5708#ifdef F77_DUMMY_MAIN
5709# ifdef __cplusplus
5710 extern "C"
5711# endif
5712 int F77_DUMMY_MAIN() { return 1; }
5713#endif
5714int
5715main ()
5716{
5717static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5718test_array [0] = 0
5719
5720 ;
5721 return 0;
5722}
5723_ACEOF
5724rm -f conftest.$ac_objext
5725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5726 (eval $ac_compile) 2>&5
5727 ac_status=$?
5728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); } &&
5730 { ac_try='test -s conftest.$ac_objext'
5731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5732 (eval $ac_try) 2>&5
5733 ac_status=$?
5734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
5736 ac_hi=$ac_mid
5737else
5738 echo "$as_me: failed program was:" >&5
5739cat conftest.$ac_ext >&5
5740ac_lo=`expr '(' $ac_mid ')' + 1`
5741fi
5742rm -f conftest.$ac_objext conftest.$ac_ext
5743done
5744case $ac_lo in
5745?*) ac_cv_sizeof_long=$ac_lo;;
5746'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5747echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5748 { (exit 1); exit 1; }; } ;;
5749esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005750else
5751 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005752 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5753echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5754 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005755else
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 cat >conftest.$ac_ext <<_ACEOF
5757#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005758#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005759$ac_includes_default
5760long longval () { return (long) (sizeof (long)); }
5761unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005762#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005763#include <stdlib.h>
5764#ifdef F77_DUMMY_MAIN
5765# ifdef __cplusplus
5766 extern "C"
5767# endif
5768 int F77_DUMMY_MAIN() { return 1; }
5769#endif
5770int
5771main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005772{
Martin v. Löwis11437992002-04-12 09:54:03 +00005773
5774 FILE *f = fopen ("conftest.val", "w");
5775 if (! f)
5776 exit (1);
5777 if (((long) (sizeof (long))) < 0)
5778 {
5779 long i = longval ();
5780 if (i != ((long) (sizeof (long))))
5781 exit (1);
5782 fprintf (f, "%ld\n", i);
5783 }
5784 else
5785 {
5786 unsigned long i = ulongval ();
5787 if (i != ((long) (sizeof (long))))
5788 exit (1);
5789 fprintf (f, "%lu\n", i);
5790 }
5791 exit (ferror (f) || fclose (f) != 0);
5792
5793 ;
5794 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005795}
Martin v. Löwis11437992002-04-12 09:54:03 +00005796_ACEOF
5797rm -f conftest$ac_exeext
5798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5799 (eval $ac_link) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5804 (eval $ac_try) 2>&5
5805 ac_status=$?
5806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5807 (exit $ac_status); }; }; then
5808 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005809else
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 echo "$as_me: program exited with status $ac_status" >&5
5811echo "$as_me: failed program was:" >&5
5812cat conftest.$ac_ext >&5
5813( exit $ac_status )
5814{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5815echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5816 { (exit 1); exit 1; }; }
5817fi
5818rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5819fi
5820fi
5821rm -f conftest.val
5822else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005823 ac_cv_sizeof_long=0
5824fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005825fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005826echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5827echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5828cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005829#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005830_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005831
5832
Martin v. Löwis11437992002-04-12 09:54:03 +00005833echo "$as_me:$LINENO: checking for void *" >&5
5834echo $ECHO_N "checking for void *... $ECHO_C" >&6
5835if test "${ac_cv_type_void_p+set}" = set; then
5836 echo $ECHO_N "(cached) $ECHO_C" >&6
5837else
5838 cat >conftest.$ac_ext <<_ACEOF
5839#line $LINENO "configure"
5840#include "confdefs.h"
5841$ac_includes_default
5842#ifdef F77_DUMMY_MAIN
5843# ifdef __cplusplus
5844 extern "C"
5845# endif
5846 int F77_DUMMY_MAIN() { return 1; }
5847#endif
5848int
5849main ()
5850{
5851if ((void * *) 0)
5852 return 0;
5853if (sizeof (void *))
5854 return 0;
5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
5860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5861 (eval $ac_compile) 2>&5
5862 ac_status=$?
5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); } &&
5865 { ac_try='test -s conftest.$ac_objext'
5866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867 (eval $ac_try) 2>&5
5868 ac_status=$?
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); }; }; then
5871 ac_cv_type_void_p=yes
5872else
5873 echo "$as_me: failed program was:" >&5
5874cat conftest.$ac_ext >&5
5875ac_cv_type_void_p=no
5876fi
5877rm -f conftest.$ac_objext conftest.$ac_ext
5878fi
5879echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5880echo "${ECHO_T}$ac_cv_type_void_p" >&6
5881
5882echo "$as_me:$LINENO: checking size of void *" >&5
5883echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5884if test "${ac_cv_sizeof_void_p+set}" = set; then
5885 echo $ECHO_N "(cached) $ECHO_C" >&6
5886else
5887 if test "$ac_cv_type_void_p" = yes; then
5888 # The cast to unsigned long works around a bug in the HP C Compiler
5889 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5890 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5891 # This bug is HP SR number 8606223364.
5892 if test "$cross_compiling" = yes; then
5893 # Depending upon the size, compute the lo and hi bounds.
5894cat >conftest.$ac_ext <<_ACEOF
5895#line $LINENO "configure"
5896#include "confdefs.h"
5897$ac_includes_default
5898#ifdef F77_DUMMY_MAIN
5899# ifdef __cplusplus
5900 extern "C"
5901# endif
5902 int F77_DUMMY_MAIN() { return 1; }
5903#endif
5904int
5905main ()
5906{
5907static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5908test_array [0] = 0
5909
5910 ;
5911 return 0;
5912}
5913_ACEOF
5914rm -f conftest.$ac_objext
5915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5916 (eval $ac_compile) 2>&5
5917 ac_status=$?
5918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5919 (exit $ac_status); } &&
5920 { ac_try='test -s conftest.$ac_objext'
5921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5922 (eval $ac_try) 2>&5
5923 ac_status=$?
5924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5925 (exit $ac_status); }; }; then
5926 ac_lo=0 ac_mid=0
5927 while :; do
5928 cat >conftest.$ac_ext <<_ACEOF
5929#line $LINENO "configure"
5930#include "confdefs.h"
5931$ac_includes_default
5932#ifdef F77_DUMMY_MAIN
5933# ifdef __cplusplus
5934 extern "C"
5935# endif
5936 int F77_DUMMY_MAIN() { return 1; }
5937#endif
5938int
5939main ()
5940{
5941static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
5942test_array [0] = 0
5943
5944 ;
5945 return 0;
5946}
5947_ACEOF
5948rm -f conftest.$ac_objext
5949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5950 (eval $ac_compile) 2>&5
5951 ac_status=$?
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); } &&
5954 { ac_try='test -s conftest.$ac_objext'
5955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5956 (eval $ac_try) 2>&5
5957 ac_status=$?
5958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5959 (exit $ac_status); }; }; then
5960 ac_hi=$ac_mid; break
5961else
5962 echo "$as_me: failed program was:" >&5
5963cat conftest.$ac_ext >&5
5964ac_lo=`expr $ac_mid + 1`
5965 if test $ac_lo -le $ac_mid; then
5966 ac_lo= ac_hi=
5967 break
5968 fi
5969 ac_mid=`expr 2 '*' $ac_mid + 1`
5970fi
5971rm -f conftest.$ac_objext conftest.$ac_ext
5972 done
5973else
5974 echo "$as_me: failed program was:" >&5
5975cat conftest.$ac_ext >&5
5976cat >conftest.$ac_ext <<_ACEOF
5977#line $LINENO "configure"
5978#include "confdefs.h"
5979$ac_includes_default
5980#ifdef F77_DUMMY_MAIN
5981# ifdef __cplusplus
5982 extern "C"
5983# endif
5984 int F77_DUMMY_MAIN() { return 1; }
5985#endif
5986int
5987main ()
5988{
5989static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
5990test_array [0] = 0
5991
5992 ;
5993 return 0;
5994}
5995_ACEOF
5996rm -f conftest.$ac_objext
5997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5998 (eval $ac_compile) 2>&5
5999 ac_status=$?
6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6001 (exit $ac_status); } &&
6002 { ac_try='test -s conftest.$ac_objext'
6003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6004 (eval $ac_try) 2>&5
6005 ac_status=$?
6006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6007 (exit $ac_status); }; }; then
6008 ac_hi=-1 ac_mid=-1
6009 while :; do
6010 cat >conftest.$ac_ext <<_ACEOF
6011#line $LINENO "configure"
6012#include "confdefs.h"
6013$ac_includes_default
6014#ifdef F77_DUMMY_MAIN
6015# ifdef __cplusplus
6016 extern "C"
6017# endif
6018 int F77_DUMMY_MAIN() { return 1; }
6019#endif
6020int
6021main ()
6022{
6023static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6024test_array [0] = 0
6025
6026 ;
6027 return 0;
6028}
6029_ACEOF
6030rm -f conftest.$ac_objext
6031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6032 (eval $ac_compile) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6038 (eval $ac_try) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
6042 ac_lo=$ac_mid; break
6043else
6044 echo "$as_me: failed program was:" >&5
6045cat conftest.$ac_ext >&5
6046ac_hi=`expr '(' $ac_mid ')' - 1`
6047 if test $ac_mid -le $ac_hi; then
6048 ac_lo= ac_hi=
6049 break
6050 fi
6051 ac_mid=`expr 2 '*' $ac_mid`
6052fi
6053rm -f conftest.$ac_objext conftest.$ac_ext
6054 done
6055else
6056 echo "$as_me: failed program was:" >&5
6057cat conftest.$ac_ext >&5
6058ac_lo= ac_hi=
6059fi
6060rm -f conftest.$ac_objext conftest.$ac_ext
6061fi
6062rm -f conftest.$ac_objext conftest.$ac_ext
6063# Binary search between lo and hi bounds.
6064while test "x$ac_lo" != "x$ac_hi"; do
6065 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6066 cat >conftest.$ac_ext <<_ACEOF
6067#line $LINENO "configure"
6068#include "confdefs.h"
6069$ac_includes_default
6070#ifdef F77_DUMMY_MAIN
6071# ifdef __cplusplus
6072 extern "C"
6073# endif
6074 int F77_DUMMY_MAIN() { return 1; }
6075#endif
6076int
6077main ()
6078{
6079static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6080test_array [0] = 0
6081
6082 ;
6083 return 0;
6084}
6085_ACEOF
6086rm -f conftest.$ac_objext
6087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6088 (eval $ac_compile) 2>&5
6089 ac_status=$?
6090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6091 (exit $ac_status); } &&
6092 { ac_try='test -s conftest.$ac_objext'
6093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6094 (eval $ac_try) 2>&5
6095 ac_status=$?
6096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097 (exit $ac_status); }; }; then
6098 ac_hi=$ac_mid
6099else
6100 echo "$as_me: failed program was:" >&5
6101cat conftest.$ac_ext >&5
6102ac_lo=`expr '(' $ac_mid ')' + 1`
6103fi
6104rm -f conftest.$ac_objext conftest.$ac_ext
6105done
6106case $ac_lo in
6107?*) ac_cv_sizeof_void_p=$ac_lo;;
6108'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6109echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6110 { (exit 1); exit 1; }; } ;;
6111esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006112else
6113 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006114 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6115echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6116 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006117else
Martin v. Löwis11437992002-04-12 09:54:03 +00006118 cat >conftest.$ac_ext <<_ACEOF
6119#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006120#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006121$ac_includes_default
6122long longval () { return (long) (sizeof (void *)); }
6123unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006124#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006125#include <stdlib.h>
6126#ifdef F77_DUMMY_MAIN
6127# ifdef __cplusplus
6128 extern "C"
6129# endif
6130 int F77_DUMMY_MAIN() { return 1; }
6131#endif
6132int
6133main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006134{
Martin v. Löwis11437992002-04-12 09:54:03 +00006135
6136 FILE *f = fopen ("conftest.val", "w");
6137 if (! f)
6138 exit (1);
6139 if (((long) (sizeof (void *))) < 0)
6140 {
6141 long i = longval ();
6142 if (i != ((long) (sizeof (void *))))
6143 exit (1);
6144 fprintf (f, "%ld\n", i);
6145 }
6146 else
6147 {
6148 unsigned long i = ulongval ();
6149 if (i != ((long) (sizeof (void *))))
6150 exit (1);
6151 fprintf (f, "%lu\n", i);
6152 }
6153 exit (ferror (f) || fclose (f) != 0);
6154
6155 ;
6156 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006157}
Martin v. Löwis11437992002-04-12 09:54:03 +00006158_ACEOF
6159rm -f conftest$ac_exeext
6160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6161 (eval $ac_link) 2>&5
6162 ac_status=$?
6163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6166 (eval $ac_try) 2>&5
6167 ac_status=$?
6168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6169 (exit $ac_status); }; }; then
6170 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006171else
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 echo "$as_me: program exited with status $ac_status" >&5
6173echo "$as_me: failed program was:" >&5
6174cat conftest.$ac_ext >&5
6175( exit $ac_status )
6176{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6177echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6178 { (exit 1); exit 1; }; }
6179fi
6180rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6181fi
6182fi
6183rm -f conftest.val
6184else
Guido van Rossumad678af1998-10-02 14:42:15 +00006185 ac_cv_sizeof_void_p=0
6186fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006188echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6189echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6190cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006191#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006192_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006193
6194
Martin v. Löwis11437992002-04-12 09:54:03 +00006195echo "$as_me:$LINENO: checking for char" >&5
6196echo $ECHO_N "checking for char... $ECHO_C" >&6
6197if test "${ac_cv_type_char+set}" = set; then
6198 echo $ECHO_N "(cached) $ECHO_C" >&6
6199else
6200 cat >conftest.$ac_ext <<_ACEOF
6201#line $LINENO "configure"
6202#include "confdefs.h"
6203$ac_includes_default
6204#ifdef F77_DUMMY_MAIN
6205# ifdef __cplusplus
6206 extern "C"
6207# endif
6208 int F77_DUMMY_MAIN() { return 1; }
6209#endif
6210int
6211main ()
6212{
6213if ((char *) 0)
6214 return 0;
6215if (sizeof (char))
6216 return 0;
6217 ;
6218 return 0;
6219}
6220_ACEOF
6221rm -f conftest.$ac_objext
6222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6223 (eval $ac_compile) 2>&5
6224 ac_status=$?
6225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6226 (exit $ac_status); } &&
6227 { ac_try='test -s conftest.$ac_objext'
6228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6229 (eval $ac_try) 2>&5
6230 ac_status=$?
6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6232 (exit $ac_status); }; }; then
6233 ac_cv_type_char=yes
6234else
6235 echo "$as_me: failed program was:" >&5
6236cat conftest.$ac_ext >&5
6237ac_cv_type_char=no
6238fi
6239rm -f conftest.$ac_objext conftest.$ac_ext
6240fi
6241echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6242echo "${ECHO_T}$ac_cv_type_char" >&6
6243
6244echo "$as_me:$LINENO: checking size of char" >&5
6245echo $ECHO_N "checking size of char... $ECHO_C" >&6
6246if test "${ac_cv_sizeof_char+set}" = set; then
6247 echo $ECHO_N "(cached) $ECHO_C" >&6
6248else
6249 if test "$ac_cv_type_char" = yes; then
6250 # The cast to unsigned long works around a bug in the HP C Compiler
6251 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6252 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6253 # This bug is HP SR number 8606223364.
6254 if test "$cross_compiling" = yes; then
6255 # Depending upon the size, compute the lo and hi bounds.
6256cat >conftest.$ac_ext <<_ACEOF
6257#line $LINENO "configure"
6258#include "confdefs.h"
6259$ac_includes_default
6260#ifdef F77_DUMMY_MAIN
6261# ifdef __cplusplus
6262 extern "C"
6263# endif
6264 int F77_DUMMY_MAIN() { return 1; }
6265#endif
6266int
6267main ()
6268{
6269static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6270test_array [0] = 0
6271
6272 ;
6273 return 0;
6274}
6275_ACEOF
6276rm -f conftest.$ac_objext
6277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6278 (eval $ac_compile) 2>&5
6279 ac_status=$?
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); } &&
6282 { ac_try='test -s conftest.$ac_objext'
6283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6284 (eval $ac_try) 2>&5
6285 ac_status=$?
6286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6287 (exit $ac_status); }; }; then
6288 ac_lo=0 ac_mid=0
6289 while :; do
6290 cat >conftest.$ac_ext <<_ACEOF
6291#line $LINENO "configure"
6292#include "confdefs.h"
6293$ac_includes_default
6294#ifdef F77_DUMMY_MAIN
6295# ifdef __cplusplus
6296 extern "C"
6297# endif
6298 int F77_DUMMY_MAIN() { return 1; }
6299#endif
6300int
6301main ()
6302{
6303static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6304test_array [0] = 0
6305
6306 ;
6307 return 0;
6308}
6309_ACEOF
6310rm -f conftest.$ac_objext
6311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6312 (eval $ac_compile) 2>&5
6313 ac_status=$?
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315 (exit $ac_status); } &&
6316 { ac_try='test -s conftest.$ac_objext'
6317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6318 (eval $ac_try) 2>&5
6319 ac_status=$?
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321 (exit $ac_status); }; }; then
6322 ac_hi=$ac_mid; break
6323else
6324 echo "$as_me: failed program was:" >&5
6325cat conftest.$ac_ext >&5
6326ac_lo=`expr $ac_mid + 1`
6327 if test $ac_lo -le $ac_mid; then
6328 ac_lo= ac_hi=
6329 break
6330 fi
6331 ac_mid=`expr 2 '*' $ac_mid + 1`
6332fi
6333rm -f conftest.$ac_objext conftest.$ac_ext
6334 done
6335else
6336 echo "$as_me: failed program was:" >&5
6337cat conftest.$ac_ext >&5
6338cat >conftest.$ac_ext <<_ACEOF
6339#line $LINENO "configure"
6340#include "confdefs.h"
6341$ac_includes_default
6342#ifdef F77_DUMMY_MAIN
6343# ifdef __cplusplus
6344 extern "C"
6345# endif
6346 int F77_DUMMY_MAIN() { return 1; }
6347#endif
6348int
6349main ()
6350{
6351static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6352test_array [0] = 0
6353
6354 ;
6355 return 0;
6356}
6357_ACEOF
6358rm -f conftest.$ac_objext
6359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6360 (eval $ac_compile) 2>&5
6361 ac_status=$?
6362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6363 (exit $ac_status); } &&
6364 { ac_try='test -s conftest.$ac_objext'
6365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366 (eval $ac_try) 2>&5
6367 ac_status=$?
6368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369 (exit $ac_status); }; }; then
6370 ac_hi=-1 ac_mid=-1
6371 while :; do
6372 cat >conftest.$ac_ext <<_ACEOF
6373#line $LINENO "configure"
6374#include "confdefs.h"
6375$ac_includes_default
6376#ifdef F77_DUMMY_MAIN
6377# ifdef __cplusplus
6378 extern "C"
6379# endif
6380 int F77_DUMMY_MAIN() { return 1; }
6381#endif
6382int
6383main ()
6384{
6385static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6386test_array [0] = 0
6387
6388 ;
6389 return 0;
6390}
6391_ACEOF
6392rm -f conftest.$ac_objext
6393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6394 (eval $ac_compile) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); } &&
6398 { ac_try='test -s conftest.$ac_objext'
6399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6403 (exit $ac_status); }; }; then
6404 ac_lo=$ac_mid; break
6405else
6406 echo "$as_me: failed program was:" >&5
6407cat conftest.$ac_ext >&5
6408ac_hi=`expr '(' $ac_mid ')' - 1`
6409 if test $ac_mid -le $ac_hi; then
6410 ac_lo= ac_hi=
6411 break
6412 fi
6413 ac_mid=`expr 2 '*' $ac_mid`
6414fi
6415rm -f conftest.$ac_objext conftest.$ac_ext
6416 done
6417else
6418 echo "$as_me: failed program was:" >&5
6419cat conftest.$ac_ext >&5
6420ac_lo= ac_hi=
6421fi
6422rm -f conftest.$ac_objext conftest.$ac_ext
6423fi
6424rm -f conftest.$ac_objext conftest.$ac_ext
6425# Binary search between lo and hi bounds.
6426while test "x$ac_lo" != "x$ac_hi"; do
6427 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6428 cat >conftest.$ac_ext <<_ACEOF
6429#line $LINENO "configure"
6430#include "confdefs.h"
6431$ac_includes_default
6432#ifdef F77_DUMMY_MAIN
6433# ifdef __cplusplus
6434 extern "C"
6435# endif
6436 int F77_DUMMY_MAIN() { return 1; }
6437#endif
6438int
6439main ()
6440{
6441static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6442test_array [0] = 0
6443
6444 ;
6445 return 0;
6446}
6447_ACEOF
6448rm -f conftest.$ac_objext
6449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6450 (eval $ac_compile) 2>&5
6451 ac_status=$?
6452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6453 (exit $ac_status); } &&
6454 { ac_try='test -s conftest.$ac_objext'
6455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6456 (eval $ac_try) 2>&5
6457 ac_status=$?
6458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459 (exit $ac_status); }; }; then
6460 ac_hi=$ac_mid
6461else
6462 echo "$as_me: failed program was:" >&5
6463cat conftest.$ac_ext >&5
6464ac_lo=`expr '(' $ac_mid ')' + 1`
6465fi
6466rm -f conftest.$ac_objext conftest.$ac_ext
6467done
6468case $ac_lo in
6469?*) ac_cv_sizeof_char=$ac_lo;;
6470'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6471echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6472 { (exit 1); exit 1; }; } ;;
6473esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006474else
6475 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006476 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6477echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6478 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006479else
Martin v. Löwis11437992002-04-12 09:54:03 +00006480 cat >conftest.$ac_ext <<_ACEOF
6481#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006482#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006483$ac_includes_default
6484long longval () { return (long) (sizeof (char)); }
6485unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006486#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006487#include <stdlib.h>
6488#ifdef F77_DUMMY_MAIN
6489# ifdef __cplusplus
6490 extern "C"
6491# endif
6492 int F77_DUMMY_MAIN() { return 1; }
6493#endif
6494int
6495main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006496{
Martin v. Löwis11437992002-04-12 09:54:03 +00006497
6498 FILE *f = fopen ("conftest.val", "w");
6499 if (! f)
6500 exit (1);
6501 if (((long) (sizeof (char))) < 0)
6502 {
6503 long i = longval ();
6504 if (i != ((long) (sizeof (char))))
6505 exit (1);
6506 fprintf (f, "%ld\n", i);
6507 }
6508 else
6509 {
6510 unsigned long i = ulongval ();
6511 if (i != ((long) (sizeof (char))))
6512 exit (1);
6513 fprintf (f, "%lu\n", i);
6514 }
6515 exit (ferror (f) || fclose (f) != 0);
6516
6517 ;
6518 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006519}
Martin v. Löwis11437992002-04-12 09:54:03 +00006520_ACEOF
6521rm -f conftest$ac_exeext
6522if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6523 (eval $ac_link) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6528 (eval $ac_try) 2>&5
6529 ac_status=$?
6530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6531 (exit $ac_status); }; }; then
6532 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006533else
Martin v. Löwis11437992002-04-12 09:54:03 +00006534 echo "$as_me: program exited with status $ac_status" >&5
6535echo "$as_me: failed program was:" >&5
6536cat conftest.$ac_ext >&5
6537( exit $ac_status )
6538{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6539echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6540 { (exit 1); exit 1; }; }
6541fi
6542rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6543fi
6544fi
6545rm -f conftest.val
6546else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006547 ac_cv_sizeof_char=0
6548fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006549fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006550echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6551echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6552cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006553#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006554_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006555
6556
Martin v. Löwis11437992002-04-12 09:54:03 +00006557echo "$as_me:$LINENO: checking for short" >&5
6558echo $ECHO_N "checking for short... $ECHO_C" >&6
6559if test "${ac_cv_type_short+set}" = set; then
6560 echo $ECHO_N "(cached) $ECHO_C" >&6
6561else
6562 cat >conftest.$ac_ext <<_ACEOF
6563#line $LINENO "configure"
6564#include "confdefs.h"
6565$ac_includes_default
6566#ifdef F77_DUMMY_MAIN
6567# ifdef __cplusplus
6568 extern "C"
6569# endif
6570 int F77_DUMMY_MAIN() { return 1; }
6571#endif
6572int
6573main ()
6574{
6575if ((short *) 0)
6576 return 0;
6577if (sizeof (short))
6578 return 0;
6579 ;
6580 return 0;
6581}
6582_ACEOF
6583rm -f conftest.$ac_objext
6584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6585 (eval $ac_compile) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); } &&
6589 { ac_try='test -s conftest.$ac_objext'
6590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6591 (eval $ac_try) 2>&5
6592 ac_status=$?
6593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594 (exit $ac_status); }; }; then
6595 ac_cv_type_short=yes
6596else
6597 echo "$as_me: failed program was:" >&5
6598cat conftest.$ac_ext >&5
6599ac_cv_type_short=no
6600fi
6601rm -f conftest.$ac_objext conftest.$ac_ext
6602fi
6603echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6604echo "${ECHO_T}$ac_cv_type_short" >&6
6605
6606echo "$as_me:$LINENO: checking size of short" >&5
6607echo $ECHO_N "checking size of short... $ECHO_C" >&6
6608if test "${ac_cv_sizeof_short+set}" = set; then
6609 echo $ECHO_N "(cached) $ECHO_C" >&6
6610else
6611 if test "$ac_cv_type_short" = yes; then
6612 # The cast to unsigned long works around a bug in the HP C Compiler
6613 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615 # This bug is HP SR number 8606223364.
6616 if test "$cross_compiling" = yes; then
6617 # Depending upon the size, compute the lo and hi bounds.
6618cat >conftest.$ac_ext <<_ACEOF
6619#line $LINENO "configure"
6620#include "confdefs.h"
6621$ac_includes_default
6622#ifdef F77_DUMMY_MAIN
6623# ifdef __cplusplus
6624 extern "C"
6625# endif
6626 int F77_DUMMY_MAIN() { return 1; }
6627#endif
6628int
6629main ()
6630{
6631static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6632test_array [0] = 0
6633
6634 ;
6635 return 0;
6636}
6637_ACEOF
6638rm -f conftest.$ac_objext
6639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6640 (eval $ac_compile) 2>&5
6641 ac_status=$?
6642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643 (exit $ac_status); } &&
6644 { ac_try='test -s conftest.$ac_objext'
6645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6646 (eval $ac_try) 2>&5
6647 ac_status=$?
6648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6649 (exit $ac_status); }; }; then
6650 ac_lo=0 ac_mid=0
6651 while :; do
6652 cat >conftest.$ac_ext <<_ACEOF
6653#line $LINENO "configure"
6654#include "confdefs.h"
6655$ac_includes_default
6656#ifdef F77_DUMMY_MAIN
6657# ifdef __cplusplus
6658 extern "C"
6659# endif
6660 int F77_DUMMY_MAIN() { return 1; }
6661#endif
6662int
6663main ()
6664{
6665static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6666test_array [0] = 0
6667
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
6673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6674 (eval $ac_compile) 2>&5
6675 ac_status=$?
6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6677 (exit $ac_status); } &&
6678 { ac_try='test -s conftest.$ac_objext'
6679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6680 (eval $ac_try) 2>&5
6681 ac_status=$?
6682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6683 (exit $ac_status); }; }; then
6684 ac_hi=$ac_mid; break
6685else
6686 echo "$as_me: failed program was:" >&5
6687cat conftest.$ac_ext >&5
6688ac_lo=`expr $ac_mid + 1`
6689 if test $ac_lo -le $ac_mid; then
6690 ac_lo= ac_hi=
6691 break
6692 fi
6693 ac_mid=`expr 2 '*' $ac_mid + 1`
6694fi
6695rm -f conftest.$ac_objext conftest.$ac_ext
6696 done
6697else
6698 echo "$as_me: failed program was:" >&5
6699cat conftest.$ac_ext >&5
6700cat >conftest.$ac_ext <<_ACEOF
6701#line $LINENO "configure"
6702#include "confdefs.h"
6703$ac_includes_default
6704#ifdef F77_DUMMY_MAIN
6705# ifdef __cplusplus
6706 extern "C"
6707# endif
6708 int F77_DUMMY_MAIN() { return 1; }
6709#endif
6710int
6711main ()
6712{
6713static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6714test_array [0] = 0
6715
6716 ;
6717 return 0;
6718}
6719_ACEOF
6720rm -f conftest.$ac_objext
6721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6722 (eval $ac_compile) 2>&5
6723 ac_status=$?
6724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6725 (exit $ac_status); } &&
6726 { ac_try='test -s conftest.$ac_objext'
6727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6728 (eval $ac_try) 2>&5
6729 ac_status=$?
6730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6731 (exit $ac_status); }; }; then
6732 ac_hi=-1 ac_mid=-1
6733 while :; do
6734 cat >conftest.$ac_ext <<_ACEOF
6735#line $LINENO "configure"
6736#include "confdefs.h"
6737$ac_includes_default
6738#ifdef F77_DUMMY_MAIN
6739# ifdef __cplusplus
6740 extern "C"
6741# endif
6742 int F77_DUMMY_MAIN() { return 1; }
6743#endif
6744int
6745main ()
6746{
6747static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6748test_array [0] = 0
6749
6750 ;
6751 return 0;
6752}
6753_ACEOF
6754rm -f conftest.$ac_objext
6755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6756 (eval $ac_compile) 2>&5
6757 ac_status=$?
6758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6759 (exit $ac_status); } &&
6760 { ac_try='test -s conftest.$ac_objext'
6761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6762 (eval $ac_try) 2>&5
6763 ac_status=$?
6764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6765 (exit $ac_status); }; }; then
6766 ac_lo=$ac_mid; break
6767else
6768 echo "$as_me: failed program was:" >&5
6769cat conftest.$ac_ext >&5
6770ac_hi=`expr '(' $ac_mid ')' - 1`
6771 if test $ac_mid -le $ac_hi; then
6772 ac_lo= ac_hi=
6773 break
6774 fi
6775 ac_mid=`expr 2 '*' $ac_mid`
6776fi
6777rm -f conftest.$ac_objext conftest.$ac_ext
6778 done
6779else
6780 echo "$as_me: failed program was:" >&5
6781cat conftest.$ac_ext >&5
6782ac_lo= ac_hi=
6783fi
6784rm -f conftest.$ac_objext conftest.$ac_ext
6785fi
6786rm -f conftest.$ac_objext conftest.$ac_ext
6787# Binary search between lo and hi bounds.
6788while test "x$ac_lo" != "x$ac_hi"; do
6789 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6790 cat >conftest.$ac_ext <<_ACEOF
6791#line $LINENO "configure"
6792#include "confdefs.h"
6793$ac_includes_default
6794#ifdef F77_DUMMY_MAIN
6795# ifdef __cplusplus
6796 extern "C"
6797# endif
6798 int F77_DUMMY_MAIN() { return 1; }
6799#endif
6800int
6801main ()
6802{
6803static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6804test_array [0] = 0
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6812 (eval $ac_compile) 2>&5
6813 ac_status=$?
6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6815 (exit $ac_status); } &&
6816 { ac_try='test -s conftest.$ac_objext'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; }; then
6822 ac_hi=$ac_mid
6823else
6824 echo "$as_me: failed program was:" >&5
6825cat conftest.$ac_ext >&5
6826ac_lo=`expr '(' $ac_mid ')' + 1`
6827fi
6828rm -f conftest.$ac_objext conftest.$ac_ext
6829done
6830case $ac_lo in
6831?*) ac_cv_sizeof_short=$ac_lo;;
6832'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6833echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6834 { (exit 1); exit 1; }; } ;;
6835esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006836else
6837 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006838 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6839echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6840 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006841else
Martin v. Löwis11437992002-04-12 09:54:03 +00006842 cat >conftest.$ac_ext <<_ACEOF
6843#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006844#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006845$ac_includes_default
6846long longval () { return (long) (sizeof (short)); }
6847unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006848#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006849#include <stdlib.h>
6850#ifdef F77_DUMMY_MAIN
6851# ifdef __cplusplus
6852 extern "C"
6853# endif
6854 int F77_DUMMY_MAIN() { return 1; }
6855#endif
6856int
6857main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006858{
Martin v. Löwis11437992002-04-12 09:54:03 +00006859
6860 FILE *f = fopen ("conftest.val", "w");
6861 if (! f)
6862 exit (1);
6863 if (((long) (sizeof (short))) < 0)
6864 {
6865 long i = longval ();
6866 if (i != ((long) (sizeof (short))))
6867 exit (1);
6868 fprintf (f, "%ld\n", i);
6869 }
6870 else
6871 {
6872 unsigned long i = ulongval ();
6873 if (i != ((long) (sizeof (short))))
6874 exit (1);
6875 fprintf (f, "%lu\n", i);
6876 }
6877 exit (ferror (f) || fclose (f) != 0);
6878
6879 ;
6880 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881}
Martin v. Löwis11437992002-04-12 09:54:03 +00006882_ACEOF
6883rm -f conftest$ac_exeext
6884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6885 (eval $ac_link) 2>&5
6886 ac_status=$?
6887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6890 (eval $ac_try) 2>&5
6891 ac_status=$?
6892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6893 (exit $ac_status); }; }; then
6894 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006895else
Martin v. Löwis11437992002-04-12 09:54:03 +00006896 echo "$as_me: program exited with status $ac_status" >&5
6897echo "$as_me: failed program was:" >&5
6898cat conftest.$ac_ext >&5
6899( exit $ac_status )
6900{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6901echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6902 { (exit 1); exit 1; }; }
6903fi
6904rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6905fi
6906fi
6907rm -f conftest.val
6908else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006909 ac_cv_sizeof_short=0
6910fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006912echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6913echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6914cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006915#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006916_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006917
6918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919echo "$as_me:$LINENO: checking for float" >&5
6920echo $ECHO_N "checking for float... $ECHO_C" >&6
6921if test "${ac_cv_type_float+set}" = set; then
6922 echo $ECHO_N "(cached) $ECHO_C" >&6
6923else
6924 cat >conftest.$ac_ext <<_ACEOF
6925#line $LINENO "configure"
6926#include "confdefs.h"
6927$ac_includes_default
6928#ifdef F77_DUMMY_MAIN
6929# ifdef __cplusplus
6930 extern "C"
6931# endif
6932 int F77_DUMMY_MAIN() { return 1; }
6933#endif
6934int
6935main ()
6936{
6937if ((float *) 0)
6938 return 0;
6939if (sizeof (float))
6940 return 0;
6941 ;
6942 return 0;
6943}
6944_ACEOF
6945rm -f conftest.$ac_objext
6946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6947 (eval $ac_compile) 2>&5
6948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); } &&
6951 { ac_try='test -s conftest.$ac_objext'
6952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953 (eval $ac_try) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); }; }; then
6957 ac_cv_type_float=yes
6958else
6959 echo "$as_me: failed program was:" >&5
6960cat conftest.$ac_ext >&5
6961ac_cv_type_float=no
6962fi
6963rm -f conftest.$ac_objext conftest.$ac_ext
6964fi
6965echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6966echo "${ECHO_T}$ac_cv_type_float" >&6
6967
6968echo "$as_me:$LINENO: checking size of float" >&5
6969echo $ECHO_N "checking size of float... $ECHO_C" >&6
6970if test "${ac_cv_sizeof_float+set}" = set; then
6971 echo $ECHO_N "(cached) $ECHO_C" >&6
6972else
6973 if test "$ac_cv_type_float" = yes; then
6974 # The cast to unsigned long works around a bug in the HP C Compiler
6975 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6976 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6977 # This bug is HP SR number 8606223364.
6978 if test "$cross_compiling" = yes; then
6979 # Depending upon the size, compute the lo and hi bounds.
6980cat >conftest.$ac_ext <<_ACEOF
6981#line $LINENO "configure"
6982#include "confdefs.h"
6983$ac_includes_default
6984#ifdef F77_DUMMY_MAIN
6985# ifdef __cplusplus
6986 extern "C"
6987# endif
6988 int F77_DUMMY_MAIN() { return 1; }
6989#endif
6990int
6991main ()
6992{
6993static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6994test_array [0] = 0
6995
6996 ;
6997 return 0;
6998}
6999_ACEOF
7000rm -f conftest.$ac_objext
7001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7002 (eval $ac_compile) 2>&5
7003 ac_status=$?
7004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7005 (exit $ac_status); } &&
7006 { ac_try='test -s conftest.$ac_objext'
7007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7008 (eval $ac_try) 2>&5
7009 ac_status=$?
7010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7011 (exit $ac_status); }; }; then
7012 ac_lo=0 ac_mid=0
7013 while :; do
7014 cat >conftest.$ac_ext <<_ACEOF
7015#line $LINENO "configure"
7016#include "confdefs.h"
7017$ac_includes_default
7018#ifdef F77_DUMMY_MAIN
7019# ifdef __cplusplus
7020 extern "C"
7021# endif
7022 int F77_DUMMY_MAIN() { return 1; }
7023#endif
7024int
7025main ()
7026{
7027static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7028test_array [0] = 0
7029
7030 ;
7031 return 0;
7032}
7033_ACEOF
7034rm -f conftest.$ac_objext
7035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7036 (eval $ac_compile) 2>&5
7037 ac_status=$?
7038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7039 (exit $ac_status); } &&
7040 { ac_try='test -s conftest.$ac_objext'
7041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7042 (eval $ac_try) 2>&5
7043 ac_status=$?
7044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7045 (exit $ac_status); }; }; then
7046 ac_hi=$ac_mid; break
7047else
7048 echo "$as_me: failed program was:" >&5
7049cat conftest.$ac_ext >&5
7050ac_lo=`expr $ac_mid + 1`
7051 if test $ac_lo -le $ac_mid; then
7052 ac_lo= ac_hi=
7053 break
7054 fi
7055 ac_mid=`expr 2 '*' $ac_mid + 1`
7056fi
7057rm -f conftest.$ac_objext conftest.$ac_ext
7058 done
7059else
7060 echo "$as_me: failed program was:" >&5
7061cat conftest.$ac_ext >&5
7062cat >conftest.$ac_ext <<_ACEOF
7063#line $LINENO "configure"
7064#include "confdefs.h"
7065$ac_includes_default
7066#ifdef F77_DUMMY_MAIN
7067# ifdef __cplusplus
7068 extern "C"
7069# endif
7070 int F77_DUMMY_MAIN() { return 1; }
7071#endif
7072int
7073main ()
7074{
7075static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7076test_array [0] = 0
7077
7078 ;
7079 return 0;
7080}
7081_ACEOF
7082rm -f conftest.$ac_objext
7083if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7084 (eval $ac_compile) 2>&5
7085 ac_status=$?
7086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7087 (exit $ac_status); } &&
7088 { ac_try='test -s conftest.$ac_objext'
7089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7090 (eval $ac_try) 2>&5
7091 ac_status=$?
7092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7093 (exit $ac_status); }; }; then
7094 ac_hi=-1 ac_mid=-1
7095 while :; do
7096 cat >conftest.$ac_ext <<_ACEOF
7097#line $LINENO "configure"
7098#include "confdefs.h"
7099$ac_includes_default
7100#ifdef F77_DUMMY_MAIN
7101# ifdef __cplusplus
7102 extern "C"
7103# endif
7104 int F77_DUMMY_MAIN() { return 1; }
7105#endif
7106int
7107main ()
7108{
7109static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7110test_array [0] = 0
7111
7112 ;
7113 return 0;
7114}
7115_ACEOF
7116rm -f conftest.$ac_objext
7117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7118 (eval $ac_compile) 2>&5
7119 ac_status=$?
7120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7121 (exit $ac_status); } &&
7122 { ac_try='test -s conftest.$ac_objext'
7123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7124 (eval $ac_try) 2>&5
7125 ac_status=$?
7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127 (exit $ac_status); }; }; then
7128 ac_lo=$ac_mid; break
7129else
7130 echo "$as_me: failed program was:" >&5
7131cat conftest.$ac_ext >&5
7132ac_hi=`expr '(' $ac_mid ')' - 1`
7133 if test $ac_mid -le $ac_hi; then
7134 ac_lo= ac_hi=
7135 break
7136 fi
7137 ac_mid=`expr 2 '*' $ac_mid`
7138fi
7139rm -f conftest.$ac_objext conftest.$ac_ext
7140 done
7141else
7142 echo "$as_me: failed program was:" >&5
7143cat conftest.$ac_ext >&5
7144ac_lo= ac_hi=
7145fi
7146rm -f conftest.$ac_objext conftest.$ac_ext
7147fi
7148rm -f conftest.$ac_objext conftest.$ac_ext
7149# Binary search between lo and hi bounds.
7150while test "x$ac_lo" != "x$ac_hi"; do
7151 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7152 cat >conftest.$ac_ext <<_ACEOF
7153#line $LINENO "configure"
7154#include "confdefs.h"
7155$ac_includes_default
7156#ifdef F77_DUMMY_MAIN
7157# ifdef __cplusplus
7158 extern "C"
7159# endif
7160 int F77_DUMMY_MAIN() { return 1; }
7161#endif
7162int
7163main ()
7164{
7165static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7166test_array [0] = 0
7167
7168 ;
7169 return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext
7173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7174 (eval $ac_compile) 2>&5
7175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); } &&
7178 { ac_try='test -s conftest.$ac_objext'
7179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7180 (eval $ac_try) 2>&5
7181 ac_status=$?
7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7183 (exit $ac_status); }; }; then
7184 ac_hi=$ac_mid
7185else
7186 echo "$as_me: failed program was:" >&5
7187cat conftest.$ac_ext >&5
7188ac_lo=`expr '(' $ac_mid ')' + 1`
7189fi
7190rm -f conftest.$ac_objext conftest.$ac_ext
7191done
7192case $ac_lo in
7193?*) ac_cv_sizeof_float=$ac_lo;;
7194'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7195echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7196 { (exit 1); exit 1; }; } ;;
7197esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007198else
7199 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7201echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7202 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007203else
Martin v. Löwis11437992002-04-12 09:54:03 +00007204 cat >conftest.$ac_ext <<_ACEOF
7205#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007206#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007207$ac_includes_default
7208long longval () { return (long) (sizeof (float)); }
7209unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007210#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007211#include <stdlib.h>
7212#ifdef F77_DUMMY_MAIN
7213# ifdef __cplusplus
7214 extern "C"
7215# endif
7216 int F77_DUMMY_MAIN() { return 1; }
7217#endif
7218int
7219main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220{
Martin v. Löwis11437992002-04-12 09:54:03 +00007221
7222 FILE *f = fopen ("conftest.val", "w");
7223 if (! f)
7224 exit (1);
7225 if (((long) (sizeof (float))) < 0)
7226 {
7227 long i = longval ();
7228 if (i != ((long) (sizeof (float))))
7229 exit (1);
7230 fprintf (f, "%ld\n", i);
7231 }
7232 else
7233 {
7234 unsigned long i = ulongval ();
7235 if (i != ((long) (sizeof (float))))
7236 exit (1);
7237 fprintf (f, "%lu\n", i);
7238 }
7239 exit (ferror (f) || fclose (f) != 0);
7240
7241 ;
7242 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007243}
Martin v. Löwis11437992002-04-12 09:54:03 +00007244_ACEOF
7245rm -f conftest$ac_exeext
7246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7247 (eval $ac_link) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7252 (eval $ac_try) 2>&5
7253 ac_status=$?
7254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7255 (exit $ac_status); }; }; then
7256 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007257else
Martin v. Löwis11437992002-04-12 09:54:03 +00007258 echo "$as_me: program exited with status $ac_status" >&5
7259echo "$as_me: failed program was:" >&5
7260cat conftest.$ac_ext >&5
7261( exit $ac_status )
7262{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7263echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7264 { (exit 1); exit 1; }; }
7265fi
7266rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7267fi
7268fi
7269rm -f conftest.val
7270else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007271 ac_cv_sizeof_float=0
7272fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007273fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007274echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7275echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7276cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007277#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007278_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279
7280
Martin v. Löwis11437992002-04-12 09:54:03 +00007281echo "$as_me:$LINENO: checking for double" >&5
7282echo $ECHO_N "checking for double... $ECHO_C" >&6
7283if test "${ac_cv_type_double+set}" = set; then
7284 echo $ECHO_N "(cached) $ECHO_C" >&6
7285else
7286 cat >conftest.$ac_ext <<_ACEOF
7287#line $LINENO "configure"
7288#include "confdefs.h"
7289$ac_includes_default
7290#ifdef F77_DUMMY_MAIN
7291# ifdef __cplusplus
7292 extern "C"
7293# endif
7294 int F77_DUMMY_MAIN() { return 1; }
7295#endif
7296int
7297main ()
7298{
7299if ((double *) 0)
7300 return 0;
7301if (sizeof (double))
7302 return 0;
7303 ;
7304 return 0;
7305}
7306_ACEOF
7307rm -f conftest.$ac_objext
7308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7309 (eval $ac_compile) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); } &&
7313 { ac_try='test -s conftest.$ac_objext'
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; }; then
7319 ac_cv_type_double=yes
7320else
7321 echo "$as_me: failed program was:" >&5
7322cat conftest.$ac_ext >&5
7323ac_cv_type_double=no
7324fi
7325rm -f conftest.$ac_objext conftest.$ac_ext
7326fi
7327echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7328echo "${ECHO_T}$ac_cv_type_double" >&6
7329
7330echo "$as_me:$LINENO: checking size of double" >&5
7331echo $ECHO_N "checking size of double... $ECHO_C" >&6
7332if test "${ac_cv_sizeof_double+set}" = set; then
7333 echo $ECHO_N "(cached) $ECHO_C" >&6
7334else
7335 if test "$ac_cv_type_double" = yes; then
7336 # The cast to unsigned long works around a bug in the HP C Compiler
7337 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7338 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7339 # This bug is HP SR number 8606223364.
7340 if test "$cross_compiling" = yes; then
7341 # Depending upon the size, compute the lo and hi bounds.
7342cat >conftest.$ac_ext <<_ACEOF
7343#line $LINENO "configure"
7344#include "confdefs.h"
7345$ac_includes_default
7346#ifdef F77_DUMMY_MAIN
7347# ifdef __cplusplus
7348 extern "C"
7349# endif
7350 int F77_DUMMY_MAIN() { return 1; }
7351#endif
7352int
7353main ()
7354{
7355static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7356test_array [0] = 0
7357
7358 ;
7359 return 0;
7360}
7361_ACEOF
7362rm -f conftest.$ac_objext
7363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7364 (eval $ac_compile) 2>&5
7365 ac_status=$?
7366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7367 (exit $ac_status); } &&
7368 { ac_try='test -s conftest.$ac_objext'
7369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7370 (eval $ac_try) 2>&5
7371 ac_status=$?
7372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7373 (exit $ac_status); }; }; then
7374 ac_lo=0 ac_mid=0
7375 while :; do
7376 cat >conftest.$ac_ext <<_ACEOF
7377#line $LINENO "configure"
7378#include "confdefs.h"
7379$ac_includes_default
7380#ifdef F77_DUMMY_MAIN
7381# ifdef __cplusplus
7382 extern "C"
7383# endif
7384 int F77_DUMMY_MAIN() { return 1; }
7385#endif
7386int
7387main ()
7388{
7389static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7390test_array [0] = 0
7391
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396rm -f conftest.$ac_objext
7397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7398 (eval $ac_compile) 2>&5
7399 ac_status=$?
7400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7401 (exit $ac_status); } &&
7402 { ac_try='test -s conftest.$ac_objext'
7403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404 (eval $ac_try) 2>&5
7405 ac_status=$?
7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407 (exit $ac_status); }; }; then
7408 ac_hi=$ac_mid; break
7409else
7410 echo "$as_me: failed program was:" >&5
7411cat conftest.$ac_ext >&5
7412ac_lo=`expr $ac_mid + 1`
7413 if test $ac_lo -le $ac_mid; then
7414 ac_lo= ac_hi=
7415 break
7416 fi
7417 ac_mid=`expr 2 '*' $ac_mid + 1`
7418fi
7419rm -f conftest.$ac_objext conftest.$ac_ext
7420 done
7421else
7422 echo "$as_me: failed program was:" >&5
7423cat conftest.$ac_ext >&5
7424cat >conftest.$ac_ext <<_ACEOF
7425#line $LINENO "configure"
7426#include "confdefs.h"
7427$ac_includes_default
7428#ifdef F77_DUMMY_MAIN
7429# ifdef __cplusplus
7430 extern "C"
7431# endif
7432 int F77_DUMMY_MAIN() { return 1; }
7433#endif
7434int
7435main ()
7436{
7437static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7438test_array [0] = 0
7439
7440 ;
7441 return 0;
7442}
7443_ACEOF
7444rm -f conftest.$ac_objext
7445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7446 (eval $ac_compile) 2>&5
7447 ac_status=$?
7448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449 (exit $ac_status); } &&
7450 { ac_try='test -s conftest.$ac_objext'
7451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7452 (eval $ac_try) 2>&5
7453 ac_status=$?
7454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7455 (exit $ac_status); }; }; then
7456 ac_hi=-1 ac_mid=-1
7457 while :; do
7458 cat >conftest.$ac_ext <<_ACEOF
7459#line $LINENO "configure"
7460#include "confdefs.h"
7461$ac_includes_default
7462#ifdef F77_DUMMY_MAIN
7463# ifdef __cplusplus
7464 extern "C"
7465# endif
7466 int F77_DUMMY_MAIN() { return 1; }
7467#endif
7468int
7469main ()
7470{
7471static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7472test_array [0] = 0
7473
7474 ;
7475 return 0;
7476}
7477_ACEOF
7478rm -f conftest.$ac_objext
7479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7480 (eval $ac_compile) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } &&
7484 { ac_try='test -s conftest.$ac_objext'
7485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7486 (eval $ac_try) 2>&5
7487 ac_status=$?
7488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7489 (exit $ac_status); }; }; then
7490 ac_lo=$ac_mid; break
7491else
7492 echo "$as_me: failed program was:" >&5
7493cat conftest.$ac_ext >&5
7494ac_hi=`expr '(' $ac_mid ')' - 1`
7495 if test $ac_mid -le $ac_hi; then
7496 ac_lo= ac_hi=
7497 break
7498 fi
7499 ac_mid=`expr 2 '*' $ac_mid`
7500fi
7501rm -f conftest.$ac_objext conftest.$ac_ext
7502 done
7503else
7504 echo "$as_me: failed program was:" >&5
7505cat conftest.$ac_ext >&5
7506ac_lo= ac_hi=
7507fi
7508rm -f conftest.$ac_objext conftest.$ac_ext
7509fi
7510rm -f conftest.$ac_objext conftest.$ac_ext
7511# Binary search between lo and hi bounds.
7512while test "x$ac_lo" != "x$ac_hi"; do
7513 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7514 cat >conftest.$ac_ext <<_ACEOF
7515#line $LINENO "configure"
7516#include "confdefs.h"
7517$ac_includes_default
7518#ifdef F77_DUMMY_MAIN
7519# ifdef __cplusplus
7520 extern "C"
7521# endif
7522 int F77_DUMMY_MAIN() { return 1; }
7523#endif
7524int
7525main ()
7526{
7527static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
7535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7536 (eval $ac_compile) 2>&5
7537 ac_status=$?
7538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7539 (exit $ac_status); } &&
7540 { ac_try='test -s conftest.$ac_objext'
7541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7542 (eval $ac_try) 2>&5
7543 ac_status=$?
7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7545 (exit $ac_status); }; }; then
7546 ac_hi=$ac_mid
7547else
7548 echo "$as_me: failed program was:" >&5
7549cat conftest.$ac_ext >&5
7550ac_lo=`expr '(' $ac_mid ')' + 1`
7551fi
7552rm -f conftest.$ac_objext conftest.$ac_ext
7553done
7554case $ac_lo in
7555?*) ac_cv_sizeof_double=$ac_lo;;
7556'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7557echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7558 { (exit 1); exit 1; }; } ;;
7559esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007560else
7561 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7563echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7564 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007565else
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 cat >conftest.$ac_ext <<_ACEOF
7567#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007568#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007569$ac_includes_default
7570long longval () { return (long) (sizeof (double)); }
7571unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007572#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007573#include <stdlib.h>
7574#ifdef F77_DUMMY_MAIN
7575# ifdef __cplusplus
7576 extern "C"
7577# endif
7578 int F77_DUMMY_MAIN() { return 1; }
7579#endif
7580int
7581main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007582{
Martin v. Löwis11437992002-04-12 09:54:03 +00007583
7584 FILE *f = fopen ("conftest.val", "w");
7585 if (! f)
7586 exit (1);
7587 if (((long) (sizeof (double))) < 0)
7588 {
7589 long i = longval ();
7590 if (i != ((long) (sizeof (double))))
7591 exit (1);
7592 fprintf (f, "%ld\n", i);
7593 }
7594 else
7595 {
7596 unsigned long i = ulongval ();
7597 if (i != ((long) (sizeof (double))))
7598 exit (1);
7599 fprintf (f, "%lu\n", i);
7600 }
7601 exit (ferror (f) || fclose (f) != 0);
7602
7603 ;
7604 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007605}
Martin v. Löwis11437992002-04-12 09:54:03 +00007606_ACEOF
7607rm -f conftest$ac_exeext
7608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7609 (eval $ac_link) 2>&5
7610 ac_status=$?
7611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); }; }; then
7618 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007619else
Martin v. Löwis11437992002-04-12 09:54:03 +00007620 echo "$as_me: program exited with status $ac_status" >&5
7621echo "$as_me: failed program was:" >&5
7622cat conftest.$ac_ext >&5
7623( exit $ac_status )
7624{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7625echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7626 { (exit 1); exit 1; }; }
7627fi
7628rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7629fi
7630fi
7631rm -f conftest.val
7632else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633 ac_cv_sizeof_double=0
7634fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007636echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7637echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7638cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007639#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007640_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641
7642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643echo "$as_me:$LINENO: checking for fpos_t" >&5
7644echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7645if test "${ac_cv_type_fpos_t+set}" = set; then
7646 echo $ECHO_N "(cached) $ECHO_C" >&6
7647else
7648 cat >conftest.$ac_ext <<_ACEOF
7649#line $LINENO "configure"
7650#include "confdefs.h"
7651$ac_includes_default
7652#ifdef F77_DUMMY_MAIN
7653# ifdef __cplusplus
7654 extern "C"
7655# endif
7656 int F77_DUMMY_MAIN() { return 1; }
7657#endif
7658int
7659main ()
7660{
7661if ((fpos_t *) 0)
7662 return 0;
7663if (sizeof (fpos_t))
7664 return 0;
7665 ;
7666 return 0;
7667}
7668_ACEOF
7669rm -f conftest.$ac_objext
7670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7671 (eval $ac_compile) 2>&5
7672 ac_status=$?
7673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674 (exit $ac_status); } &&
7675 { ac_try='test -s conftest.$ac_objext'
7676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7677 (eval $ac_try) 2>&5
7678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); }; }; then
7681 ac_cv_type_fpos_t=yes
7682else
7683 echo "$as_me: failed program was:" >&5
7684cat conftest.$ac_ext >&5
7685ac_cv_type_fpos_t=no
7686fi
7687rm -f conftest.$ac_objext conftest.$ac_ext
7688fi
7689echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7690echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7691
7692echo "$as_me:$LINENO: checking size of fpos_t" >&5
7693echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7694if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7695 echo $ECHO_N "(cached) $ECHO_C" >&6
7696else
7697 if test "$ac_cv_type_fpos_t" = yes; then
7698 # The cast to unsigned long works around a bug in the HP C Compiler
7699 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7700 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7701 # This bug is HP SR number 8606223364.
7702 if test "$cross_compiling" = yes; then
7703 # Depending upon the size, compute the lo and hi bounds.
7704cat >conftest.$ac_ext <<_ACEOF
7705#line $LINENO "configure"
7706#include "confdefs.h"
7707$ac_includes_default
7708#ifdef F77_DUMMY_MAIN
7709# ifdef __cplusplus
7710 extern "C"
7711# endif
7712 int F77_DUMMY_MAIN() { return 1; }
7713#endif
7714int
7715main ()
7716{
7717static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7718test_array [0] = 0
7719
7720 ;
7721 return 0;
7722}
7723_ACEOF
7724rm -f conftest.$ac_objext
7725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7726 (eval $ac_compile) 2>&5
7727 ac_status=$?
7728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729 (exit $ac_status); } &&
7730 { ac_try='test -s conftest.$ac_objext'
7731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7732 (eval $ac_try) 2>&5
7733 ac_status=$?
7734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 (exit $ac_status); }; }; then
7736 ac_lo=0 ac_mid=0
7737 while :; do
7738 cat >conftest.$ac_ext <<_ACEOF
7739#line $LINENO "configure"
7740#include "confdefs.h"
7741$ac_includes_default
7742#ifdef F77_DUMMY_MAIN
7743# ifdef __cplusplus
7744 extern "C"
7745# endif
7746 int F77_DUMMY_MAIN() { return 1; }
7747#endif
7748int
7749main ()
7750{
7751static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7752test_array [0] = 0
7753
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
7759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7760 (eval $ac_compile) 2>&5
7761 ac_status=$?
7762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7763 (exit $ac_status); } &&
7764 { ac_try='test -s conftest.$ac_objext'
7765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7766 (eval $ac_try) 2>&5
7767 ac_status=$?
7768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7769 (exit $ac_status); }; }; then
7770 ac_hi=$ac_mid; break
7771else
7772 echo "$as_me: failed program was:" >&5
7773cat conftest.$ac_ext >&5
7774ac_lo=`expr $ac_mid + 1`
7775 if test $ac_lo -le $ac_mid; then
7776 ac_lo= ac_hi=
7777 break
7778 fi
7779 ac_mid=`expr 2 '*' $ac_mid + 1`
7780fi
7781rm -f conftest.$ac_objext conftest.$ac_ext
7782 done
7783else
7784 echo "$as_me: failed program was:" >&5
7785cat conftest.$ac_ext >&5
7786cat >conftest.$ac_ext <<_ACEOF
7787#line $LINENO "configure"
7788#include "confdefs.h"
7789$ac_includes_default
7790#ifdef F77_DUMMY_MAIN
7791# ifdef __cplusplus
7792 extern "C"
7793# endif
7794 int F77_DUMMY_MAIN() { return 1; }
7795#endif
7796int
7797main ()
7798{
7799static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7800test_array [0] = 0
7801
7802 ;
7803 return 0;
7804}
7805_ACEOF
7806rm -f conftest.$ac_objext
7807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7808 (eval $ac_compile) 2>&5
7809 ac_status=$?
7810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7811 (exit $ac_status); } &&
7812 { ac_try='test -s conftest.$ac_objext'
7813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7814 (eval $ac_try) 2>&5
7815 ac_status=$?
7816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817 (exit $ac_status); }; }; then
7818 ac_hi=-1 ac_mid=-1
7819 while :; do
7820 cat >conftest.$ac_ext <<_ACEOF
7821#line $LINENO "configure"
7822#include "confdefs.h"
7823$ac_includes_default
7824#ifdef F77_DUMMY_MAIN
7825# ifdef __cplusplus
7826 extern "C"
7827# endif
7828 int F77_DUMMY_MAIN() { return 1; }
7829#endif
7830int
7831main ()
7832{
7833static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7834test_array [0] = 0
7835
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840rm -f conftest.$ac_objext
7841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7842 (eval $ac_compile) 2>&5
7843 ac_status=$?
7844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7845 (exit $ac_status); } &&
7846 { ac_try='test -s conftest.$ac_objext'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; }; then
7852 ac_lo=$ac_mid; break
7853else
7854 echo "$as_me: failed program was:" >&5
7855cat conftest.$ac_ext >&5
7856ac_hi=`expr '(' $ac_mid ')' - 1`
7857 if test $ac_mid -le $ac_hi; then
7858 ac_lo= ac_hi=
7859 break
7860 fi
7861 ac_mid=`expr 2 '*' $ac_mid`
7862fi
7863rm -f conftest.$ac_objext conftest.$ac_ext
7864 done
7865else
7866 echo "$as_me: failed program was:" >&5
7867cat conftest.$ac_ext >&5
7868ac_lo= ac_hi=
7869fi
7870rm -f conftest.$ac_objext conftest.$ac_ext
7871fi
7872rm -f conftest.$ac_objext conftest.$ac_ext
7873# Binary search between lo and hi bounds.
7874while test "x$ac_lo" != "x$ac_hi"; do
7875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7876 cat >conftest.$ac_ext <<_ACEOF
7877#line $LINENO "configure"
7878#include "confdefs.h"
7879$ac_includes_default
7880#ifdef F77_DUMMY_MAIN
7881# ifdef __cplusplus
7882 extern "C"
7883# endif
7884 int F77_DUMMY_MAIN() { return 1; }
7885#endif
7886int
7887main ()
7888{
7889static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7890test_array [0] = 0
7891
7892 ;
7893 return 0;
7894}
7895_ACEOF
7896rm -f conftest.$ac_objext
7897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7898 (eval $ac_compile) 2>&5
7899 ac_status=$?
7900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7901 (exit $ac_status); } &&
7902 { ac_try='test -s conftest.$ac_objext'
7903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7904 (eval $ac_try) 2>&5
7905 ac_status=$?
7906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7907 (exit $ac_status); }; }; then
7908 ac_hi=$ac_mid
7909else
7910 echo "$as_me: failed program was:" >&5
7911cat conftest.$ac_ext >&5
7912ac_lo=`expr '(' $ac_mid ')' + 1`
7913fi
7914rm -f conftest.$ac_objext conftest.$ac_ext
7915done
7916case $ac_lo in
7917?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7918'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7919echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7920 { (exit 1); exit 1; }; } ;;
7921esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007922else
7923 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7925echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7926 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 cat >conftest.$ac_ext <<_ACEOF
7929#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007930#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007931$ac_includes_default
7932long longval () { return (long) (sizeof (fpos_t)); }
7933unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007934#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007935#include <stdlib.h>
7936#ifdef F77_DUMMY_MAIN
7937# ifdef __cplusplus
7938 extern "C"
7939# endif
7940 int F77_DUMMY_MAIN() { return 1; }
7941#endif
7942int
7943main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007944{
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
7946 FILE *f = fopen ("conftest.val", "w");
7947 if (! f)
7948 exit (1);
7949 if (((long) (sizeof (fpos_t))) < 0)
7950 {
7951 long i = longval ();
7952 if (i != ((long) (sizeof (fpos_t))))
7953 exit (1);
7954 fprintf (f, "%ld\n", i);
7955 }
7956 else
7957 {
7958 unsigned long i = ulongval ();
7959 if (i != ((long) (sizeof (fpos_t))))
7960 exit (1);
7961 fprintf (f, "%lu\n", i);
7962 }
7963 exit (ferror (f) || fclose (f) != 0);
7964
7965 ;
7966 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007967}
Martin v. Löwis11437992002-04-12 09:54:03 +00007968_ACEOF
7969rm -f conftest$ac_exeext
7970if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7971 (eval $ac_link) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7976 (eval $ac_try) 2>&5
7977 ac_status=$?
7978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7979 (exit $ac_status); }; }; then
7980 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007981else
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 echo "$as_me: program exited with status $ac_status" >&5
7983echo "$as_me: failed program was:" >&5
7984cat conftest.$ac_ext >&5
7985( exit $ac_status )
7986{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7987echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7988 { (exit 1); exit 1; }; }
7989fi
7990rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7991fi
7992fi
7993rm -f conftest.val
7994else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007995 ac_cv_sizeof_fpos_t=0
7996fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007998echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7999echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8000cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008001#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008002_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008003
Michael W. Hudson54241132001-12-07 15:38:26 +00008004
8005
Martin v. Löwis11437992002-04-12 09:54:03 +00008006echo "$as_me:$LINENO: checking for long long support" >&5
8007echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008008have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008009cat >conftest.$ac_ext <<_ACEOF
8010#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008011#include "confdefs.h"
8012
Martin v. Löwis11437992002-04-12 09:54:03 +00008013#ifdef F77_DUMMY_MAIN
8014# ifdef __cplusplus
8015 extern "C"
8016# endif
8017 int F77_DUMMY_MAIN() { return 1; }
8018#endif
8019int
8020main ()
8021{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008022long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ;
8024 return 0;
8025}
8026_ACEOF
8027rm -f conftest.$ac_objext
8028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8029 (eval $ac_compile) 2>&5
8030 ac_status=$?
8031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest.$ac_objext'
8034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8035 (eval $ac_try) 2>&5
8036 ac_status=$?
8037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039
8040
8041cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008042#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008043_ACEOF
8044
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008045 have_long_long=yes
8046
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008047else
Martin v. Löwis11437992002-04-12 09:54:03 +00008048 echo "$as_me: failed program was:" >&5
8049cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008051rm -f conftest.$ac_objext conftest.$ac_ext
8052echo "$as_me:$LINENO: result: $have_long_long" >&5
8053echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008054if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008055echo "$as_me:$LINENO: checking for long long" >&5
8056echo $ECHO_N "checking for long long... $ECHO_C" >&6
8057if test "${ac_cv_type_long_long+set}" = set; then
8058 echo $ECHO_N "(cached) $ECHO_C" >&6
8059else
8060 cat >conftest.$ac_ext <<_ACEOF
8061#line $LINENO "configure"
8062#include "confdefs.h"
8063$ac_includes_default
8064#ifdef F77_DUMMY_MAIN
8065# ifdef __cplusplus
8066 extern "C"
8067# endif
8068 int F77_DUMMY_MAIN() { return 1; }
8069#endif
8070int
8071main ()
8072{
8073if ((long long *) 0)
8074 return 0;
8075if (sizeof (long long))
8076 return 0;
8077 ;
8078 return 0;
8079}
8080_ACEOF
8081rm -f conftest.$ac_objext
8082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8083 (eval $ac_compile) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); } &&
8087 { ac_try='test -s conftest.$ac_objext'
8088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8089 (eval $ac_try) 2>&5
8090 ac_status=$?
8091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8092 (exit $ac_status); }; }; then
8093 ac_cv_type_long_long=yes
8094else
8095 echo "$as_me: failed program was:" >&5
8096cat conftest.$ac_ext >&5
8097ac_cv_type_long_long=no
8098fi
8099rm -f conftest.$ac_objext conftest.$ac_ext
8100fi
8101echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8102echo "${ECHO_T}$ac_cv_type_long_long" >&6
8103
8104echo "$as_me:$LINENO: checking size of long long" >&5
8105echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8106if test "${ac_cv_sizeof_long_long+set}" = set; then
8107 echo $ECHO_N "(cached) $ECHO_C" >&6
8108else
8109 if test "$ac_cv_type_long_long" = yes; then
8110 # The cast to unsigned long works around a bug in the HP C Compiler
8111 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8112 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8113 # This bug is HP SR number 8606223364.
8114 if test "$cross_compiling" = yes; then
8115 # Depending upon the size, compute the lo and hi bounds.
8116cat >conftest.$ac_ext <<_ACEOF
8117#line $LINENO "configure"
8118#include "confdefs.h"
8119$ac_includes_default
8120#ifdef F77_DUMMY_MAIN
8121# ifdef __cplusplus
8122 extern "C"
8123# endif
8124 int F77_DUMMY_MAIN() { return 1; }
8125#endif
8126int
8127main ()
8128{
8129static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8130test_array [0] = 0
8131
8132 ;
8133 return 0;
8134}
8135_ACEOF
8136rm -f conftest.$ac_objext
8137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8138 (eval $ac_compile) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); } &&
8142 { ac_try='test -s conftest.$ac_objext'
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; }; then
8148 ac_lo=0 ac_mid=0
8149 while :; do
8150 cat >conftest.$ac_ext <<_ACEOF
8151#line $LINENO "configure"
8152#include "confdefs.h"
8153$ac_includes_default
8154#ifdef F77_DUMMY_MAIN
8155# ifdef __cplusplus
8156 extern "C"
8157# endif
8158 int F77_DUMMY_MAIN() { return 1; }
8159#endif
8160int
8161main ()
8162{
8163static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8164test_array [0] = 0
8165
8166 ;
8167 return 0;
8168}
8169_ACEOF
8170rm -f conftest.$ac_objext
8171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8172 (eval $ac_compile) 2>&5
8173 ac_status=$?
8174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); } &&
8176 { ac_try='test -s conftest.$ac_objext'
8177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8178 (eval $ac_try) 2>&5
8179 ac_status=$?
8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8181 (exit $ac_status); }; }; then
8182 ac_hi=$ac_mid; break
8183else
8184 echo "$as_me: failed program was:" >&5
8185cat conftest.$ac_ext >&5
8186ac_lo=`expr $ac_mid + 1`
8187 if test $ac_lo -le $ac_mid; then
8188 ac_lo= ac_hi=
8189 break
8190 fi
8191 ac_mid=`expr 2 '*' $ac_mid + 1`
8192fi
8193rm -f conftest.$ac_objext conftest.$ac_ext
8194 done
8195else
8196 echo "$as_me: failed program was:" >&5
8197cat conftest.$ac_ext >&5
8198cat >conftest.$ac_ext <<_ACEOF
8199#line $LINENO "configure"
8200#include "confdefs.h"
8201$ac_includes_default
8202#ifdef F77_DUMMY_MAIN
8203# ifdef __cplusplus
8204 extern "C"
8205# endif
8206 int F77_DUMMY_MAIN() { return 1; }
8207#endif
8208int
8209main ()
8210{
8211static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8212test_array [0] = 0
8213
8214 ;
8215 return 0;
8216}
8217_ACEOF
8218rm -f conftest.$ac_objext
8219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8220 (eval $ac_compile) 2>&5
8221 ac_status=$?
8222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8223 (exit $ac_status); } &&
8224 { ac_try='test -s conftest.$ac_objext'
8225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8226 (eval $ac_try) 2>&5
8227 ac_status=$?
8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8229 (exit $ac_status); }; }; then
8230 ac_hi=-1 ac_mid=-1
8231 while :; do
8232 cat >conftest.$ac_ext <<_ACEOF
8233#line $LINENO "configure"
8234#include "confdefs.h"
8235$ac_includes_default
8236#ifdef F77_DUMMY_MAIN
8237# ifdef __cplusplus
8238 extern "C"
8239# endif
8240 int F77_DUMMY_MAIN() { return 1; }
8241#endif
8242int
8243main ()
8244{
8245static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8246test_array [0] = 0
8247
8248 ;
8249 return 0;
8250}
8251_ACEOF
8252rm -f conftest.$ac_objext
8253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8254 (eval $ac_compile) 2>&5
8255 ac_status=$?
8256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8257 (exit $ac_status); } &&
8258 { ac_try='test -s conftest.$ac_objext'
8259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8260 (eval $ac_try) 2>&5
8261 ac_status=$?
8262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8263 (exit $ac_status); }; }; then
8264 ac_lo=$ac_mid; break
8265else
8266 echo "$as_me: failed program was:" >&5
8267cat conftest.$ac_ext >&5
8268ac_hi=`expr '(' $ac_mid ')' - 1`
8269 if test $ac_mid -le $ac_hi; then
8270 ac_lo= ac_hi=
8271 break
8272 fi
8273 ac_mid=`expr 2 '*' $ac_mid`
8274fi
8275rm -f conftest.$ac_objext conftest.$ac_ext
8276 done
8277else
8278 echo "$as_me: failed program was:" >&5
8279cat conftest.$ac_ext >&5
8280ac_lo= ac_hi=
8281fi
8282rm -f conftest.$ac_objext conftest.$ac_ext
8283fi
8284rm -f conftest.$ac_objext conftest.$ac_ext
8285# Binary search between lo and hi bounds.
8286while test "x$ac_lo" != "x$ac_hi"; do
8287 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8288 cat >conftest.$ac_ext <<_ACEOF
8289#line $LINENO "configure"
8290#include "confdefs.h"
8291$ac_includes_default
8292#ifdef F77_DUMMY_MAIN
8293# ifdef __cplusplus
8294 extern "C"
8295# endif
8296 int F77_DUMMY_MAIN() { return 1; }
8297#endif
8298int
8299main ()
8300{
8301static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8302test_array [0] = 0
8303
8304 ;
8305 return 0;
8306}
8307_ACEOF
8308rm -f conftest.$ac_objext
8309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8310 (eval $ac_compile) 2>&5
8311 ac_status=$?
8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313 (exit $ac_status); } &&
8314 { ac_try='test -s conftest.$ac_objext'
8315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8316 (eval $ac_try) 2>&5
8317 ac_status=$?
8318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319 (exit $ac_status); }; }; then
8320 ac_hi=$ac_mid
8321else
8322 echo "$as_me: failed program was:" >&5
8323cat conftest.$ac_ext >&5
8324ac_lo=`expr '(' $ac_mid ')' + 1`
8325fi
8326rm -f conftest.$ac_objext conftest.$ac_ext
8327done
8328case $ac_lo in
8329?*) ac_cv_sizeof_long_long=$ac_lo;;
8330'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8331echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8332 { (exit 1); exit 1; }; } ;;
8333esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008334else
8335 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8337echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8338 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008339else
Martin v. Löwis11437992002-04-12 09:54:03 +00008340 cat >conftest.$ac_ext <<_ACEOF
8341#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008342#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008343$ac_includes_default
8344long longval () { return (long) (sizeof (long long)); }
8345unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008346#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008347#include <stdlib.h>
8348#ifdef F77_DUMMY_MAIN
8349# ifdef __cplusplus
8350 extern "C"
8351# endif
8352 int F77_DUMMY_MAIN() { return 1; }
8353#endif
8354int
8355main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008356{
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358 FILE *f = fopen ("conftest.val", "w");
8359 if (! f)
8360 exit (1);
8361 if (((long) (sizeof (long long))) < 0)
8362 {
8363 long i = longval ();
8364 if (i != ((long) (sizeof (long long))))
8365 exit (1);
8366 fprintf (f, "%ld\n", i);
8367 }
8368 else
8369 {
8370 unsigned long i = ulongval ();
8371 if (i != ((long) (sizeof (long long))))
8372 exit (1);
8373 fprintf (f, "%lu\n", i);
8374 }
8375 exit (ferror (f) || fclose (f) != 0);
8376
8377 ;
8378 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008379}
Martin v. Löwis11437992002-04-12 09:54:03 +00008380_ACEOF
8381rm -f conftest$ac_exeext
8382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8383 (eval $ac_link) 2>&5
8384 ac_status=$?
8385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8386 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8388 (eval $ac_try) 2>&5
8389 ac_status=$?
8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8391 (exit $ac_status); }; }; then
8392 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008393else
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 echo "$as_me: program exited with status $ac_status" >&5
8395echo "$as_me: failed program was:" >&5
8396cat conftest.$ac_ext >&5
8397( exit $ac_status )
8398{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8399echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8400 { (exit 1); exit 1; }; }
8401fi
8402rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8403fi
8404fi
8405rm -f conftest.val
8406else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008407 ac_cv_sizeof_long_long=0
8408fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008410echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8411echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8412cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008413#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008415
Michael W. Hudson54241132001-12-07 15:38:26 +00008416
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008417fi
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8420echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008421have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008422cat >conftest.$ac_ext <<_ACEOF
8423#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008424#include "confdefs.h"
8425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426#ifdef F77_DUMMY_MAIN
8427# ifdef __cplusplus
8428 extern "C"
8429# endif
8430 int F77_DUMMY_MAIN() { return 1; }
8431#endif
8432int
8433main ()
8434{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008435uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ;
8437 return 0;
8438}
8439_ACEOF
8440rm -f conftest.$ac_objext
8441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8442 (eval $ac_compile) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); } &&
8446 { ac_try='test -s conftest.$ac_objext'
8447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8448 (eval $ac_try) 2>&5
8449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); }; }; then
8452
8453
8454cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008455#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008456_ACEOF
8457
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008458 have_uintptr_t=yes
8459
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008460else
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 echo "$as_me: failed program was:" >&5
8462cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008463fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008464rm -f conftest.$ac_objext conftest.$ac_ext
8465echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8466echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008467if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008468echo "$as_me:$LINENO: checking for uintptr_t" >&5
8469echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8470if test "${ac_cv_type_uintptr_t+set}" = set; then
8471 echo $ECHO_N "(cached) $ECHO_C" >&6
8472else
8473 cat >conftest.$ac_ext <<_ACEOF
8474#line $LINENO "configure"
8475#include "confdefs.h"
8476$ac_includes_default
8477#ifdef F77_DUMMY_MAIN
8478# ifdef __cplusplus
8479 extern "C"
8480# endif
8481 int F77_DUMMY_MAIN() { return 1; }
8482#endif
8483int
8484main ()
8485{
8486if ((uintptr_t *) 0)
8487 return 0;
8488if (sizeof (uintptr_t))
8489 return 0;
8490 ;
8491 return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext
8495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8496 (eval $ac_compile) 2>&5
8497 ac_status=$?
8498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8499 (exit $ac_status); } &&
8500 { ac_try='test -s conftest.$ac_objext'
8501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8502 (eval $ac_try) 2>&5
8503 ac_status=$?
8504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8505 (exit $ac_status); }; }; then
8506 ac_cv_type_uintptr_t=yes
8507else
8508 echo "$as_me: failed program was:" >&5
8509cat conftest.$ac_ext >&5
8510ac_cv_type_uintptr_t=no
8511fi
8512rm -f conftest.$ac_objext conftest.$ac_ext
8513fi
8514echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8515echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8516
8517echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8518echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8519if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8520 echo $ECHO_N "(cached) $ECHO_C" >&6
8521else
8522 if test "$ac_cv_type_uintptr_t" = yes; then
8523 # The cast to unsigned long works around a bug in the HP C Compiler
8524 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526 # This bug is HP SR number 8606223364.
8527 if test "$cross_compiling" = yes; then
8528 # Depending upon the size, compute the lo and hi bounds.
8529cat >conftest.$ac_ext <<_ACEOF
8530#line $LINENO "configure"
8531#include "confdefs.h"
8532$ac_includes_default
8533#ifdef F77_DUMMY_MAIN
8534# ifdef __cplusplus
8535 extern "C"
8536# endif
8537 int F77_DUMMY_MAIN() { return 1; }
8538#endif
8539int
8540main ()
8541{
8542static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8543test_array [0] = 0
8544
8545 ;
8546 return 0;
8547}
8548_ACEOF
8549rm -f conftest.$ac_objext
8550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8551 (eval $ac_compile) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); } &&
8555 { ac_try='test -s conftest.$ac_objext'
8556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557 (eval $ac_try) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); }; }; then
8561 ac_lo=0 ac_mid=0
8562 while :; do
8563 cat >conftest.$ac_ext <<_ACEOF
8564#line $LINENO "configure"
8565#include "confdefs.h"
8566$ac_includes_default
8567#ifdef F77_DUMMY_MAIN
8568# ifdef __cplusplus
8569 extern "C"
8570# endif
8571 int F77_DUMMY_MAIN() { return 1; }
8572#endif
8573int
8574main ()
8575{
8576static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8577test_array [0] = 0
8578
8579 ;
8580 return 0;
8581}
8582_ACEOF
8583rm -f conftest.$ac_objext
8584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8585 (eval $ac_compile) 2>&5
8586 ac_status=$?
8587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8588 (exit $ac_status); } &&
8589 { ac_try='test -s conftest.$ac_objext'
8590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8591 (eval $ac_try) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; }; then
8595 ac_hi=$ac_mid; break
8596else
8597 echo "$as_me: failed program was:" >&5
8598cat conftest.$ac_ext >&5
8599ac_lo=`expr $ac_mid + 1`
8600 if test $ac_lo -le $ac_mid; then
8601 ac_lo= ac_hi=
8602 break
8603 fi
8604 ac_mid=`expr 2 '*' $ac_mid + 1`
8605fi
8606rm -f conftest.$ac_objext conftest.$ac_ext
8607 done
8608else
8609 echo "$as_me: failed program was:" >&5
8610cat conftest.$ac_ext >&5
8611cat >conftest.$ac_ext <<_ACEOF
8612#line $LINENO "configure"
8613#include "confdefs.h"
8614$ac_includes_default
8615#ifdef F77_DUMMY_MAIN
8616# ifdef __cplusplus
8617 extern "C"
8618# endif
8619 int F77_DUMMY_MAIN() { return 1; }
8620#endif
8621int
8622main ()
8623{
8624static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8625test_array [0] = 0
8626
8627 ;
8628 return 0;
8629}
8630_ACEOF
8631rm -f conftest.$ac_objext
8632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8633 (eval $ac_compile) 2>&5
8634 ac_status=$?
8635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8636 (exit $ac_status); } &&
8637 { ac_try='test -s conftest.$ac_objext'
8638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8639 (eval $ac_try) 2>&5
8640 ac_status=$?
8641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642 (exit $ac_status); }; }; then
8643 ac_hi=-1 ac_mid=-1
8644 while :; do
8645 cat >conftest.$ac_ext <<_ACEOF
8646#line $LINENO "configure"
8647#include "confdefs.h"
8648$ac_includes_default
8649#ifdef F77_DUMMY_MAIN
8650# ifdef __cplusplus
8651 extern "C"
8652# endif
8653 int F77_DUMMY_MAIN() { return 1; }
8654#endif
8655int
8656main ()
8657{
8658static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8659test_array [0] = 0
8660
8661 ;
8662 return 0;
8663}
8664_ACEOF
8665rm -f conftest.$ac_objext
8666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8667 (eval $ac_compile) 2>&5
8668 ac_status=$?
8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670 (exit $ac_status); } &&
8671 { ac_try='test -s conftest.$ac_objext'
8672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8673 (eval $ac_try) 2>&5
8674 ac_status=$?
8675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8676 (exit $ac_status); }; }; then
8677 ac_lo=$ac_mid; break
8678else
8679 echo "$as_me: failed program was:" >&5
8680cat conftest.$ac_ext >&5
8681ac_hi=`expr '(' $ac_mid ')' - 1`
8682 if test $ac_mid -le $ac_hi; then
8683 ac_lo= ac_hi=
8684 break
8685 fi
8686 ac_mid=`expr 2 '*' $ac_mid`
8687fi
8688rm -f conftest.$ac_objext conftest.$ac_ext
8689 done
8690else
8691 echo "$as_me: failed program was:" >&5
8692cat conftest.$ac_ext >&5
8693ac_lo= ac_hi=
8694fi
8695rm -f conftest.$ac_objext conftest.$ac_ext
8696fi
8697rm -f conftest.$ac_objext conftest.$ac_ext
8698# Binary search between lo and hi bounds.
8699while test "x$ac_lo" != "x$ac_hi"; do
8700 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8701 cat >conftest.$ac_ext <<_ACEOF
8702#line $LINENO "configure"
8703#include "confdefs.h"
8704$ac_includes_default
8705#ifdef F77_DUMMY_MAIN
8706# ifdef __cplusplus
8707 extern "C"
8708# endif
8709 int F77_DUMMY_MAIN() { return 1; }
8710#endif
8711int
8712main ()
8713{
8714static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8715test_array [0] = 0
8716
8717 ;
8718 return 0;
8719}
8720_ACEOF
8721rm -f conftest.$ac_objext
8722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8723 (eval $ac_compile) 2>&5
8724 ac_status=$?
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); } &&
8727 { ac_try='test -s conftest.$ac_objext'
8728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8729 (eval $ac_try) 2>&5
8730 ac_status=$?
8731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8732 (exit $ac_status); }; }; then
8733 ac_hi=$ac_mid
8734else
8735 echo "$as_me: failed program was:" >&5
8736cat conftest.$ac_ext >&5
8737ac_lo=`expr '(' $ac_mid ')' + 1`
8738fi
8739rm -f conftest.$ac_objext conftest.$ac_ext
8740done
8741case $ac_lo in
8742?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8743'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8744echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8745 { (exit 1); exit 1; }; } ;;
8746esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008747else
8748 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8750echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8751 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008752else
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 cat >conftest.$ac_ext <<_ACEOF
8754#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008755#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008756$ac_includes_default
8757long longval () { return (long) (sizeof (uintptr_t)); }
8758unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008759#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008760#include <stdlib.h>
8761#ifdef F77_DUMMY_MAIN
8762# ifdef __cplusplus
8763 extern "C"
8764# endif
8765 int F77_DUMMY_MAIN() { return 1; }
8766#endif
8767int
8768main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008769{
Martin v. Löwis11437992002-04-12 09:54:03 +00008770
8771 FILE *f = fopen ("conftest.val", "w");
8772 if (! f)
8773 exit (1);
8774 if (((long) (sizeof (uintptr_t))) < 0)
8775 {
8776 long i = longval ();
8777 if (i != ((long) (sizeof (uintptr_t))))
8778 exit (1);
8779 fprintf (f, "%ld\n", i);
8780 }
8781 else
8782 {
8783 unsigned long i = ulongval ();
8784 if (i != ((long) (sizeof (uintptr_t))))
8785 exit (1);
8786 fprintf (f, "%lu\n", i);
8787 }
8788 exit (ferror (f) || fclose (f) != 0);
8789
8790 ;
8791 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008792}
Martin v. Löwis11437992002-04-12 09:54:03 +00008793_ACEOF
8794rm -f conftest$ac_exeext
8795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8805 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008806else
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 echo "$as_me: program exited with status $ac_status" >&5
8808echo "$as_me: failed program was:" >&5
8809cat conftest.$ac_ext >&5
8810( exit $ac_status )
8811{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8812echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8813 { (exit 1); exit 1; }; }
8814fi
8815rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8816fi
8817fi
8818rm -f conftest.val
8819else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008820 ac_cv_sizeof_uintptr_t=0
8821fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008822fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008823echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8824echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8825cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008826#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008827_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008828
Michael W. Hudson54241132001-12-07 15:38:26 +00008829
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008830fi
8831
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008832# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008833echo "$as_me:$LINENO: checking size of off_t" >&5
8834echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8835if test "${ac_cv_sizeof_off_t+set}" = set; then
8836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008837else
8838 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008839 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008840else
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 cat >conftest.$ac_ext <<_ACEOF
8842#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008843#include "confdefs.h"
8844#include <stdio.h>
8845#include <sys/types.h>
8846main()
8847{
8848 FILE *f=fopen("conftestval", "w");
8849 if (!f) exit(1);
8850 fprintf(f, "%d\n", sizeof(off_t));
8851 exit(0);
8852}
Martin v. Löwis11437992002-04-12 09:54:03 +00008853_ACEOF
8854rm -f conftest$ac_exeext
8855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8856 (eval $ac_link) 2>&5
8857 ac_status=$?
8858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8861 (eval $ac_try) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865 ac_cv_sizeof_off_t=`cat conftestval`
8866else
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 echo "$as_me: program exited with status $ac_status" >&5
8868echo "$as_me: failed program was:" >&5
8869cat conftest.$ac_ext >&5
8870( exit $ac_status )
8871ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008872fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008873rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874fi
8875
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008876fi
8877
Martin v. Löwis11437992002-04-12 09:54:03 +00008878echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8879echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8880
8881cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008882#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008883_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008884
Michael W. Hudson54241132001-12-07 15:38:26 +00008885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8887echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008888if test "$have_long_long" = yes -a \
8889 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8890 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891
Martin v. Löwis11437992002-04-12 09:54:03 +00008892cat >>confdefs.h <<\_ACEOF
8893#define HAVE_LARGEFILE_SUPPORT 1
8894_ACEOF
8895
8896 echo "$as_me:$LINENO: result: yes" >&5
8897echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008898else
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 echo "$as_me:$LINENO: result: no" >&5
8900echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008901fi
8902
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008903# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008904echo "$as_me:$LINENO: checking size of time_t" >&5
8905echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8906if test "${ac_cv_sizeof_time_t+set}" = set; then
8907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008908else
8909 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008910 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008911else
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 cat >conftest.$ac_ext <<_ACEOF
8913#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008914#include "confdefs.h"
8915#include <stdio.h>
8916#include <time.h>
8917main()
8918{
8919 FILE *f=fopen("conftestval", "w");
8920 if (!f) exit(1);
8921 fprintf(f, "%d\n", sizeof(time_t));
8922 exit(0);
8923}
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
8925rm -f conftest$ac_exeext
8926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8927 (eval $ac_link) 2>&5
8928 ac_status=$?
8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8932 (eval $ac_try) 2>&5
8933 ac_status=$?
8934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8935 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008936 ac_cv_sizeof_time_t=`cat conftestval`
8937else
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 echo "$as_me: program exited with status $ac_status" >&5
8939echo "$as_me: failed program was:" >&5
8940cat conftest.$ac_ext >&5
8941( exit $ac_status )
8942ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008944rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945fi
8946
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008947fi
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8950echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8951
8952cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008953#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008954_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008955
Michael W. Hudson54241132001-12-07 15:38:26 +00008956
8957
Trent Mick635f6fb2000-08-23 21:33:05 +00008958# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008959ac_save_cc="$CC"
8960if test "$ac_cv_kpthread" = "yes"
8961then CC="$CC -Kpthread"
8962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008963echo "$as_me:$LINENO: checking for pthread_t" >&5
8964echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008965have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008966cat >conftest.$ac_ext <<_ACEOF
8967#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008968#include "confdefs.h"
8969#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008970#ifdef F77_DUMMY_MAIN
8971# ifdef __cplusplus
8972 extern "C"
8973# endif
8974 int F77_DUMMY_MAIN() { return 1; }
8975#endif
8976int
8977main ()
8978{
Guido van Rossum12580492000-09-24 16:47:19 +00008979pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ;
8981 return 0;
8982}
8983_ACEOF
8984rm -f conftest.$ac_objext
8985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8986 (eval $ac_compile) 2>&5
8987 ac_status=$?
8988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8989 (exit $ac_status); } &&
8990 { ac_try='test -s conftest.$ac_objext'
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8992 (eval $ac_try) 2>&5
8993 ac_status=$?
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008996 have_pthread_t=yes
8997else
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 echo "$as_me: failed program was:" >&5
8999cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009000fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009001rm -f conftest.$ac_objext conftest.$ac_ext
9002echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9003echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009004if test "$have_pthread_t" = yes ; then
9005 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9007echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9008 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9009 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009010else
9011 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009012 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009013else
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 cat >conftest.$ac_ext <<_ACEOF
9015#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009016#include "confdefs.h"
9017#include <stdio.h>
9018 #include <pthread.h>
9019 main()
9020 {
9021 FILE *f=fopen("conftestval", "w");
9022 if (!f) exit(1);
9023 fprintf(f, "%d\n", sizeof(pthread_t));
9024 exit(0);
9025 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009026_ACEOF
9027rm -f conftest$ac_exeext
9028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9029 (eval $ac_link) 2>&5
9030 ac_status=$?
9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9034 (eval $ac_try) 2>&5
9035 ac_status=$?
9036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009038 ac_cv_sizeof_pthread_t=`cat conftestval`
9039else
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 echo "$as_me: program exited with status $ac_status" >&5
9041echo "$as_me: failed program was:" >&5
9042cat conftest.$ac_ext >&5
9043( exit $ac_status )
9044ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009046rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009047fi
9048
Trent Mick635f6fb2000-08-23 21:33:05 +00009049fi
9050
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9052echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9053
9054cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009055#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009056_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009057
9058fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009059CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009060
Martin v. Löwis11437992002-04-12 09:54:03 +00009061echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9062echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009063# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9064if test "${enable_toolbox_glue+set}" = set; then
9065 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067fi;
Jack Jansene578a632001-08-15 01:27:14 +00009068
9069if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009070then
Jack Jansene578a632001-08-15 01:27:14 +00009071 case $ac_sys_system/$ac_sys_release in
9072 Darwin/*)
9073 enable_toolbox_glue="yes";;
9074 *)
9075 enable_toolbox_glue="no";;
9076 esac
9077fi
9078case "$enable_toolbox_glue" in
9079yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009080 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009081 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009082 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
9084cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009085#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009086_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009087
9088 ;;
9089*)
9090 extra_frameworks=""
9091 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009092 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009093 ;;
9094esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009095echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9096echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009097
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009098
9099case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009100 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009101 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009102 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009103 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9104 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009105 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009106 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009107 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009108 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9109 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110esac
9111
Martin v. Löwis11437992002-04-12 09:54:03 +00009112echo "$as_me:$LINENO: checking for --enable-framework" >&5
9113echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009114if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009115then
Jack Jansenca06bc62001-08-03 15:32:23 +00009116 OPT="$OPT -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009118 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009119 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121cat >>confdefs.h <<\_ACEOF
9122#define WITH_NEXT_FRAMEWORK 1
9123_ACEOF
9124
9125 echo "$as_me:$LINENO: result: yes" >&5
9126echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009127else
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 echo "$as_me:$LINENO: result: no" >&5
9129echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130fi
9131
Martin v. Löwis11437992002-04-12 09:54:03 +00009132echo "$as_me:$LINENO: checking for dyld" >&5
9133echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009134case $ac_sys_system/$ac_sys_release in
9135 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137cat >>confdefs.h <<\_ACEOF
9138#define WITH_DYLD 1
9139_ACEOF
9140
9141 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9142echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009143 ;;
9144 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 echo "$as_me:$LINENO: result: no" >&5
9146echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009147 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009148esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149
Guido van Rossum0a516c91994-09-12 10:58:40 +00009150# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151
Michael W. Hudson54241132001-12-07 15:38:26 +00009152
9153
9154
9155
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009157# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009158echo "$as_me:$LINENO: checking SO" >&5
9159echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009160if test -z "$SO"
9161then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009162 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009163 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009164 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009165 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009166 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009168echo "$as_me:$LINENO: result: $SO" >&5
9169echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009170# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009171# -- "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 +00009172# (Shared libraries in this instance are shared modules to be loaded into
9173# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009174echo "$as_me:$LINENO: checking LDSHARED" >&5
9175echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009176if test -z "$LDSHARED"
9177then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009178 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009179 AIX*)
9180 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009181 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009182 ;;
9183 BeOS*)
9184 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009185 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009186 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009187 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009188 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009189 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00009191 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009192 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009193 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00009194 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009195 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009196 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9197 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009198 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009199 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9200 if test "$enable_framework" ; then
9201 # Link against the framework. All externals should be defined.
9202 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9203 else
9204 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009205 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009206 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009207 Darwin/*)
9208 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
9211 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9212 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009213 # No framework, use the Python app as bundle-loader
9214 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9215 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009216 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009217 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009218 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009219 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009220 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009221 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009222 then
9223 LDSHARED="cc -shared ${LDFLAGS}"
9224 else
9225 LDSHARED="ld -Bshareable ${LDFLAGS}"
9226 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009227 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009228 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009229 if test "$GCC" = "yes"
9230 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009231 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009232 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009233 SCO_SV*) LDSHARED="$(CC) -Wl,-G,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00009234 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009235 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009236 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009237 *) LDSHARED="ld";;
9238 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009240echo "$as_me:$LINENO: result: $LDSHARED" >&5
9241echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009242BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009243# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009244# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: checking CCSHARED" >&5
9246echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247if test -z "$CCSHARED"
9248then
Guido van Rossum07397971997-04-29 21:49:50 +00009249 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009250 SunOS*) if test "$GCC" = yes;
9251 then CCSHARED="-fPIC";
9252 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009253 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009254 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009255 else CCSHARED="+z";
9256 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009257 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009258 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009259 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009261 if test "$GCC" = "yes"
9262 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009263 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009264 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009265 SCO_SV*)
9266 if test "$GCC" = "yes"
9267 then CCSHARED="-fPIC"
9268 else CCSHARED="-Kpic -belf"
9269 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009270 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009271 IRIX*/6*) case $CC in
9272 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009273 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009274 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009275 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009278echo "$as_me:$LINENO: result: $CCSHARED" >&5
9279echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009281# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009282echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9283echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009284if test -z "$LINKFORSHARED"
9285then
Guido van Rossum07397971997-04-29 21:49:50 +00009286 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009287 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009288 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009289 LINKFORSHARED="-Wl,-E -Wl,+s";;
9290# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009291 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009292 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009293 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009295 # -u __dummy makes the linker aware of the objc runtime
9296 # in System.framework; otherwise, __objcInit (referenced in
9297 # crt1.o) gets erroneously defined as common, which breaks dynamic
9298 # loading of any modules which reference it in System.framework.
9299 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9300 # not used by the core itself but which needs to be in the core so
9301 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009302 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009303 if test "$enable_framework"
9304 then
9305 LINKFORSHARED="$LINKFORSHARED -framework Python"
9306 fi
9307 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009308 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009309 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009310 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009312 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9313 then
9314 LINKFORSHARED="-Wl,--export-dynamic"
9315 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009316 SunOS/5*) case $CC in
9317 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009318 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009319 then
9320 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009321 fi;;
9322 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009325echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9326echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327
Michael W. Hudson54241132001-12-07 15:38:26 +00009328
Martin v. Löwis11437992002-04-12 09:54:03 +00009329echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9330echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009331if test ! "$LIBRARY" = "$LDLIBRARY"
9332then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009333 case $ac_sys_system in
9334 CYGWIN*)
9335 # Cygwin needs CCSHARED when building extension DLLs
9336 # but not when building the interpreter DLL.
9337 CFLAGSFORSHARED='';;
9338 *)
9339 CFLAGSFORSHARED='$(CCSHARED)'
9340 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009341fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009342echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9343echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009344
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009345# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9346# library (with --enable-shared).
9347# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009348# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9349# if it is not required, since it creates a dependency of the shared library
9350# to LIBS. This, in turn, means that applications linking the shared libpython
9351# don't need to link LIBS explicitly. The default should be only changed
9352# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009353
9354echo "$as_me:$LINENO: checking SHLIBS" >&5
9355echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9356case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009357 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009358 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009359esac
9360echo "$as_me:$LINENO: result: $SHLIBS" >&5
9361echo "${ECHO_T}$SHLIBS" >&6
9362
9363
Guido van Rossum627b2d71993-12-24 10:39:16 +00009364# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009365
9366echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9367echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9368if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009370else
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009372LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009373cat >conftest.$ac_ext <<_ACEOF
9374#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009376
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009378#ifdef __cplusplus
9379extern "C"
9380#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 builtin and then its argument prototype would still apply. */
9383char dlopen ();
9384#ifdef F77_DUMMY_MAIN
9385# ifdef __cplusplus
9386 extern "C"
9387# endif
9388 int F77_DUMMY_MAIN() { return 1; }
9389#endif
9390int
9391main ()
9392{
9393dlopen ();
9394 ;
9395 return 0;
9396}
9397_ACEOF
9398rm -f conftest.$ac_objext conftest$ac_exeext
9399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9400 (eval $ac_link) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); } &&
9404 { ac_try='test -s conftest$ac_exeext'
9405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9406 (eval $ac_try) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); }; }; then
9410 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009411else
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 echo "$as_me: failed program was:" >&5
9413cat conftest.$ac_ext >&5
9414ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9417LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009419echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9420echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9421if test $ac_cv_lib_dl_dlopen = yes; then
9422 cat >>confdefs.h <<_ACEOF
9423#define HAVE_LIBDL 1
9424_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009426 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009428fi
9429 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009430
9431echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9432echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9433if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009435else
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009437LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009438cat >conftest.$ac_ext <<_ACEOF
9439#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009443#ifdef __cplusplus
9444extern "C"
9445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 builtin and then its argument prototype would still apply. */
9448char shl_load ();
9449#ifdef F77_DUMMY_MAIN
9450# ifdef __cplusplus
9451 extern "C"
9452# endif
9453 int F77_DUMMY_MAIN() { return 1; }
9454#endif
9455int
9456main ()
9457{
9458shl_load ();
9459 ;
9460 return 0;
9461}
9462_ACEOF
9463rm -f conftest.$ac_objext conftest$ac_exeext
9464if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9465 (eval $ac_link) 2>&5
9466 ac_status=$?
9467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9468 (exit $ac_status); } &&
9469 { ac_try='test -s conftest$ac_exeext'
9470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9471 (eval $ac_try) 2>&5
9472 ac_status=$?
9473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9474 (exit $ac_status); }; }; then
9475 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009476else
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 echo "$as_me: failed program was:" >&5
9478cat conftest.$ac_ext >&5
9479ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009481rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9482LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009484echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9485echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9486if test $ac_cv_lib_dld_shl_load = yes; then
9487 cat >>confdefs.h <<_ACEOF
9488#define HAVE_LIBDLD 1
9489_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009490
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009491 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009493fi
9494 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009495echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9496echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9497if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009499else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009500 ac_func_search_save_LIBS=$LIBS
9501ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009502cat >conftest.$ac_ext <<_ACEOF
9503#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009504#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009506/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009507#ifdef __cplusplus
9508extern "C"
9509#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009510/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 builtin and then its argument prototype would still apply. */
9512char sem_init ();
9513#ifdef F77_DUMMY_MAIN
9514# ifdef __cplusplus
9515 extern "C"
9516# endif
9517 int F77_DUMMY_MAIN() { return 1; }
9518#endif
9519int
9520main ()
9521{
9522sem_init ();
9523 ;
9524 return 0;
9525}
9526_ACEOF
9527rm -f conftest.$ac_objext conftest$ac_exeext
9528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9529 (eval $ac_link) 2>&5
9530 ac_status=$?
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } &&
9533 { ac_try='test -s conftest$ac_exeext'
9534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9535 (eval $ac_try) 2>&5
9536 ac_status=$?
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9538 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009539 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009540else
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 echo "$as_me: failed program was:" >&5
9542cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009544rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009545if test "$ac_cv_search_sem_init" = no; then
9546 for ac_lib in rt posix4; do
9547 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9548 cat >conftest.$ac_ext <<_ACEOF
9549#line $LINENO "configure"
9550#include "confdefs.h"
9551
9552/* Override any gcc2 internal prototype to avoid an error. */
9553#ifdef __cplusplus
9554extern "C"
9555#endif
9556/* We use char because int might match the return type of a gcc2
9557 builtin and then its argument prototype would still apply. */
9558char sem_init ();
9559#ifdef F77_DUMMY_MAIN
9560# ifdef __cplusplus
9561 extern "C"
9562# endif
9563 int F77_DUMMY_MAIN() { return 1; }
9564#endif
9565int
9566main ()
9567{
9568sem_init ();
9569 ;
9570 return 0;
9571}
Martin v. Löwis11437992002-04-12 09:54:03 +00009572_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009573rm -f conftest.$ac_objext conftest$ac_exeext
9574if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9575 (eval $ac_link) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); } &&
9579 { ac_try='test -s conftest$ac_exeext'
9580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9581 (eval $ac_try) 2>&5
9582 ac_status=$?
9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); }; }; then
9585 ac_cv_search_sem_init="-l$ac_lib"
9586break
9587else
9588 echo "$as_me: failed program was:" >&5
9589cat conftest.$ac_ext >&5
9590fi
9591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9592 done
9593fi
9594LIBS=$ac_func_search_save_LIBS
9595fi
9596echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9597echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9598if test "$ac_cv_search_sem_init" != no; then
9599 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009600
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009601fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602 # 'Real Time' functions on Solaris,
9603 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009604
9605# checks for system dependent C++ extensions support
9606case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9608echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9609 cat >conftest.$ac_ext <<_ACEOF
9610#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009611#include "confdefs.h"
9612#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009613#ifdef F77_DUMMY_MAIN
9614# ifdef __cplusplus
9615 extern "C"
9616# endif
9617 int F77_DUMMY_MAIN() { return 1; }
9618#endif
9619int
9620main ()
9621{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009622loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ;
9624 return 0;
9625}
9626_ACEOF
9627rm -f conftest.$ac_objext conftest$ac_exeext
9628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9629 (eval $ac_link) 2>&5
9630 ac_status=$?
9631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9632 (exit $ac_status); } &&
9633 { ac_try='test -s conftest$ac_exeext'
9634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9635 (eval $ac_try) 2>&5
9636 ac_status=$?
9637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9638 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009639
Martin v. Löwis11437992002-04-12 09:54:03 +00009640cat >>confdefs.h <<\_ACEOF
9641#define AIX_GENUINE_CPLUSPLUS 1
9642_ACEOF
9643
9644 echo "$as_me:$LINENO: result: yes" >&5
9645echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009646else
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 echo "$as_me: failed program was:" >&5
9648cat conftest.$ac_ext >&5
9649echo "$as_me:$LINENO: result: no" >&5
9650echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009652rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009653 *) ;;
9654esac
9655
Guido van Rossum70c7f481998-03-26 18:44:10 +00009656# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
9657# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009658# BeOS' sockets are stashed in libnet.
9659case "$ac_sys_system" in
9660IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009661*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009662echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9663echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9664if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009666else
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009668LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009669cat >conftest.$ac_ext <<_ACEOF
9670#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009671#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009672
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009673/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674#ifdef __cplusplus
9675extern "C"
9676#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009677/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 builtin and then its argument prototype would still apply. */
9679char t_open ();
9680#ifdef F77_DUMMY_MAIN
9681# ifdef __cplusplus
9682 extern "C"
9683# endif
9684 int F77_DUMMY_MAIN() { return 1; }
9685#endif
9686int
9687main ()
9688{
9689t_open ();
9690 ;
9691 return 0;
9692}
9693_ACEOF
9694rm -f conftest.$ac_objext conftest$ac_exeext
9695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9696 (eval $ac_link) 2>&5
9697 ac_status=$?
9698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9699 (exit $ac_status); } &&
9700 { ac_try='test -s conftest$ac_exeext'
9701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9702 (eval $ac_try) 2>&5
9703 ac_status=$?
9704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9705 (exit $ac_status); }; }; then
9706 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 echo "$as_me: failed program was:" >&5
9709cat conftest.$ac_ext >&5
9710ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009712rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9713LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009715echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9716echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9717if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009718 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009719fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009720 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009721echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9722echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9723if test "${ac_cv_lib_socket_socket+set}" = set; then
9724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725else
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009727LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009728cat >conftest.$ac_ext <<_ACEOF
9729#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009730#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009731
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009733#ifdef __cplusplus
9734extern "C"
9735#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009736/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 builtin and then its argument prototype would still apply. */
9738char socket ();
9739#ifdef F77_DUMMY_MAIN
9740# ifdef __cplusplus
9741 extern "C"
9742# endif
9743 int F77_DUMMY_MAIN() { return 1; }
9744#endif
9745int
9746main ()
9747{
9748socket ();
9749 ;
9750 return 0;
9751}
9752_ACEOF
9753rm -f conftest.$ac_objext conftest$ac_exeext
9754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9755 (eval $ac_link) 2>&5
9756 ac_status=$?
9757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9758 (exit $ac_status); } &&
9759 { ac_try='test -s conftest$ac_exeext'
9760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9761 (eval $ac_try) 2>&5
9762 ac_status=$?
9763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9764 (exit $ac_status); }; }; then
9765 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009766else
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 echo "$as_me: failed program was:" >&5
9768cat conftest.$ac_ext >&5
9769ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009770fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9772LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009774echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9775echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9776if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009777 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009778fi
9779 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009780;;
9781esac
9782case "$ac_sys_system" in
9783BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009784echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9785echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9786if test "${ac_cv_lib_net_socket+set}" = set; then
9787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009790LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009791cat >conftest.$ac_ext <<_ACEOF
9792#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009793#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009794
Guido van Rossumad678af1998-10-02 14:42:15 +00009795/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796#ifdef __cplusplus
9797extern "C"
9798#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 builtin and then its argument prototype would still apply. */
9801char socket ();
9802#ifdef F77_DUMMY_MAIN
9803# ifdef __cplusplus
9804 extern "C"
9805# endif
9806 int F77_DUMMY_MAIN() { return 1; }
9807#endif
9808int
9809main ()
9810{
9811socket ();
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816rm -f conftest.$ac_objext conftest$ac_exeext
9817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9818 (eval $ac_link) 2>&5
9819 ac_status=$?
9820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9821 (exit $ac_status); } &&
9822 { ac_try='test -s conftest$ac_exeext'
9823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9824 (eval $ac_try) 2>&5
9825 ac_status=$?
9826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9827 (exit $ac_status); }; }; then
9828 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009829else
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 echo "$as_me: failed program was:" >&5
9831cat conftest.$ac_ext >&5
9832ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009833fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9835LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009837echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9838echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9839if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009840 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009841fi
9842 # BeOS
9843;;
9844esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009845
Martin v. Löwis11437992002-04-12 09:54:03 +00009846echo "$as_me:$LINENO: checking for --with-libs" >&5
9847echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9848
Guido van Rossuma68acba1996-07-31 17:36:39 +00009849# Check whether --with-libs or --without-libs was given.
9850if test "${with_libs+set}" = set; then
9851 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
9853echo "$as_me:$LINENO: result: $withval" >&5
9854echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009855LIBS="$withval $LIBS"
9856
9857else
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 echo "$as_me:$LINENO: result: no" >&5
9859echo "${ECHO_T}no" >&6
9860fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009861
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009862# Determine if signalmodule should be used.
9863
9864
Martin v. Löwis11437992002-04-12 09:54:03 +00009865echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9866echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9867
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009868# Check whether --with-signal-module or --without-signal-module was given.
9869if test "${with_signal_module+set}" = set; then
9870 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009871
Martin v. Löwis11437992002-04-12 09:54:03 +00009872fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009873
9874if test -z "$with_signal_module"
9875then with_signal_module="yes"
9876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009877echo "$as_me:$LINENO: result: $with_signal_module" >&5
9878echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009879
9880if test "${with_signal_module}" = "yes"; then
9881 USE_SIGNAL_MODULE=""
9882 SIGNAL_OBJS=""
9883else
9884 USE_SIGNAL_MODULE="#"
9885 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9886fi
9887
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009888# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009889
Barry Warsawc0d24d82000-06-29 16:12:00 +00009890USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009891
Martin v. Löwis11437992002-04-12 09:54:03 +00009892echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9893echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9894
Guido van Rossumec2f0731997-01-22 20:54:01 +00009895
9896# Check whether --with-dec-threads or --without-dec-threads was given.
9897if test "${with_dec_threads+set}" = set; then
9898 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009899
9900echo "$as_me:$LINENO: result: $withval" >&5
9901echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009902LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009903if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009904 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009905fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009906else
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 echo "$as_me:$LINENO: result: no" >&5
9908echo "${ECHO_T}no" >&6
9909fi;
9910
9911# Templates for things AC_DEFINEd more than once.
9912# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009913
9914
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
9916
9917
9918
9919
9920echo "$as_me:$LINENO: checking for --with-threads" >&5
9921echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9922
Guido van Rossumec2f0731997-01-22 20:54:01 +00009923# Check whether --with-threads or --without-threads was given.
9924if test "${with_threads+set}" = set; then
9925 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009928
Barry Warsawc0d24d82000-06-29 16:12:00 +00009929# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009931# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009932if test "${with_thread+set}" = set; then
9933 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00009934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935with_threads=$with_thread
9936fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009937
9938if test -z "$with_threads"
9939then with_threads="yes"
9940fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009941echo "$as_me:$LINENO: result: $with_threads" >&5
9942echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009943
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009944
Barry Warsawc0d24d82000-06-29 16:12:00 +00009945if test "$with_threads" = "no"
9946then
9947 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009948elif test "$ac_cv_pthread_is_default" = yes
9949then
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009951#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009952_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009953
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009954 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009956#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009957_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009958
9959 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009961elif test "$ac_cv_kpthread" = "yes"
9962then
9963 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009965#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009966_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009967
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009968 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009969 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009970else
9971 if test ! -z "$with_threads" -a -d "$with_threads"
9972 then LDFLAGS="$LDFLAGS -L$with_threads"
9973 fi
9974 if test ! -z "$withval" -a -d "$withval"
9975 then LDFLAGS="$LDFLAGS -L$withval"
9976 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009977
9978 # According to the POSIX spec, a pthreads implementation must
9979 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9981echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9982 cat >conftest.$ac_ext <<_ACEOF
9983#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009984#include "confdefs.h"
9985#include <unistd.h>
9986 #ifdef _POSIX_THREADS
9987 yes
9988 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
9990_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9992 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009993 unistd_defines_pthreads=yes
9994else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009995 unistd_defines_pthreads=no
9996fi
9997rm -f conftest*
9998
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10000echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010001
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010003#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010004_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010005
Martin v. Löwis11437992002-04-12 09:54:03 +000010006 if test "${ac_cv_header_cthreads_h+set}" = set; then
10007 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10008echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10009if test "${ac_cv_header_cthreads_h+set}" = set; then
10010 echo $ECHO_N "(cached) $ECHO_C" >&6
10011fi
10012echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10013echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 # Is the header compilable?
10016echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10017echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10018cat >conftest.$ac_ext <<_ACEOF
10019#line $LINENO "configure"
10020#include "confdefs.h"
10021$ac_includes_default
10022#include <cthreads.h>
10023_ACEOF
10024rm -f conftest.$ac_objext
10025if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10026 (eval $ac_compile) 2>&5
10027 ac_status=$?
10028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); } &&
10030 { ac_try='test -s conftest.$ac_objext'
10031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10032 (eval $ac_try) 2>&5
10033 ac_status=$?
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); }; }; then
10036 ac_header_compiler=yes
10037else
10038 echo "$as_me: failed program was:" >&5
10039cat conftest.$ac_ext >&5
10040ac_header_compiler=no
10041fi
10042rm -f conftest.$ac_objext conftest.$ac_ext
10043echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10044echo "${ECHO_T}$ac_header_compiler" >&6
10045
10046# Is the header present?
10047echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10048echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10049cat >conftest.$ac_ext <<_ACEOF
10050#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010051#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010052#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010053_ACEOF
10054if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10055 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10056 ac_status=$?
10057 egrep -v '^ *\+' conftest.er1 >conftest.err
10058 rm -f conftest.er1
10059 cat conftest.err >&5
10060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10061 (exit $ac_status); } >/dev/null; then
10062 if test -s conftest.err; then
10063 ac_cpp_err=$ac_c_preproc_warn_flag
10064 else
10065 ac_cpp_err=
10066 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010067else
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 ac_cpp_err=yes
10069fi
10070if test -z "$ac_cpp_err"; then
10071 ac_header_preproc=yes
10072else
10073 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010074 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010076fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010077rm -f conftest.err conftest.$ac_ext
10078echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10079echo "${ECHO_T}$ac_header_preproc" >&6
10080
10081# So? What about this header?
10082case $ac_header_compiler:$ac_header_preproc in
10083 yes:no )
10084 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10085echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10086 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10087echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10088 no:yes )
10089 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10090echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10091 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10092echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10093 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10094echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10095esac
10096echo "$as_me:$LINENO: checking for cthreads.h" >&5
10097echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10098if test "${ac_cv_header_cthreads_h+set}" = set; then
10099 echo $ECHO_N "(cached) $ECHO_C" >&6
10100else
10101 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010102fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010103echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10104echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10105
10106fi
10107if test $ac_cv_header_cthreads_h = yes; then
10108 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010109#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010110_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010113#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010114_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010115
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
10117cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010118#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010120
10121 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010122 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010123else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010124
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10126 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10127echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10128if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10129 echo $ECHO_N "(cached) $ECHO_C" >&6
10130fi
10131echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10132echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010133else
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 # Is the header compilable?
10135echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10136echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10137cat >conftest.$ac_ext <<_ACEOF
10138#line $LINENO "configure"
10139#include "confdefs.h"
10140$ac_includes_default
10141#include <mach/cthreads.h>
10142_ACEOF
10143rm -f conftest.$ac_objext
10144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10145 (eval $ac_compile) 2>&5
10146 ac_status=$?
10147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148 (exit $ac_status); } &&
10149 { ac_try='test -s conftest.$ac_objext'
10150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10151 (eval $ac_try) 2>&5
10152 ac_status=$?
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154 (exit $ac_status); }; }; then
10155 ac_header_compiler=yes
10156else
10157 echo "$as_me: failed program was:" >&5
10158cat conftest.$ac_ext >&5
10159ac_header_compiler=no
10160fi
10161rm -f conftest.$ac_objext conftest.$ac_ext
10162echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10163echo "${ECHO_T}$ac_header_compiler" >&6
10164
10165# Is the header present?
10166echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10167echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10168cat >conftest.$ac_ext <<_ACEOF
10169#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010170#include "confdefs.h"
10171#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010172_ACEOF
10173if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10174 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10175 ac_status=$?
10176 egrep -v '^ *\+' conftest.er1 >conftest.err
10177 rm -f conftest.er1
10178 cat conftest.err >&5
10179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10180 (exit $ac_status); } >/dev/null; then
10181 if test -s conftest.err; then
10182 ac_cpp_err=$ac_c_preproc_warn_flag
10183 else
10184 ac_cpp_err=
10185 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010186else
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 ac_cpp_err=yes
10188fi
10189if test -z "$ac_cpp_err"; then
10190 ac_header_preproc=yes
10191else
10192 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010193 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010196rm -f conftest.err conftest.$ac_ext
10197echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10198echo "${ECHO_T}$ac_header_preproc" >&6
10199
10200# So? What about this header?
10201case $ac_header_compiler:$ac_header_preproc in
10202 yes:no )
10203 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10204echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10205 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10206echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10207 no:yes )
10208 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10209echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10210 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10211echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10212 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10213echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10214esac
10215echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10216echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10217if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10218 echo $ECHO_N "(cached) $ECHO_C" >&6
10219else
10220 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010222echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10223echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10224
10225fi
10226if test $ac_cv_header_mach_cthreads_h = yes; then
10227 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010228#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010229_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010230
Martin v. Löwis11437992002-04-12 09:54:03 +000010231 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010232#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010234
Martin v. Löwis11437992002-04-12 09:54:03 +000010235
10236cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010237#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010238_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010239
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010240 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010241else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010242
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 echo "$as_me:$LINENO: checking for --with-pth" >&5
10244echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10245
10246# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010247if test "${with_pth+set}" = set; then
10248 withval="$with_pth"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010249
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 echo "$as_me:$LINENO: result: $withval" >&5
10251echo "${ECHO_T}$withval" >&6
10252 cat >>confdefs.h <<\_ACEOF
10253#define WITH_THREAD 1
10254_ACEOF
10255
10256
10257cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010258#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010260
Martin v. Löwis130fb172001-07-19 11:00:41 +000010261 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010262 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010263else
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
10265 echo "$as_me:$LINENO: result: no" >&5
10266echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010267
10268 # Just looking for pthread_create in libpthread is not enough:
10269 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10270 # So we really have to include pthread.h, and then link.
10271 _libs=$LIBS
10272 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10274echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10275 cat >conftest.$ac_ext <<_ACEOF
10276#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010277#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010278#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010279
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010280void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010281#ifdef F77_DUMMY_MAIN
10282# ifdef __cplusplus
10283 extern "C"
10284# endif
10285 int F77_DUMMY_MAIN() { return 1; }
10286#endif
10287int
10288main ()
10289{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010290
10291pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 ;
10293 return 0;
10294}
10295_ACEOF
10296rm -f conftest.$ac_objext conftest$ac_exeext
10297if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10298 (eval $ac_link) 2>&5
10299 ac_status=$?
10300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10301 (exit $ac_status); } &&
10302 { ac_try='test -s conftest$ac_exeext'
10303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10304 (eval $ac_try) 2>&5
10305 ac_status=$?
10306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10307 (exit $ac_status); }; }; then
10308
10309 echo "$as_me:$LINENO: result: yes" >&5
10310echo "${ECHO_T}yes" >&6
10311 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010312#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010313_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010314
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010315 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010316 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010317else
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 echo "$as_me: failed program was:" >&5
10319cat conftest.$ac_ext >&5
10320
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010321 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010322 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10323echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10324if test "${ac_cv_func_pthread_detach+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010326else
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 cat >conftest.$ac_ext <<_ACEOF
10328#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010329#include "confdefs.h"
10330/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010332#include <assert.h>
10333/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334#ifdef __cplusplus
10335extern "C"
10336#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 builtin and then its argument prototype would still apply. */
10339char pthread_detach ();
10340char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010341
Martin v. Löwis11437992002-04-12 09:54:03 +000010342#ifdef F77_DUMMY_MAIN
10343# ifdef __cplusplus
10344 extern "C"
10345# endif
10346 int F77_DUMMY_MAIN() { return 1; }
10347#endif
10348int
10349main ()
10350{
Guido van Rossumad678af1998-10-02 14:42:15 +000010351/* The GNU C library defines this for functions which it implements
10352 to always fail with ENOSYS. Some functions are actually named
10353 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010354#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010355choke me
10356#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010357f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010358#endif
10359
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ;
10361 return 0;
10362}
10363_ACEOF
10364rm -f conftest.$ac_objext conftest$ac_exeext
10365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10366 (eval $ac_link) 2>&5
10367 ac_status=$?
10368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10369 (exit $ac_status); } &&
10370 { ac_try='test -s conftest$ac_exeext'
10371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10373 ac_status=$?
10374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10375 (exit $ac_status); }; }; then
10376 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 echo "$as_me: failed program was:" >&5
10379cat conftest.$ac_ext >&5
10380ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010381fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010384echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10385echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10386if test $ac_cv_func_pthread_detach = yes; then
10387 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010388#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010389_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010390
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010391 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010392 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010393else
Guido van Rossumad678af1998-10-02 14:42:15 +000010394
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010395 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10396 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10397echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10398if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10399 echo $ECHO_N "(cached) $ECHO_C" >&6
10400fi
10401echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10402echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10403else
10404 # Is the header compilable?
10405echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10406echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10407cat >conftest.$ac_ext <<_ACEOF
10408#line $LINENO "configure"
10409#include "confdefs.h"
10410$ac_includes_default
10411#include <atheos/threads.h>
10412_ACEOF
10413rm -f conftest.$ac_objext
10414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10415 (eval $ac_compile) 2>&5
10416 ac_status=$?
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } &&
10419 { ac_try='test -s conftest.$ac_objext'
10420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10421 (eval $ac_try) 2>&5
10422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); }; }; then
10425 ac_header_compiler=yes
10426else
10427 echo "$as_me: failed program was:" >&5
10428cat conftest.$ac_ext >&5
10429ac_header_compiler=no
10430fi
10431rm -f conftest.$ac_objext conftest.$ac_ext
10432echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10433echo "${ECHO_T}$ac_header_compiler" >&6
10434
10435# Is the header present?
10436echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10437echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10438cat >conftest.$ac_ext <<_ACEOF
10439#line $LINENO "configure"
10440#include "confdefs.h"
10441#include <atheos/threads.h>
10442_ACEOF
10443if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10444 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10445 ac_status=$?
10446 egrep -v '^ *\+' conftest.er1 >conftest.err
10447 rm -f conftest.er1
10448 cat conftest.err >&5
10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450 (exit $ac_status); } >/dev/null; then
10451 if test -s conftest.err; then
10452 ac_cpp_err=$ac_c_preproc_warn_flag
10453 else
10454 ac_cpp_err=
10455 fi
10456else
10457 ac_cpp_err=yes
10458fi
10459if test -z "$ac_cpp_err"; then
10460 ac_header_preproc=yes
10461else
10462 echo "$as_me: failed program was:" >&5
10463 cat conftest.$ac_ext >&5
10464 ac_header_preproc=no
10465fi
10466rm -f conftest.err conftest.$ac_ext
10467echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10468echo "${ECHO_T}$ac_header_preproc" >&6
10469
10470# So? What about this header?
10471case $ac_header_compiler:$ac_header_preproc in
10472 yes:no )
10473 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10474echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10475 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10476echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10477 no:yes )
10478 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10479echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10480 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10481echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10482 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10483echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10484esac
10485echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10486echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10487if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
10489else
10490 ac_cv_header_atheos_threads_h=$ac_header_preproc
10491fi
10492echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10493echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10494
10495fi
10496if test $ac_cv_header_atheos_threads_h = yes; then
10497 cat >>confdefs.h <<\_ACEOF
10498#define WITH_THREAD 1
10499_ACEOF
10500
10501
10502cat >>confdefs.h <<\_ACEOF
10503#define ATHEOS_THREADS 1
10504_ACEOF
10505
10506 THREADOBJ="Python/thread.o"
10507else
10508
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10510 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10511echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10512if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10513 echo $ECHO_N "(cached) $ECHO_C" >&6
10514fi
10515echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10516echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010517else
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 # Is the header compilable?
10519echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10520echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10521cat >conftest.$ac_ext <<_ACEOF
10522#line $LINENO "configure"
10523#include "confdefs.h"
10524$ac_includes_default
10525#include <kernel/OS.h>
10526_ACEOF
10527rm -f conftest.$ac_objext
10528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10529 (eval $ac_compile) 2>&5
10530 ac_status=$?
10531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10532 (exit $ac_status); } &&
10533 { ac_try='test -s conftest.$ac_objext'
10534 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10535 (eval $ac_try) 2>&5
10536 ac_status=$?
10537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10538 (exit $ac_status); }; }; then
10539 ac_header_compiler=yes
10540else
10541 echo "$as_me: failed program was:" >&5
10542cat conftest.$ac_ext >&5
10543ac_header_compiler=no
10544fi
10545rm -f conftest.$ac_objext conftest.$ac_ext
10546echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10547echo "${ECHO_T}$ac_header_compiler" >&6
10548
10549# Is the header present?
10550echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10551echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10552cat >conftest.$ac_ext <<_ACEOF
10553#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010554#include "confdefs.h"
10555#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010556_ACEOF
10557if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10558 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10559 ac_status=$?
10560 egrep -v '^ *\+' conftest.er1 >conftest.err
10561 rm -f conftest.er1
10562 cat conftest.err >&5
10563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10564 (exit $ac_status); } >/dev/null; then
10565 if test -s conftest.err; then
10566 ac_cpp_err=$ac_c_preproc_warn_flag
10567 else
10568 ac_cpp_err=
10569 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ac_cpp_err=yes
10572fi
10573if test -z "$ac_cpp_err"; then
10574 ac_header_preproc=yes
10575else
10576 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010577 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010580rm -f conftest.err conftest.$ac_ext
10581echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10582echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010583
Martin v. Löwis11437992002-04-12 09:54:03 +000010584# So? What about this header?
10585case $ac_header_compiler:$ac_header_preproc in
10586 yes:no )
10587 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10588echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10589 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10590echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10591 no:yes )
10592 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10593echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10594 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10595echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10596 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10597echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10598esac
10599echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10600echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10601if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10602 echo $ECHO_N "(cached) $ECHO_C" >&6
10603else
10604 ac_cv_header_kernel_OS_h=$ac_header_preproc
10605fi
10606echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10607echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10608
10609fi
10610if test $ac_cv_header_kernel_OS_h = yes; then
10611 cat >>confdefs.h <<\_ACEOF
10612#define WITH_THREAD 1
10613_ACEOF
10614
10615
10616cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010617#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010618_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010619
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010620 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010621else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10624echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10625if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10626 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010629LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010630cat >conftest.$ac_ext <<_ACEOF
10631#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010632#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010633
Greg Steinadf63d62000-07-05 10:38:09 +000010634/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010635#ifdef __cplusplus
10636extern "C"
10637#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010638/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 builtin and then its argument prototype would still apply. */
10640char pthread_create ();
10641#ifdef F77_DUMMY_MAIN
10642# ifdef __cplusplus
10643 extern "C"
10644# endif
10645 int F77_DUMMY_MAIN() { return 1; }
10646#endif
10647int
10648main ()
10649{
10650pthread_create ();
10651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10657 (eval $ac_link) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); } &&
10661 { ac_try='test -s conftest$ac_exeext'
10662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10663 (eval $ac_try) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); }; }; then
10667 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010668else
Martin v. Löwis11437992002-04-12 09:54:03 +000010669 echo "$as_me: failed program was:" >&5
10670cat conftest.$ac_ext >&5
10671ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10674LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10677echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10678if test $ac_cv_lib_pthreads_pthread_create = yes; then
10679 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010680#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010681_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010682
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010683 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010684 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010685 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010686else
Greg Steinadf63d62000-07-05 10:38:09 +000010687
Martin v. Löwis11437992002-04-12 09:54:03 +000010688 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10689echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10690if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10691 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010692else
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010694LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010695cat >conftest.$ac_ext <<_ACEOF
10696#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010697#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010698
Guido van Rossum49545951997-12-02 19:28:29 +000010699/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010700#ifdef __cplusplus
10701extern "C"
10702#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010703/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 builtin and then its argument prototype would still apply. */
10705char pthread_create ();
10706#ifdef F77_DUMMY_MAIN
10707# ifdef __cplusplus
10708 extern "C"
10709# endif
10710 int F77_DUMMY_MAIN() { return 1; }
10711#endif
10712int
10713main ()
10714{
10715pthread_create ();
10716 ;
10717 return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
10721if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10722 (eval $ac_link) 2>&5
10723 ac_status=$?
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); } &&
10726 { ac_try='test -s conftest$ac_exeext'
10727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10728 (eval $ac_try) 2>&5
10729 ac_status=$?
10730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10731 (exit $ac_status); }; }; then
10732 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010733else
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 echo "$as_me: failed program was:" >&5
10735cat conftest.$ac_ext >&5
10736ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010741echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10742echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10743if test $ac_cv_lib_c_r_pthread_create = yes; then
10744 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010745#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010746_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010747
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010748 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010749 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010750 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010751else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10754echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10755if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10756 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010757else
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010759LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010760cat >conftest.$ac_ext <<_ACEOF
10761#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010762#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010763
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010764/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010765#ifdef __cplusplus
10766extern "C"
10767#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010768/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 builtin and then its argument prototype would still apply. */
10770char __d6_pthread_create ();
10771#ifdef F77_DUMMY_MAIN
10772# ifdef __cplusplus
10773 extern "C"
10774# endif
10775 int F77_DUMMY_MAIN() { return 1; }
10776#endif
10777int
10778main ()
10779{
10780__d6_pthread_create ();
10781 ;
10782 return 0;
10783}
10784_ACEOF
10785rm -f conftest.$ac_objext conftest$ac_exeext
10786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10787 (eval $ac_link) 2>&5
10788 ac_status=$?
10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790 (exit $ac_status); } &&
10791 { ac_try='test -s conftest$ac_exeext'
10792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10793 (eval $ac_try) 2>&5
10794 ac_status=$?
10795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796 (exit $ac_status); }; }; then
10797 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010798else
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 echo "$as_me: failed program was:" >&5
10800cat conftest.$ac_ext >&5
10801ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010802fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010803rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010805fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010806echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10807echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10808if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10809 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010810#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010811_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010812
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010813 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010814 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010815 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010816else
Guido van Rossum49545951997-12-02 19:28:29 +000010817
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10819echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10820if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010822else
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010824LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010825cat >conftest.$ac_ext <<_ACEOF
10826#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010827#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010829/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010830#ifdef __cplusplus
10831extern "C"
10832#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010834 builtin and then its argument prototype would still apply. */
10835char __pthread_create_system ();
10836#ifdef F77_DUMMY_MAIN
10837# ifdef __cplusplus
10838 extern "C"
10839# endif
10840 int F77_DUMMY_MAIN() { return 1; }
10841#endif
10842int
10843main ()
10844{
10845__pthread_create_system ();
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext conftest$ac_exeext
10851if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10852 (eval $ac_link) 2>&5
10853 ac_status=$?
10854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10855 (exit $ac_status); } &&
10856 { ac_try='test -s conftest$ac_exeext'
10857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10858 (eval $ac_try) 2>&5
10859 ac_status=$?
10860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10861 (exit $ac_status); }; }; then
10862 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010863else
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 echo "$as_me: failed program was:" >&5
10865cat conftest.$ac_ext >&5
10866ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010870fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010871echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10872echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10873if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10874 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010875#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010876_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010877
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010878 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010879 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010880 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010881else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010882
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10884echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10885if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10886 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010887else
Martin v. Löwis11437992002-04-12 09:54:03 +000010888 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010889LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010890cat >conftest.$ac_ext <<_ACEOF
10891#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010892#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010893
Guido van Rossumb93a8621998-05-07 13:27:32 +000010894/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010895#ifdef __cplusplus
10896extern "C"
10897#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010898/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 builtin and then its argument prototype would still apply. */
10900char pthread_create ();
10901#ifdef F77_DUMMY_MAIN
10902# ifdef __cplusplus
10903 extern "C"
10904# endif
10905 int F77_DUMMY_MAIN() { return 1; }
10906#endif
10907int
10908main ()
10909{
10910pthread_create ();
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915rm -f conftest.$ac_objext conftest$ac_exeext
10916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10917 (eval $ac_link) 2>&5
10918 ac_status=$?
10919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10920 (exit $ac_status); } &&
10921 { ac_try='test -s conftest$ac_exeext'
10922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10923 (eval $ac_try) 2>&5
10924 ac_status=$?
10925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10926 (exit $ac_status); }; }; then
10927 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010928else
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 echo "$as_me: failed program was:" >&5
10930cat conftest.$ac_ext >&5
10931ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010933rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10934LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010935fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010936echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10937echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10938if test $ac_cv_lib_cma_pthread_create = yes; then
10939 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010940#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010941_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010942
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010943 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010944 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010945 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010946else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010947
Martin v. Löwis130fb172001-07-19 11:00:41 +000010948 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010949fi
10950
Guido van Rossum627b2d71993-12-24 10:39:16 +000010951
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010952fi
10953
Guido van Rossum0be3e491997-05-22 20:33:33 +000010954fi
10955
Guido van Rossum49545951997-12-02 19:28:29 +000010956fi
10957
Guido van Rossumb93a8621998-05-07 13:27:32 +000010958fi
10959
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010960fi
10961
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010962
Michael W. Hudson54241132001-12-07 15:38:26 +000010963fi
10964
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010965
10966fi
10967
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010968fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010969rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10970fi;
10971fi
10972
10973
10974fi
10975
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010976
Michael W. Hudson54241132001-12-07 15:38:26 +000010977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010978 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010979 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010980
10981cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010982#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010983_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010984
10985 fi
10986
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10988echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10989 if test "${ac_cv_pthread_system_supported+set}" = set; then
10990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010991else
10992 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010993 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010994else
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >conftest.$ac_ext <<_ACEOF
10996#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010997#include "confdefs.h"
10998#include <pthread.h>
10999 void *foo(void *parm) {
11000 return NULL;
11001 }
11002 main() {
11003 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011004 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011005 if (pthread_attr_init(&attr)) exit(-1);
11006 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011007 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011008 exit(0);
11009 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011010_ACEOF
11011rm -f conftest$ac_exeext
11012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11013 (eval $ac_link) 2>&5
11014 ac_status=$?
11015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11016 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11018 (eval $ac_try) 2>&5
11019 ac_status=$?
11020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11021 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011022 ac_cv_pthread_system_supported=yes
11023else
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 echo "$as_me: program exited with status $ac_status" >&5
11025echo "$as_me: failed program was:" >&5
11026cat conftest.$ac_ext >&5
11027( exit $ac_status )
11028ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011030rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011031fi
11032
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011033fi
11034
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11036echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011037 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
11039cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011040#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011041_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011042
11043 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011044
11045for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011046do
Martin v. Löwis11437992002-04-12 09:54:03 +000011047as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11048echo "$as_me:$LINENO: checking for $ac_func" >&5
11049echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11050if eval "test \"\${$as_ac_var+set}\" = set"; then
11051 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011052else
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 cat >conftest.$ac_ext <<_ACEOF
11054#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011055#include "confdefs.h"
11056/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011058#include <assert.h>
11059/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011060#ifdef __cplusplus
11061extern "C"
11062#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011063/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 builtin and then its argument prototype would still apply. */
11065char $ac_func ();
11066char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011067
Martin v. Löwis11437992002-04-12 09:54:03 +000011068#ifdef F77_DUMMY_MAIN
11069# ifdef __cplusplus
11070 extern "C"
11071# endif
11072 int F77_DUMMY_MAIN() { return 1; }
11073#endif
11074int
11075main ()
11076{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011077/* The GNU C library defines this for functions which it implements
11078 to always fail with ENOSYS. Some functions are actually named
11079 something starting with __ and the normal name is an alias. */
11080#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11081choke me
11082#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011083f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011084#endif
11085
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ;
11087 return 0;
11088}
11089_ACEOF
11090rm -f conftest.$ac_objext conftest$ac_exeext
11091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11092 (eval $ac_link) 2>&5
11093 ac_status=$?
11094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11095 (exit $ac_status); } &&
11096 { ac_try='test -s conftest$ac_exeext'
11097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11098 (eval $ac_try) 2>&5
11099 ac_status=$?
11100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11101 (exit $ac_status); }; }; then
11102 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011103else
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 echo "$as_me: failed program was:" >&5
11105cat conftest.$ac_ext >&5
11106eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011108rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011110echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11111echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11112if test `eval echo '${'$as_ac_var'}'` = yes; then
11113 cat >>confdefs.h <<_ACEOF
11114#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11115_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011116
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011117fi
11118done
11119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011120 fi
11121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11123echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11124if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11125 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011126else
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011128LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011129cat >conftest.$ac_ext <<_ACEOF
11130#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011133/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011134#ifdef __cplusplus
11135extern "C"
11136#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011137/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 builtin and then its argument prototype would still apply. */
11139char usconfig ();
11140#ifdef F77_DUMMY_MAIN
11141# ifdef __cplusplus
11142 extern "C"
11143# endif
11144 int F77_DUMMY_MAIN() { return 1; }
11145#endif
11146int
11147main ()
11148{
11149usconfig ();
11150 ;
11151 return 0;
11152}
11153_ACEOF
11154rm -f conftest.$ac_objext conftest$ac_exeext
11155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11156 (eval $ac_link) 2>&5
11157 ac_status=$?
11158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11159 (exit $ac_status); } &&
11160 { ac_try='test -s conftest$ac_exeext'
11161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11162 (eval $ac_try) 2>&5
11163 ac_status=$?
11164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11165 (exit $ac_status); }; }; then
11166 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011167else
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 echo "$as_me: failed program was:" >&5
11169cat conftest.$ac_ext >&5
11170ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011171fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011172rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11173LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011175echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11176echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11177if test $ac_cv_lib_mpc_usconfig = yes; then
11178 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011179#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011180_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011181
Martin v. Löwis130fb172001-07-19 11:00:41 +000011182 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011183 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011184 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011185fi
11186
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011187
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 if test $posix_threads != "yes"; then
11189 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11190echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11191if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11192 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011195LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011196cat >conftest.$ac_ext <<_ACEOF
11197#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011198#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011200/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011201#ifdef __cplusplus
11202extern "C"
11203#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011204/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 builtin and then its argument prototype would still apply. */
11206char thr_create ();
11207#ifdef F77_DUMMY_MAIN
11208# ifdef __cplusplus
11209 extern "C"
11210# endif
11211 int F77_DUMMY_MAIN() { return 1; }
11212#endif
11213int
11214main ()
11215{
11216thr_create ();
11217 ;
11218 return 0;
11219}
11220_ACEOF
11221rm -f conftest.$ac_objext conftest$ac_exeext
11222if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11223 (eval $ac_link) 2>&5
11224 ac_status=$?
11225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226 (exit $ac_status); } &&
11227 { ac_try='test -s conftest$ac_exeext'
11228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229 (eval $ac_try) 2>&5
11230 ac_status=$?
11231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232 (exit $ac_status); }; }; then
11233 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234else
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 echo "$as_me: failed program was:" >&5
11236cat conftest.$ac_ext >&5
11237ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011239rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011242echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11243echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11244if test $ac_cv_lib_thread_thr_create = yes; then
11245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011247_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011248
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011249 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011250 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011251 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011252fi
11253
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011254 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011255
Martin v. Löwis130fb172001-07-19 11:00:41 +000011256 if test "$USE_THREAD_MODULE" != "#"
11257 then
11258 # If the above checks didn't disable threads, (at least) OSF1
11259 # needs this '-threads' argument during linking.
11260 case $ac_sys_system in
11261 OSF1) LDLAST=-threads;;
11262 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011263 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011264
11265 if test "$posix_threads" = yes -a \
11266 "$ac_sys_system" = "SunOS" -a \
11267 "$ac_sys_release" = "5.6"; then
11268
11269cat >>confdefs.h <<\_ACEOF
11270#define HAVE_PTHREAD_DESTRUCTOR 1
11271_ACEOF
11272
11273 fi
11274
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275fi
11276
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011277# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
11279
11280echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11281echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011282# Check whether --enable-ipv6 or --disable-ipv6 was given.
11283if test "${enable_ipv6+set}" = set; then
11284 enableval="$enable_ipv6"
11285 case "$enableval" in
11286 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 echo "$as_me:$LINENO: result: no" >&5
11288echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011289 ipv6=no
11290 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 *) echo "$as_me:$LINENO: result: yes" >&5
11292echo "${ECHO_T}yes" >&6
11293 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011294#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011295_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011296
11297 ipv6=yes
11298 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011300else
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011302 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 echo "$as_me:$LINENO: result: no" >&5
11304echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011305 ipv6=no
11306
11307else
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 cat >conftest.$ac_ext <<_ACEOF
11309#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011310#include "confdefs.h"
11311 /* AF_INET6 available check */
11312#include <sys/types.h>
11313#include <sys/socket.h>
11314main()
11315{
11316 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11317 exit(1);
11318 else
11319 exit(0);
11320}
11321
Martin v. Löwis11437992002-04-12 09:54:03 +000011322_ACEOF
11323rm -f conftest$ac_exeext
11324if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11325 (eval $ac_link) 2>&5
11326 ac_status=$?
11327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11330 (eval $ac_try) 2>&5
11331 ac_status=$?
11332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11333 (exit $ac_status); }; }; then
11334 echo "$as_me:$LINENO: result: yes" >&5
11335echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011336 ipv6=yes
11337else
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 echo "$as_me: program exited with status $ac_status" >&5
11339echo "$as_me: failed program was:" >&5
11340cat conftest.$ac_ext >&5
11341( exit $ac_status )
11342echo "$as_me:$LINENO: result: no" >&5
11343echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011344 ipv6=no
11345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011346rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011347fi
11348
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011349if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11351echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11352 cat >conftest.$ac_ext <<_ACEOF
11353#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011354#include "confdefs.h"
11355#include <sys/types.h>
11356#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011357#ifdef F77_DUMMY_MAIN
11358# ifdef __cplusplus
11359 extern "C"
11360# endif
11361 int F77_DUMMY_MAIN() { return 1; }
11362#endif
11363int
11364main ()
11365{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011366struct sockaddr_in6 x;
11367x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ;
11369 return 0;
11370}
11371_ACEOF
11372rm -f conftest.$ac_objext
11373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11374 (eval $ac_compile) 2>&5
11375 ac_status=$?
11376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11377 (exit $ac_status); } &&
11378 { ac_try='test -s conftest.$ac_objext'
11379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11380 (eval $ac_try) 2>&5
11381 ac_status=$?
11382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11383 (exit $ac_status); }; }; then
11384 echo "$as_me:$LINENO: result: yes" >&5
11385echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011386 ipv6=yes
11387else
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 echo "$as_me: failed program was:" >&5
11389cat conftest.$ac_ext >&5
11390echo "$as_me:$LINENO: result: no" >&5
11391echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011392 ipv6=no
11393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011394rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011395fi
11396
11397if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011399#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011401
11402fi
11403
Martin v. Löwis11437992002-04-12 09:54:03 +000011404fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011405
11406ipv6type=unknown
11407ipv6lib=none
11408ipv6trylibc=no
11409
11410if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11412echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011413 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11414 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011415 case $i in
11416 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 cat >conftest.$ac_ext <<_ACEOF
11418#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011419#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011420
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011421#include <netinet/in.h>
11422#ifdef IPV6_INRIA_VERSION
11423yes
11424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011425_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11427 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011428 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011429fi
11430rm -f conftest*
11431
11432 ;;
11433 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 cat >conftest.$ac_ext <<_ACEOF
11435#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011436#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011437
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011438#include <netinet/in.h>
11439#ifdef __KAME__
11440yes
11441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011442_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11444 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011445 ipv6type=$i;
11446 ipv6lib=inet6
11447 ipv6libdir=/usr/local/v6/lib
11448 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011449fi
11450rm -f conftest*
11451
11452 ;;
11453 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 cat >conftest.$ac_ext <<_ACEOF
11455#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011456#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011457
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011458#include <features.h>
11459#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11460yes
11461#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011462_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11464 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011465 ipv6type=$i;
11466 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011467fi
11468rm -f conftest*
11469
11470 ;;
11471 linux-inet6)
11472 if test -d /usr/inet6; then
11473 ipv6type=$i
11474 ipv6lib=inet6
11475 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011476 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011477 fi
11478 ;;
11479 solaris)
11480 if test -f /etc/netconfig; then
11481 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11482 ipv6type=$i
11483 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011484 fi
11485 fi
11486 ;;
11487 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 cat >conftest.$ac_ext <<_ACEOF
11489#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011490#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011491
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011492#include <sys/param.h>
11493#ifdef _TOSHIBA_INET6
11494yes
11495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011496_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11498 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011499 ipv6type=$i;
11500 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011501 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011502fi
11503rm -f conftest*
11504
11505 ;;
11506 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 cat >conftest.$ac_ext <<_ACEOF
11508#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011509#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011510
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011511#include </usr/local/v6/include/sys/v6config.h>
11512#ifdef __V6D__
11513yes
11514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011515_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11517 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011518 ipv6type=$i;
11519 ipv6lib=v6;
11520 ipv6libdir=/usr/local/v6/lib;
11521 OPT="-I/usr/local/v6/include $OPT"
11522fi
11523rm -f conftest*
11524
11525 ;;
11526 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 cat >conftest.$ac_ext <<_ACEOF
11528#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011529#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011530
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011531#include <sys/param.h>
11532#ifdef _ZETA_MINAMI_INET6
11533yes
11534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011535_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11537 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011538 ipv6type=$i;
11539 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011540 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011541fi
11542rm -f conftest*
11543
11544 ;;
11545 esac
11546 if test "$ipv6type" != "unknown"; then
11547 break
11548 fi
11549 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 echo "$as_me:$LINENO: result: $ipv6type" >&5
11551echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011552fi
11553
11554if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11555 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11556 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11557 echo "using lib$ipv6lib"
11558 else
11559 if test $ipv6trylibc = "yes"; then
11560 echo "using libc"
11561 else
11562 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11563 echo "You need to fetch lib$ipv6lib.a from appropriate"
11564 echo 'ipv6 kit and compile beforehand.'
11565 exit 1
11566 fi
11567 fi
11568fi
11569
Jack Jansen7b8c7542002-04-14 20:12:41 +000011570# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011571echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11572echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011573
11574# Check whether --with-universal-newlines or --without-universal-newlines was given.
11575if test "${with_universal_newlines+set}" = set; then
11576 withval="$with_universal_newlines"
11577
11578fi;
11579
11580if test -z "$with_universal_newlines"
11581then with_universal_newlines="yes"
11582fi
11583if test "$with_universal_newlines" != "no"
11584then
Martin v. Löwise8aea582002-04-16 05:51:02 +000011585
11586cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011587#define WITH_UNIVERSAL_NEWLINES 1
11588_ACEOF
11589
11590fi
11591echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11592echo "${ECHO_T}$with_universal_newlines" >&6
11593
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011594# Check for --with-doc-strings
11595echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11596echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11597
11598# Check whether --with-doc-strings or --without-doc-strings was given.
11599if test "${with_doc_strings+set}" = set; then
11600 withval="$with_doc_strings"
11601
11602fi;
11603
11604if test -z "$with_doc_strings"
11605then with_doc_strings="yes"
11606fi
11607if test "$with_doc_strings" != "no"
11608then
11609
11610cat >>confdefs.h <<\_ACEOF
11611#define WITH_DOC_STRINGS 1
11612_ACEOF
11613
11614fi
11615echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11616echo "${ECHO_T}$with_doc_strings" >&6
11617
Neil Schemenauera35c6882001-02-27 04:45:05 +000011618# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011619echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11620echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11621
Neil Schemenauera35c6882001-02-27 04:45:05 +000011622# Check whether --with-pymalloc or --without-pymalloc was given.
11623if test "${with_pymalloc+set}" = set; then
11624 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011627
Neil Schemenauer16c22972002-03-22 15:34:49 +000011628if test -z "$with_pymalloc"
11629then with_pymalloc="yes"
11630fi
11631if test "$with_pymalloc" != "no"
11632then
Martin v. Löwis11437992002-04-12 09:54:03 +000011633
11634cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011635#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011636_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011637
11638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011639echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11640echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011641
Barry Warsawef82cd72000-06-30 16:21:01 +000011642# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011643echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11644echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11645
Barry Warsawef82cd72000-06-30 16:21:01 +000011646# Check whether --with-wctype-functions or --without-wctype-functions was given.
11647if test "${with_wctype_functions+set}" = set; then
11648 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
Barry Warsawef82cd72000-06-30 16:21:01 +000011650if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011651then
11652
11653cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011654#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011655_ACEOF
11656
11657 echo "$as_me:$LINENO: result: yes" >&5
11658echo "${ECHO_T}yes" >&6
11659else echo "$as_me:$LINENO: result: no" >&5
11660echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011661fi
11662else
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 echo "$as_me:$LINENO: result: no" >&5
11664echo "${ECHO_T}no" >&6
11665fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011666
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011667# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011668
Guido van Rossum98935bf2001-09-05 19:13:16 +000011669DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011670
Martin v. Löwis11437992002-04-12 09:54:03 +000011671echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11672echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011675if test "${with_sgi_dl+set}" = set; then
11676 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
11678echo "$as_me:$LINENO: result: $withval" >&5
11679echo "${ECHO_T}$withval" >&6
11680
11681cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011682#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011683_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011684
Guido van Rossume97ee181999-12-20 21:27:22 +000011685DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011686dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011687if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011688then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011689else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11690echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11691 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011692fi
11693DLINCLDIR=${dldir}
11694LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011695else
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 echo "$as_me:$LINENO: result: no" >&5
11697echo "${ECHO_T}no" >&6
11698fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011699
Martin v. Löwis11437992002-04-12 09:54:03 +000011700echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11701echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011702
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011703# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011704if test "${with_dl_dld+set}" = set; then
11705 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
11707echo "$as_me:$LINENO: result: $withval" >&5
11708echo "${ECHO_T}$withval" >&6
11709
11710cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011711#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011712_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011713
Guido van Rossume97ee181999-12-20 21:27:22 +000011714DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011715dldir=`echo "$withval" | sed 's/,.*//'`
11716dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011717if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011718then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011719else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&5
11720echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY" >&2;}
11721 { (exit DLD_DIRECTORY); exit DLD_DIRECTORY; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011722fi
11723DLINCLDIR=${dldir}
11724LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011725else
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 echo "$as_me:$LINENO: result: no" >&5
11727echo "${ECHO_T}no" >&6
11728fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011729
Guido van Rossume97ee181999-12-20 21:27:22 +000011730# the dlopen() function means we might want to use dynload_shlib.o. some
11731# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Thomas Wouters3a584202000-08-05 23:28:51 +000011733for ac_func in dlopen
11734do
Martin v. Löwis11437992002-04-12 09:54:03 +000011735as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11736echo "$as_me:$LINENO: checking for $ac_func" >&5
11737echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11738if eval "test \"\${$as_ac_var+set}\" = set"; then
11739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011740else
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 cat >conftest.$ac_ext <<_ACEOF
11742#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011743#include "confdefs.h"
11744/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011746#include <assert.h>
11747/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011748#ifdef __cplusplus
11749extern "C"
11750#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011751/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 builtin and then its argument prototype would still apply. */
11753char $ac_func ();
11754char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756#ifdef F77_DUMMY_MAIN
11757# ifdef __cplusplus
11758 extern "C"
11759# endif
11760 int F77_DUMMY_MAIN() { return 1; }
11761#endif
11762int
11763main ()
11764{
Guido van Rossume97ee181999-12-20 21:27:22 +000011765/* The GNU C library defines this for functions which it implements
11766 to always fail with ENOSYS. Some functions are actually named
11767 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011768#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011769choke me
11770#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011771f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011772#endif
11773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ;
11775 return 0;
11776}
11777_ACEOF
11778rm -f conftest.$ac_objext conftest$ac_exeext
11779if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11780 (eval $ac_link) 2>&5
11781 ac_status=$?
11782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11783 (exit $ac_status); } &&
11784 { ac_try='test -s conftest$ac_exeext'
11785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11786 (eval $ac_try) 2>&5
11787 ac_status=$?
11788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11789 (exit $ac_status); }; }; then
11790 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011791else
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 echo "$as_me: failed program was:" >&5
11793cat conftest.$ac_ext >&5
11794eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011795fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011796rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011798echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11799echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11800if test `eval echo '${'$as_ac_var'}'` = yes; then
11801 cat >>confdefs.h <<_ACEOF
11802#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11803_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011804
Guido van Rossume97ee181999-12-20 21:27:22 +000011805fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011806done
Guido van Rossume97ee181999-12-20 21:27:22 +000011807
Michael W. Hudson54241132001-12-07 15:38:26 +000011808
Guido van Rossume97ee181999-12-20 21:27:22 +000011809# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11810# loading of modules.
11811
Martin v. Löwis11437992002-04-12 09:54:03 +000011812echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11813echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011814if test -z "$DYNLOADFILE"
11815then
11816 case $ac_sys_system/$ac_sys_release in
11817 AIX*) DYNLOADFILE="dynload_aix.o";;
11818 BeOS*) DYNLOADFILE="dynload_beos.o";;
11819 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011820 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011821 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011822 *)
11823 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11824 # out any dynamic loading
11825 if test "$ac_cv_func_dlopen" = yes
11826 then DYNLOADFILE="dynload_shlib.o"
11827 else DYNLOADFILE="dynload_stub.o"
11828 fi
11829 ;;
11830 esac
11831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011832echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11833echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011834if test "$DYNLOADFILE" != "dynload_stub.o"
11835then
Martin v. Löwis11437992002-04-12 09:54:03 +000011836
11837cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011838#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011839_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011840
11841fi
11842
Neil Schemenauer4e425612001-06-19 15:44:15 +000011843# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11844
Michael W. Hudson54241132001-12-07 15:38:26 +000011845
Martin v. Löwis11437992002-04-12 09:54:03 +000011846echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11847echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011848if test -z "$MACHDEP_OBJS"
11849then
Jack Jansene578a632001-08-15 01:27:14 +000011850 MACHDEP_OBJS=$extra_machdep_objs
11851else
11852 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011854echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11855echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011856
Guido van Rossum627b2d71993-12-24 10:39:16 +000011857# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
Martin v. Löwis06a83e92002-04-14 10:19:44 +000011931
Fred Drake6b3cc522002-04-15 19:20:27 +000011932
Jack Jansen0b06be72002-06-21 14:48:38 +000011933
Martin v. Löwis0cec0ff2002-07-28 16:33:45 +000011934
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011935
Martin v. Löwis244edc82001-10-04 22:44:26 +000011936for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011937 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis606edc12002-06-13 21:09:11 +000011938 gai_strerror getgroups getlogin getpeername getpgid getpid getpwent getwd \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011939 hstrerror inet_pton kill killpg lchown link lstat mkfifo mknod mktime \
11940 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011941 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +000011942 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011943 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Michael W. Hudson065c1a22002-06-06 13:03:44 +000011944 sigaction siginterrupt sigrelse strftime strptime symlink \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011945 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis6aa9fdb2002-09-10 09:16:13 +000011946 truncate uname unsetenv utimes waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +000011947do
Martin v. Löwis11437992002-04-12 09:54:03 +000011948as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11949echo "$as_me:$LINENO: checking for $ac_func" >&5
11950echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11951if eval "test \"\${$as_ac_var+set}\" = set"; then
11952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953else
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 cat >conftest.$ac_ext <<_ACEOF
11955#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011956#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011957/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011959#include <assert.h>
11960/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011961#ifdef __cplusplus
11962extern "C"
11963#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011964/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011965 builtin and then its argument prototype would still apply. */
11966char $ac_func ();
11967char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011968
Martin v. Löwis11437992002-04-12 09:54:03 +000011969#ifdef F77_DUMMY_MAIN
11970# ifdef __cplusplus
11971 extern "C"
11972# endif
11973 int F77_DUMMY_MAIN() { return 1; }
11974#endif
11975int
11976main ()
11977{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011978/* The GNU C library defines this for functions which it implements
11979 to always fail with ENOSYS. Some functions are actually named
11980 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011982choke me
11983#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011984f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011985#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 ;
11988 return 0;
11989}
11990_ACEOF
11991rm -f conftest.$ac_objext conftest$ac_exeext
11992if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11993 (eval $ac_link) 2>&5
11994 ac_status=$?
11995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11996 (exit $ac_status); } &&
11997 { ac_try='test -s conftest$ac_exeext'
11998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11999 (eval $ac_try) 2>&5
12000 ac_status=$?
12001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12002 (exit $ac_status); }; }; then
12003 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012004else
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 echo "$as_me: failed program was:" >&5
12006cat conftest.$ac_ext >&5
12007eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012009rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012010fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012011echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12012echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12013if test `eval echo '${'$as_ac_var'}'` = yes; then
12014 cat >>confdefs.h <<_ACEOF
12015#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12016_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012017
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012018fi
12019done
12020
Michael W. Hudson54241132001-12-07 15:38:26 +000012021
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012022# check for openpty and forkpty
12023
Martin v. Löwis11437992002-04-12 09:54:03 +000012024
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012025for ac_func in openpty
12026do
Martin v. Löwis11437992002-04-12 09:54:03 +000012027as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12028echo "$as_me:$LINENO: checking for $ac_func" >&5
12029echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12030if eval "test \"\${$as_ac_var+set}\" = set"; then
12031 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012032else
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 cat >conftest.$ac_ext <<_ACEOF
12034#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012035#include "confdefs.h"
12036/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012038#include <assert.h>
12039/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012040#ifdef __cplusplus
12041extern "C"
12042#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012043/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 builtin and then its argument prototype would still apply. */
12045char $ac_func ();
12046char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012047
Martin v. Löwis11437992002-04-12 09:54:03 +000012048#ifdef F77_DUMMY_MAIN
12049# ifdef __cplusplus
12050 extern "C"
12051# endif
12052 int F77_DUMMY_MAIN() { return 1; }
12053#endif
12054int
12055main ()
12056{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012057/* The GNU C library defines this for functions which it implements
12058 to always fail with ENOSYS. Some functions are actually named
12059 something starting with __ and the normal name is an alias. */
12060#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12061choke me
12062#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012063f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012064#endif
12065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ;
12067 return 0;
12068}
12069_ACEOF
12070rm -f conftest.$ac_objext conftest$ac_exeext
12071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12072 (eval $ac_link) 2>&5
12073 ac_status=$?
12074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); } &&
12076 { ac_try='test -s conftest$ac_exeext'
12077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12078 (eval $ac_try) 2>&5
12079 ac_status=$?
12080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12081 (exit $ac_status); }; }; then
12082 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012083else
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 echo "$as_me: failed program was:" >&5
12085cat conftest.$ac_ext >&5
12086eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012088rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012090echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12091echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12092if test `eval echo '${'$as_ac_var'}'` = yes; then
12093 cat >>confdefs.h <<_ACEOF
12094#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12095_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012097else
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
12099echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
12100if test "${ac_cv_lib_util_openpty+set}" = set; then
12101 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102else
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012104LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012105cat >conftest.$ac_ext <<_ACEOF
12106#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012107#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
Fred Drake8cef4cf2000-06-28 16:40:38 +000012109/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012110#ifdef __cplusplus
12111extern "C"
12112#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 builtin and then its argument prototype would still apply. */
12115char openpty ();
12116#ifdef F77_DUMMY_MAIN
12117# ifdef __cplusplus
12118 extern "C"
12119# endif
12120 int F77_DUMMY_MAIN() { return 1; }
12121#endif
12122int
12123main ()
12124{
12125openpty ();
12126 ;
12127 return 0;
12128}
12129_ACEOF
12130rm -f conftest.$ac_objext conftest$ac_exeext
12131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12132 (eval $ac_link) 2>&5
12133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); } &&
12136 { ac_try='test -s conftest$ac_exeext'
12137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12138 (eval $ac_try) 2>&5
12139 ac_status=$?
12140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12141 (exit $ac_status); }; }; then
12142 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012143else
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 echo "$as_me: failed program was:" >&5
12145cat conftest.$ac_ext >&5
12146ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012148rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12149LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012150fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012151echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
12152echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
12153if test $ac_cv_lib_util_openpty = yes; then
12154 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012155#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012156_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012157 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158fi
12159
12160fi
12161done
12162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164for ac_func in forkpty
12165do
Martin v. Löwis11437992002-04-12 09:54:03 +000012166as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12167echo "$as_me:$LINENO: checking for $ac_func" >&5
12168echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12169if eval "test \"\${$as_ac_var+set}\" = set"; then
12170 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171else
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 cat >conftest.$ac_ext <<_ACEOF
12173#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174#include "confdefs.h"
12175/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177#include <assert.h>
12178/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012179#ifdef __cplusplus
12180extern "C"
12181#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 builtin and then its argument prototype would still apply. */
12184char $ac_func ();
12185char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187#ifdef F77_DUMMY_MAIN
12188# ifdef __cplusplus
12189 extern "C"
12190# endif
12191 int F77_DUMMY_MAIN() { return 1; }
12192#endif
12193int
12194main ()
12195{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196/* The GNU C library defines this for functions which it implements
12197 to always fail with ENOSYS. Some functions are actually named
12198 something starting with __ and the normal name is an alias. */
12199#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12200choke me
12201#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012202f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012203#endif
12204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 ;
12206 return 0;
12207}
12208_ACEOF
12209rm -f conftest.$ac_objext conftest$ac_exeext
12210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12211 (eval $ac_link) 2>&5
12212 ac_status=$?
12213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12214 (exit $ac_status); } &&
12215 { ac_try='test -s conftest$ac_exeext'
12216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12217 (eval $ac_try) 2>&5
12218 ac_status=$?
12219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12220 (exit $ac_status); }; }; then
12221 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012222else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 echo "$as_me: failed program was:" >&5
12224cat conftest.$ac_ext >&5
12225eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012226fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012229echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12230echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12231if test `eval echo '${'$as_ac_var'}'` = yes; then
12232 cat >>confdefs.h <<_ACEOF
12233#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12234_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012235
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236else
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12238echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12239if test "${ac_cv_lib_util_forkpty+set}" = set; then
12240 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012241else
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012243LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012244cat >conftest.$ac_ext <<_ACEOF
12245#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012249#ifdef __cplusplus
12250extern "C"
12251#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012252/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 builtin and then its argument prototype would still apply. */
12254char forkpty ();
12255#ifdef F77_DUMMY_MAIN
12256# ifdef __cplusplus
12257 extern "C"
12258# endif
12259 int F77_DUMMY_MAIN() { return 1; }
12260#endif
12261int
12262main ()
12263{
12264forkpty ();
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext conftest$ac_exeext
12270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12271 (eval $ac_link) 2>&5
12272 ac_status=$?
12273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12274 (exit $ac_status); } &&
12275 { ac_try='test -s conftest$ac_exeext'
12276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12277 (eval $ac_try) 2>&5
12278 ac_status=$?
12279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12280 (exit $ac_status); }; }; then
12281 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012282else
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 echo "$as_me: failed program was:" >&5
12284cat conftest.$ac_ext >&5
12285ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012287rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12288LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012289fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012290echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12291echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12292if test $ac_cv_lib_util_forkpty = yes; then
12293 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012295_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297fi
12298
12299fi
12300done
12301
Jack Jansendd19cf82001-12-06 22:36:17 +000012302
Michael W. Hudson54241132001-12-07 15:38:26 +000012303# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
12305
12306
12307
12308
12309
Fred Drake8cef4cf2000-06-28 16:40:38 +000012310for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12311do
Martin v. Löwis11437992002-04-12 09:54:03 +000012312as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12313echo "$as_me:$LINENO: checking for $ac_func" >&5
12314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12315if eval "test \"\${$as_ac_var+set}\" = set"; then
12316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 cat >conftest.$ac_ext <<_ACEOF
12319#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012320#include "confdefs.h"
12321/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012323#include <assert.h>
12324/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012325#ifdef __cplusplus
12326extern "C"
12327#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 builtin and then its argument prototype would still apply. */
12330char $ac_func ();
12331char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333#ifdef F77_DUMMY_MAIN
12334# ifdef __cplusplus
12335 extern "C"
12336# endif
12337 int F77_DUMMY_MAIN() { return 1; }
12338#endif
12339int
12340main ()
12341{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012342/* The GNU C library defines this for functions which it implements
12343 to always fail with ENOSYS. Some functions are actually named
12344 something starting with __ and the normal name is an alias. */
12345#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12346choke me
12347#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012348f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012349#endif
12350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 ;
12352 return 0;
12353}
12354_ACEOF
12355rm -f conftest.$ac_objext conftest$ac_exeext
12356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12357 (eval $ac_link) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); } &&
12361 { ac_try='test -s conftest$ac_exeext'
12362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12363 (eval $ac_try) 2>&5
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12367 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368else
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 echo "$as_me: failed program was:" >&5
12370cat conftest.$ac_ext >&5
12371eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12376echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12377if test `eval echo '${'$as_ac_var'}'` = yes; then
12378 cat >>confdefs.h <<_ACEOF
12379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12380_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012382fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012383done
12384
Michael W. Hudson54241132001-12-07 15:38:26 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
12387
12388
12389
12390
Martin v. Löwis1142de32002-03-29 16:28:31 +000012391for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012392do
Martin v. Löwis11437992002-04-12 09:54:03 +000012393as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12394echo "$as_me:$LINENO: checking for $ac_func" >&5
12395echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12396if eval "test \"\${$as_ac_var+set}\" = set"; then
12397 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398else
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 cat >conftest.$ac_ext <<_ACEOF
12400#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012402/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012404#include <assert.h>
12405/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012406#ifdef __cplusplus
12407extern "C"
12408#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012409/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 builtin and then its argument prototype would still apply. */
12411char $ac_func ();
12412char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414#ifdef F77_DUMMY_MAIN
12415# ifdef __cplusplus
12416 extern "C"
12417# endif
12418 int F77_DUMMY_MAIN() { return 1; }
12419#endif
12420int
12421main ()
12422{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012423/* The GNU C library defines this for functions which it implements
12424 to always fail with ENOSYS. Some functions are actually named
12425 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012426#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012427choke me
12428#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012429f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
12436rm -f conftest.$ac_objext conftest$ac_exeext
12437if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12438 (eval $ac_link) 2>&5
12439 ac_status=$?
12440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12441 (exit $ac_status); } &&
12442 { ac_try='test -s conftest$ac_exeext'
12443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12444 (eval $ac_try) 2>&5
12445 ac_status=$?
12446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12447 (exit $ac_status); }; }; then
12448 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012449else
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 echo "$as_me: failed program was:" >&5
12451cat conftest.$ac_ext >&5
12452eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012454rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012455fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012456echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12457echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12458if test `eval echo '${'$as_ac_var'}'` = yes; then
12459 cat >>confdefs.h <<_ACEOF
12460#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12461_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012462
Martin v. Löwis1142de32002-03-29 16:28:31 +000012463else
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012465fi
12466done
12467
12468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Martin v. Löwis1142de32002-03-29 16:28:31 +000012470for ac_func in getpgrp
12471do
Martin v. Löwis11437992002-04-12 09:54:03 +000012472as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12473echo "$as_me:$LINENO: checking for $ac_func" >&5
12474echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12475if eval "test \"\${$as_ac_var+set}\" = set"; then
12476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012477else
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 cat >conftest.$ac_ext <<_ACEOF
12479#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012480#include "confdefs.h"
12481/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012483#include <assert.h>
12484/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012485#ifdef __cplusplus
12486extern "C"
12487#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012488/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 builtin and then its argument prototype would still apply. */
12490char $ac_func ();
12491char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493#ifdef F77_DUMMY_MAIN
12494# ifdef __cplusplus
12495 extern "C"
12496# endif
12497 int F77_DUMMY_MAIN() { return 1; }
12498#endif
12499int
12500main ()
12501{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012502/* The GNU C library defines this for functions which it implements
12503 to always fail with ENOSYS. Some functions are actually named
12504 something starting with __ and the normal name is an alias. */
12505#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12506choke me
12507#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012508f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012509#endif
12510
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 ;
12512 return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext conftest$ac_exeext
12516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12517 (eval $ac_link) 2>&5
12518 ac_status=$?
12519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } &&
12521 { ac_try='test -s conftest$ac_exeext'
12522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523 (eval $ac_try) 2>&5
12524 ac_status=$?
12525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526 (exit $ac_status); }; }; then
12527 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012528else
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 echo "$as_me: failed program was:" >&5
12530cat conftest.$ac_ext >&5
12531eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012533rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012534fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012535echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12536echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12537if test `eval echo '${'$as_ac_var'}'` = yes; then
12538 cat >>confdefs.h <<_ACEOF
12539#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12540_ACEOF
12541 cat >conftest.$ac_ext <<_ACEOF
12542#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543#include "confdefs.h"
12544#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012545#ifdef F77_DUMMY_MAIN
12546# ifdef __cplusplus
12547 extern "C"
12548# endif
12549 int F77_DUMMY_MAIN() { return 1; }
12550#endif
12551int
12552main ()
12553{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
12559rm -f conftest.$ac_objext
12560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12561 (eval $ac_compile) 2>&5
12562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); } &&
12565 { ac_try='test -s conftest.$ac_objext'
12566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); }; }; then
12571
12572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012574_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012575
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Guido van Rossumf78abae1997-01-21 22:02:36 +000012577else
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 echo "$as_me: failed program was:" >&5
12579cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012581rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012582
Guido van Rossum627b2d71993-12-24 10:39:16 +000012583fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012584done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012585
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012586echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12587echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12588if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012590else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012591 if test "$cross_compiling" = yes; then
12592 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12593echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12594 { (exit 1); exit 1; }; }
12595else
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012598#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012599#if HAVE_UNISTD_H
12600# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012601#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603#ifdef F77_DUMMY_MAIN
12604# ifdef __cplusplus
12605 extern "C"
12606# endif
12607 int F77_DUMMY_MAIN() { return 1; }
12608#endif
12609int
12610main ()
12611{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012612/* If this system has a BSD-style setpgrp which takes arguments,
12613 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12614 exit successfully. */
12615 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 ;
12617 return 0;
12618}
12619_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012620rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12622 (eval $ac_link) 2>&5
12623 ac_status=$?
12624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12627 (eval $ac_try) 2>&5
12628 ac_status=$?
12629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12630 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012631 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012632else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012633 echo "$as_me: program exited with status $ac_status" >&5
12634echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012635cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012636( exit $ac_status )
12637ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012638fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012639rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012640fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012641fi
12642echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12643echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12644if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
12646cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012647#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012648_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012649
12650fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012651
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Thomas Wouters3a584202000-08-05 23:28:51 +000012653for ac_func in gettimeofday
12654do
Martin v. Löwis11437992002-04-12 09:54:03 +000012655as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12656echo "$as_me:$LINENO: checking for $ac_func" >&5
12657echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12658if eval "test \"\${$as_ac_var+set}\" = set"; then
12659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012660else
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 cat >conftest.$ac_ext <<_ACEOF
12662#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012664/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012666#include <assert.h>
12667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012671/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012672 builtin and then its argument prototype would still apply. */
12673char $ac_func ();
12674char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012675
Martin v. Löwis11437992002-04-12 09:54:03 +000012676#ifdef F77_DUMMY_MAIN
12677# ifdef __cplusplus
12678 extern "C"
12679# endif
12680 int F77_DUMMY_MAIN() { return 1; }
12681#endif
12682int
12683main ()
12684{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012685/* The GNU C library defines this for functions which it implements
12686 to always fail with ENOSYS. Some functions are actually named
12687 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012688#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689choke me
12690#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012691f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692#endif
12693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ;
12695 return 0;
12696}
12697_ACEOF
12698rm -f conftest.$ac_objext conftest$ac_exeext
12699if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12700 (eval $ac_link) 2>&5
12701 ac_status=$?
12702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12703 (exit $ac_status); } &&
12704 { ac_try='test -s conftest$ac_exeext'
12705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12706 (eval $ac_try) 2>&5
12707 ac_status=$?
12708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12709 (exit $ac_status); }; }; then
12710 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012711else
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 echo "$as_me: failed program was:" >&5
12713cat conftest.$ac_ext >&5
12714eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012718echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12719echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12720if test `eval echo '${'$as_ac_var'}'` = yes; then
12721 cat >>confdefs.h <<_ACEOF
12722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12723_ACEOF
12724 cat >conftest.$ac_ext <<_ACEOF
12725#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012727#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012728#ifdef F77_DUMMY_MAIN
12729# ifdef __cplusplus
12730 extern "C"
12731# endif
12732 int F77_DUMMY_MAIN() { return 1; }
12733#endif
12734int
12735main ()
12736{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012737gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ;
12739 return 0;
12740}
12741_ACEOF
12742rm -f conftest.$ac_objext
12743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12744 (eval $ac_compile) 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } &&
12748 { ac_try='test -s conftest.$ac_objext'
12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
12752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754 :
12755else
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 echo "$as_me: failed program was:" >&5
12757cat conftest.$ac_ext >&5
12758
12759cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012761_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012762
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
Guido van Rossum627b2d71993-12-24 10:39:16 +000012764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012765rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012768done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769
Michael W. Hudson54241132001-12-07 15:38:26 +000012770
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012771echo "$as_me:$LINENO: checking for major" >&5
12772echo $ECHO_N "checking for major... $ECHO_C" >&6
12773cat >conftest.$ac_ext <<_ACEOF
12774#line $LINENO "configure"
12775#include "confdefs.h"
12776
12777 #if defined(MAJOR_IN_MKDEV)
12778 #include <sys/mkdev.h>
12779 #elif defined(MAJOR_IN_SYSMACROS)
12780 #include <sys/sysmacros.h>
12781 #else
12782 #include <sys/types.h>
12783 #endif
12784
12785#ifdef F77_DUMMY_MAIN
12786# ifdef __cplusplus
12787 extern "C"
12788# endif
12789 int F77_DUMMY_MAIN() { return 1; }
12790#endif
12791int
12792main ()
12793{
12794
12795 makedev(major(0),minor(0));
12796
12797 ;
12798 return 0;
12799}
12800_ACEOF
12801rm -f conftest.$ac_objext
12802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12803 (eval $ac_compile) 2>&5
12804 ac_status=$?
12805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12806 (exit $ac_status); } &&
12807 { ac_try='test -s conftest.$ac_objext'
12808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12809 (eval $ac_try) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); }; }; then
12813
12814
12815cat >>confdefs.h <<\_ACEOF
12816#define HAVE_DEVICE_MACROS 1
12817_ACEOF
12818
12819 echo "$as_me:$LINENO: result: yes" >&5
12820echo "${ECHO_T}yes" >&6
12821
12822else
12823 echo "$as_me: failed program was:" >&5
12824cat conftest.$ac_ext >&5
12825
12826 echo "$as_me:$LINENO: result: no" >&5
12827echo "${ECHO_T}no" >&6
12828
12829fi
12830rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012831
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012832# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012833# for [no]getaddrinfo in netdb.h.
12834echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12835echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12836cat >conftest.$ac_ext <<_ACEOF
12837#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012838#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012839
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012840#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012841#include <sys/socket.h>
12842#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012843#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845#ifdef F77_DUMMY_MAIN
12846# ifdef __cplusplus
12847 extern "C"
12848# endif
12849 int F77_DUMMY_MAIN() { return 1; }
12850#endif
12851int
12852main ()
12853{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012854
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012855getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012856
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ;
12858 return 0;
12859}
12860_ACEOF
12861rm -f conftest.$ac_objext conftest$ac_exeext
12862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12863 (eval $ac_link) 2>&5
12864 ac_status=$?
12865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12866 (exit $ac_status); } &&
12867 { ac_try='test -s conftest$ac_exeext'
12868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869 (eval $ac_try) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); }; }; then
12873
12874echo "$as_me:$LINENO: result: yes" >&5
12875echo "${ECHO_T}yes" >&6
12876echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12877echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012878if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 echo "$as_me:$LINENO: result: buggy" >&5
12880echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881buggygetaddrinfo=yes
12882else
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 cat >conftest.$ac_ext <<_ACEOF
12884#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012885#include "confdefs.h"
12886
12887#include <sys/types.h>
12888#include <netdb.h>
12889#include <string.h>
12890#include <sys/socket.h>
12891#include <netinet/in.h>
12892
12893main()
12894{
12895 int passive, gaierr, inet4 = 0, inet6 = 0;
12896 struct addrinfo hints, *ai, *aitop;
12897 char straddr[INET6_ADDRSTRLEN], strport[16];
12898
12899 for (passive = 0; passive <= 1; passive++) {
12900 memset(&hints, 0, sizeof(hints));
12901 hints.ai_family = AF_UNSPEC;
12902 hints.ai_flags = passive ? AI_PASSIVE : 0;
12903 hints.ai_socktype = SOCK_STREAM;
12904 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12905 (void)gai_strerror(gaierr);
12906 goto bad;
12907 }
12908 for (ai = aitop; ai; ai = ai->ai_next) {
12909 if (ai->ai_addr == NULL ||
12910 ai->ai_addrlen == 0 ||
12911 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12912 straddr, sizeof(straddr), strport, sizeof(strport),
12913 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12914 goto bad;
12915 }
12916 switch (ai->ai_family) {
12917 case AF_INET:
12918 if (strcmp(strport, "54321") != 0) {
12919 goto bad;
12920 }
12921 if (passive) {
12922 if (strcmp(straddr, "0.0.0.0") != 0) {
12923 goto bad;
12924 }
12925 } else {
12926 if (strcmp(straddr, "127.0.0.1") != 0) {
12927 goto bad;
12928 }
12929 }
12930 inet4++;
12931 break;
12932 case AF_INET6:
12933 if (strcmp(strport, "54321") != 0) {
12934 goto bad;
12935 }
12936 if (passive) {
12937 if (strcmp(straddr, "::") != 0) {
12938 goto bad;
12939 }
12940 } else {
12941 if (strcmp(straddr, "::1") != 0) {
12942 goto bad;
12943 }
12944 }
12945 inet6++;
12946 break;
12947 case AF_UNSPEC:
12948 goto bad;
12949 break;
12950 default:
12951 /* another family support? */
12952 break;
12953 }
12954 }
12955 }
12956
12957 if (!(inet4 == 0 || inet4 == 2))
12958 goto bad;
12959 if (!(inet6 == 0 || inet6 == 2))
12960 goto bad;
12961
12962 if (aitop)
12963 freeaddrinfo(aitop);
12964 exit(0);
12965
12966 bad:
12967 if (aitop)
12968 freeaddrinfo(aitop);
12969 exit(1);
12970}
12971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
12973rm -f conftest$ac_exeext
12974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12975 (eval $ac_link) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); }; }; then
12984 echo "$as_me:$LINENO: result: good" >&5
12985echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012986buggygetaddrinfo=no
12987else
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 echo "$as_me: program exited with status $ac_status" >&5
12989echo "$as_me: failed program was:" >&5
12990cat conftest.$ac_ext >&5
12991( exit $ac_status )
12992echo "$as_me:$LINENO: result: buggy" >&5
12993echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994buggygetaddrinfo=yes
12995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012996rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012997fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012998else
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 echo "$as_me: failed program was:" >&5
13000cat conftest.$ac_ext >&5
13001
13002echo "$as_me:$LINENO: result: no" >&5
13003echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013004buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013007rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013008
13009if test "$buggygetaddrinfo" = "yes"; then
13010 if test "$ipv6" = "yes"; then
13011 echo 'Fatal: You must get working getaddrinfo() function.'
13012 echo ' or you can specify "--disable-ipv6"'.
13013 exit 1
13014 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
13017cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013018#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013019_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013020
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013023for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024do
Martin v. Löwis11437992002-04-12 09:54:03 +000013025as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13026echo "$as_me:$LINENO: checking for $ac_func" >&5
13027echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13028if eval "test \"\${$as_ac_var+set}\" = set"; then
13029 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
13032#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033#include "confdefs.h"
13034/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036#include <assert.h>
13037/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013038#ifdef __cplusplus
13039extern "C"
13040#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013041/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 builtin and then its argument prototype would still apply. */
13043char $ac_func ();
13044char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045
Martin v. Löwis11437992002-04-12 09:54:03 +000013046#ifdef F77_DUMMY_MAIN
13047# ifdef __cplusplus
13048 extern "C"
13049# endif
13050 int F77_DUMMY_MAIN() { return 1; }
13051#endif
13052int
13053main ()
13054{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055/* The GNU C library defines this for functions which it implements
13056 to always fail with ENOSYS. Some functions are actually named
13057 something starting with __ and the normal name is an alias. */
13058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13059choke me
13060#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013061f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062#endif
13063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 ;
13065 return 0;
13066}
13067_ACEOF
13068rm -f conftest.$ac_objext conftest$ac_exeext
13069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13070 (eval $ac_link) 2>&5
13071 ac_status=$?
13072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073 (exit $ac_status); } &&
13074 { ac_try='test -s conftest$ac_exeext'
13075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13076 (eval $ac_try) 2>&5
13077 ac_status=$?
13078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079 (exit $ac_status); }; }; then
13080 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013081else
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 echo "$as_me: failed program was:" >&5
13083cat conftest.$ac_ext >&5
13084eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013088echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13089echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13090if test `eval echo '${'$as_ac_var'}'` = yes; then
13091 cat >>confdefs.h <<_ACEOF
13092#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13093_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013094
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013095fi
13096done
13097
Michael W. Hudson54241132001-12-07 15:38:26 +000013098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000013100echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
13101echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13102if test "${ac_cv_header_time+set}" = set; then
13103 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013104else
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 cat >conftest.$ac_ext <<_ACEOF
13106#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013107#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013108#include <sys/types.h>
13109#include <sys/time.h>
13110#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013111
13112#ifdef F77_DUMMY_MAIN
13113# ifdef __cplusplus
13114 extern "C"
13115# endif
13116 int F77_DUMMY_MAIN() { return 1; }
13117#endif
13118int
13119main ()
13120{
13121if ((struct tm *) 0)
13122return 0;
13123 ;
13124 return 0;
13125}
13126_ACEOF
13127rm -f conftest.$ac_objext
13128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13129 (eval $ac_compile) 2>&5
13130 ac_status=$?
13131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132 (exit $ac_status); } &&
13133 { ac_try='test -s conftest.$ac_objext'
13134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13135 (eval $ac_try) 2>&5
13136 ac_status=$?
13137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13138 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013140else
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 echo "$as_me: failed program was:" >&5
13142cat conftest.$ac_ext >&5
13143ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013144fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013145rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013147echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
13148echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013149if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
13151cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013152#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013153_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
13155fi
13156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
13158echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
13159if test "${ac_cv_struct_tm+set}" = set; then
13160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161else
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 cat >conftest.$ac_ext <<_ACEOF
13163#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164#include "confdefs.h"
13165#include <sys/types.h>
13166#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
13168#ifdef F77_DUMMY_MAIN
13169# ifdef __cplusplus
13170 extern "C"
13171# endif
13172 int F77_DUMMY_MAIN() { return 1; }
13173#endif
13174int
13175main ()
13176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013177struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ;
13179 return 0;
13180}
13181_ACEOF
13182rm -f conftest.$ac_objext
13183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13184 (eval $ac_compile) 2>&5
13185 ac_status=$?
13186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13187 (exit $ac_status); } &&
13188 { ac_try='test -s conftest.$ac_objext'
13189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13190 (eval $ac_try) 2>&5
13191 ac_status=$?
13192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194 ac_cv_struct_tm=time.h
13195else
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 echo "$as_me: failed program was:" >&5
13197cat conftest.$ac_ext >&5
13198ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013200rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013202echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
13203echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013204if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013205
13206cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013207#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013208_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013209
13210fi
13211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
13213echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
13214if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
13215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 cat >conftest.$ac_ext <<_ACEOF
13218#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013219#include "confdefs.h"
13220#include <sys/types.h>
13221#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
13223
13224#ifdef F77_DUMMY_MAIN
13225# ifdef __cplusplus
13226 extern "C"
13227# endif
13228 int F77_DUMMY_MAIN() { return 1; }
13229#endif
13230int
13231main ()
13232{
13233static struct tm ac_aggr;
13234if (ac_aggr.tm_zone)
13235return 0;
13236 ;
13237 return 0;
13238}
13239_ACEOF
13240rm -f conftest.$ac_objext
13241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13242 (eval $ac_compile) 2>&5
13243 ac_status=$?
13244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13245 (exit $ac_status); } &&
13246 { ac_try='test -s conftest.$ac_objext'
13247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13248 (eval $ac_try) 2>&5
13249 ac_status=$?
13250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13251 (exit $ac_status); }; }; then
13252 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013253else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 echo "$as_me: failed program was:" >&5
13255cat conftest.$ac_ext >&5
13256ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013257fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013258rm -f conftest.$ac_objext conftest.$ac_ext
13259fi
13260echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13261echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13262if test $ac_cv_member_struct_tm_tm_zone = yes; then
13263
13264cat >>confdefs.h <<_ACEOF
13265#define HAVE_STRUCT_TM_TM_ZONE 1
13266_ACEOF
13267
13268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13272
13273cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013275_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276
13277else
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 echo "$as_me:$LINENO: checking for tzname" >&5
13279echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13280if test "${ac_cv_var_tzname+set}" = set; then
13281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282else
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 cat >conftest.$ac_ext <<_ACEOF
13284#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013285#include "confdefs.h"
13286#include <time.h>
13287#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
13291#ifdef F77_DUMMY_MAIN
13292# ifdef __cplusplus
13293 extern "C"
13294# endif
13295 int F77_DUMMY_MAIN() { return 1; }
13296#endif
13297int
13298main ()
13299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ;
13302 return 0;
13303}
13304_ACEOF
13305rm -f conftest.$ac_objext conftest$ac_exeext
13306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13307 (eval $ac_link) 2>&5
13308 ac_status=$?
13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest$ac_exeext'
13312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13314 ac_status=$?
13315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317 ac_cv_var_tzname=yes
13318else
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 echo "$as_me: failed program was:" >&5
13320cat conftest.$ac_ext >&5
13321ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013325echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13326echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013327 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328
13329cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013331_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333 fi
13334fi
13335
Jack Jansendd19cf82001-12-06 22:36:17 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13338echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13339if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13340 echo $ECHO_N "(cached) $ECHO_C" >&6
13341else
13342 cat >conftest.$ac_ext <<_ACEOF
13343#line $LINENO "configure"
13344#include "confdefs.h"
13345$ac_includes_default
13346#ifdef F77_DUMMY_MAIN
13347# ifdef __cplusplus
13348 extern "C"
13349# endif
13350 int F77_DUMMY_MAIN() { return 1; }
13351#endif
13352int
13353main ()
13354{
13355static struct stat ac_aggr;
13356if (ac_aggr.st_rdev)
13357return 0;
13358 ;
13359 return 0;
13360}
13361_ACEOF
13362rm -f conftest.$ac_objext
13363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13364 (eval $ac_compile) 2>&5
13365 ac_status=$?
13366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13367 (exit $ac_status); } &&
13368 { ac_try='test -s conftest.$ac_objext'
13369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13370 (eval $ac_try) 2>&5
13371 ac_status=$?
13372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13373 (exit $ac_status); }; }; then
13374 ac_cv_member_struct_stat_st_rdev=yes
13375else
13376 echo "$as_me: failed program was:" >&5
13377cat conftest.$ac_ext >&5
13378ac_cv_member_struct_stat_st_rdev=no
13379fi
13380rm -f conftest.$ac_objext conftest.$ac_ext
13381fi
13382echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13383echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13384if test $ac_cv_member_struct_stat_st_rdev = yes; then
13385
13386cat >>confdefs.h <<_ACEOF
13387#define HAVE_STRUCT_STAT_ST_RDEV 1
13388_ACEOF
13389
13390
13391cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013392#define HAVE_ST_RDEV 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013393_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013394
13395fi
13396
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
13398
13399echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13400echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13401if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13402 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013403else
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 cat >conftest.$ac_ext <<_ACEOF
13405#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013406#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013407$ac_includes_default
13408#ifdef F77_DUMMY_MAIN
13409# ifdef __cplusplus
13410 extern "C"
13411# endif
13412 int F77_DUMMY_MAIN() { return 1; }
13413#endif
13414int
13415main ()
13416{
13417static struct stat ac_aggr;
13418if (ac_aggr.st_blksize)
13419return 0;
13420 ;
13421 return 0;
13422}
13423_ACEOF
13424rm -f conftest.$ac_objext
13425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13426 (eval $ac_compile) 2>&5
13427 ac_status=$?
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429 (exit $ac_status); } &&
13430 { ac_try='test -s conftest.$ac_objext'
13431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13433 ac_status=$?
13434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13435 (exit $ac_status); }; }; then
13436 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013437else
Martin v. Löwis11437992002-04-12 09:54:03 +000013438 echo "$as_me: failed program was:" >&5
13439cat conftest.$ac_ext >&5
13440ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013442rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13445echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13446if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448cat >>confdefs.h <<_ACEOF
13449#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13450_ACEOF
13451
13452
13453cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013454#define HAVE_ST_BLKSIZE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013455_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013456
13457fi
13458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
13460echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13461echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13462if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13463 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 cat >conftest.$ac_ext <<_ACEOF
13466#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013467#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013468$ac_includes_default
13469#ifdef F77_DUMMY_MAIN
13470# ifdef __cplusplus
13471 extern "C"
13472# endif
13473 int F77_DUMMY_MAIN() { return 1; }
13474#endif
13475int
13476main ()
13477{
13478static struct stat ac_aggr;
13479if (ac_aggr.st_blocks)
13480return 0;
13481 ;
13482 return 0;
13483}
13484_ACEOF
13485rm -f conftest.$ac_objext
13486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13487 (eval $ac_compile) 2>&5
13488 ac_status=$?
13489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13490 (exit $ac_status); } &&
13491 { ac_try='test -s conftest.$ac_objext'
13492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13493 (eval $ac_try) 2>&5
13494 ac_status=$?
13495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); }; }; then
13497 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013498else
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 echo "$as_me: failed program was:" >&5
13500cat conftest.$ac_ext >&5
13501ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013503rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013505echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13506echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13507if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013508
Martin v. Löwis11437992002-04-12 09:54:03 +000013509cat >>confdefs.h <<_ACEOF
13510#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13511_ACEOF
13512
13513
13514cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013515#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013516_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013517
13518else
Martin v. Löwis11437992002-04-12 09:54:03 +000013519 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013520fi
13521
Michael W. Hudson54241132001-12-07 15:38:26 +000013522
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
13524echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13525echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13526if test "${ac_cv_header_time_altzone+set}" = set; then
13527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528else
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 cat >conftest.$ac_ext <<_ACEOF
13530#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531#include "confdefs.h"
13532#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013533#ifdef F77_DUMMY_MAIN
13534# ifdef __cplusplus
13535 extern "C"
13536# endif
13537 int F77_DUMMY_MAIN() { return 1; }
13538#endif
13539int
13540main ()
13541{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 ;
13544 return 0;
13545}
13546_ACEOF
13547rm -f conftest.$ac_objext
13548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13549 (eval $ac_compile) 2>&5
13550 ac_status=$?
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); } &&
13553 { ac_try='test -s conftest.$ac_objext'
13554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13555 (eval $ac_try) 2>&5
13556 ac_status=$?
13557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013559 ac_cv_header_time_altzone=yes
13560else
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 echo "$as_me: failed program was:" >&5
13562cat conftest.$ac_ext >&5
13563ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013564fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013565rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566fi
13567
Martin v. Löwis11437992002-04-12 09:54:03 +000013568echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13569echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013570if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013571
13572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575
13576fi
13577
Guido van Rossumda88dad1995-01-26 00:46:29 +000013578was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013579echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13580echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13581cat >conftest.$ac_ext <<_ACEOF
13582#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013583#include "confdefs.h"
13584
13585#include <sys/types.h>
13586#include <sys/select.h>
13587#include <sys/time.h>
13588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589#ifdef F77_DUMMY_MAIN
13590# ifdef __cplusplus
13591 extern "C"
13592# endif
13593 int F77_DUMMY_MAIN() { return 1; }
13594#endif
13595int
13596main ()
13597{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013598;
Martin v. Löwis11437992002-04-12 09:54:03 +000013599 ;
13600 return 0;
13601}
13602_ACEOF
13603rm -f conftest.$ac_objext
13604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13605 (eval $ac_compile) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); } &&
13609 { ac_try='test -s conftest.$ac_objext'
13610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13611 (eval $ac_try) 2>&5
13612 ac_status=$?
13613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13614 (exit $ac_status); }; }; then
13615
13616
13617cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013619_ACEOF
13620
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013621 was_it_defined=yes
13622
Guido van Rossumf78abae1997-01-21 22:02:36 +000013623else
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 echo "$as_me: failed program was:" >&5
13625cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013626fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013627rm -f conftest.$ac_objext conftest.$ac_ext
13628echo "$as_me:$LINENO: result: $was_it_defined" >&5
13629echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630
Martin v. Löwis11437992002-04-12 09:54:03 +000013631echo "$as_me:$LINENO: checking for addrinfo" >&5
13632echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13633if test "${ac_cv_struct_addrinfo+set}" = set; then
13634 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013635else
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 cat >conftest.$ac_ext <<_ACEOF
13637#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013638#include "confdefs.h"
13639
13640# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013641#ifdef F77_DUMMY_MAIN
13642# ifdef __cplusplus
13643 extern "C"
13644# endif
13645 int F77_DUMMY_MAIN() { return 1; }
13646#endif
13647int
13648main ()
13649{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013650struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
13656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13657 (eval $ac_compile) 2>&5
13658 ac_status=$?
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } &&
13661 { ac_try='test -s conftest.$ac_objext'
13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013667 ac_cv_struct_addrinfo=yes
13668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5
13671ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013673rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013674fi
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13677echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013678if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013679
13680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013681#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013682_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013683
13684fi
13685
Martin v. Löwis11437992002-04-12 09:54:03 +000013686echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13687echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13688if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13689 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013690else
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 cat >conftest.$ac_ext <<_ACEOF
13692#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013693#include "confdefs.h"
13694
13695# include <sys/types.h>
13696# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013697#ifdef F77_DUMMY_MAIN
13698# ifdef __cplusplus
13699 extern "C"
13700# endif
13701 int F77_DUMMY_MAIN() { return 1; }
13702#endif
13703int
13704main ()
13705{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013706struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013707 ;
13708 return 0;
13709}
13710_ACEOF
13711rm -f conftest.$ac_objext
13712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13713 (eval $ac_compile) 2>&5
13714 ac_status=$?
13715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716 (exit $ac_status); } &&
13717 { ac_try='test -s conftest.$ac_objext'
13718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13719 (eval $ac_try) 2>&5
13720 ac_status=$?
13721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13722 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013723 ac_cv_struct_sockaddr_storage=yes
13724else
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 echo "$as_me: failed program was:" >&5
13726cat conftest.$ac_ext >&5
13727ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013729rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013730fi
13731
Martin v. Löwis11437992002-04-12 09:54:03 +000013732echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13733echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013734if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
13736cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013737#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013738_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013739
13740fi
13741
Guido van Rossum627b2d71993-12-24 10:39:16 +000013742# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013743
Michael W. Hudson54241132001-12-07 15:38:26 +000013744
Martin v. Löwis11437992002-04-12 09:54:03 +000013745echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13746echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13747if test "${ac_cv_c_char_unsigned+set}" = set; then
13748 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013749else
Martin v. Löwis11437992002-04-12 09:54:03 +000013750 cat >conftest.$ac_ext <<_ACEOF
13751#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013752#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013753$ac_includes_default
13754#ifdef F77_DUMMY_MAIN
13755# ifdef __cplusplus
13756 extern "C"
13757# endif
13758 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013759#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013760int
13761main ()
13762{
13763static int test_array [1 - 2 * !(((char) -1) < 0)];
13764test_array [0] = 0
13765
13766 ;
13767 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013768}
Martin v. Löwis11437992002-04-12 09:54:03 +000013769_ACEOF
13770rm -f conftest.$ac_objext
13771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13772 (eval $ac_compile) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); } &&
13776 { ac_try='test -s conftest.$ac_objext'
13777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13778 (eval $ac_try) 2>&5
13779 ac_status=$?
13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13781 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013782 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013783else
13784 echo "$as_me: failed program was:" >&5
13785cat conftest.$ac_ext >&5
13786ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013788rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013790echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13791echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013792if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013795_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796
13797fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013798
Martin v. Löwis11437992002-04-12 09:54:03 +000013799echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
13800echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13801if test "${ac_cv_prog_cc_stdc+set}" = set; then
13802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013803else
Martin v. Löwis11437992002-04-12 09:54:03 +000013804 ac_cv_prog_cc_stdc=no
13805ac_save_CC=$CC
13806cat >conftest.$ac_ext <<_ACEOF
13807#line $LINENO "configure"
13808#include "confdefs.h"
13809#include <stdarg.h>
13810#include <stdio.h>
13811#include <sys/types.h>
13812#include <sys/stat.h>
13813/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13814struct buf { int x; };
13815FILE * (*rcsopen) (struct buf *, struct stat *, int);
13816static char *e (p, i)
13817 char **p;
13818 int i;
13819{
13820 return p[i];
13821}
13822static char *f (char * (*g) (char **, int), char **p, ...)
13823{
13824 char *s;
13825 va_list v;
13826 va_start (v,p);
13827 s = g (p, va_arg (v,int));
13828 va_end (v);
13829 return s;
13830}
13831int test (int i, double x);
13832struct s1 {int (*f) (int a);};
13833struct s2 {int (*f) (double a);};
13834int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13835int argc;
13836char **argv;
13837#ifdef F77_DUMMY_MAIN
13838# ifdef __cplusplus
13839 extern "C"
13840# endif
13841 int F77_DUMMY_MAIN() { return 1; }
13842#endif
13843int
13844main ()
13845{
13846return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13847 ;
13848 return 0;
13849}
13850_ACEOF
13851# Don't try gcc -ansi; that turns off useful extensions and
13852# breaks some systems' header files.
13853# AIX -qlanglvl=ansi
13854# Ultrix and OSF/1 -std1
13855# HP-UX 10.20 and later -Ae
13856# HP-UX older versions -Aa -D_HPUX_SOURCE
13857# SVR4 -Xc -D__EXTENSIONS__
13858for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13859do
13860 CC="$ac_save_CC $ac_arg"
13861 rm -f conftest.$ac_objext
13862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13863 (eval $ac_compile) 2>&5
13864 ac_status=$?
13865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866 (exit $ac_status); } &&
13867 { ac_try='test -s conftest.$ac_objext'
13868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13869 (eval $ac_try) 2>&5
13870 ac_status=$?
13871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13872 (exit $ac_status); }; }; then
13873 ac_cv_prog_cc_stdc=$ac_arg
13874break
13875else
13876 echo "$as_me: failed program was:" >&5
13877cat conftest.$ac_ext >&5
13878fi
13879rm -f conftest.$ac_objext
13880done
13881rm -f conftest.$ac_ext conftest.$ac_objext
13882CC=$ac_save_CC
13883
13884fi
13885
13886case "x$ac_cv_prog_cc_stdc" in
13887 x|xno)
13888 echo "$as_me:$LINENO: result: none needed" >&5
13889echo "${ECHO_T}none needed" >&6 ;;
13890 *)
13891 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
13892echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13893 CC="$CC $ac_cv_prog_cc_stdc" ;;
13894esac
13895
13896echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13897echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13898if test "${ac_cv_c_const+set}" = set; then
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
13900else
13901 cat >conftest.$ac_ext <<_ACEOF
13902#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903#include "confdefs.h"
13904
Martin v. Löwis11437992002-04-12 09:54:03 +000013905#ifdef F77_DUMMY_MAIN
13906# ifdef __cplusplus
13907 extern "C"
13908# endif
13909 int F77_DUMMY_MAIN() { return 1; }
13910#endif
13911int
13912main ()
13913{
13914/* FIXME: Include the comments suggested by Paul. */
13915#ifndef __cplusplus
13916 /* Ultrix mips cc rejects this. */
13917 typedef int charset[2];
13918 const charset x;
13919 /* SunOS 4.1.1 cc rejects this. */
13920 char const *const *ccp;
13921 char **p;
13922 /* NEC SVR4.0.2 mips cc rejects this. */
13923 struct point {int x, y;};
13924 static struct point const zero = {0,0};
13925 /* AIX XL C 1.02.0.0 rejects this.
13926 It does not let you subtract one const X* pointer from another in
13927 an arm of an if-expression whose if-part is not a constant
13928 expression */
13929 const char *g = "string";
13930 ccp = &g + (g ? g-g : 0);
13931 /* HPUX 7.0 cc rejects these. */
13932 ++ccp;
13933 p = (char**) ccp;
13934 ccp = (char const *const *) p;
13935 { /* SCO 3.2v4 cc rejects this. */
13936 char *t;
13937 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 *t++ = 0;
13940 }
13941 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13942 int x[] = {25, 17};
13943 const int *foo = &x[0];
13944 ++foo;
13945 }
13946 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13947 typedef const int *iptr;
13948 iptr p = 0;
13949 ++p;
13950 }
13951 { /* AIX XL C 1.02.0.0 rejects this saying
13952 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13953 struct s { int j; const int *ap[3]; };
13954 struct s *b; b->j = 5;
13955 }
13956 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13957 const int foo = 10;
13958 }
13959#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013960
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 ;
13962 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013963}
Martin v. Löwis11437992002-04-12 09:54:03 +000013964_ACEOF
13965rm -f conftest.$ac_objext
13966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13967 (eval $ac_compile) 2>&5
13968 ac_status=$?
13969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13970 (exit $ac_status); } &&
13971 { ac_try='test -s conftest.$ac_objext'
13972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13973 (eval $ac_try) 2>&5
13974 ac_status=$?
13975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13976 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013977 ac_cv_c_const=yes
13978else
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 echo "$as_me: failed program was:" >&5
13980cat conftest.$ac_ext >&5
13981ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013982fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013983rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013984fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013985echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13986echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013987if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013988
13989cat >>confdefs.h <<\_ACEOF
13990#define const
13991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013992
13993fi
13994
Michael W. Hudson54241132001-12-07 15:38:26 +000013995
Guido van Rossumda88dad1995-01-26 00:46:29 +000013996works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013997echo "$as_me:$LINENO: checking for working volatile" >&5
13998echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13999cat >conftest.$ac_ext <<_ACEOF
14000#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014001#include "confdefs.h"
14002
Martin v. Löwis11437992002-04-12 09:54:03 +000014003#ifdef F77_DUMMY_MAIN
14004# ifdef __cplusplus
14005 extern "C"
14006# endif
14007 int F77_DUMMY_MAIN() { return 1; }
14008#endif
14009int
14010main ()
14011{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014012volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
14017rm -f conftest.$ac_objext
14018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14019 (eval $ac_compile) 2>&5
14020 ac_status=$?
14021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14022 (exit $ac_status); } &&
14023 { ac_try='test -s conftest.$ac_objext'
14024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14025 (eval $ac_try) 2>&5
14026 ac_status=$?
14027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14028 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014029 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 echo "$as_me: failed program was:" >&5
14032cat conftest.$ac_ext >&5
14033
14034cat >>confdefs.h <<\_ACEOF
14035#define volatile
14036_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014037
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014038
Guido van Rossum627b2d71993-12-24 10:39:16 +000014039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014040rm -f conftest.$ac_objext conftest.$ac_ext
14041echo "$as_me:$LINENO: result: $works" >&5
14042echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014043
Guido van Rossumda88dad1995-01-26 00:46:29 +000014044works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014045echo "$as_me:$LINENO: checking for working signed char" >&5
14046echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14047cat >conftest.$ac_ext <<_ACEOF
14048#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014049#include "confdefs.h"
14050
Martin v. Löwis11437992002-04-12 09:54:03 +000014051#ifdef F77_DUMMY_MAIN
14052# ifdef __cplusplus
14053 extern "C"
14054# endif
14055 int F77_DUMMY_MAIN() { return 1; }
14056#endif
14057int
14058main ()
14059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014060signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
14065rm -f conftest.$ac_objext
14066if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14067 (eval $ac_compile) 2>&5
14068 ac_status=$?
14069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14070 (exit $ac_status); } &&
14071 { ac_try='test -s conftest.$ac_objext'
14072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14073 (eval $ac_try) 2>&5
14074 ac_status=$?
14075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014077 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014078else
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 echo "$as_me: failed program was:" >&5
14080cat conftest.$ac_ext >&5
14081
14082cat >>confdefs.h <<\_ACEOF
14083#define signed
14084_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000014085
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014086
Guido van Rossum7f43da71994-08-01 12:15:30 +000014087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014088rm -f conftest.$ac_objext conftest.$ac_ext
14089echo "$as_me:$LINENO: result: $works" >&5
14090echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014091
Guido van Rossumda88dad1995-01-26 00:46:29 +000014092have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014093echo "$as_me:$LINENO: checking for prototypes" >&5
14094echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
14095cat >conftest.$ac_ext <<_ACEOF
14096#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014097#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014098int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014099#ifdef F77_DUMMY_MAIN
14100# ifdef __cplusplus
14101 extern "C"
14102# endif
14103 int F77_DUMMY_MAIN() { return 1; }
14104#endif
14105int
14106main ()
14107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ;
14110 return 0;
14111}
14112_ACEOF
14113rm -f conftest.$ac_objext
14114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14115 (eval $ac_compile) 2>&5
14116 ac_status=$?
14117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14118 (exit $ac_status); } &&
14119 { ac_try='test -s conftest.$ac_objext'
14120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14121 (eval $ac_try) 2>&5
14122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); }; }; then
14125
14126
14127cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014128#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014129_ACEOF
14130
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014131 have_prototypes=yes
14132
Guido van Rossumf78abae1997-01-21 22:02:36 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 echo "$as_me: failed program was:" >&5
14135cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014137rm -f conftest.$ac_objext conftest.$ac_ext
14138echo "$as_me:$LINENO: result: $have_prototypes" >&5
14139echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014140
Guido van Rossumda88dad1995-01-26 00:46:29 +000014141works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014142echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
14143echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
14144cat >conftest.$ac_ext <<_ACEOF
14145#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014146#include "confdefs.h"
14147
14148#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000014149int foo(int x, ...) {
14150 va_list va;
14151 va_start(va, x);
14152 va_arg(va, int);
14153 va_arg(va, char *);
14154 va_arg(va, double);
14155 return 0;
14156}
Guido van Rossum7f43da71994-08-01 12:15:30 +000014157
Martin v. Löwis11437992002-04-12 09:54:03 +000014158#ifdef F77_DUMMY_MAIN
14159# ifdef __cplusplus
14160 extern "C"
14161# endif
14162 int F77_DUMMY_MAIN() { return 1; }
14163#endif
14164int
14165main ()
14166{
Guido van Rossum90eea071996-08-30 20:58:57 +000014167return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000014168 ;
14169 return 0;
14170}
14171_ACEOF
14172rm -f conftest.$ac_objext
14173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14174 (eval $ac_compile) 2>&5
14175 ac_status=$?
14176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14177 (exit $ac_status); } &&
14178 { ac_try='test -s conftest.$ac_objext'
14179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14180 (eval $ac_try) 2>&5
14181 ac_status=$?
14182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14183 (exit $ac_status); }; }; then
14184
14185
14186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014187#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014188_ACEOF
14189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014190 works=yes
14191
Guido van Rossumf78abae1997-01-21 22:02:36 +000014192else
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 echo "$as_me: failed program was:" >&5
14194cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000014195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014196rm -f conftest.$ac_objext conftest.$ac_ext
14197echo "$as_me:$LINENO: result: $works" >&5
14198echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014199
Guido van Rossumda88dad1995-01-26 00:46:29 +000014200if test "$have_prototypes" = yes; then
14201bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014202echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
14203echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
14204cat >conftest.$ac_ext <<_ACEOF
14205#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014206#include "confdefs.h"
14207#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014208#ifdef F77_DUMMY_MAIN
14209# ifdef __cplusplus
14210 extern "C"
14211# endif
14212 int F77_DUMMY_MAIN() { return 1; }
14213#endif
14214int
14215main ()
14216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014217char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000014218 ;
14219 return 0;
14220}
14221_ACEOF
14222rm -f conftest.$ac_objext
14223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14224 (eval $ac_compile) 2>&5
14225 ac_status=$?
14226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227 (exit $ac_status); } &&
14228 { ac_try='test -s conftest.$ac_objext'
14229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230 (eval $ac_try) 2>&5
14231 ac_status=$?
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014234 :
14235else
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 echo "$as_me: failed program was:" >&5
14237cat conftest.$ac_ext >&5
14238
14239cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014240#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014241_ACEOF
14242
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014243 bad_prototypes=yes
14244
Guido van Rossum627b2d71993-12-24 10:39:16 +000014245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014246rm -f conftest.$ac_objext conftest.$ac_ext
14247echo "$as_me:$LINENO: result: $bad_prototypes" >&5
14248echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014249fi
14250
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014251# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000014252echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
14253echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
14254cat >conftest.$ac_ext <<_ACEOF
14255#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014256#include "confdefs.h"
14257#include <sys/types.h>
14258#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014259#ifdef F77_DUMMY_MAIN
14260# ifdef __cplusplus
14261 extern "C"
14262# endif
14263 int F77_DUMMY_MAIN() { return 1; }
14264#endif
14265int
14266main ()
14267{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014268struct sockaddr x;
14269x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 ;
14271 return 0;
14272}
14273_ACEOF
14274rm -f conftest.$ac_objext
14275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14276 (eval $ac_compile) 2>&5
14277 ac_status=$?
14278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279 (exit $ac_status); } &&
14280 { ac_try='test -s conftest.$ac_objext'
14281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14282 (eval $ac_try) 2>&5
14283 ac_status=$?
14284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285 (exit $ac_status); }; }; then
14286 echo "$as_me:$LINENO: result: yes" >&5
14287echo "${ECHO_T}yes" >&6
14288
14289cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014290#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014291_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014292
14293else
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 echo "$as_me: failed program was:" >&5
14295cat conftest.$ac_ext >&5
14296echo "$as_me:$LINENO: result: no" >&5
14297echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014298fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014299rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014300
Guido van Rossumda88dad1995-01-26 00:46:29 +000014301va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014302echo "$as_me:$LINENO: checking whether va_list is an array" >&5
14303echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
14304cat >conftest.$ac_ext <<_ACEOF
14305#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014306#include "confdefs.h"
14307
14308#ifdef HAVE_STDARG_PROTOTYPES
14309#include <stdarg.h>
14310#else
14311#include <varargs.h>
14312#endif
14313
Martin v. Löwis11437992002-04-12 09:54:03 +000014314#ifdef F77_DUMMY_MAIN
14315# ifdef __cplusplus
14316 extern "C"
14317# endif
14318 int F77_DUMMY_MAIN() { return 1; }
14319#endif
14320int
14321main ()
14322{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014323va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 ;
14325 return 0;
14326}
14327_ACEOF
14328rm -f conftest.$ac_objext
14329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14330 (eval $ac_compile) 2>&5
14331 ac_status=$?
14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14333 (exit $ac_status); } &&
14334 { ac_try='test -s conftest.$ac_objext'
14335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14336 (eval $ac_try) 2>&5
14337 ac_status=$?
14338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14339 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014340 :
14341else
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 echo "$as_me: failed program was:" >&5
14343cat conftest.$ac_ext >&5
14344
14345
14346cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014347#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014348_ACEOF
14349
Guido van Rossumda88dad1995-01-26 00:46:29 +000014350 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014353rm -f conftest.$ac_objext conftest.$ac_ext
14354echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14355echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014357# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
14359
14360
14361echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14362echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14363if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014365else
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 cat >conftest.$ac_ext <<_ACEOF
14367#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014368#include "confdefs.h"
14369/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014371#include <assert.h>
14372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014373#ifdef __cplusplus
14374extern "C"
14375#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014376/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 builtin and then its argument prototype would still apply. */
14378char gethostbyname_r ();
14379char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014380
Martin v. Löwis11437992002-04-12 09:54:03 +000014381#ifdef F77_DUMMY_MAIN
14382# ifdef __cplusplus
14383 extern "C"
14384# endif
14385 int F77_DUMMY_MAIN() { return 1; }
14386#endif
14387int
14388main ()
14389{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014390/* The GNU C library defines this for functions which it implements
14391 to always fail with ENOSYS. Some functions are actually named
14392 something starting with __ and the normal name is an alias. */
14393#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14394choke me
14395#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014396f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014397#endif
14398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ;
14400 return 0;
14401}
14402_ACEOF
14403rm -f conftest.$ac_objext conftest$ac_exeext
14404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14405 (eval $ac_link) 2>&5
14406 ac_status=$?
14407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14408 (exit $ac_status); } &&
14409 { ac_try='test -s conftest$ac_exeext'
14410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14411 (eval $ac_try) 2>&5
14412 ac_status=$?
14413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14414 (exit $ac_status); }; }; then
14415 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014416else
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 echo "$as_me: failed program was:" >&5
14418cat conftest.$ac_ext >&5
14419ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014421rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014422fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014423echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14424echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14425if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014426
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014428#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014429_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014430
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14432echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014433 OLD_CFLAGS=$CFLAGS
14434 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 cat >conftest.$ac_ext <<_ACEOF
14436#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014437#include "confdefs.h"
14438
14439# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441#ifdef F77_DUMMY_MAIN
14442# ifdef __cplusplus
14443 extern "C"
14444# endif
14445 int F77_DUMMY_MAIN() { return 1; }
14446#endif
14447int
14448main ()
14449{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014450
14451 char *name;
14452 struct hostent *he, *res;
14453 char buffer[2048];
14454 int buflen = 2048;
14455 int h_errnop;
14456
14457 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
14459 ;
14460 return 0;
14461}
14462_ACEOF
14463rm -f conftest.$ac_objext
14464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14465 (eval $ac_compile) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); } &&
14469 { ac_try='test -s conftest.$ac_objext'
14470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14471 (eval $ac_try) 2>&5
14472 ac_status=$?
14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474 (exit $ac_status); }; }; then
14475
14476 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014477#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014479
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
14481cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014482#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014483_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014484
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 echo "$as_me:$LINENO: result: yes" >&5
14486echo "${ECHO_T}yes" >&6
14487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014488else
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 echo "$as_me: failed program was:" >&5
14490cat conftest.$ac_ext >&5
14491
14492 echo "$as_me:$LINENO: result: no" >&5
14493echo "${ECHO_T}no" >&6
14494 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14495echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14496 cat >conftest.$ac_ext <<_ACEOF
14497#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014498#include "confdefs.h"
14499
14500# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
14502#ifdef F77_DUMMY_MAIN
14503# ifdef __cplusplus
14504 extern "C"
14505# endif
14506 int F77_DUMMY_MAIN() { return 1; }
14507#endif
14508int
14509main ()
14510{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014511
14512 char *name;
14513 struct hostent *he;
14514 char buffer[2048];
14515 int buflen = 2048;
14516 int h_errnop;
14517
14518 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524rm -f conftest.$ac_objext
14525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14526 (eval $ac_compile) 2>&5
14527 ac_status=$?
14528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529 (exit $ac_status); } &&
14530 { ac_try='test -s conftest.$ac_objext'
14531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14532 (eval $ac_try) 2>&5
14533 ac_status=$?
14534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14535 (exit $ac_status); }; }; then
14536
14537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014538#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014539_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541
14542cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014543#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014544_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014545
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 echo "$as_me:$LINENO: result: yes" >&5
14547echo "${ECHO_T}yes" >&6
14548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014549else
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 echo "$as_me: failed program was:" >&5
14551cat conftest.$ac_ext >&5
14552
14553 echo "$as_me:$LINENO: result: no" >&5
14554echo "${ECHO_T}no" >&6
14555 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14556echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14557 cat >conftest.$ac_ext <<_ACEOF
14558#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014559#include "confdefs.h"
14560
14561# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
14563#ifdef F77_DUMMY_MAIN
14564# ifdef __cplusplus
14565 extern "C"
14566# endif
14567 int F77_DUMMY_MAIN() { return 1; }
14568#endif
14569int
14570main ()
14571{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014572
14573 char *name;
14574 struct hostent *he;
14575 struct hostent_data data;
14576
14577 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
14579 ;
14580 return 0;
14581}
14582_ACEOF
14583rm -f conftest.$ac_objext
14584if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14585 (eval $ac_compile) 2>&5
14586 ac_status=$?
14587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588 (exit $ac_status); } &&
14589 { ac_try='test -s conftest.$ac_objext'
14590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14591 (eval $ac_try) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); }; }; then
14595
14596 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014597#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014598_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014599
Martin v. Löwis11437992002-04-12 09:54:03 +000014600
14601cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014602#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014603_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 echo "$as_me:$LINENO: result: yes" >&5
14606echo "${ECHO_T}yes" >&6
14607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014608else
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 echo "$as_me: failed program was:" >&5
14610cat conftest.$ac_ext >&5
14611
14612 echo "$as_me:$LINENO: result: no" >&5
14613echo "${ECHO_T}no" >&6
14614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014616rm -f conftest.$ac_objext conftest.$ac_ext
14617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014619rm -f conftest.$ac_objext conftest.$ac_ext
14620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014621fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014622rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014623 CFLAGS=$OLD_CFLAGS
14624
14625else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014626
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
14628for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014629do
Martin v. Löwis11437992002-04-12 09:54:03 +000014630as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14631echo "$as_me:$LINENO: checking for $ac_func" >&5
14632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14633if eval "test \"\${$as_ac_var+set}\" = set"; then
14634 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014635else
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 cat >conftest.$ac_ext <<_ACEOF
14637#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014638#include "confdefs.h"
14639/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014640 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014641#include <assert.h>
14642/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014643#ifdef __cplusplus
14644extern "C"
14645#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014646/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 builtin and then its argument prototype would still apply. */
14648char $ac_func ();
14649char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014650
Martin v. Löwis11437992002-04-12 09:54:03 +000014651#ifdef F77_DUMMY_MAIN
14652# ifdef __cplusplus
14653 extern "C"
14654# endif
14655 int F77_DUMMY_MAIN() { return 1; }
14656#endif
14657int
14658main ()
14659{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014660/* The GNU C library defines this for functions which it implements
14661 to always fail with ENOSYS. Some functions are actually named
14662 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014663#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014664choke me
14665#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014666f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014667#endif
14668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ;
14670 return 0;
14671}
14672_ACEOF
14673rm -f conftest.$ac_objext conftest$ac_exeext
14674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14675 (eval $ac_link) 2>&5
14676 ac_status=$?
14677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678 (exit $ac_status); } &&
14679 { ac_try='test -s conftest$ac_exeext'
14680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681 (eval $ac_try) 2>&5
14682 ac_status=$?
14683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684 (exit $ac_status); }; }; then
14685 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014686else
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 echo "$as_me: failed program was:" >&5
14688cat conftest.$ac_ext >&5
14689eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014693echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14694echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14695if test `eval echo '${'$as_ac_var'}'` = yes; then
14696 cat >>confdefs.h <<_ACEOF
14697#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14698_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014700fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014701done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014702
Michael W. Hudson54241132001-12-07 15:38:26 +000014703
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014704fi
14705
Michael W. Hudson54241132001-12-07 15:38:26 +000014706
14707
14708
14709
14710
14711
Guido van Rossum627b2d71993-12-24 10:39:16 +000014712# checks for system services
14713# (none yet)
14714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014715# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014716echo "$as_me:$LINENO: checking for __fpu_control" >&5
14717echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14718if test "${ac_cv_func___fpu_control+set}" = set; then
14719 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014720else
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 cat >conftest.$ac_ext <<_ACEOF
14722#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014723#include "confdefs.h"
14724/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014726#include <assert.h>
14727/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014728#ifdef __cplusplus
14729extern "C"
14730#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014731/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 builtin and then its argument prototype would still apply. */
14733char __fpu_control ();
14734char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736#ifdef F77_DUMMY_MAIN
14737# ifdef __cplusplus
14738 extern "C"
14739# endif
14740 int F77_DUMMY_MAIN() { return 1; }
14741#endif
14742int
14743main ()
14744{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014745/* The GNU C library defines this for functions which it implements
14746 to always fail with ENOSYS. Some functions are actually named
14747 something starting with __ and the normal name is an alias. */
14748#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14749choke me
14750#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014751f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014752#endif
14753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 ;
14755 return 0;
14756}
14757_ACEOF
14758rm -f conftest.$ac_objext conftest$ac_exeext
14759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14760 (eval $ac_link) 2>&5
14761 ac_status=$?
14762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14763 (exit $ac_status); } &&
14764 { ac_try='test -s conftest$ac_exeext'
14765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14766 (eval $ac_try) 2>&5
14767 ac_status=$?
14768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14769 (exit $ac_status); }; }; then
14770 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014771else
Martin v. Löwis11437992002-04-12 09:54:03 +000014772 echo "$as_me: failed program was:" >&5
14773cat conftest.$ac_ext >&5
14774ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014778echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14779echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14780if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014781 :
14782else
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
14784echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14785echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14786if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014788else
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014790LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014791cat >conftest.$ac_ext <<_ACEOF
14792#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014793#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014795/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014796#ifdef __cplusplus
14797extern "C"
14798#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014799/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 builtin and then its argument prototype would still apply. */
14801char __fpu_control ();
14802#ifdef F77_DUMMY_MAIN
14803# ifdef __cplusplus
14804 extern "C"
14805# endif
14806 int F77_DUMMY_MAIN() { return 1; }
14807#endif
14808int
14809main ()
14810{
14811__fpu_control ();
14812 ;
14813 return 0;
14814}
14815_ACEOF
14816rm -f conftest.$ac_objext conftest$ac_exeext
14817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14818 (eval $ac_link) 2>&5
14819 ac_status=$?
14820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14821 (exit $ac_status); } &&
14822 { ac_try='test -s conftest$ac_exeext'
14823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14824 (eval $ac_try) 2>&5
14825 ac_status=$?
14826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827 (exit $ac_status); }; }; then
14828 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014829else
Martin v. Löwis11437992002-04-12 09:54:03 +000014830 echo "$as_me: failed program was:" >&5
14831cat conftest.$ac_ext >&5
14832ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14835LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014836fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014837echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14838echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14839if test $ac_cv_lib_ieee___fpu_control = yes; then
14840 cat >>confdefs.h <<_ACEOF
14841#define HAVE_LIBIEEE 1
14842_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014843
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014844 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014845
Guido van Rossum627b2d71993-12-24 10:39:16 +000014846fi
14847
Michael W. Hudson54241132001-12-07 15:38:26 +000014848
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014849fi
14850
Michael W. Hudson54241132001-12-07 15:38:26 +000014851
Guido van Rossum7f253911997-05-09 02:42:48 +000014852# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014853echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14854echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14855
Guido van Rossum7f253911997-05-09 02:42:48 +000014856# Check whether --with-fpectl or --without-fpectl was given.
14857if test "${with_fpectl+set}" = set; then
14858 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
Guido van Rossum7f253911997-05-09 02:42:48 +000014860if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014861then
14862
14863cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014864#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014865_ACEOF
14866
14867 echo "$as_me:$LINENO: result: yes" >&5
14868echo "${ECHO_T}yes" >&6
14869else echo "$as_me:$LINENO: result: no" >&5
14870echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014871fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014872else
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 echo "$as_me:$LINENO: result: no" >&5
14874echo "${ECHO_T}no" >&6
14875fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014876
Guido van Rossum7f43da71994-08-01 12:15:30 +000014877# check for --with-libm=...
14878
Guido van Rossum563e7081996-09-10 18:20:48 +000014879case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014880Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014881BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014882*) LIBM=-lm
14883esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014884echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14885echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014887# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014888if test "${with_libm+set}" = set; then
14889 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
Guido van Rossum7f253911997-05-09 02:42:48 +000014891if test "$withval" = no
14892then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14894echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014895elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014896then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14898echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14899else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14900echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14901 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014902fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014903else
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14905echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14906fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014907
14908# check for --with-libc=...
14909
Martin v. Löwis11437992002-04-12 09:54:03 +000014910echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14911echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014913# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014914if test "${with_libc+set}" = set; then
14915 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014916
Guido van Rossum7f253911997-05-09 02:42:48 +000014917if test "$withval" = no
14918then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14920echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014921elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014922then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14924echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14925else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14926echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14927 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014928fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014929else
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14931echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14932fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014933
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014934# check for hypot() in math library
14935LIBS_SAVE=$LIBS
14936LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014938for ac_func in hypot
14939do
Martin v. Löwis11437992002-04-12 09:54:03 +000014940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14941echo "$as_me:$LINENO: checking for $ac_func" >&5
14942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14943if eval "test \"\${$as_ac_var+set}\" = set"; then
14944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014945else
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 cat >conftest.$ac_ext <<_ACEOF
14947#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014948#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014949/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014951#include <assert.h>
14952/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014953#ifdef __cplusplus
14954extern "C"
14955#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014956/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 builtin and then its argument prototype would still apply. */
14958char $ac_func ();
14959char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014960
Martin v. Löwis11437992002-04-12 09:54:03 +000014961#ifdef F77_DUMMY_MAIN
14962# ifdef __cplusplus
14963 extern "C"
14964# endif
14965 int F77_DUMMY_MAIN() { return 1; }
14966#endif
14967int
14968main ()
14969{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014970/* The GNU C library defines this for functions which it implements
14971 to always fail with ENOSYS. Some functions are actually named
14972 something starting with __ and the normal name is an alias. */
14973#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14974choke me
14975#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014976f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014977#endif
14978
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ;
14980 return 0;
14981}
14982_ACEOF
14983rm -f conftest.$ac_objext conftest$ac_exeext
14984if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14985 (eval $ac_link) 2>&5
14986 ac_status=$?
14987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14988 (exit $ac_status); } &&
14989 { ac_try='test -s conftest$ac_exeext'
14990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14991 (eval $ac_try) 2>&5
14992 ac_status=$?
14993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14994 (exit $ac_status); }; }; then
14995 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014996else
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 echo "$as_me: failed program was:" >&5
14998cat conftest.$ac_ext >&5
14999eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015001rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015003echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15004echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15005if test `eval echo '${'$as_ac_var'}'` = yes; then
15006 cat >>confdefs.h <<_ACEOF
15007#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15008_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015009
Michael W. Hudson54241132001-12-07 15:38:26 +000015010else
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015012fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015013done
15014
Michael W. Hudson54241132001-12-07 15:38:26 +000015015
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015016LIBS=$LIBS_SAVE
15017
Guido van Rossumad713701997-07-10 22:42:38 +000015018# check whether malloc(0) returns NULL or not
Martin v. Löwis11437992002-04-12 09:54:03 +000015019echo "$as_me:$LINENO: checking what malloc(0) returns" >&5
15020echo $ECHO_N "checking what malloc(0) returns... $ECHO_C" >&6
15021if test "${ac_cv_malloc_zero+set}" = set; then
15022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015023else
15024 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015025 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +000015026else
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 cat >conftest.$ac_ext <<_ACEOF
15028#line $LINENO "configure"
Guido van Rossumad713701997-07-10 22:42:38 +000015029#include "confdefs.h"
15030#include <stdio.h>
15031#ifdef HAVE_STDLIB
15032#include <stdlib.h>
15033#else
15034char *malloc(), *realloc();
15035int *free();
15036#endif
15037main() {
15038 char *p;
15039 p = malloc(0);
15040 if (p == NULL) exit(1);
15041 p = realloc(p, 0);
15042 if (p == NULL) exit(1);
15043 free(p);
15044 exit(0);
15045}
Martin v. Löwis11437992002-04-12 09:54:03 +000015046_ACEOF
15047rm -f conftest$ac_exeext
15048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15049 (eval $ac_link) 2>&5
15050 ac_status=$?
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15054 (eval $ac_try) 2>&5
15055 ac_status=$?
15056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15057 (exit $ac_status); }; }; then
Guido van Rossumad713701997-07-10 22:42:38 +000015058 ac_cv_malloc_zero=nonnull
15059else
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 echo "$as_me: program exited with status $ac_status" >&5
15061echo "$as_me: failed program was:" >&5
15062cat conftest.$ac_ext >&5
15063( exit $ac_status )
15064ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +000015065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015066rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumad713701997-07-10 22:42:38 +000015067fi
Guido van Rossumad713701997-07-10 22:42:38 +000015068fi
Guido van Rossum3065c942001-09-17 04:03:14 +000015069 # XXX arm cross-compile?
Martin v. Löwis11437992002-04-12 09:54:03 +000015070echo "$as_me:$LINENO: result: $ac_cv_malloc_zero" >&5
15071echo "${ECHO_T}$ac_cv_malloc_zero" >&6
Guido van Rossumad713701997-07-10 22:42:38 +000015072if test "$ac_cv_malloc_zero" = null
15073then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074
15075cat >>confdefs.h <<\_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015076#define MALLOC_ZERO_RETURNS_NULL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077_ACEOF
Guido van Rossumad713701997-07-10 22:42:38 +000015078
15079fi
15080
Guido van Rossumef2255b2000-03-10 22:30:29 +000015081# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015082if test "${ac_cv_header_wchar_h+set}" = set; then
15083 echo "$as_me:$LINENO: checking for wchar.h" >&5
15084echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15085if test "${ac_cv_header_wchar_h+set}" = set; then
15086 echo $ECHO_N "(cached) $ECHO_C" >&6
15087fi
15088echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15089echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015090else
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 # Is the header compilable?
15092echo "$as_me:$LINENO: checking wchar.h usability" >&5
15093echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15094cat >conftest.$ac_ext <<_ACEOF
15095#line $LINENO "configure"
15096#include "confdefs.h"
15097$ac_includes_default
15098#include <wchar.h>
15099_ACEOF
15100rm -f conftest.$ac_objext
15101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15103 ac_status=$?
15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); } &&
15106 { ac_try='test -s conftest.$ac_objext'
15107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15109 ac_status=$?
15110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
15112 ac_header_compiler=yes
15113else
15114 echo "$as_me: failed program was:" >&5
15115cat conftest.$ac_ext >&5
15116ac_header_compiler=no
15117fi
15118rm -f conftest.$ac_objext conftest.$ac_ext
15119echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15120echo "${ECHO_T}$ac_header_compiler" >&6
15121
15122# Is the header present?
15123echo "$as_me:$LINENO: checking wchar.h presence" >&5
15124echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
15125cat >conftest.$ac_ext <<_ACEOF
15126#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015127#include "confdefs.h"
15128#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
15130if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15131 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15132 ac_status=$?
15133 egrep -v '^ *\+' conftest.er1 >conftest.err
15134 rm -f conftest.er1
15135 cat conftest.err >&5
15136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15137 (exit $ac_status); } >/dev/null; then
15138 if test -s conftest.err; then
15139 ac_cpp_err=$ac_c_preproc_warn_flag
15140 else
15141 ac_cpp_err=
15142 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015143else
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 ac_cpp_err=yes
15145fi
15146if test -z "$ac_cpp_err"; then
15147 ac_header_preproc=yes
15148else
15149 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000015150 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015153rm -f conftest.err conftest.$ac_ext
15154echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15155echo "${ECHO_T}$ac_header_preproc" >&6
15156
15157# So? What about this header?
15158case $ac_header_compiler:$ac_header_preproc in
15159 yes:no )
15160 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
15161echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15162 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15163echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15164 no:yes )
15165 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
15166echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
15167 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
15168echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
15169 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
15170echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
15171esac
15172echo "$as_me:$LINENO: checking for wchar.h" >&5
15173echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15174if test "${ac_cv_header_wchar_h+set}" = set; then
15175 echo $ECHO_N "(cached) $ECHO_C" >&6
15176else
15177 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000015178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015179echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15180echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
15181
15182fi
15183if test $ac_cv_header_wchar_h = yes; then
15184
15185
15186cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015187#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015188_ACEOF
15189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015190 wchar_h="yes"
15191
Guido van Rossumef2255b2000-03-10 22:30:29 +000015192else
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015194
15195fi
15196
Michael W. Hudson54241132001-12-07 15:38:26 +000015197
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015199# determine wchar_t size
15200if test "$wchar_h" = yes
15201then
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 echo "$as_me:$LINENO: checking for wchar_t" >&5
15203echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
15204if test "${ac_cv_type_wchar_t+set}" = set; then
15205 echo $ECHO_N "(cached) $ECHO_C" >&6
15206else
15207 cat >conftest.$ac_ext <<_ACEOF
15208#line $LINENO "configure"
15209#include "confdefs.h"
15210#include <wchar.h>
15211
15212#ifdef F77_DUMMY_MAIN
15213# ifdef __cplusplus
15214 extern "C"
15215# endif
15216 int F77_DUMMY_MAIN() { return 1; }
15217#endif
15218int
15219main ()
15220{
15221if ((wchar_t *) 0)
15222 return 0;
15223if (sizeof (wchar_t))
15224 return 0;
15225 ;
15226 return 0;
15227}
15228_ACEOF
15229rm -f conftest.$ac_objext
15230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15231 (eval $ac_compile) 2>&5
15232 ac_status=$?
15233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15234 (exit $ac_status); } &&
15235 { ac_try='test -s conftest.$ac_objext'
15236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15237 (eval $ac_try) 2>&5
15238 ac_status=$?
15239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15240 (exit $ac_status); }; }; then
15241 ac_cv_type_wchar_t=yes
15242else
15243 echo "$as_me: failed program was:" >&5
15244cat conftest.$ac_ext >&5
15245ac_cv_type_wchar_t=no
15246fi
15247rm -f conftest.$ac_objext conftest.$ac_ext
15248fi
15249echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
15250echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
15251
15252echo "$as_me:$LINENO: checking size of wchar_t" >&5
15253echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
15254if test "${ac_cv_sizeof_wchar_t+set}" = set; then
15255 echo $ECHO_N "(cached) $ECHO_C" >&6
15256else
15257 if test "$ac_cv_type_wchar_t" = yes; then
15258 # The cast to unsigned long works around a bug in the HP C Compiler
15259 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15260 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15261 # This bug is HP SR number 8606223364.
15262 if test "$cross_compiling" = yes; then
15263 # Depending upon the size, compute the lo and hi bounds.
15264cat >conftest.$ac_ext <<_ACEOF
15265#line $LINENO "configure"
15266#include "confdefs.h"
15267#include <wchar.h>
15268
15269#ifdef F77_DUMMY_MAIN
15270# ifdef __cplusplus
15271 extern "C"
15272# endif
15273 int F77_DUMMY_MAIN() { return 1; }
15274#endif
15275int
15276main ()
15277{
15278static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
15279test_array [0] = 0
15280
15281 ;
15282 return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext
15286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15287 (eval $ac_compile) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); } &&
15291 { ac_try='test -s conftest.$ac_objext'
15292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15293 (eval $ac_try) 2>&5
15294 ac_status=$?
15295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15296 (exit $ac_status); }; }; then
15297 ac_lo=0 ac_mid=0
15298 while :; do
15299 cat >conftest.$ac_ext <<_ACEOF
15300#line $LINENO "configure"
15301#include "confdefs.h"
15302#include <wchar.h>
15303
15304#ifdef F77_DUMMY_MAIN
15305# ifdef __cplusplus
15306 extern "C"
15307# endif
15308 int F77_DUMMY_MAIN() { return 1; }
15309#endif
15310int
15311main ()
15312{
15313static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15314test_array [0] = 0
15315
15316 ;
15317 return 0;
15318}
15319_ACEOF
15320rm -f conftest.$ac_objext
15321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15322 (eval $ac_compile) 2>&5
15323 ac_status=$?
15324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15325 (exit $ac_status); } &&
15326 { ac_try='test -s conftest.$ac_objext'
15327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15328 (eval $ac_try) 2>&5
15329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; }; then
15332 ac_hi=$ac_mid; break
15333else
15334 echo "$as_me: failed program was:" >&5
15335cat conftest.$ac_ext >&5
15336ac_lo=`expr $ac_mid + 1`
15337 if test $ac_lo -le $ac_mid; then
15338 ac_lo= ac_hi=
15339 break
15340 fi
15341 ac_mid=`expr 2 '*' $ac_mid + 1`
15342fi
15343rm -f conftest.$ac_objext conftest.$ac_ext
15344 done
15345else
15346 echo "$as_me: failed program was:" >&5
15347cat conftest.$ac_ext >&5
15348cat >conftest.$ac_ext <<_ACEOF
15349#line $LINENO "configure"
15350#include "confdefs.h"
15351#include <wchar.h>
15352
15353#ifdef F77_DUMMY_MAIN
15354# ifdef __cplusplus
15355 extern "C"
15356# endif
15357 int F77_DUMMY_MAIN() { return 1; }
15358#endif
15359int
15360main ()
15361{
15362static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
15363test_array [0] = 0
15364
15365 ;
15366 return 0;
15367}
15368_ACEOF
15369rm -f conftest.$ac_objext
15370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15371 (eval $ac_compile) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); } &&
15375 { ac_try='test -s conftest.$ac_objext'
15376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15377 (eval $ac_try) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); }; }; then
15381 ac_hi=-1 ac_mid=-1
15382 while :; do
15383 cat >conftest.$ac_ext <<_ACEOF
15384#line $LINENO "configure"
15385#include "confdefs.h"
15386#include <wchar.h>
15387
15388#ifdef F77_DUMMY_MAIN
15389# ifdef __cplusplus
15390 extern "C"
15391# endif
15392 int F77_DUMMY_MAIN() { return 1; }
15393#endif
15394int
15395main ()
15396{
15397static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
15398test_array [0] = 0
15399
15400 ;
15401 return 0;
15402}
15403_ACEOF
15404rm -f conftest.$ac_objext
15405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15406 (eval $ac_compile) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); } &&
15410 { ac_try='test -s conftest.$ac_objext'
15411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15413 ac_status=$?
15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); }; }; then
15416 ac_lo=$ac_mid; break
15417else
15418 echo "$as_me: failed program was:" >&5
15419cat conftest.$ac_ext >&5
15420ac_hi=`expr '(' $ac_mid ')' - 1`
15421 if test $ac_mid -le $ac_hi; then
15422 ac_lo= ac_hi=
15423 break
15424 fi
15425 ac_mid=`expr 2 '*' $ac_mid`
15426fi
15427rm -f conftest.$ac_objext conftest.$ac_ext
15428 done
15429else
15430 echo "$as_me: failed program was:" >&5
15431cat conftest.$ac_ext >&5
15432ac_lo= ac_hi=
15433fi
15434rm -f conftest.$ac_objext conftest.$ac_ext
15435fi
15436rm -f conftest.$ac_objext conftest.$ac_ext
15437# Binary search between lo and hi bounds.
15438while test "x$ac_lo" != "x$ac_hi"; do
15439 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15440 cat >conftest.$ac_ext <<_ACEOF
15441#line $LINENO "configure"
15442#include "confdefs.h"
15443#include <wchar.h>
15444
15445#ifdef F77_DUMMY_MAIN
15446# ifdef __cplusplus
15447 extern "C"
15448# endif
15449 int F77_DUMMY_MAIN() { return 1; }
15450#endif
15451int
15452main ()
15453{
15454static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
15455test_array [0] = 0
15456
15457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext
15462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15463 (eval $ac_compile) 2>&5
15464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); } &&
15467 { ac_try='test -s conftest.$ac_objext'
15468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15470 ac_status=$?
15471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472 (exit $ac_status); }; }; then
15473 ac_hi=$ac_mid
15474else
15475 echo "$as_me: failed program was:" >&5
15476cat conftest.$ac_ext >&5
15477ac_lo=`expr '(' $ac_mid ')' + 1`
15478fi
15479rm -f conftest.$ac_objext conftest.$ac_ext
15480done
15481case $ac_lo in
15482?*) ac_cv_sizeof_wchar_t=$ac_lo;;
15483'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15484echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15485 { (exit 1); exit 1; }; } ;;
15486esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015487else
15488 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015489 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15490echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15491 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000015492else
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 cat >conftest.$ac_ext <<_ACEOF
15494#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015495#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015496#include <wchar.h>
15497
15498long longval () { return (long) (sizeof (wchar_t)); }
15499unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015500#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015501#include <stdlib.h>
15502#ifdef F77_DUMMY_MAIN
15503# ifdef __cplusplus
15504 extern "C"
15505# endif
15506 int F77_DUMMY_MAIN() { return 1; }
15507#endif
15508int
15509main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015510{
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
15512 FILE *f = fopen ("conftest.val", "w");
15513 if (! f)
15514 exit (1);
15515 if (((long) (sizeof (wchar_t))) < 0)
15516 {
15517 long i = longval ();
15518 if (i != ((long) (sizeof (wchar_t))))
15519 exit (1);
15520 fprintf (f, "%ld\n", i);
15521 }
15522 else
15523 {
15524 unsigned long i = ulongval ();
15525 if (i != ((long) (sizeof (wchar_t))))
15526 exit (1);
15527 fprintf (f, "%lu\n", i);
15528 }
15529 exit (ferror (f) || fclose (f) != 0);
15530
15531 ;
15532 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015533}
Martin v. Löwis11437992002-04-12 09:54:03 +000015534_ACEOF
15535rm -f conftest$ac_exeext
15536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15537 (eval $ac_link) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15542 (eval $ac_try) 2>&5
15543 ac_status=$?
15544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15545 (exit $ac_status); }; }; then
15546 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015547else
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 echo "$as_me: program exited with status $ac_status" >&5
15549echo "$as_me: failed program was:" >&5
15550cat conftest.$ac_ext >&5
15551( exit $ac_status )
15552{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15553echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15554 { (exit 1); exit 1; }; }
15555fi
15556rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15557fi
15558fi
15559rm -f conftest.val
15560else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015561 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015562fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015564echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15565echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15566cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015567#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015568_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015569
Michael W. Hudson54241132001-12-07 15:38:26 +000015570
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015571fi
15572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15574echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015575# Check whether --enable-unicode or --disable-unicode was given.
15576if test "${enable_unicode+set}" = set; then
15577 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015578
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015579else
15580 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015581fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015582
15583if test $enable_unicode = yes
15584then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015585 # Without any arguments, Py_UNICODE defaults to two-byte mode
15586 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015587fi
15588
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015589
15590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015591case "$enable_unicode" in
15592ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015594#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015595_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015596
15597 ;;
15598ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015600#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015602
15603 ;;
15604esac
15605
Michael W. Hudson54241132001-12-07 15:38:26 +000015606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015609
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015610if test "$enable_unicode" = "no"
15611then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015612 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 echo "$as_me:$LINENO: result: not used" >&5
15614echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015615else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015616 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
15618cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015619#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015620_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015621
15622 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15623 then
15624 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015625
Martin v. Löwis11437992002-04-12 09:54:03 +000015626cat >>confdefs.h <<\_ACEOF
15627#define HAVE_USABLE_WCHAR_T 1
15628_ACEOF
15629
15630 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015631#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015632_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015633
15634 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15635 then
15636 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015638#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015639_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015640
15641 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15642 then
15643 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015645#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015646_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015647
15648 else
15649 PY_UNICODE_TYPE="no type found"
15650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15652echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015653fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015654
15655# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015656echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15657echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15658if test "${ac_cv_c_bigendian+set}" = set; then
15659 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015660else
Martin v. Löwis11437992002-04-12 09:54:03 +000015661 # See if sys/param.h defines the BYTE_ORDER macro.
15662cat >conftest.$ac_ext <<_ACEOF
15663#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015664#include "confdefs.h"
15665#include <sys/types.h>
15666#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015667
Martin v. Löwis11437992002-04-12 09:54:03 +000015668#ifdef F77_DUMMY_MAIN
15669# ifdef __cplusplus
15670 extern "C"
15671# endif
15672 int F77_DUMMY_MAIN() { return 1; }
15673#endif
15674int
15675main ()
15676{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015677#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15678 bogus endian macros
15679#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681 ;
15682 return 0;
15683}
15684_ACEOF
15685rm -f conftest.$ac_objext
15686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15687 (eval $ac_compile) 2>&5
15688 ac_status=$?
15689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15690 (exit $ac_status); } &&
15691 { ac_try='test -s conftest.$ac_objext'
15692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15693 (eval $ac_try) 2>&5
15694 ac_status=$?
15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15696 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015697 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015698cat >conftest.$ac_ext <<_ACEOF
15699#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015700#include "confdefs.h"
15701#include <sys/types.h>
15702#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704#ifdef F77_DUMMY_MAIN
15705# ifdef __cplusplus
15706 extern "C"
15707# endif
15708 int F77_DUMMY_MAIN() { return 1; }
15709#endif
15710int
15711main ()
15712{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015713#if BYTE_ORDER != BIG_ENDIAN
15714 not big endian
15715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015716
15717 ;
15718 return 0;
15719}
15720_ACEOF
15721rm -f conftest.$ac_objext
15722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15723 (eval $ac_compile) 2>&5
15724 ac_status=$?
15725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15726 (exit $ac_status); } &&
15727 { ac_try='test -s conftest.$ac_objext'
15728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15729 (eval $ac_try) 2>&5
15730 ac_status=$?
15731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15732 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015733 ac_cv_c_bigendian=yes
15734else
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 echo "$as_me: failed program was:" >&5
15736cat conftest.$ac_ext >&5
15737ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015738fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015739rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015740else
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 echo "$as_me: failed program was:" >&5
15742cat conftest.$ac_ext >&5
15743# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015744if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 # try to guess the endianess by grep'ing values into an object file
15746 ac_cv_c_bigendian=unknown
15747 cat >conftest.$ac_ext <<_ACEOF
15748#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015749#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015750short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15751short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15752void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15753short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15754short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15755void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
15756#ifdef F77_DUMMY_MAIN
15757# ifdef __cplusplus
15758 extern "C"
15759# endif
15760 int F77_DUMMY_MAIN() { return 1; }
15761#endif
15762int
15763main ()
15764{
15765 _ascii (); _ebcdic ();
15766 ;
15767 return 0;
15768}
15769_ACEOF
15770rm -f conftest.$ac_objext
15771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15772 (eval $ac_compile) 2>&5
15773 ac_status=$?
15774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775 (exit $ac_status); } &&
15776 { ac_try='test -s conftest.$ac_objext'
15777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15778 (eval $ac_try) 2>&5
15779 ac_status=$?
15780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15781 (exit $ac_status); }; }; then
15782 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
15783 ac_cv_c_bigendian=yes
15784fi
15785if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15786 if test "$ac_cv_c_bigendian" = unknown; then
15787 ac_cv_c_bigendian=no
15788 else
15789 # finding both strings is unlikely to happen, but who knows?
15790 ac_cv_c_bigendian=unknown
15791 fi
15792fi
15793else
15794 echo "$as_me: failed program was:" >&5
15795cat conftest.$ac_ext >&5
15796fi
15797rm -f conftest.$ac_objext conftest.$ac_ext
15798else
15799 cat >conftest.$ac_ext <<_ACEOF
15800#line $LINENO "configure"
15801#include "confdefs.h"
15802int
15803main ()
15804{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015805 /* Are we little or big endian? From Harbison&Steele. */
15806 union
15807 {
15808 long l;
15809 char c[sizeof (long)];
15810 } u;
15811 u.l = 1;
15812 exit (u.c[sizeof (long) - 1] == 1);
15813}
Martin v. Löwis11437992002-04-12 09:54:03 +000015814_ACEOF
15815rm -f conftest$ac_exeext
15816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15817 (eval $ac_link) 2>&5
15818 ac_status=$?
15819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15822 (eval $ac_try) 2>&5
15823 ac_status=$?
15824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15825 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015826 ac_cv_c_bigendian=no
15827else
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 echo "$as_me: program exited with status $ac_status" >&5
15829echo "$as_me: failed program was:" >&5
15830cat conftest.$ac_ext >&5
15831( exit $ac_status )
15832ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015834rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015836fi
15837rm -f conftest.$ac_objext conftest.$ac_ext
15838fi
15839echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15840echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15841case $ac_cv_c_bigendian in
15842 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015845#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015846_ACEOF
15847 ;;
15848 no)
15849 ;;
15850 *)
15851 { { echo "$as_me:$LINENO: error: unknown endianess
15852presetting ac_cv_c_bigendian=no (or yes) will help" >&5
15853echo "$as_me: error: unknown endianess
15854presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15855 { (exit 1); exit 1; }; } ;;
15856esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015857
Michael W. Hudson54241132001-12-07 15:38:26 +000015858
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015859# Check whether right shifting a negative integer extends the sign bit
15860# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015861echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15862echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15863if test "${ac_cv_rshift_extends_sign+set}" = set; then
15864 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015865else
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015867if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015868 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015869else
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >conftest.$ac_ext <<_ACEOF
15871#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015872#include "confdefs.h"
15873
15874int main()
15875{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015876 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015877}
15878
Martin v. Löwis11437992002-04-12 09:54:03 +000015879_ACEOF
15880rm -f conftest$ac_exeext
15881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15882 (eval $ac_link) 2>&5
15883 ac_status=$?
15884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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
Vladimir Marangozova6180282000-07-12 05:05:06 +000015891 ac_cv_rshift_extends_sign=yes
15892else
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 echo "$as_me: program exited with status $ac_status" >&5
15894echo "$as_me: failed program was:" >&5
15895cat conftest.$ac_ext >&5
15896( exit $ac_status )
15897ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015898fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015899rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15900fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015901fi
15902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15904echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015905if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015906then
Martin v. Löwis11437992002-04-12 09:54:03 +000015907
15908cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015909#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015910_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015911
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015912fi
15913
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015914# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015915echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15916echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15917if test "${ac_cv_have_getc_unlocked+set}" = set; then
15918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015919else
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
15921cat >conftest.$ac_ext <<_ACEOF
15922#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015923#include "confdefs.h"
15924#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015925#ifdef F77_DUMMY_MAIN
15926# ifdef __cplusplus
15927 extern "C"
15928# endif
15929 int F77_DUMMY_MAIN() { return 1; }
15930#endif
15931int
15932main ()
15933{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015934
15935 FILE *f = fopen("/dev/null", "r");
15936 flockfile(f);
15937 getc_unlocked(f);
15938 funlockfile(f);
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ;
15941 return 0;
15942}
15943_ACEOF
15944rm -f conftest.$ac_objext conftest$ac_exeext
15945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15946 (eval $ac_link) 2>&5
15947 ac_status=$?
15948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15949 (exit $ac_status); } &&
15950 { ac_try='test -s conftest$ac_exeext'
15951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15952 (eval $ac_try) 2>&5
15953 ac_status=$?
15954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015956 ac_cv_have_getc_unlocked=yes
15957else
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 echo "$as_me: failed program was:" >&5
15959cat conftest.$ac_ext >&5
15960ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015963fi
15964
Martin v. Löwis11437992002-04-12 09:54:03 +000015965echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15966echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015967if test "$ac_cv_have_getc_unlocked" = yes
15968then
Martin v. Löwis11437992002-04-12 09:54:03 +000015969
15970cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015971#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015972_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015973
15974fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015975
Martin v. Löwis0daad592001-09-30 21:09:59 +000015976# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015977echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15978echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15979if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015981else
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015983LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015984cat >conftest.$ac_ext <<_ACEOF
15985#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015986#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015987
Guido van Rossum353ae582001-07-10 16:45:32 +000015988/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015989#ifdef __cplusplus
15990extern "C"
15991#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015992/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 builtin and then its argument prototype would still apply. */
15994char rl_pre_input_hook ();
15995#ifdef F77_DUMMY_MAIN
15996# ifdef __cplusplus
15997 extern "C"
15998# endif
15999 int F77_DUMMY_MAIN() { return 1; }
16000#endif
16001int
16002main ()
16003{
16004rl_pre_input_hook ();
16005 ;
16006 return 0;
16007}
16008_ACEOF
16009rm -f conftest.$ac_objext conftest$ac_exeext
16010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16011 (eval $ac_link) 2>&5
16012 ac_status=$?
16013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); } &&
16015 { ac_try='test -s conftest$ac_exeext'
16016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16017 (eval $ac_try) 2>&5
16018 ac_status=$?
16019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020 (exit $ac_status); }; }; then
16021 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016022else
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 echo "$as_me: failed program was:" >&5
16024cat conftest.$ac_ext >&5
16025ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16028LIBS=$ac_check_lib_save_LIBS
16029fi
16030echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16031echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16032if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016033
Martin v. Löwis11437992002-04-12 09:54:03 +000016034cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016035#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016036_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016037
Martin v. Löwis0daad592001-09-30 21:09:59 +000016038fi
16039
Michael W. Hudson54241132001-12-07 15:38:26 +000016040
Martin v. Löwis0daad592001-09-30 21:09:59 +000016041# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016042echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16043echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16044if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016046else
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016048LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016049cat >conftest.$ac_ext <<_ACEOF
16050#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016051#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
Martin v. Löwis0daad592001-09-30 21:09:59 +000016053/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016054#ifdef __cplusplus
16055extern "C"
16056#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016057/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 builtin and then its argument prototype would still apply. */
16059char rl_completion_matches ();
16060#ifdef F77_DUMMY_MAIN
16061# ifdef __cplusplus
16062 extern "C"
16063# endif
16064 int F77_DUMMY_MAIN() { return 1; }
16065#endif
16066int
16067main ()
16068{
16069rl_completion_matches ();
16070 ;
16071 return 0;
16072}
16073_ACEOF
16074rm -f conftest.$ac_objext conftest$ac_exeext
16075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16076 (eval $ac_link) 2>&5
16077 ac_status=$?
16078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16079 (exit $ac_status); } &&
16080 { ac_try='test -s conftest$ac_exeext'
16081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16082 (eval $ac_try) 2>&5
16083 ac_status=$?
16084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16085 (exit $ac_status); }; }; then
16086 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000016087else
Martin v. Löwis11437992002-04-12 09:54:03 +000016088 echo "$as_me: failed program was:" >&5
16089cat conftest.$ac_ext >&5
16090ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000016091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16093LIBS=$ac_check_lib_save_LIBS
16094fi
16095echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
16096echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
16097if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016098
Martin v. Löwis11437992002-04-12 09:54:03 +000016099cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016100#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000016102
Guido van Rossum353ae582001-07-10 16:45:32 +000016103fi
16104
Jack Jansendd19cf82001-12-06 22:36:17 +000016105
Martin v. Löwis11437992002-04-12 09:54:03 +000016106echo "$as_me:$LINENO: checking for broken nice()" >&5
16107echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
16108if test "${ac_cv_broken_nice+set}" = set; then
16109 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016110else
Martin v. Löwis11437992002-04-12 09:54:03 +000016111
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016112if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016113 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016114else
Martin v. Löwis11437992002-04-12 09:54:03 +000016115 cat >conftest.$ac_ext <<_ACEOF
16116#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016117#include "confdefs.h"
16118
16119int main()
16120{
16121 int val1 = nice(1);
16122 if (val1 != -1 && val1 == nice(2))
16123 exit(0);
16124 exit(1);
16125}
16126
Martin v. Löwis11437992002-04-12 09:54:03 +000016127_ACEOF
16128rm -f conftest$ac_exeext
16129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16130 (eval $ac_link) 2>&5
16131 ac_status=$?
16132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16135 (eval $ac_try) 2>&5
16136 ac_status=$?
16137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16138 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016139 ac_cv_broken_nice=yes
16140else
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 echo "$as_me: program exited with status $ac_status" >&5
16142echo "$as_me: failed program was:" >&5
16143cat conftest.$ac_ext >&5
16144( exit $ac_status )
16145ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016147rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16148fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016149fi
16150
Martin v. Löwis11437992002-04-12 09:54:03 +000016151echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
16152echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016153if test "$ac_cv_broken_nice" = yes
16154then
Martin v. Löwis11437992002-04-12 09:54:03 +000016155
16156cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016157#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016158_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000016159
16160fi
16161
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016162# Look for subsecond timestamps in struct stat
16163echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
16164echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
16165if test "${ac_cv_stat_tv_nsec+set}" = set; then
16166 echo $ECHO_N "(cached) $ECHO_C" >&6
16167else
16168 cat >conftest.$ac_ext <<_ACEOF
16169#line $LINENO "configure"
16170#include "confdefs.h"
16171#include <sys/stat.h>
16172#ifdef F77_DUMMY_MAIN
16173# ifdef __cplusplus
16174 extern "C"
16175# endif
16176 int F77_DUMMY_MAIN() { return 1; }
16177#endif
16178int
16179main ()
16180{
16181
16182struct stat st;
16183st.st_mtim.tv_nsec = 1;
16184
16185 ;
16186 return 0;
16187}
16188_ACEOF
16189rm -f conftest.$ac_objext
16190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16191 (eval $ac_compile) 2>&5
16192 ac_status=$?
16193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194 (exit $ac_status); } &&
16195 { ac_try='test -s conftest.$ac_objext'
16196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16197 (eval $ac_try) 2>&5
16198 ac_status=$?
16199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000016201 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000016202else
16203 echo "$as_me: failed program was:" >&5
16204cat conftest.$ac_ext >&5
16205ac_cv_stat_tv_nsec=no
16206fi
16207rm -f conftest.$ac_objext conftest.$ac_ext
16208fi
16209
16210echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
16211echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
16212if test "$ac_cv_stat_tv_nsec" = yes
16213then
16214
16215cat >>confdefs.h <<\_ACEOF
16216#define HAVE_STAT_TV_NSEC 1
16217_ACEOF
16218
16219fi
16220
Jack Jansen666b1e72001-10-31 12:11:48 +000016221# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000016222echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
16223echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
16224if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
16225 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016226else
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 cat >conftest.$ac_ext <<_ACEOF
16228#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016229#include "confdefs.h"
16230#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef F77_DUMMY_MAIN
16232# ifdef __cplusplus
16233 extern "C"
16234# endif
16235 int F77_DUMMY_MAIN() { return 1; }
16236#endif
16237int
16238main ()
16239{
Jack Jansen666b1e72001-10-31 12:11:48 +000016240
16241 int rtn;
16242 rtn = mvwdelch(0,0,0);
16243
Martin v. Löwis11437992002-04-12 09:54:03 +000016244 ;
16245 return 0;
16246}
16247_ACEOF
16248rm -f conftest.$ac_objext
16249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16250 (eval $ac_compile) 2>&5
16251 ac_status=$?
16252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16253 (exit $ac_status); } &&
16254 { ac_try='test -s conftest.$ac_objext'
16255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16256 (eval $ac_try) 2>&5
16257 ac_status=$?
16258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016260 ac_cv_mvwdelch_is_expression=yes
16261else
Martin v. Löwis11437992002-04-12 09:54:03 +000016262 echo "$as_me: failed program was:" >&5
16263cat conftest.$ac_ext >&5
16264ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016266rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016267fi
16268
Martin v. Löwis11437992002-04-12 09:54:03 +000016269echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
16270echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016271
16272if test "$ac_cv_mvwdelch_is_expression" = yes
16273then
Martin v. Löwis11437992002-04-12 09:54:03 +000016274
16275cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016276#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016277_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016278
16279fi
16280
Martin v. Löwis11437992002-04-12 09:54:03 +000016281echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
16282echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
16283if test "${ac_cv_window_has_flags+set}" = set; then
16284 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000016285else
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 cat >conftest.$ac_ext <<_ACEOF
16287#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000016288#include "confdefs.h"
16289#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016290#ifdef F77_DUMMY_MAIN
16291# ifdef __cplusplus
16292 extern "C"
16293# endif
16294 int F77_DUMMY_MAIN() { return 1; }
16295#endif
16296int
16297main ()
16298{
Jack Jansen666b1e72001-10-31 12:11:48 +000016299
16300 WINDOW *w;
16301 w->_flags = 0;
16302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ;
16304 return 0;
16305}
16306_ACEOF
16307rm -f conftest.$ac_objext
16308if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16309 (eval $ac_compile) 2>&5
16310 ac_status=$?
16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16312 (exit $ac_status); } &&
16313 { ac_try='test -s conftest.$ac_objext'
16314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16315 (eval $ac_try) 2>&5
16316 ac_status=$?
16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16318 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000016319 ac_cv_window_has_flags=yes
16320else
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 echo "$as_me: failed program was:" >&5
16322cat conftest.$ac_ext >&5
16323ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000016324fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016325rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000016326fi
16327
Martin v. Löwis11437992002-04-12 09:54:03 +000016328echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
16329echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016330
Jack Jansen666b1e72001-10-31 12:11:48 +000016331
16332if test "$ac_cv_window_has_flags" = yes
16333then
Martin v. Löwis11437992002-04-12 09:54:03 +000016334
16335cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016336#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000016338
16339fi
16340
Guido van Rossum95713eb2000-05-18 20:53:31 +000016341# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
16342# Add sys/socket.h to confdefs.h
16343cat >> confdefs.h <<\EOF
16344#ifdef HAVE_SYS_SOCKET_H
16345#include <sys/socket.h>
16346#endif
16347EOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016348echo "$as_me:$LINENO: checking for socklen_t" >&5
16349echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
16350if test "${ac_cv_type_socklen_t+set}" = set; then
16351 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000016352else
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 cat >conftest.$ac_ext <<_ACEOF
16354#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000016355#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016356$ac_includes_default
16357#ifdef F77_DUMMY_MAIN
16358# ifdef __cplusplus
16359 extern "C"
16360# endif
16361 int F77_DUMMY_MAIN() { return 1; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016363int
16364main ()
16365{
16366if ((socklen_t *) 0)
16367 return 0;
16368if (sizeof (socklen_t))
16369 return 0;
16370 ;
16371 return 0;
16372}
16373_ACEOF
16374rm -f conftest.$ac_objext
16375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16376 (eval $ac_compile) 2>&5
16377 ac_status=$?
16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379 (exit $ac_status); } &&
16380 { ac_try='test -s conftest.$ac_objext'
16381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16382 (eval $ac_try) 2>&5
16383 ac_status=$?
16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16385 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016386 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000016387else
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 echo "$as_me: failed program was:" >&5
16389cat conftest.$ac_ext >&5
16390ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000016391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016392rm -f conftest.$ac_objext conftest.$ac_ext
16393fi
16394echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
16395echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
16396if test $ac_cv_type_socklen_t = yes; then
16397 :
16398else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016399
Martin v. Löwis11437992002-04-12 09:54:03 +000016400cat >>confdefs.h <<_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016401#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000016403
16404fi
16405
Michael W. Hudson54241132001-12-07 15:38:26 +000016406
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016407#AC_MSG_CHECKING(for Modules/Setup)
16408#if test ! -f Modules/Setup ; then
16409# if test ! -d Modules ; then
16410# mkdir Modules
16411# fi
16412# cp "$srcdir/Modules/Setup.dist" Modules/Setup
16413# AC_MSG_RESULT(creating)
16414#else
16415# AC_MSG_RESULT(already exists)
16416#fi
16417
Michael W. Hudson54241132001-12-07 15:38:26 +000016418
16419
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016420for h in `(cd $srcdir;echo Python/thread_*.h)`
16421do
16422 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16423done
16424
Michael W. Hudson54241132001-12-07 15:38:26 +000016425
Jack Jansen0b06be72002-06-21 14:48:38 +000016426SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000016427echo "$as_me:$LINENO: checking for build directories" >&5
16428echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016429for dir in $SRCDIRS; do
16430 if test ! -d $dir; then
16431 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016432 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016433done
Martin v. Löwis11437992002-04-12 09:54:03 +000016434echo "$as_me:$LINENO: result: done" >&5
16435echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000016436
Guido van Rossum627b2d71993-12-24 10:39:16 +000016437# generate output files
Martin v. Löwis11437992002-04-12 09:54:03 +000016438ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
16439cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016440# This file is a shell script that caches the results of configure
16441# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016442# scripts and configure runs, see configure's option --config-cache.
16443# It is not useful on other systems. If it contains results you don't
16444# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016445#
Martin v. Löwis11437992002-04-12 09:54:03 +000016446# config.status only pays attention to the cache file if you give it
16447# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016448#
Martin v. Löwis11437992002-04-12 09:54:03 +000016449# `ac_cv_env_foo' variables (set or unset) will be overriden when
16450# loading this file, other *unset* `ac_cv_foo' will be assigned the
16451# following values.
16452
16453_ACEOF
16454
Guido van Rossumf78abae1997-01-21 22:02:36 +000016455# The following way of writing the cache mishandles newlines in values,
16456# but we know of no workaround that is simple, portable, and efficient.
16457# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016458# Ultrix sh set writes to stderr and can't be redirected directly,
16459# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000016460{
16461 (set) 2>&1 |
16462 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16463 *ac_space=\ *)
16464 # `set' does not quote correctly, so add quotes (double-quote
16465 # substitution turns \\\\ into \\, and sed turns \\ into \).
16466 sed -n \
16467 "s/'/'\\\\''/g;
16468 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16469 ;;
16470 *)
16471 # `set' quotes correctly as required by POSIX, so do not add quotes.
16472 sed -n \
16473 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16474 ;;
16475 esac;
16476} |
16477 sed '
16478 t clear
16479 : clear
16480 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16481 t end
16482 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16483 : end' >>confcache
16484if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016485 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16487 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488 else
16489 echo "not updating unwritable cache $cache_file"
16490 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016491fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016492rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016493
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016494test "x$prefix" = xNONE && prefix=$ac_default_prefix
16495# Let make expand exec_prefix.
16496test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016497
Martin v. Löwis11437992002-04-12 09:54:03 +000016498# VPATH may cause trouble with some makes, so we remove $(srcdir),
16499# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16500# trailing colons and then remove the whole line if VPATH becomes empty
16501# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000016502if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016503 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16504s/:*\$(srcdir):*/:/;
16505s/:*\${srcdir}:*/:/;
16506s/:*@srcdir@:*/:/;
16507s/^\([^=]*=[ ]*\):*/\1/;
16508s/:*$//;
16509s/^[^=]*=[ ]*$//;
16510}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016511fi
16512
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016513DEFS=-DHAVE_CONFIG_H
16514
Martin v. Löwis11437992002-04-12 09:54:03 +000016515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016516: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016517ac_clean_files_save=$ac_clean_files
16518ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16519{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16520echo "$as_me: creating $CONFIG_STATUS" >&6;}
16521cat >$CONFIG_STATUS <<_ACEOF
16522#! $SHELL
16523# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016524# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016525# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016526# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016527
Martin v. Löwis11437992002-04-12 09:54:03 +000016528debug=false
16529SHELL=\${CONFIG_SHELL-$SHELL}
16530_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016531
Martin v. Löwis11437992002-04-12 09:54:03 +000016532cat >>$CONFIG_STATUS <<\_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016533
Martin v. Löwis11437992002-04-12 09:54:03 +000016534## --------------------- ##
16535## M4sh Initialization. ##
16536## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016537
Martin v. Löwis11437992002-04-12 09:54:03 +000016538# Be Bourne compatible
16539if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16540 emulate sh
16541 NULLCMD=:
16542elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16543 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016544fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016545
Martin v. Löwis11437992002-04-12 09:54:03 +000016546# NLS nuisances.
16547# Support unset when possible.
16548if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16549 as_unset=unset
16550else
16551 as_unset=false
16552fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016553
Martin v. Löwis11437992002-04-12 09:54:03 +000016554(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16555 { $as_unset LANG || test "${LANG+set}" != set; } ||
16556 { LANG=C; export LANG; }
16557(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16558 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16559 { LC_ALL=C; export LC_ALL; }
16560(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16561 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16562 { LC_TIME=C; export LC_TIME; }
16563(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16564 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16565 { LC_CTYPE=C; export LC_CTYPE; }
16566(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16567 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16568 { LANGUAGE=C; export LANGUAGE; }
16569(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16570 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16571 { LC_COLLATE=C; export LC_COLLATE; }
16572(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16573 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16574 { LC_NUMERIC=C; export LC_NUMERIC; }
16575(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16576 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16577 { LC_MESSAGES=C; export LC_MESSAGES; }
16578
16579
16580# Name of the executable.
16581as_me=`(basename "$0") 2>/dev/null ||
16582$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16583 X"$0" : 'X\(//\)$' \| \
16584 X"$0" : 'X\(/\)$' \| \
16585 . : '\(.\)' 2>/dev/null ||
16586echo X/"$0" |
16587 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16588 /^X\/\(\/\/\)$/{ s//\1/; q; }
16589 /^X\/\(\/\).*/{ s//\1/; q; }
16590 s/.*/./; q'`
16591
16592# PATH needs CR, and LINENO needs CR and PATH.
16593# Avoid depending upon Character Ranges.
16594as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16595as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16596as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16597as_cr_digits='0123456789'
16598as_cr_alnum=$as_cr_Letters$as_cr_digits
16599
16600# The user is always right.
16601if test "${PATH_SEPARATOR+set}" != set; then
16602 echo "#! /bin/sh" >conftest.sh
16603 echo "exit 0" >>conftest.sh
16604 chmod +x conftest.sh
16605 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16606 PATH_SEPARATOR=';'
16607 else
16608 PATH_SEPARATOR=:
16609 fi
16610 rm -f conftest.sh
16611fi
16612
16613
16614 as_lineno_1=$LINENO
16615 as_lineno_2=$LINENO
16616 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16617 test "x$as_lineno_1" != "x$as_lineno_2" &&
16618 test "x$as_lineno_3" = "x$as_lineno_2" || {
16619 # Find who we are. Look in the path if we contain no path at all
16620 # relative or not.
16621 case $0 in
16622 *[\\/]* ) as_myself=$0 ;;
16623 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16624for as_dir in $PATH
16625do
16626 IFS=$as_save_IFS
16627 test -z "$as_dir" && as_dir=.
16628 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16629done
16630
16631 ;;
16632 esac
16633 # We did not find ourselves, most probably we were run as `sh COMMAND'
16634 # in which case we are not to be found in the path.
16635 if test "x$as_myself" = x; then
16636 as_myself=$0
16637 fi
16638 if test ! -f "$as_myself"; then
16639 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16640echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16641 { (exit 1); exit 1; }; }
16642 fi
16643 case $CONFIG_SHELL in
16644 '')
16645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16646for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16647do
16648 IFS=$as_save_IFS
16649 test -z "$as_dir" && as_dir=.
16650 for as_base in sh bash ksh sh5; do
16651 case $as_dir in
16652 /*)
16653 if ("$as_dir/$as_base" -c '
16654 as_lineno_1=$LINENO
16655 as_lineno_2=$LINENO
16656 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16657 test "x$as_lineno_1" != "x$as_lineno_2" &&
16658 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
16659 CONFIG_SHELL=$as_dir/$as_base
16660 export CONFIG_SHELL
16661 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16662 fi;;
16663 esac
16664 done
16665done
16666;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016667 esac
16668
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16670 # uniformly replaced by the line number. The first 'sed' inserts a
16671 # line-number line before each line; the second 'sed' does the real
16672 # work. The second script uses 'N' to pair each line-number line
16673 # with the numbered line, and appends trailing '-' during
16674 # substitution so that $LINENO is not a special case at line end.
16675 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16676 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16677 sed '=' <$as_myself |
16678 sed '
16679 N
16680 s,$,-,
16681 : loop
16682 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16683 t loop
16684 s,-$,,
16685 s,^['$as_cr_digits']*\n,,
16686 ' >$as_me.lineno &&
16687 chmod +x $as_me.lineno ||
16688 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16689echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16690 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016691
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 # Don't try to exec as it changes $[0], causing all sort of problems
16693 # (the dirname of $[0] is not the place where we might find the
16694 # original and so on. Autoconf is especially sensible to this).
16695 . ./$as_me.lineno
16696 # Exit status is that of the last command.
16697 exit
16698}
16699
16700
16701case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16702 *c*,-n*) ECHO_N= ECHO_C='
16703' ECHO_T=' ' ;;
16704 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16705 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16706esac
16707
16708if expr a : '\(a\)' >/dev/null 2>&1; then
16709 as_expr=expr
16710else
16711 as_expr=false
16712fi
16713
16714rm -f conf$$ conf$$.exe conf$$.file
16715echo >conf$$.file
16716if ln -s conf$$.file conf$$ 2>/dev/null; then
16717 # We could just check for DJGPP; but this test a) works b) is more generic
16718 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16719 if test -f conf$$.exe; then
16720 # Don't use ln at all; we don't have any links
16721 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016722 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 as_ln_s='ln -s'
16724 fi
16725elif ln conf$$.file conf$$ 2>/dev/null; then
16726 as_ln_s=ln
16727else
16728 as_ln_s='cp -p'
16729fi
16730rm -f conf$$ conf$$.exe conf$$.file
16731
16732as_executable_p="test -f"
16733
16734# Sed expression to map a string onto a valid CPP name.
16735as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16736
16737# Sed expression to map a string onto a valid variable name.
16738as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16739
16740
16741# IFS
16742# We need space, tab and new line, in precisely that order.
16743as_nl='
16744'
16745IFS=" $as_nl"
16746
16747# CDPATH.
16748$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16749
16750exec 6>&1
16751
16752# Open the log real soon, to keep \$[0] and so on meaningful, and to
16753# report actual input values of CONFIG_FILES etc. instead of their
16754# values after options handling. Logging --version etc. is OK.
16755exec 5>>config.log
16756{
16757 echo
16758 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16759## Running $as_me. ##
16760_ASBOX
16761} >&5
16762cat >&5 <<_CSEOF
16763
16764This file was extended by $as_me, which was
16765generated by GNU Autoconf 2.53. Invocation command line was
16766
16767 CONFIG_FILES = $CONFIG_FILES
16768 CONFIG_HEADERS = $CONFIG_HEADERS
16769 CONFIG_LINKS = $CONFIG_LINKS
16770 CONFIG_COMMANDS = $CONFIG_COMMANDS
16771 $ $0 $@
16772
16773_CSEOF
16774echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16775echo >&5
16776_ACEOF
16777
16778# Files that config.status was made for.
16779if test -n "$ac_config_files"; then
16780 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16781fi
16782
16783if test -n "$ac_config_headers"; then
16784 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16785fi
16786
16787if test -n "$ac_config_links"; then
16788 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16789fi
16790
16791if test -n "$ac_config_commands"; then
16792 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16793fi
16794
16795cat >>$CONFIG_STATUS <<\_ACEOF
16796
16797ac_cs_usage="\
16798\`$as_me' instantiates files from templates according to the
16799current configuration.
16800
16801Usage: $0 [OPTIONS] [FILE]...
16802
16803 -h, --help print this help, then exit
16804 -V, --version print version number, then exit
16805 -d, --debug don't remove temporary files
16806 --recheck update $as_me by reconfiguring in the same conditions
16807 --file=FILE[:TEMPLATE]
16808 instantiate the configuration file FILE
16809 --header=FILE[:TEMPLATE]
16810 instantiate the configuration header FILE
16811
16812Configuration files:
16813$config_files
16814
16815Configuration headers:
16816$config_headers
16817
16818Report bugs to <bug-autoconf@gnu.org>."
16819_ACEOF
16820
16821cat >>$CONFIG_STATUS <<_ACEOF
16822ac_cs_version="\\
16823config.status
16824configured by $0, generated by GNU Autoconf 2.53,
16825 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16826
16827Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16828Free Software Foundation, Inc.
16829This config.status script is free software; the Free Software Foundation
16830gives unlimited permission to copy, distribute and modify it."
16831srcdir=$srcdir
16832INSTALL="$INSTALL"
16833_ACEOF
16834
16835cat >>$CONFIG_STATUS <<\_ACEOF
16836# If no file are specified by the user, then we need to provide default
16837# value. By we need to know if files were specified by the user.
16838ac_need_defaults=:
16839while test $# != 0
16840do
16841 case $1 in
16842 --*=*)
16843 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16844 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16845 shift
16846 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16847 shift
16848 ;;
16849 -*);;
16850 *) # This is not an option, so the user has probably given explicit
16851 # arguments.
16852 ac_need_defaults=false;;
16853 esac
16854
16855 case $1 in
16856 # Handling of the options.
16857_ACEOF
16858cat >>$CONFIG_STATUS <<_ACEOF
16859 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16860 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16861 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16862_ACEOF
16863cat >>$CONFIG_STATUS <<\_ACEOF
16864 --version | --vers* | -V )
16865 echo "$ac_cs_version"; exit 0 ;;
16866 --he | --h)
16867 # Conflict between --help and --header
16868 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16869Try \`$0 --help' for more information." >&5
16870echo "$as_me: error: ambiguous option: $1
16871Try \`$0 --help' for more information." >&2;}
16872 { (exit 1); exit 1; }; };;
16873 --help | --hel | -h )
16874 echo "$ac_cs_usage"; exit 0 ;;
16875 --debug | --d* | -d )
16876 debug=: ;;
16877 --file | --fil | --fi | --f )
16878 shift
16879 CONFIG_FILES="$CONFIG_FILES $1"
16880 ac_need_defaults=false;;
16881 --header | --heade | --head | --hea )
16882 shift
16883 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16884 ac_need_defaults=false;;
16885
16886 # This is an error.
16887 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16888Try \`$0 --help' for more information." >&5
16889echo "$as_me: error: unrecognized option: $1
16890Try \`$0 --help' for more information." >&2;}
16891 { (exit 1); exit 1; }; } ;;
16892
16893 *) ac_config_targets="$ac_config_targets $1" ;;
16894
16895 esac
16896 shift
16897done
16898
16899_ACEOF
16900
16901
16902
16903
16904
16905cat >>$CONFIG_STATUS <<\_ACEOF
16906for ac_config_target in $ac_config_targets
16907do
16908 case "$ac_config_target" in
16909 # Handling of arguments.
16910 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16911 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16912 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16913 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16914echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16915 { (exit 1); exit 1; }; };;
16916 esac
16917done
16918
16919# If the user did not use the arguments to specify the items to instantiate,
16920# then the envvar interface is used. Set only those that are not.
16921# We use the long form for the default assignment because of an extremely
16922# bizarre bug on SunOS 4.1.3.
16923if $ac_need_defaults; then
16924 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16925 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16926fi
16927
16928# Create a temporary directory, and hook for its removal unless debugging.
16929$debug ||
16930{
16931 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16932 trap '{ (exit 1); exit 1; }' 1 2 13 15
16933}
16934
16935# Create a (secure) tmp directory for tmp files.
16936: ${TMPDIR=/tmp}
16937{
16938 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16939 test -n "$tmp" && test -d "$tmp"
16940} ||
16941{
16942 tmp=$TMPDIR/cs$$-$RANDOM
16943 (umask 077 && mkdir $tmp)
16944} ||
16945{
16946 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16947 { (exit 1); exit 1; }
16948}
16949
16950_ACEOF
16951
16952cat >>$CONFIG_STATUS <<_ACEOF
16953
16954#
16955# CONFIG_FILES section.
16956#
16957
16958# No need to generate the scripts if there are no CONFIG_FILES.
16959# This happens for instance when ./config.status config.h
16960if test -n "\$CONFIG_FILES"; then
16961 # Protect against being on the right side of a sed subst in config.status.
16962 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16963 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16964s,@SHELL@,$SHELL,;t t
16965s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16966s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16967s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16968s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16969s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16970s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16971s,@exec_prefix@,$exec_prefix,;t t
16972s,@prefix@,$prefix,;t t
16973s,@program_transform_name@,$program_transform_name,;t t
16974s,@bindir@,$bindir,;t t
16975s,@sbindir@,$sbindir,;t t
16976s,@libexecdir@,$libexecdir,;t t
16977s,@datadir@,$datadir,;t t
16978s,@sysconfdir@,$sysconfdir,;t t
16979s,@sharedstatedir@,$sharedstatedir,;t t
16980s,@localstatedir@,$localstatedir,;t t
16981s,@libdir@,$libdir,;t t
16982s,@includedir@,$includedir,;t t
16983s,@oldincludedir@,$oldincludedir,;t t
16984s,@infodir@,$infodir,;t t
16985s,@mandir@,$mandir,;t t
16986s,@build_alias@,$build_alias,;t t
16987s,@host_alias@,$host_alias,;t t
16988s,@target_alias@,$target_alias,;t t
16989s,@DEFS@,$DEFS,;t t
16990s,@ECHO_C@,$ECHO_C,;t t
16991s,@ECHO_N@,$ECHO_N,;t t
16992s,@ECHO_T@,$ECHO_T,;t t
16993s,@LIBS@,$LIBS,;t t
16994s,@VERSION@,$VERSION,;t t
16995s,@SOVERSION@,$SOVERSION,;t t
16996s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16997s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16998s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16999s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
17000s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
17001s,@MACHDEP@,$MACHDEP,;t t
17002s,@SGI_ABI@,$SGI_ABI,;t t
17003s,@CXX@,$CXX,;t t
17004s,@MAINOBJ@,$MAINOBJ,;t t
17005s,@EXEEXT@,$EXEEXT,;t t
17006s,@CC@,$CC,;t t
17007s,@CFLAGS@,$CFLAGS,;t t
17008s,@LDFLAGS@,$LDFLAGS,;t t
17009s,@CPPFLAGS@,$CPPFLAGS,;t t
17010s,@ac_ct_CC@,$ac_ct_CC,;t t
17011s,@OBJEXT@,$OBJEXT,;t t
17012s,@CPP@,$CPP,;t t
17013s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
17014s,@LIBRARY@,$LIBRARY,;t t
17015s,@LDLIBRARY@,$LDLIBRARY,;t t
17016s,@DLLLIBRARY@,$DLLLIBRARY,;t t
17017s,@BLDLIBRARY@,$BLDLIBRARY,;t t
17018s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
17019s,@INSTSONAME@,$INSTSONAME,;t t
17020s,@RUNSHARED@,$RUNSHARED,;t t
17021s,@LINKCC@,$LINKCC,;t t
17022s,@RANLIB@,$RANLIB,;t t
17023s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17024s,@AR@,$AR,;t t
17025s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17026s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17027s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17028s,@LN@,$LN,;t t
17029s,@OPT@,$OPT,;t t
17030s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
17031s,@SO@,$SO,;t t
17032s,@LDSHARED@,$LDSHARED,;t t
17033s,@BLDSHARED@,$BLDSHARED,;t t
17034s,@CCSHARED@,$CCSHARED,;t t
17035s,@LINKFORSHARED@,$LINKFORSHARED,;t t
17036s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017037s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000017038s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
17039s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
17040s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
17041s,@LDLAST@,$LDLAST,;t t
17042s,@THREADOBJ@,$THREADOBJ,;t t
17043s,@DLINCLDIR@,$DLINCLDIR,;t t
17044s,@DYNLOADFILE@,$DYNLOADFILE,;t t
17045s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
17046s,@LIBOBJS@,$LIBOBJS,;t t
17047s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
17048s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
17049s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
17050s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
17051s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
17052s,@LIBM@,$LIBM,;t t
17053s,@LIBC@,$LIBC,;t t
17054s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
17055s,@THREADHEADERS@,$THREADHEADERS,;t t
17056s,@SRCDIRS@,$SRCDIRS,;t t
17057CEOF
17058
17059_ACEOF
17060
17061 cat >>$CONFIG_STATUS <<\_ACEOF
17062 # Split the substitutions into bite-sized pieces for seds with
17063 # small command number limits, like on Digital OSF/1 and HP-UX.
17064 ac_max_sed_lines=48
17065 ac_sed_frag=1 # Number of current file.
17066 ac_beg=1 # First line for current file.
17067 ac_end=$ac_max_sed_lines # Line after last line for current file.
17068 ac_more_lines=:
17069 ac_sed_cmds=
17070 while $ac_more_lines; do
17071 if test $ac_beg -gt 1; then
17072 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17073 else
17074 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17075 fi
17076 if test ! -s $tmp/subs.frag; then
17077 ac_more_lines=false
17078 else
17079 # The purpose of the label and of the branching condition is to
17080 # speed up the sed processing (if there are no `@' at all, there
17081 # is no need to browse any of the substitutions).
17082 # These are the two extra sed commands mentioned above.
17083 (echo ':t
17084 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17085 if test -z "$ac_sed_cmds"; then
17086 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17087 else
17088 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17089 fi
17090 ac_sed_frag=`expr $ac_sed_frag + 1`
17091 ac_beg=$ac_end
17092 ac_end=`expr $ac_end + $ac_max_sed_lines`
17093 fi
17094 done
17095 if test -z "$ac_sed_cmds"; then
17096 ac_sed_cmds=cat
17097 fi
17098fi # test -n "$CONFIG_FILES"
17099
17100_ACEOF
17101cat >>$CONFIG_STATUS <<\_ACEOF
17102for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17103 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17104 case $ac_file in
17105 - | *:- | *:-:* ) # input from stdin
17106 cat >$tmp/stdin
17107 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17108 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17109 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17110 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17111 * ) ac_file_in=$ac_file.in ;;
17112 esac
17113
17114 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17115 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17116$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17117 X"$ac_file" : 'X\(//\)[^/]' \| \
17118 X"$ac_file" : 'X\(//\)$' \| \
17119 X"$ac_file" : 'X\(/\)' \| \
17120 . : '\(.\)' 2>/dev/null ||
17121echo X"$ac_file" |
17122 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17123 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17124 /^X\(\/\/\)$/{ s//\1/; q; }
17125 /^X\(\/\).*/{ s//\1/; q; }
17126 s/.*/./; q'`
17127 { case "$ac_dir" in
17128 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17129 *) as_incr_dir=.;;
17130esac
17131as_dummy="$ac_dir"
17132for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17133 case $as_mkdir_dir in
17134 # Skip DOS drivespec
17135 ?:) as_incr_dir=$as_mkdir_dir ;;
17136 *)
17137 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17138 test -d "$as_incr_dir" ||
17139 mkdir "$as_incr_dir" ||
17140 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17141echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17142 { (exit 1); exit 1; }; }
17143 ;;
17144 esac
17145done; }
17146
17147 ac_builddir=.
17148
17149if test "$ac_dir" != .; then
17150 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17151 # A "../" for each directory in $ac_dir_suffix.
17152 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17153else
17154 ac_dir_suffix= ac_top_builddir=
17155fi
17156
17157case $srcdir in
17158 .) # No --srcdir option. We are building in place.
17159 ac_srcdir=.
17160 if test -z "$ac_top_builddir"; then
17161 ac_top_srcdir=.
17162 else
17163 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17164 fi ;;
17165 [\\/]* | ?:[\\/]* ) # Absolute path.
17166 ac_srcdir=$srcdir$ac_dir_suffix;
17167 ac_top_srcdir=$srcdir ;;
17168 *) # Relative path.
17169 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17170 ac_top_srcdir=$ac_top_builddir$srcdir ;;
17171esac
17172# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17173# absolute.
17174ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017175ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000017176ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17177ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17178
17179
17180 case $INSTALL in
17181 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17182 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17183 esac
17184
17185 if test x"$ac_file" != x-; then
17186 { echo "$as_me:$LINENO: creating $ac_file" >&5
17187echo "$as_me: creating $ac_file" >&6;}
17188 rm -f "$ac_file"
17189 fi
17190 # Let's still pretend it is `configure' which instantiates (i.e., don't
17191 # use $as_me), people would be surprised to read:
17192 # /* config.h. Generated by config.status. */
17193 if test x"$ac_file" = x-; then
17194 configure_input=
17195 else
17196 configure_input="$ac_file. "
17197 fi
17198 configure_input=$configure_input"Generated from `echo $ac_file_in |
17199 sed 's,.*/,,'` by configure."
17200
17201 # First look for the input files in the build tree, otherwise in the
17202 # src tree.
17203 ac_file_inputs=`IFS=:
17204 for f in $ac_file_in; do
17205 case $f in
17206 -) echo $tmp/stdin ;;
17207 [\\/$]*)
17208 # Absolute (can't be DOS-style, as IFS=:)
17209 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17210echo "$as_me: error: cannot find input file: $f" >&2;}
17211 { (exit 1); exit 1; }; }
17212 echo $f;;
17213 *) # Relative
17214 if test -f "$f"; then
17215 # Build tree
17216 echo $f
17217 elif test -f "$srcdir/$f"; then
17218 # Source tree
17219 echo $srcdir/$f
17220 else
17221 # /dev/null tree
17222 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17223echo "$as_me: error: cannot find input file: $f" >&2;}
17224 { (exit 1); exit 1; }; }
17225 fi;;
17226 esac
17227 done` || { (exit 1); exit 1; }
17228_ACEOF
17229cat >>$CONFIG_STATUS <<_ACEOF
17230 sed "$ac_vpsub
17231$extrasub
17232_ACEOF
17233cat >>$CONFIG_STATUS <<\_ACEOF
17234:t
17235/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17236s,@configure_input@,$configure_input,;t t
17237s,@srcdir@,$ac_srcdir,;t t
17238s,@abs_srcdir@,$ac_abs_srcdir,;t t
17239s,@top_srcdir@,$ac_top_srcdir,;t t
17240s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17241s,@builddir@,$ac_builddir,;t t
17242s,@abs_builddir@,$ac_abs_builddir,;t t
17243s,@top_builddir@,$ac_top_builddir,;t t
17244s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17245s,@INSTALL@,$ac_INSTALL,;t t
17246" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17247 rm -f $tmp/stdin
17248 if test x"$ac_file" != x-; then
17249 mv $tmp/out $ac_file
17250 else
17251 cat $tmp/out
17252 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017253 fi
17254
Martin v. Löwis11437992002-04-12 09:54:03 +000017255done
17256_ACEOF
17257cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017258
Martin v. Löwis11437992002-04-12 09:54:03 +000017259#
17260# CONFIG_HEADER section.
17261#
Guido van Rossum627b2d71993-12-24 10:39:16 +000017262
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017263# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17264# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017265#
17266# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000017267ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17268ac_dB='[ ].*$,\1#\2'
17269ac_dC=' '
17270ac_dD=',;t'
17271# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17272ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17273ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017274ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000017275ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017276
Martin v. Löwis11437992002-04-12 09:54:03 +000017277for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000017278 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 case $ac_file in
17280 - | *:- | *:-:* ) # input from stdin
17281 cat >$tmp/stdin
17282 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17283 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17284 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17285 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17286 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017287 esac
17288
Martin v. Löwis11437992002-04-12 09:54:03 +000017289 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17290echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017291
Martin v. Löwis11437992002-04-12 09:54:03 +000017292 # First look for the input files in the build tree, otherwise in the
17293 # src tree.
17294 ac_file_inputs=`IFS=:
17295 for f in $ac_file_in; do
17296 case $f in
17297 -) echo $tmp/stdin ;;
17298 [\\/$]*)
17299 # Absolute (can't be DOS-style, as IFS=:)
17300 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17301echo "$as_me: error: cannot find input file: $f" >&2;}
17302 { (exit 1); exit 1; }; }
17303 echo $f;;
17304 *) # Relative
17305 if test -f "$f"; then
17306 # Build tree
17307 echo $f
17308 elif test -f "$srcdir/$f"; then
17309 # Source tree
17310 echo $srcdir/$f
17311 else
17312 # /dev/null tree
17313 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17314echo "$as_me: error: cannot find input file: $f" >&2;}
17315 { (exit 1); exit 1; }; }
17316 fi;;
17317 esac
17318 done` || { (exit 1); exit 1; }
17319 # Remove the trailing spaces.
17320 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017321
Martin v. Löwis11437992002-04-12 09:54:03 +000017322_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017323
Martin v. Löwis11437992002-04-12 09:54:03 +000017324# Transform confdefs.h into two sed scripts, `conftest.defines' and
17325# `conftest.undefs', that substitutes the proper values into
17326# config.h.in to produce config.h. The first handles `#define'
17327# templates, and the second `#undef' templates.
17328# And first: Protect against being on the right side of a sed subst in
17329# config.status. Protect against being in an unquoted here document
17330# in config.status.
17331rm -f conftest.defines conftest.undefs
17332# Using a here document instead of a string reduces the quoting nightmare.
17333# Putting comments in sed scripts is not portable.
17334#
17335# `end' is used to avoid that the second main sed command (meant for
17336# 0-ary CPP macros) applies to n-ary macro definitions.
17337# See the Autoconf documentation for `clear'.
17338cat >confdef2sed.sed <<\_ACEOF
17339s/[\\&,]/\\&/g
17340s,[\\$`],\\&,g
17341t clear
17342: clear
17343s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17344t end
17345s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17346: end
17347_ACEOF
17348# If some macros were called several times there might be several times
17349# the same #defines, which is useless. Nevertheless, we may not want to
17350# sort them, since we want the *last* AC-DEFINE to be honored.
17351uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17352sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17353rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017354
17355# This sed command replaces #undef with comments. This is necessary, for
17356# example, in the case of _POSIX_SOURCE, which is predefined and required
17357# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017358cat >>conftest.undefs <<\_ACEOF
17359s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17360_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017361
Martin v. Löwis11437992002-04-12 09:54:03 +000017362# Break up conftest.defines because some shells have a limit on the size
17363# of here documents, and old seds have small limits too (100 cmds).
17364echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17365echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17366echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17367echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017368rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000017369while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000017370do
Martin v. Löwis11437992002-04-12 09:54:03 +000017371 # Write a limited-size here document to $tmp/defines.sed.
17372 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17373 # Speed up: don't consider the non `#define' lines.
17374 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
17375 # Work around the forget-to-reset-the-flag bug.
17376 echo 't clr' >>$CONFIG_STATUS
17377 echo ': clr' >>$CONFIG_STATUS
17378 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017379 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 sed -f $tmp/defines.sed $tmp/in >$tmp/out
17381 rm -f $tmp/in
17382 mv $tmp/out $tmp/in
17383' >>$CONFIG_STATUS
17384 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17385 rm -f conftest.defines
17386 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000017387done
Martin v. Löwis11437992002-04-12 09:54:03 +000017388rm -f conftest.defines
17389echo ' fi # egrep' >>$CONFIG_STATUS
17390echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000017391
Martin v. Löwis11437992002-04-12 09:54:03 +000017392# Break up conftest.undefs because some shells have a limit on the size
17393# of here documents, and old seds have small limits too (100 cmds).
17394echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
17395rm -f conftest.tail
17396while grep . conftest.undefs >/dev/null
17397do
17398 # Write a limited-size here document to $tmp/undefs.sed.
17399 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17400 # Speed up: don't consider the non `#undef'
17401 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
17402 # Work around the forget-to-reset-the-flag bug.
17403 echo 't clr' >>$CONFIG_STATUS
17404 echo ': clr' >>$CONFIG_STATUS
17405 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17406 echo 'CEOF
17407 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17408 rm -f $tmp/in
17409 mv $tmp/out $tmp/in
17410' >>$CONFIG_STATUS
17411 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17412 rm -f conftest.undefs
17413 mv conftest.tail conftest.undefs
17414done
17415rm -f conftest.undefs
17416
17417cat >>$CONFIG_STATUS <<\_ACEOF
17418 # Let's still pretend it is `configure' which instantiates (i.e., don't
17419 # use $as_me), people would be surprised to read:
17420 # /* config.h. Generated by config.status. */
17421 if test x"$ac_file" = x-; then
17422 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000017423 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000017425 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 cat $tmp/in >>$tmp/config.h
17427 rm -f $tmp/in
17428 if test x"$ac_file" != x-; then
17429 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17430 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17431echo "$as_me: $ac_file is unchanged" >&6;}
17432 else
17433 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17434$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17435 X"$ac_file" : 'X\(//\)[^/]' \| \
17436 X"$ac_file" : 'X\(//\)$' \| \
17437 X"$ac_file" : 'X\(/\)' \| \
17438 . : '\(.\)' 2>/dev/null ||
17439echo X"$ac_file" |
17440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17441 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17442 /^X\(\/\/\)$/{ s//\1/; q; }
17443 /^X\(\/\).*/{ s//\1/; q; }
17444 s/.*/./; q'`
17445 { case "$ac_dir" in
17446 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17447 *) as_incr_dir=.;;
17448esac
17449as_dummy="$ac_dir"
17450for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17451 case $as_mkdir_dir in
17452 # Skip DOS drivespec
17453 ?:) as_incr_dir=$as_mkdir_dir ;;
17454 *)
17455 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17456 test -d "$as_incr_dir" ||
17457 mkdir "$as_incr_dir" ||
17458 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17459echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17460 { (exit 1); exit 1; }; }
17461 ;;
17462 esac
17463done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017464
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 rm -f $ac_file
17466 mv $tmp/config.h $ac_file
17467 fi
17468 else
17469 cat $tmp/config.h
17470 rm -f $tmp/config.h
17471 fi
17472done
17473_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017474
Martin v. Löwis11437992002-04-12 09:54:03 +000017475cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477{ (exit 0); exit 0; }
17478_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017479chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017480ac_clean_files=$ac_clean_files_save
17481
17482
17483# configure is writing to config.log, and then calls config.status.
17484# config.status does its own redirection, appending to config.log.
17485# Unfortunately, on DOS this fails, as config.log is still kept open
17486# by configure, so config.status won't be able to write to it; its
17487# output is simply discarded. So we exec the FD to /dev/null,
17488# effectively closing config.log, so it can be properly (re)opened and
17489# appended to by config.status. When coming back to configure, we
17490# need to make the FD available again.
17491if test "$no_create" != yes; then
17492 ac_cs_success=:
17493 exec 5>/dev/null
17494 $SHELL $CONFIG_STATUS || ac_cs_success=false
17495 exec 5>>config.log
17496 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17497 # would make configure fail if this is the last instruction.
17498 $ac_cs_success || { (exit 1); exit 1; }
17499fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017500
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017501
17502echo "creating Setup"
17503if test ! -f Modules/Setup
17504then
17505 cp $srcdir/Modules/Setup.dist Modules/Setup
17506fi
17507
17508echo "creating Setup.local"
17509if test ! -f Modules/Setup.local
17510then
17511 echo "# Edit this file for local setup changes" >Modules/Setup.local
17512fi
17513
17514echo "creating Makefile"
17515$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17516 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017517 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017518mv config.c Modules