blob: d8d5edfb9aa15449b6fd40845c4879df71b6c9d4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis858f8172003-05-24 12:35:47 +00002# From configure.in Revision: 1.410 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Barry Warsawfe33b792003-01-07 22:42:49 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
Barry Warsawfe33b792003-01-07 22:42:49 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
Barry Warsawfe33b792003-01-07 22:42:49 +000038(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Barry Warsawfe33b792003-01-07 22:42:49 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001255# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1256# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1257# them.
1258
1259cat >>confdefs.h <<\_ACEOF
1260#define _NETBSD_SOURCE 1
1261_ACEOF
1262
1263
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001264define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001265
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001266# Arguments passed to configure.
1267
1268CONFIG_ARGS="$ac_configure_args"
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270# Check whether --enable-framework or --disable-framework was given.
1271if test "${enable_framework+set}" = set; then
1272 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Jack Jansene578a632001-08-15 01:27:14 +00001274 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001276 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 esac
1278 case $enableval in
1279 no)
1280 PYTHONFRAMEWORK=
1281 PYTHONFRAMEWORKDIR=no-framework
1282 PYTHONFRAMEWORKPREFIX=
1283 PYTHONFRAMEWORKINSTALLDIR=
1284 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001285 ;;
1286 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001287 PYTHONFRAMEWORK=Python
1288 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1291 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001292 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001293
Guido van Rossum563e7081996-09-10 18:20:48 +00001294else
Martin v. Löwis11437992002-04-12 09:54:03 +00001295
Jack Jansene578a632001-08-15 01:27:14 +00001296 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001297 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001298 PYTHONFRAMEWORKPREFIX=
1299 PYTHONFRAMEWORKINSTALLDIR=
1300 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001303
1304
1305
1306
Jack Jansene578a632001-08-15 01:27:14 +00001307
1308##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001309## AC_HELP_STRING(--with-dyld,
1310## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001311##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312# Set name for machine-dependent library files
1313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314echo "$as_me:$LINENO: checking MACHDEP" >&5
1315echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316if test -z "$MACHDEP"
1317then
Guido van Rossum563e7081996-09-10 18:20:48 +00001318 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001319 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001324 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_md_system=`echo $ac_sys_system |
1326 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1327 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001328 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001329 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001330
Guido van Rossum07397971997-04-29 21:49:50 +00001331 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001333 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001334 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001335 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 esac
1337fi
Guido van Rossum91922671997-10-09 20:24:13 +00001338
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001339# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1340# disable features if it is defined, without any means to access these
1341# features as extensions. For these systems, we skip the definition of
1342# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1343# some feature, make sure there is no alternative way to access this
1344# feature. Also, when using wildcards, make sure you have verified the
1345# need for not defining _XOPEN_SOURCE on all systems matching the
1346# wildcard, and that the wildcard does not include future systems
1347# (which may remove their limitations).
1348case $ac_sys_system/$ac_sys_release in
1349 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1350 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis858f8172003-05-24 12:35:47 +00001351 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm.
1352 OpenBSD/2.* | OpenBSD/3.[0123])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001353 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001354 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1355 # of union __?sigval. Reported by Stuart Bishop.
1356 SunOS/5.6)
1357 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001358 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1359 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1360 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1361 define_xopen_source=no;;
1362 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001363 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001364 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001365 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001366esac
1367
1368if test $define_xopen_source = yes
1369then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001370
1371cat >>confdefs.h <<\_ACEOF
1372#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001373_ACEOF
1374
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001375
1376 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1377 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1378 # several APIs are not declared. Since this is also needed in some
1379 # cases for HP-UX, we define it globally.
1380
1381
1382cat >>confdefs.h <<\_ACEOF
1383#define _XOPEN_SOURCE_EXTENDED 1
1384_ACEOF
1385
1386
1387cat >>confdefs.h <<\_ACEOF
1388#define _POSIX_C_SOURCE 200112L
1389_ACEOF
1390
1391
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001392fi
1393
Guido van Rossum91922671997-10-09 20:24:13 +00001394#
1395# SGI compilers allow the specification of the both the ABI and the
1396# ISA on the command line. Depending on the values of these switches,
1397# different and often incompatable code will be generated.
1398#
1399# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1400# thus supply support for various ABI/ISA combinations. The MACHDEP
1401# variable is also adjusted.
1402#
1403
1404if test ! -z "$SGI_ABI"
1405then
1406 CC="cc $SGI_ABI"
1407 LDFLAGS="$SGI_ABI $LDFLAGS"
1408 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001410echo "$as_me:$LINENO: result: $MACHDEP" >&5
1411echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001412
Jack Jansen83f898c2002-12-30 22:23:40 +00001413# And add extra plat-mac for darwin
1414
Jack Jansen7b59b422003-03-17 15:44:10 +00001415
Jack Jansen83f898c2002-12-30 22:23:40 +00001416echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1417echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1418if test -z "$EXTRAPLATDIR"
1419then
1420 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001421 darwin)
1422 EXTRAPLATDIR="\$(PLATMACDIRS)"
1423 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1424 ;;
1425 *)
1426 EXTRAPLATDIR=""
1427 EXTRAMACHDEPPATH=""
1428 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001429 esac
1430fi
1431echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1432echo "${ECHO_T}$EXTRAPLATDIR" >&6
1433
Guido van Rossum627b2d71993-12-24 10:39:16 +00001434# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001435
1436# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1437# for debug/optimization stuff. BASECFLAGS is for flags that are required
1438# just to get things to compile and link. Users are free to override OPT
1439# when running configure or make. The build should not break if they do.
1440# BASECFLAGS should generally not be messed with, however.
1441
1442# XXX shouldn't some/most/all of this code be merged with the stuff later
1443# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking for --without-gcc" >&5
1445echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001448if test "${with_gcc+set}" = set; then
1449 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
Guido van Rossum7f43da71994-08-01 12:15:30 +00001451 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001452 no) CC=cc
1453 without_gcc=yes;;
1454 yes) CC=gcc
1455 without_gcc=no;;
1456 *) CC=$withval
1457 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001458 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001459else
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001461 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001462 AIX*) CC=cc_r
1463 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001464 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001465 case $BE_HOST_CPU in
1466 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001467 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001468 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001469 BASECFLAGS="$BASECFLAGS -export pragma"
1470 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001471 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 ;;
1473 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001474 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001475 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001476 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
1478 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1480echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1481 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001482 ;;
1483 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001484 AR="\$(srcdir)/Modules/ar_beos"
1485 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001486 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001487 Monterey*)
1488 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001489 without_gcc=;;
1490 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001491 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001492fi;
1493echo "$as_me:$LINENO: result: $without_gcc" >&5
1494echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001495
1496
Guido van Rossum95012191999-12-16 17:50:52 +00001497
Fred Drakea1a84e72001-03-06 05:52:16 +00001498MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001499echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1500echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1501
Guido van Rossum95012191999-12-16 17:50:52 +00001502# Check whether --with-cxx or --without-cxx was given.
1503if test "${with_cxx+set}" = set; then
1504 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Martin v. Löwis22352952000-12-13 17:37:02 +00001506 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001507 case $withval in
1508 no) CXX=
1509 with_cxx=no;;
1510 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001511 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001512 with_cxx=$withval;;
1513 esac
1514else
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Guido van Rossum95012191999-12-16 17:50:52 +00001516 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001517 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001518
Martin v. Löwis11437992002-04-12 09:54:03 +00001519fi;
1520echo "$as_me:$LINENO: result: $with_cxx" >&5
1521echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001522
1523if test "$with_cxx" = "yes"
1524then
Martin v. Löwis11437992002-04-12 09:54:03 +00001525 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1526echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1527 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001528fi
1529
1530
1531
1532
Martin v. Löwis11437992002-04-12 09:54:03 +00001533if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001534then
1535 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1536do
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 # 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 +00001538set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001539echo "$as_me:$LINENO: checking for $ac_word" >&5
1540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1541if test "${ac_cv_prog_CXX+set}" = set; then
1542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001543else
1544 if test -n "$CXX"; then
1545 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1546else
Martin v. Löwis11437992002-04-12 09:54:03 +00001547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1548for as_dir in $PATH
1549do
1550 IFS=$as_save_IFS
1551 test -z "$as_dir" && as_dir=.
1552 for ac_exec_ext in '' $ac_executable_extensions; do
1553 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1554 ac_cv_prog_CXX="$ac_prog"
1555 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1556 break 2
1557 fi
1558done
1559done
1560
Martin v. Löwis22352952000-12-13 17:37:02 +00001561fi
1562fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001563CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001564if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 echo "$as_me:$LINENO: result: $CXX" >&5
1566echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001567else
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 echo "$as_me:$LINENO: result: no" >&5
1569echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001570fi
1571
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001573done
1574test -n "$CXX" || CXX="notfound"
1575
1576 if test "$CXX" = "notfound"
1577 then
1578 CXX=
1579 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001581ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1585 cat >conftest.$ac_ext <<_ACEOF
1586#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001587#include "confdefs.h"
1588
Barry Warsawfe33b792003-01-07 22:42:49 +00001589#ifdef F77_DUMMY_MAIN
1590# ifdef __cplusplus
1591 extern "C"
1592# endif
1593 int F77_DUMMY_MAIN() { return 1; }
1594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001595int
1596main ()
1597{
Michael W. Hudson54241132001-12-07 15:38:26 +00001598
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ;
1600 return 0;
1601}
1602_ACEOF
1603ac_clean_files_save=$ac_clean_files
1604ac_clean_files="$ac_clean_files a.out a.exe"
1605# Try to create an executable without -o first, disregard a.out.
1606# It will help us diagnose broken compilers, and finding out an intuition
1607# of exeext.
1608echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1609echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1610ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1611if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1612 (eval $ac_link_default) 2>&5
1613 ac_status=$?
1614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1615 (exit $ac_status); }; then
1616 # Find the output, starting from the most likely. This scheme is
1617# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1618# resort.
1619
1620# Be careful to initialize this variable, since it used to be cached.
1621# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1622ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001623for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1624 ls a.out conftest 2>/dev/null;
1625 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001627 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 a.out ) # We found the default executable, but exeext='' is most
1629 # certainly right.
1630 break;;
1631 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1632 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1633 export ac_cv_exeext
1634 break;;
1635 * ) break;;
1636 esac
1637done
1638else
1639 echo "$as_me: failed program was:" >&5
1640cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001641{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1642echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001645
1646ac_exeext=$ac_cv_exeext
1647echo "$as_me:$LINENO: result: $ac_file" >&5
1648echo "${ECHO_T}$ac_file" >&6
1649
1650# Check the compiler produces executables we can run. If not, either
1651# the compiler is broken, or we cross compile.
1652echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1653echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1654# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1655# If not cross compiling, check that we can run a simple program.
1656if test "$cross_compiling" != yes; then
1657 if { ac_try='./$ac_file'
1658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1659 (eval $ac_try) 2>&5
1660 ac_status=$?
1661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1662 (exit $ac_status); }; }; then
1663 cross_compiling=no
1664 else
1665 if test "$cross_compiling" = maybe; then
1666 cross_compiling=yes
1667 else
1668 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1669If you meant to cross compile, use \`--host'." >&5
1670echo "$as_me: error: cannot run C++ compiled programs.
1671If you meant to cross compile, use \`--host'." >&2;}
1672 { (exit 1); exit 1; }; }
1673 fi
1674 fi
1675fi
1676echo "$as_me:$LINENO: result: yes" >&5
1677echo "${ECHO_T}yes" >&6
1678
1679rm -f a.out a.exe conftest$ac_cv_exeext
1680ac_clean_files=$ac_clean_files_save
1681# Check the compiler produces executables we can run. If not, either
1682# the compiler is broken, or we cross compile.
1683echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1684echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1685echo "$as_me:$LINENO: result: $cross_compiling" >&5
1686echo "${ECHO_T}$cross_compiling" >&6
1687
1688echo "$as_me:$LINENO: checking for suffix of executables" >&5
1689echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1691 (eval $ac_link) 2>&5
1692 ac_status=$?
1693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1694 (exit $ac_status); }; then
1695 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1696# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1697# work properly (i.e., refer to `conftest.exe'), while it won't with
1698# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001699for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001700 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001701 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1703 export ac_cv_exeext
1704 break;;
1705 * ) break;;
1706 esac
1707done
1708else
1709 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1710echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1711 { (exit 1); exit 1; }; }
1712fi
1713
1714rm -f conftest$ac_cv_exeext
1715echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1716echo "${ECHO_T}$ac_cv_exeext" >&6
1717
1718rm -f conftest.$ac_ext
1719EXEEXT=$ac_cv_exeext
1720ac_exeext=$EXEEXT
1721
1722 ac_ext=c
1723ac_cpp='$CPP $CPPFLAGS'
1724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1726ac_compiler_gnu=$ac_cv_c_compiler_gnu
1727
1728
Martin v. Löwis22352952000-12-13 17:37:02 +00001729
1730 fi
1731fi
1732
Guido van Rossum8b131c51995-03-09 14:10:13 +00001733# If the user switches compilers, we can't believe the cache
1734if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1735then
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1737(it is also a good idea to do 'make clean' before compiling)" >&5
1738echo "$as_me: error: cached CC is different -- throw away $cache_file
1739(it is also a good idea to do 'make clean' before compiling)" >&2;}
1740 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001741fi
1742
Martin v. Löwis11437992002-04-12 09:54:03 +00001743ac_ext=c
1744ac_cpp='$CPP $CPPFLAGS'
1745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1747ac_compiler_gnu=$ac_cv_c_compiler_gnu
1748if test -n "$ac_tool_prefix"; then
1749 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1750set dummy ${ac_tool_prefix}gcc; ac_word=$2
1751echo "$as_me:$LINENO: checking for $ac_word" >&5
1752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1753if test "${ac_cv_prog_CC+set}" = set; then
1754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001755else
1756 if test -n "$CC"; then
1757 ac_cv_prog_CC="$CC" # Let the user override the test.
1758else
Martin v. Löwis11437992002-04-12 09:54:03 +00001759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1760for as_dir in $PATH
1761do
1762 IFS=$as_save_IFS
1763 test -z "$as_dir" && as_dir=.
1764 for ac_exec_ext in '' $ac_executable_extensions; do
1765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1766 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1768 break 2
1769 fi
1770done
1771done
1772
Jack Jansendd19cf82001-12-06 22:36:17 +00001773fi
1774fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001775CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001776if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 echo "$as_me:$LINENO: result: $CC" >&5
1778echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001779else
Martin v. Löwis11437992002-04-12 09:54:03 +00001780 echo "$as_me:$LINENO: result: no" >&5
1781echo "${ECHO_T}no" >&6
1782fi
1783
1784fi
1785if test -z "$ac_cv_prog_CC"; then
1786 ac_ct_CC=$CC
1787 # Extract the first word of "gcc", so it can be a program name with args.
1788set dummy gcc; ac_word=$2
1789echo "$as_me:$LINENO: checking for $ac_word" >&5
1790echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1791if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1792 echo $ECHO_N "(cached) $ECHO_C" >&6
1793else
1794 if test -n "$ac_ct_CC"; then
1795 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1796else
1797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1798for as_dir in $PATH
1799do
1800 IFS=$as_save_IFS
1801 test -z "$as_dir" && as_dir=.
1802 for ac_exec_ext in '' $ac_executable_extensions; do
1803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1804 ac_cv_prog_ac_ct_CC="gcc"
1805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1806 break 2
1807 fi
1808done
1809done
1810
1811fi
1812fi
1813ac_ct_CC=$ac_cv_prog_ac_ct_CC
1814if test -n "$ac_ct_CC"; then
1815 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1816echo "${ECHO_T}$ac_ct_CC" >&6
1817else
1818 echo "$as_me:$LINENO: result: no" >&5
1819echo "${ECHO_T}no" >&6
1820fi
1821
1822 CC=$ac_ct_CC
1823else
1824 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001825fi
1826
Jack Jansendd19cf82001-12-06 22:36:17 +00001827if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 if test -n "$ac_tool_prefix"; then
1829 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1830set dummy ${ac_tool_prefix}cc; ac_word=$2
1831echo "$as_me:$LINENO: checking for $ac_word" >&5
1832echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1833if test "${ac_cv_prog_CC+set}" = set; then
1834 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001835else
1836 if test -n "$CC"; then
1837 ac_cv_prog_CC="$CC" # Let the user override the test.
1838else
Martin v. Löwis11437992002-04-12 09:54:03 +00001839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1840for as_dir in $PATH
1841do
1842 IFS=$as_save_IFS
1843 test -z "$as_dir" && as_dir=.
1844 for ac_exec_ext in '' $ac_executable_extensions; do
1845 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1846 ac_cv_prog_CC="${ac_tool_prefix}cc"
1847 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1848 break 2
1849 fi
1850done
1851done
1852
1853fi
1854fi
1855CC=$ac_cv_prog_CC
1856if test -n "$CC"; then
1857 echo "$as_me:$LINENO: result: $CC" >&5
1858echo "${ECHO_T}$CC" >&6
1859else
1860 echo "$as_me:$LINENO: result: no" >&5
1861echo "${ECHO_T}no" >&6
1862fi
1863
1864fi
1865if test -z "$ac_cv_prog_CC"; then
1866 ac_ct_CC=$CC
1867 # Extract the first word of "cc", so it can be a program name with args.
1868set dummy cc; ac_word=$2
1869echo "$as_me:$LINENO: checking for $ac_word" >&5
1870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1871if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1872 echo $ECHO_N "(cached) $ECHO_C" >&6
1873else
1874 if test -n "$ac_ct_CC"; then
1875 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1876else
1877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1878for as_dir in $PATH
1879do
1880 IFS=$as_save_IFS
1881 test -z "$as_dir" && as_dir=.
1882 for ac_exec_ext in '' $ac_executable_extensions; do
1883 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1884 ac_cv_prog_ac_ct_CC="cc"
1885 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1886 break 2
1887 fi
1888done
1889done
1890
1891fi
1892fi
1893ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894if test -n "$ac_ct_CC"; then
1895 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1896echo "${ECHO_T}$ac_ct_CC" >&6
1897else
1898 echo "$as_me:$LINENO: result: no" >&5
1899echo "${ECHO_T}no" >&6
1900fi
1901
1902 CC=$ac_ct_CC
1903else
1904 CC="$ac_cv_prog_CC"
1905fi
1906
1907fi
1908if test -z "$CC"; then
1909 # Extract the first word of "cc", so it can be a program name with args.
1910set dummy cc; ac_word=$2
1911echo "$as_me:$LINENO: checking for $ac_word" >&5
1912echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1913if test "${ac_cv_prog_CC+set}" = set; then
1914 echo $ECHO_N "(cached) $ECHO_C" >&6
1915else
1916 if test -n "$CC"; then
1917 ac_cv_prog_CC="$CC" # Let the user override the test.
1918else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001919 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921for as_dir in $PATH
1922do
1923 IFS=$as_save_IFS
1924 test -z "$as_dir" && as_dir=.
1925 for ac_exec_ext in '' $ac_executable_extensions; do
1926 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1927 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1928 ac_prog_rejected=yes
1929 continue
1930 fi
1931 ac_cv_prog_CC="cc"
1932 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1933 break 2
1934 fi
1935done
1936done
1937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001938if test $ac_prog_rejected = yes; then
1939 # We found a bogon in the path, so make sure we never use it.
1940 set dummy $ac_cv_prog_CC
1941 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001942 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001943 # We chose a different compiler from the bogus one.
1944 # However, it has the same basename, so the bogon will be chosen
1945 # first if we set CC to just the basename; use the full file name.
1946 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001947 set dummy "$as_dir/$ac_word" ${1+"$@"}
1948 shift
1949 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950 fi
1951fi
1952fi
1953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001954CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001955if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 echo "$as_me:$LINENO: result: $CC" >&5
1957echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001958else
Martin v. Löwis11437992002-04-12 09:54:03 +00001959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001961fi
1962
Martin v. Löwis11437992002-04-12 09:54:03 +00001963fi
1964if test -z "$CC"; then
1965 if test -n "$ac_tool_prefix"; then
1966 for ac_prog in cl
1967 do
1968 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1969set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1970echo "$as_me:$LINENO: checking for $ac_word" >&5
1971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1972if test "${ac_cv_prog_CC+set}" = set; then
1973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001974else
1975 if test -n "$CC"; then
1976 ac_cv_prog_CC="$CC" # Let the user override the test.
1977else
Martin v. Löwis11437992002-04-12 09:54:03 +00001978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1979for as_dir in $PATH
1980do
1981 IFS=$as_save_IFS
1982 test -z "$as_dir" && as_dir=.
1983 for ac_exec_ext in '' $ac_executable_extensions; do
1984 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1985 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1986 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1987 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001989done
1990done
1991
1992fi
1993fi
1994CC=$ac_cv_prog_CC
1995if test -n "$CC"; then
1996 echo "$as_me:$LINENO: result: $CC" >&5
1997echo "${ECHO_T}$CC" >&6
1998else
1999 echo "$as_me:$LINENO: result: no" >&5
2000echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002001fi
2002
Martin v. Löwis11437992002-04-12 09:54:03 +00002003 test -n "$CC" && break
2004 done
2005fi
2006if test -z "$CC"; then
2007 ac_ct_CC=$CC
2008 for ac_prog in cl
2009do
2010 # Extract the first word of "$ac_prog", so it can be a program name with args.
2011set dummy $ac_prog; ac_word=$2
2012echo "$as_me:$LINENO: checking for $ac_word" >&5
2013echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2014if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2015 echo $ECHO_N "(cached) $ECHO_C" >&6
2016else
2017 if test -n "$ac_ct_CC"; then
2018 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2019else
2020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2021for as_dir in $PATH
2022do
2023 IFS=$as_save_IFS
2024 test -z "$as_dir" && as_dir=.
2025 for ac_exec_ext in '' $ac_executable_extensions; do
2026 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2027 ac_cv_prog_ac_ct_CC="$ac_prog"
2028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2029 break 2
2030 fi
2031done
2032done
Jack Jansendd19cf82001-12-06 22:36:17 +00002033
Martin v. Löwis11437992002-04-12 09:54:03 +00002034fi
2035fi
2036ac_ct_CC=$ac_cv_prog_ac_ct_CC
2037if test -n "$ac_ct_CC"; then
2038 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2039echo "${ECHO_T}$ac_ct_CC" >&6
2040else
2041 echo "$as_me:$LINENO: result: no" >&5
2042echo "${ECHO_T}no" >&6
2043fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002044
Martin v. Löwis11437992002-04-12 09:54:03 +00002045 test -n "$ac_ct_CC" && break
2046done
Michael W. Hudson54241132001-12-07 15:38:26 +00002047
Martin v. Löwis11437992002-04-12 09:54:03 +00002048 CC=$ac_ct_CC
2049fi
2050
2051fi
2052
2053
2054test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2055echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2056 { (exit 1); exit 1; }; }
2057
2058# Provide some information about the compiler.
2059echo "$as_me:$LINENO:" \
2060 "checking for C compiler version" >&5
2061ac_compiler=`set X $ac_compile; echo $2`
2062{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2063 (eval $ac_compiler --version </dev/null >&5) 2>&5
2064 ac_status=$?
2065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2066 (exit $ac_status); }
2067{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2068 (eval $ac_compiler -v </dev/null >&5) 2>&5
2069 ac_status=$?
2070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2071 (exit $ac_status); }
2072{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2073 (eval $ac_compiler -V </dev/null >&5) 2>&5
2074 ac_status=$?
2075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2076 (exit $ac_status); }
2077
2078cat >conftest.$ac_ext <<_ACEOF
2079#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002080#include "confdefs.h"
2081
Barry Warsawfe33b792003-01-07 22:42:49 +00002082#ifdef F77_DUMMY_MAIN
2083# ifdef __cplusplus
2084 extern "C"
2085# endif
2086 int F77_DUMMY_MAIN() { return 1; }
2087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002088int
2089main ()
2090{
2091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096ac_clean_files_save=$ac_clean_files
2097ac_clean_files="$ac_clean_files a.out a.exe"
2098# Try to create an executable without -o first, disregard a.out.
2099# It will help us diagnose broken compilers, and finding out an intuition
2100# of exeext.
2101echo "$as_me:$LINENO: checking for C compiler default output" >&5
2102echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2103ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2104if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2105 (eval $ac_link_default) 2>&5
2106 ac_status=$?
2107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2108 (exit $ac_status); }; then
2109 # Find the output, starting from the most likely. This scheme is
2110# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2111# resort.
2112
2113# Be careful to initialize this variable, since it used to be cached.
2114# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2115ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002116for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2117 ls a.out conftest 2>/dev/null;
2118 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002119 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002120 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 a.out ) # We found the default executable, but exeext='' is most
2122 # certainly right.
2123 break;;
2124 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2125 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2126 export ac_cv_exeext
2127 break;;
2128 * ) break;;
2129 esac
2130done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002131else
Martin v. Löwis11437992002-04-12 09:54:03 +00002132 echo "$as_me: failed program was:" >&5
2133cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002134{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2135echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002137fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002138
Martin v. Löwis11437992002-04-12 09:54:03 +00002139ac_exeext=$ac_cv_exeext
2140echo "$as_me:$LINENO: result: $ac_file" >&5
2141echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002142
Martin v. Löwis11437992002-04-12 09:54:03 +00002143# Check the compiler produces executables we can run. If not, either
2144# the compiler is broken, or we cross compile.
2145echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2146echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2147# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2148# If not cross compiling, check that we can run a simple program.
2149if test "$cross_compiling" != yes; then
2150 if { ac_try='./$ac_file'
2151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2152 (eval $ac_try) 2>&5
2153 ac_status=$?
2154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2155 (exit $ac_status); }; }; then
2156 cross_compiling=no
2157 else
2158 if test "$cross_compiling" = maybe; then
2159 cross_compiling=yes
2160 else
2161 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2162If you meant to cross compile, use \`--host'." >&5
2163echo "$as_me: error: cannot run C compiled programs.
2164If you meant to cross compile, use \`--host'." >&2;}
2165 { (exit 1); exit 1; }; }
2166 fi
2167 fi
2168fi
2169echo "$as_me:$LINENO: result: yes" >&5
2170echo "${ECHO_T}yes" >&6
2171
2172rm -f a.out a.exe conftest$ac_cv_exeext
2173ac_clean_files=$ac_clean_files_save
2174# Check the compiler produces executables we can run. If not, either
2175# the compiler is broken, or we cross compile.
2176echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2177echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2178echo "$as_me:$LINENO: result: $cross_compiling" >&5
2179echo "${ECHO_T}$cross_compiling" >&6
2180
2181echo "$as_me:$LINENO: checking for suffix of executables" >&5
2182echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2183if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2184 (eval $ac_link) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }; then
2188 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2189# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2190# work properly (i.e., refer to `conftest.exe'), while it won't with
2191# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002192for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002193 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002194 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002195 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2196 export ac_cv_exeext
2197 break;;
2198 * ) break;;
2199 esac
2200done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002201else
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2203echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2204 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002205fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002206
Martin v. Löwis11437992002-04-12 09:54:03 +00002207rm -f conftest$ac_cv_exeext
2208echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2209echo "${ECHO_T}$ac_cv_exeext" >&6
2210
2211rm -f conftest.$ac_ext
2212EXEEXT=$ac_cv_exeext
2213ac_exeext=$EXEEXT
2214echo "$as_me:$LINENO: checking for suffix of object files" >&5
2215echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2216if test "${ac_cv_objext+set}" = set; then
2217 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002218else
Martin v. Löwis11437992002-04-12 09:54:03 +00002219 cat >conftest.$ac_ext <<_ACEOF
2220#line $LINENO "configure"
2221#include "confdefs.h"
2222
Barry Warsawfe33b792003-01-07 22:42:49 +00002223#ifdef F77_DUMMY_MAIN
2224# ifdef __cplusplus
2225 extern "C"
2226# endif
2227 int F77_DUMMY_MAIN() { return 1; }
2228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002229int
2230main ()
2231{
2232
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237rm -f conftest.o conftest.obj
2238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2239 (eval $ac_compile) 2>&5
2240 ac_status=$?
2241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2242 (exit $ac_status); }; then
2243 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2244 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002245 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002246 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2247 break;;
2248 esac
2249done
2250else
2251 echo "$as_me: failed program was:" >&5
2252cat conftest.$ac_ext >&5
2253{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2254echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2255 { (exit 1); exit 1; }; }
2256fi
2257
2258rm -f conftest.$ac_cv_objext conftest.$ac_ext
2259fi
2260echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2261echo "${ECHO_T}$ac_cv_objext" >&6
2262OBJEXT=$ac_cv_objext
2263ac_objext=$OBJEXT
2264echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2265echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2266if test "${ac_cv_c_compiler_gnu+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2268else
2269 cat >conftest.$ac_ext <<_ACEOF
2270#line $LINENO "configure"
2271#include "confdefs.h"
2272
Barry Warsawfe33b792003-01-07 22:42:49 +00002273#ifdef F77_DUMMY_MAIN
2274# ifdef __cplusplus
2275 extern "C"
2276# endif
2277 int F77_DUMMY_MAIN() { return 1; }
2278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002279int
2280main ()
2281{
2282#ifndef __GNUC__
2283 choke me
2284#endif
2285
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290rm -f conftest.$ac_objext
2291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2292 (eval $ac_compile) 2>&5
2293 ac_status=$?
2294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295 (exit $ac_status); } &&
2296 { ac_try='test -s conftest.$ac_objext'
2297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2298 (eval $ac_try) 2>&5
2299 ac_status=$?
2300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2301 (exit $ac_status); }; }; then
2302 ac_compiler_gnu=yes
2303else
2304 echo "$as_me: failed program was:" >&5
2305cat conftest.$ac_ext >&5
2306ac_compiler_gnu=no
2307fi
2308rm -f conftest.$ac_objext conftest.$ac_ext
2309ac_cv_c_compiler_gnu=$ac_compiler_gnu
2310
2311fi
2312echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2313echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2314GCC=`test $ac_compiler_gnu = yes && echo yes`
2315ac_test_CFLAGS=${CFLAGS+set}
2316ac_save_CFLAGS=$CFLAGS
2317CFLAGS="-g"
2318echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2319echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2320if test "${ac_cv_prog_cc_g+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
2322else
2323 cat >conftest.$ac_ext <<_ACEOF
2324#line $LINENO "configure"
2325#include "confdefs.h"
2326
Barry Warsawfe33b792003-01-07 22:42:49 +00002327#ifdef F77_DUMMY_MAIN
2328# ifdef __cplusplus
2329 extern "C"
2330# endif
2331 int F77_DUMMY_MAIN() { return 1; }
2332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002333int
2334main ()
2335{
2336
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341rm -f conftest.$ac_objext
2342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2343 (eval $ac_compile) 2>&5
2344 ac_status=$?
2345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2346 (exit $ac_status); } &&
2347 { ac_try='test -s conftest.$ac_objext'
2348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2349 (eval $ac_try) 2>&5
2350 ac_status=$?
2351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2352 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002353 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355 echo "$as_me: failed program was:" >&5
2356cat conftest.$ac_ext >&5
2357ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002359rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002360fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002361echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2362echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002363if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002365elif test $ac_cv_prog_cc_g = yes; then
2366 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002367 CFLAGS="-g -O2"
2368 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002369 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370 fi
2371else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002372 if test "$GCC" = yes; then
2373 CFLAGS="-O2"
2374 else
2375 CFLAGS=
2376 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002378# Some people use a C++ compiler to compile C. Since we use `exit',
2379# in C++ we need to declare it. In case someone uses the same compiler
2380# for both compiling C and C++ we need to have the C++ compiler decide
2381# the declaration of exit, since it's the most demanding environment.
2382cat >conftest.$ac_ext <<_ACEOF
2383#ifndef __cplusplus
2384 choke me
2385#endif
2386_ACEOF
2387rm -f conftest.$ac_objext
2388if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2389 (eval $ac_compile) 2>&5
2390 ac_status=$?
2391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2392 (exit $ac_status); } &&
2393 { ac_try='test -s conftest.$ac_objext'
2394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395 (eval $ac_try) 2>&5
2396 ac_status=$?
2397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398 (exit $ac_status); }; }; then
2399 for ac_declaration in \
2400 ''\
2401 '#include <stdlib.h>' \
2402 'extern "C" void std::exit (int) throw (); using std::exit;' \
2403 'extern "C" void std::exit (int); using std::exit;' \
2404 'extern "C" void exit (int) throw ();' \
2405 'extern "C" void exit (int);' \
2406 'void exit (int);'
2407do
2408 cat >conftest.$ac_ext <<_ACEOF
2409#line $LINENO "configure"
2410#include "confdefs.h"
2411#include <stdlib.h>
2412$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002413#ifdef F77_DUMMY_MAIN
2414# ifdef __cplusplus
2415 extern "C"
2416# endif
2417 int F77_DUMMY_MAIN() { return 1; }
2418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002419int
2420main ()
2421{
2422exit (42);
2423 ;
2424 return 0;
2425}
2426_ACEOF
2427rm -f conftest.$ac_objext
2428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2429 (eval $ac_compile) 2>&5
2430 ac_status=$?
2431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2432 (exit $ac_status); } &&
2433 { ac_try='test -s conftest.$ac_objext'
2434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2435 (eval $ac_try) 2>&5
2436 ac_status=$?
2437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2438 (exit $ac_status); }; }; then
2439 :
2440else
2441 echo "$as_me: failed program was:" >&5
2442cat conftest.$ac_ext >&5
2443continue
2444fi
2445rm -f conftest.$ac_objext conftest.$ac_ext
2446 cat >conftest.$ac_ext <<_ACEOF
2447#line $LINENO "configure"
2448#include "confdefs.h"
2449$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002450#ifdef F77_DUMMY_MAIN
2451# ifdef __cplusplus
2452 extern "C"
2453# endif
2454 int F77_DUMMY_MAIN() { return 1; }
2455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002456int
2457main ()
2458{
2459exit (42);
2460 ;
2461 return 0;
2462}
2463_ACEOF
2464rm -f conftest.$ac_objext
2465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2466 (eval $ac_compile) 2>&5
2467 ac_status=$?
2468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469 (exit $ac_status); } &&
2470 { ac_try='test -s conftest.$ac_objext'
2471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2472 (eval $ac_try) 2>&5
2473 ac_status=$?
2474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2475 (exit $ac_status); }; }; then
2476 break
2477else
2478 echo "$as_me: failed program was:" >&5
2479cat conftest.$ac_ext >&5
2480fi
2481rm -f conftest.$ac_objext conftest.$ac_ext
2482done
2483rm -f conftest*
2484if test -n "$ac_declaration"; then
2485 echo '#ifdef __cplusplus' >>confdefs.h
2486 echo $ac_declaration >>confdefs.h
2487 echo '#endif' >>confdefs.h
2488fi
2489
2490else
2491 echo "$as_me: failed program was:" >&5
2492cat conftest.$ac_ext >&5
2493fi
2494rm -f conftest.$ac_objext conftest.$ac_ext
2495ac_ext=c
2496ac_cpp='$CPP $CPPFLAGS'
2497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2499ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002500
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002501
2502# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504ac_ext=c
2505ac_cpp='$CPP $CPPFLAGS'
2506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2508ac_compiler_gnu=$ac_cv_c_compiler_gnu
2509echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2510echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002511# On Suns, sometimes $CPP names a directory.
2512if test -n "$CPP" && test -d "$CPP"; then
2513 CPP=
2514fi
2515if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test "${ac_cv_prog_CPP+set}" = set; then
2517 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002518else
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 # Double quotes because CPP needs to be expanded
2520 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2521 do
2522 ac_preproc_ok=false
2523for ac_c_preproc_warn_flag in '' yes
2524do
2525 # Use a header file that comes with gcc, so configuring glibc
2526 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002527 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 # not just through cpp. "Syntax error" is here to catch this case.
2529 cat >conftest.$ac_ext <<_ACEOF
2530#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002531#include "confdefs.h"
2532#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 Syntax error
2534_ACEOF
2535if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2536 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2537 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002538 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 rm -f conftest.er1
2540 cat conftest.err >&5
2541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2542 (exit $ac_status); } >/dev/null; then
2543 if test -s conftest.err; then
2544 ac_cpp_err=$ac_c_preproc_warn_flag
2545 else
2546 ac_cpp_err=
2547 fi
2548else
2549 ac_cpp_err=yes
2550fi
2551if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002552 :
2553else
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002555 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 # Broken: fails on valid input.
2557continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002559rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 # OK, works on sane cases. Now check whether non-existent headers
2562 # can be detected and how.
2563 cat >conftest.$ac_ext <<_ACEOF
2564#line $LINENO "configure"
2565#include "confdefs.h"
2566#include <ac_nonexistent.h>
2567_ACEOF
2568if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2569 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2570 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002571 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 rm -f conftest.er1
2573 cat conftest.err >&5
2574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2575 (exit $ac_status); } >/dev/null; then
2576 if test -s conftest.err; then
2577 ac_cpp_err=$ac_c_preproc_warn_flag
2578 else
2579 ac_cpp_err=
2580 fi
2581else
2582 ac_cpp_err=yes
2583fi
2584if test -z "$ac_cpp_err"; then
2585 # Broken: success on invalid input.
2586continue
2587else
2588 echo "$as_me: failed program was:" >&5
2589 cat conftest.$ac_ext >&5
2590 # Passes both tests.
2591ac_preproc_ok=:
2592break
2593fi
2594rm -f conftest.err conftest.$ac_ext
2595
2596done
2597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2598rm -f conftest.err conftest.$ac_ext
2599if $ac_preproc_ok; then
2600 break
2601fi
2602
2603 done
2604 ac_cv_prog_CPP=$CPP
2605
2606fi
2607 CPP=$ac_cv_prog_CPP
2608else
2609 ac_cv_prog_CPP=$CPP
2610fi
2611echo "$as_me:$LINENO: result: $CPP" >&5
2612echo "${ECHO_T}$CPP" >&6
2613ac_preproc_ok=false
2614for ac_c_preproc_warn_flag in '' yes
2615do
2616 # Use a header file that comes with gcc, so configuring glibc
2617 # with a fresh cross-compiler works.
2618 # On the NeXT, cc -E runs the code through the compiler's parser,
2619 # not just through cpp. "Syntax error" is here to catch this case.
2620 cat >conftest.$ac_ext <<_ACEOF
2621#line $LINENO "configure"
2622#include "confdefs.h"
2623#include <assert.h>
2624 Syntax error
2625_ACEOF
2626if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2627 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2628 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002629 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 rm -f conftest.er1
2631 cat conftest.err >&5
2632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633 (exit $ac_status); } >/dev/null; then
2634 if test -s conftest.err; then
2635 ac_cpp_err=$ac_c_preproc_warn_flag
2636 else
2637 ac_cpp_err=
2638 fi
2639else
2640 ac_cpp_err=yes
2641fi
2642if test -z "$ac_cpp_err"; then
2643 :
2644else
2645 echo "$as_me: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 # Broken: fails on valid input.
2648continue
2649fi
2650rm -f conftest.err conftest.$ac_ext
2651
2652 # OK, works on sane cases. Now check whether non-existent headers
2653 # can be detected and how.
2654 cat >conftest.$ac_ext <<_ACEOF
2655#line $LINENO "configure"
2656#include "confdefs.h"
2657#include <ac_nonexistent.h>
2658_ACEOF
2659if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2660 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2661 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002662 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 rm -f conftest.er1
2664 cat conftest.err >&5
2665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2666 (exit $ac_status); } >/dev/null; then
2667 if test -s conftest.err; then
2668 ac_cpp_err=$ac_c_preproc_warn_flag
2669 else
2670 ac_cpp_err=
2671 fi
2672else
2673 ac_cpp_err=yes
2674fi
2675if test -z "$ac_cpp_err"; then
2676 # Broken: success on invalid input.
2677continue
2678else
2679 echo "$as_me: failed program was:" >&5
2680 cat conftest.$ac_ext >&5
2681 # Passes both tests.
2682ac_preproc_ok=:
2683break
2684fi
2685rm -f conftest.err conftest.$ac_ext
2686
2687done
2688# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2689rm -f conftest.err conftest.$ac_ext
2690if $ac_preproc_ok; then
2691 :
2692else
2693 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2694echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2695 { (exit 1); exit 1; }; }
2696fi
2697
2698ac_ext=c
2699ac_cpp='$CPP $CPPFLAGS'
2700ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2701ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2702ac_compiler_gnu=$ac_cv_c_compiler_gnu
2703
2704
2705
2706echo "$as_me:$LINENO: checking for AIX" >&5
2707echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2708cat >conftest.$ac_ext <<_ACEOF
2709#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002710#include "confdefs.h"
2711#ifdef _AIX
2712 yes
2713#endif
2714
Martin v. Löwis11437992002-04-12 09:54:03 +00002715_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002717 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 echo "$as_me:$LINENO: result: yes" >&5
2719echo "${ECHO_T}yes" >&6
2720cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002721#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002722_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002723
2724else
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 echo "$as_me:$LINENO: result: no" >&5
2726echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002727fi
2728rm -f conftest*
2729
Michael W. Hudson54241132001-12-07 15:38:26 +00002730
Martin v. Löwis11437992002-04-12 09:54:03 +00002731echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2732echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2733if test "${ac_cv_header_stdc+set}" = set; then
2734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002735else
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 cat >conftest.$ac_ext <<_ACEOF
2737#line $LINENO "configure"
2738#include "confdefs.h"
2739#include <stdlib.h>
2740#include <stdarg.h>
2741#include <string.h>
2742#include <float.h>
2743
2744_ACEOF
2745if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2746 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2747 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002748 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 rm -f conftest.er1
2750 cat conftest.err >&5
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); } >/dev/null; then
2753 if test -s conftest.err; then
2754 ac_cpp_err=$ac_c_preproc_warn_flag
2755 else
2756 ac_cpp_err=
2757 fi
2758else
2759 ac_cpp_err=yes
2760fi
2761if test -z "$ac_cpp_err"; then
2762 ac_cv_header_stdc=yes
2763else
2764 echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_header_stdc=no
2767fi
2768rm -f conftest.err conftest.$ac_ext
2769
2770if test $ac_cv_header_stdc = yes; then
2771 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2772 cat >conftest.$ac_ext <<_ACEOF
2773#line $LINENO "configure"
2774#include "confdefs.h"
2775#include <string.h>
2776
2777_ACEOF
2778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002779 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 :
2781else
2782 ac_cv_header_stdc=no
2783fi
2784rm -f conftest*
2785
2786fi
2787
2788if test $ac_cv_header_stdc = yes; then
2789 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2790 cat >conftest.$ac_ext <<_ACEOF
2791#line $LINENO "configure"
2792#include "confdefs.h"
2793#include <stdlib.h>
2794
2795_ACEOF
2796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002797 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 :
2799else
2800 ac_cv_header_stdc=no
2801fi
2802rm -f conftest*
2803
2804fi
2805
2806if test $ac_cv_header_stdc = yes; then
2807 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2808 if test "$cross_compiling" = yes; then
2809 :
2810else
2811 cat >conftest.$ac_ext <<_ACEOF
2812#line $LINENO "configure"
2813#include "confdefs.h"
2814#include <ctype.h>
2815#if ((' ' & 0x0FF) == 0x020)
2816# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2817# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2818#else
2819# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2820 || ('j' <= (c) && (c) <= 'r') \
2821 || ('s' <= (c) && (c) <= 'z'))
2822# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2823#endif
2824
2825#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2826int
2827main ()
2828{
2829 int i;
2830 for (i = 0; i < 256; i++)
2831 if (XOR (islower (i), ISLOWER (i))
2832 || toupper (i) != TOUPPER (i))
2833 exit(2);
2834 exit (0);
2835}
2836_ACEOF
2837rm -f conftest$ac_exeext
2838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2839 (eval $ac_link) 2>&5
2840 ac_status=$?
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2844 (eval $ac_try) 2>&5
2845 ac_status=$?
2846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2847 (exit $ac_status); }; }; then
2848 :
2849else
2850 echo "$as_me: program exited with status $ac_status" >&5
2851echo "$as_me: failed program was:" >&5
2852cat conftest.$ac_ext >&5
2853( exit $ac_status )
2854ac_cv_header_stdc=no
2855fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002856rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002857fi
2858fi
2859fi
2860echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2861echo "${ECHO_T}$ac_cv_header_stdc" >&6
2862if test $ac_cv_header_stdc = yes; then
2863
2864cat >>confdefs.h <<\_ACEOF
2865#define STDC_HEADERS 1
2866_ACEOF
2867
2868fi
2869
2870# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2881 inttypes.h stdint.h unistd.h
2882do
2883as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2884echo "$as_me:$LINENO: checking for $ac_header" >&5
2885echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2886if eval "test \"\${$as_ac_Header+set}\" = set"; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
2888else
2889 cat >conftest.$ac_ext <<_ACEOF
2890#line $LINENO "configure"
2891#include "confdefs.h"
2892$ac_includes_default
2893
2894#include <$ac_header>
2895_ACEOF
2896rm -f conftest.$ac_objext
2897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2898 (eval $ac_compile) 2>&5
2899 ac_status=$?
2900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2901 (exit $ac_status); } &&
2902 { ac_try='test -s conftest.$ac_objext'
2903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2904 (eval $ac_try) 2>&5
2905 ac_status=$?
2906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2907 (exit $ac_status); }; }; then
2908 eval "$as_ac_Header=yes"
2909else
2910 echo "$as_me: failed program was:" >&5
2911cat conftest.$ac_ext >&5
2912eval "$as_ac_Header=no"
2913fi
2914rm -f conftest.$ac_objext conftest.$ac_ext
2915fi
2916echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2917echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2918if test `eval echo '${'$as_ac_Header'}'` = yes; then
2919 cat >>confdefs.h <<_ACEOF
2920#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2921_ACEOF
2922
2923fi
2924
2925done
2926
2927
2928if test "${ac_cv_header_minix_config_h+set}" = set; then
2929 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2930echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2931if test "${ac_cv_header_minix_config_h+set}" = set; then
2932 echo $ECHO_N "(cached) $ECHO_C" >&6
2933fi
2934echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2935echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2936else
2937 # Is the header compilable?
2938echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2939echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2940cat >conftest.$ac_ext <<_ACEOF
2941#line $LINENO "configure"
2942#include "confdefs.h"
2943$ac_includes_default
2944#include <minix/config.h>
2945_ACEOF
2946rm -f conftest.$ac_objext
2947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2948 (eval $ac_compile) 2>&5
2949 ac_status=$?
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } &&
2952 { ac_try='test -s conftest.$ac_objext'
2953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2954 (eval $ac_try) 2>&5
2955 ac_status=$?
2956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2957 (exit $ac_status); }; }; then
2958 ac_header_compiler=yes
2959else
2960 echo "$as_me: failed program was:" >&5
2961cat conftest.$ac_ext >&5
2962ac_header_compiler=no
2963fi
2964rm -f conftest.$ac_objext conftest.$ac_ext
2965echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2966echo "${ECHO_T}$ac_header_compiler" >&6
2967
2968# Is the header present?
2969echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2970echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2971cat >conftest.$ac_ext <<_ACEOF
2972#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002973#include "confdefs.h"
2974#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002975_ACEOF
2976if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2977 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2978 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002979 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002980 rm -f conftest.er1
2981 cat conftest.err >&5
2982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983 (exit $ac_status); } >/dev/null; then
2984 if test -s conftest.err; then
2985 ac_cpp_err=$ac_c_preproc_warn_flag
2986 else
2987 ac_cpp_err=
2988 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002989else
Martin v. Löwis11437992002-04-12 09:54:03 +00002990 ac_cpp_err=yes
2991fi
2992if test -z "$ac_cpp_err"; then
2993 ac_header_preproc=yes
2994else
2995 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002996 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002999rm -f conftest.err conftest.$ac_ext
3000echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3001echo "${ECHO_T}$ac_header_preproc" >&6
3002
3003# So? What about this header?
3004case $ac_header_compiler:$ac_header_preproc in
3005 yes:no )
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3007echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3008 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3009echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3010 no:yes )
3011 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3012echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3013 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3014echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3015 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3016echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3017esac
3018echo "$as_me:$LINENO: checking for minix/config.h" >&5
3019echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3020if test "${ac_cv_header_minix_config_h+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3022else
3023 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003025echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3026echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3027
3028fi
3029if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003030 MINIX=yes
3031else
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003033fi
3034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003036if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
3038cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003039#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003040_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003041
Martin v. Löwis11437992002-04-12 09:54:03 +00003042
3043cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003044#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003045_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003046
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
3048cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003049#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003050_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003051
3052fi
3053
3054
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003055# Check for unsupported systems
3056case $ac_sys_system/$ac_sys_release in
3057SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3058 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3059 echo See README for details.
3060 exit 1;;
3061esac
3062
3063if test "$MINIX" = yes; then
3064 echo This system \(MINIX\) is no longer supported.
3065 echo Read README for details.
3066 exit 1
3067fi
3068
Michael W. Hudson54241132001-12-07 15:38:26 +00003069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070echo "$as_me:$LINENO: checking for --with-suffix" >&5
3071echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003072
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003073# Check whether --with-suffix or --without-suffix was given.
3074if test "${with_suffix+set}" = set; then
3075 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003076
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003077 case $withval in
3078 no) EXEEXT=;;
3079 yes) EXEEXT=.exe;;
3080 *) EXEEXT=$withval;;
3081 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003082fi;
3083echo "$as_me:$LINENO: result: $EXEEXT" >&5
3084echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003085
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003086# Test whether we're running on a non-case-sensitive system, in which
3087# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003088
Martin v. Löwis11437992002-04-12 09:54:03 +00003089echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3090echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003091if test ! -d CaseSensitiveTestDir; then
3092mkdir CaseSensitiveTestDir
3093fi
3094
3095if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003096then
Martin v. Löwis11437992002-04-12 09:54:03 +00003097 echo "$as_me:$LINENO: result: yes" >&5
3098echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003099 BUILDEXEEXT=.exe
3100else
Martin v. Löwis11437992002-04-12 09:54:03 +00003101 echo "$as_me:$LINENO: result: no" >&5
3102echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003103 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003104fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003105rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003106
Guido van Rossumdd997f71998-10-07 19:58:26 +00003107case $MACHDEP in
3108bsdos*)
3109 case $CC in
3110 gcc) CC="$CC -D_HAVE_BSDI";;
3111 esac;;
3112esac
3113
Guido van Rossum24b1e751997-08-21 02:29:16 +00003114case $ac_sys_system in
3115hp*|HP*)
3116 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003117 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003118 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003119Monterey*)
3120 case $CC in
3121 cc) CC="$CC -Wl,-Bexport";;
3122 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003123SunOS*)
3124 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003125
3126cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003127#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003128_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003129
3130 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003131esac
3132
Michael W. Hudson54241132001-12-07 15:38:26 +00003133
3134
Martin v. Löwis11437992002-04-12 09:54:03 +00003135echo "$as_me:$LINENO: checking LIBRARY" >&5
3136echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003137if test -z "$LIBRARY"
3138then
3139 LIBRARY='libpython$(VERSION).a'
3140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003141echo "$as_me:$LINENO: result: $LIBRARY" >&5
3142echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003143
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003144# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003145# name of the library into which to insert object files). BLDLIBRARY is also
3146# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3147# is blank as the main program is not linked directly against LDLIBRARY.
3148# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3149# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3150# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3151# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003152#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003153# RUNSHARED is used to run shared python without installed libraries
3154#
3155# INSTSONAME is the name of the shared library that will be use to install
3156# on the system - some systems like version suffix, others don't
3157
3158
Michael W. Hudson54241132001-12-07 15:38:26 +00003159
3160
3161
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003162
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003163LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003164BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003165INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003166DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003167LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003168RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003169
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003170# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003171# If CXX is set, and if it is needed to link a main function that was
3172# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3173# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003174# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003175# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003176
Martin v. Löwis11437992002-04-12 09:54:03 +00003177echo "$as_me:$LINENO: checking LINKCC" >&5
3178echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003179if test -z "$LINKCC"
3180then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003181 if test -z "$CXX"; then
3182 LINKCC="\$(PURIFY) \$(CC)"
3183 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003184 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003185 $CXX -c conftest.$ac_ext 2>&5
3186 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3187 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3188 then
3189 LINKCC="\$(PURIFY) \$(CC)"
3190 else
3191 LINKCC="\$(PURIFY) \$(CXX)"
3192 fi
3193 rm -fr conftest*
3194 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003195 case $ac_sys_system in
3196 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003197 exp_extra="\"\""
3198 if test $ac_sys_release -ge 5 -o \
3199 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3200 exp_extra="."
3201 fi
3202 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003203 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003204 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003205 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003206 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003207 esac
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209echo "$as_me:$LINENO: result: $LINKCC" >&5
3210echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212echo "$as_me:$LINENO: checking for --enable-shared" >&5
3213echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214# Check whether --enable-shared or --disable-shared was given.
3215if test "${enable_shared+set}" = set; then
3216 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003219
3220if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003221then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003222 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003223 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003224 enable_shared="yes";;
3225 *)
3226 enable_shared="no";;
3227 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003229echo "$as_me:$LINENO: result: $enable_shared" >&5
3230echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003231
3232
Martin v. Löwis11437992002-04-12 09:54:03 +00003233echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3234echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003235
Guido van Rossumb8552162001-09-05 14:58:11 +00003236# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3237# library that we build, but we do not want to link against it (we
3238# will find it with a -framework option). For this reason there is an
3239# extra variable BLDLIBRARY against which Python and the extension
3240# modules are linked, BLDLIBRARY. This is normally the same as
3241# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003242if test "$enable_framework"
3243then
3244 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3245 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3246 BLDLIBRARY=''
3247else
3248 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
Jack Jansene578a632001-08-15 01:27:14 +00003250
Martin v. Löwis1142de32002-03-29 16:28:31 +00003251# Other platforms follow
3252if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003253
3254cat >>confdefs.h <<\_ACEOF
3255#define Py_ENABLE_SHARED 1
3256_ACEOF
3257
Martin v. Löwis1142de32002-03-29 16:28:31 +00003258 case $ac_sys_system in
3259 BeOS*)
3260 LDLIBRARY='libpython$(VERSION).so'
3261 ;;
3262 CYGWIN*)
3263 LDLIBRARY='libpython$(VERSION).dll.a'
3264 DLLLIBRARY='libpython$(VERSION).dll'
3265 ;;
3266 SunOS*)
3267 LDLIBRARY='libpython$(VERSION).so'
3268 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3269 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3270 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003271 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003272 LDLIBRARY='libpython$(VERSION).so'
3273 BLDLIBRARY='-L. -lpython$(VERSION)'
3274 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3275 INSTSONAME="$LDLIBRARY".$SOVERSION
3276 ;;
3277 hp*|HP*)
3278 LDLIBRARY='libpython$(VERSION).sl'
3279 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3280 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3281 ;;
3282 OSF*)
3283 LDLIBRARY='libpython$(VERSION).so'
3284 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3285 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3286 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003287 atheos*)
3288 LDLIBRARY='libpython$(VERSION).so'
3289 BLDLIBRARY='-L. -lpython$(VERSION)'
3290 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3291 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003292 esac
3293 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3294 case $MACHDEP in
3295 dguxR4)
3296 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003297 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003298 ;;
3299 esac
3300fi
3301
Martin v. Löwis11437992002-04-12 09:54:03 +00003302echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3303echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305if test -n "$ac_tool_prefix"; then
3306 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3307set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3308echo "$as_me:$LINENO: checking for $ac_word" >&5
3309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3310if test "${ac_cv_prog_RANLIB+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003312else
3313 if test -n "$RANLIB"; then
3314 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3315else
Martin v. Löwis11437992002-04-12 09:54:03 +00003316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in $PATH
3318do
3319 IFS=$as_save_IFS
3320 test -z "$as_dir" && as_dir=.
3321 for ac_exec_ext in '' $ac_executable_extensions; do
3322 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3323 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3325 break 2
3326 fi
3327done
3328done
3329
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003332RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003334 echo "$as_me:$LINENO: result: $RANLIB" >&5
3335echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
Martin v. Löwis11437992002-04-12 09:54:03 +00003337 echo "$as_me:$LINENO: result: no" >&5
3338echo "${ECHO_T}no" >&6
3339fi
3340
3341fi
3342if test -z "$ac_cv_prog_RANLIB"; then
3343 ac_ct_RANLIB=$RANLIB
3344 # Extract the first word of "ranlib", so it can be a program name with args.
3345set dummy ranlib; ac_word=$2
3346echo "$as_me:$LINENO: checking for $ac_word" >&5
3347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3350else
3351 if test -n "$ac_ct_RANLIB"; then
3352 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3353else
3354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
3359 for ac_exec_ext in '' $ac_executable_extensions; do
3360 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3361 ac_cv_prog_ac_ct_RANLIB="ranlib"
3362 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3363 break 2
3364 fi
3365done
3366done
3367
3368 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3369fi
3370fi
3371ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3372if test -n "$ac_ct_RANLIB"; then
3373 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3374echo "${ECHO_T}$ac_ct_RANLIB" >&6
3375else
3376 echo "$as_me:$LINENO: result: no" >&5
3377echo "${ECHO_T}no" >&6
3378fi
3379
3380 RANLIB=$ac_ct_RANLIB
3381else
3382 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003383fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384
3385
Guido van Rossum7f43da71994-08-01 12:15:30 +00003386for ac_prog in ar aal
3387do
Martin v. Löwis11437992002-04-12 09:54:03 +00003388 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003390echo "$as_me:$LINENO: checking for $ac_word" >&5
3391echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3392if test "${ac_cv_prog_AR+set}" = set; then
3393 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003394else
3395 if test -n "$AR"; then
3396 ac_cv_prog_AR="$AR" # Let the user override the test.
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3399for as_dir in $PATH
3400do
3401 IFS=$as_save_IFS
3402 test -z "$as_dir" && as_dir=.
3403 for ac_exec_ext in '' $ac_executable_extensions; do
3404 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3405 ac_cv_prog_AR="$ac_prog"
3406 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3407 break 2
3408 fi
3409done
3410done
3411
Guido van Rossum7f43da71994-08-01 12:15:30 +00003412fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003413fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003414AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 echo "$as_me:$LINENO: result: $AR" >&5
3417echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418else
Martin v. Löwis11437992002-04-12 09:54:03 +00003419 echo "$as_me:$LINENO: result: no" >&5
3420echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003422
Martin v. Löwis11437992002-04-12 09:54:03 +00003423 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003424done
3425test -n "$AR" || AR="ar"
3426
Michael W. Hudson54241132001-12-07 15:38:26 +00003427
Neil Schemenauera42c8272001-03-31 00:01:55 +00003428case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003429bsdos*|hp*|HP*)
3430 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003431 if test -z "$INSTALL"
3432 then
3433 INSTALL="${srcdir}/install-sh -c"
3434 fi
3435esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003436ac_aux_dir=
3437for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3438 if test -f $ac_dir/install-sh; then
3439 ac_aux_dir=$ac_dir
3440 ac_install_sh="$ac_aux_dir/install-sh -c"
3441 break
3442 elif test -f $ac_dir/install.sh; then
3443 ac_aux_dir=$ac_dir
3444 ac_install_sh="$ac_aux_dir/install.sh -c"
3445 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 elif test -f $ac_dir/shtool; then
3447 ac_aux_dir=$ac_dir
3448 ac_install_sh="$ac_aux_dir/shtool install -c"
3449 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003450 fi
3451done
3452if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3454echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3455 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003456fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003457ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3458ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3459ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003460
3461# Find a good install program. We prefer a C program (faster),
3462# so one script is as good as another. But avoid the broken or
3463# incompatible versions:
3464# SysV /etc/install, /usr/sbin/install
3465# SunOS /usr/etc/install
3466# IRIX /sbin/install
3467# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003468# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003469# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3470# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3471# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3472# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003473echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3474echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003475if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003476if test "${ac_cv_path_install+set}" = set; then
3477 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003478else
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480for as_dir in $PATH
3481do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
3484 # Account for people who put trailing slashes in PATH elements.
3485case $as_dir/ in
3486 ./ | .// | /cC/* | \
3487 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3488 /usr/ucb/* ) ;;
3489 *)
3490 # OSF1 and SCO ODT 3.0 have their own names for install.
3491 # Don't use installbsd from OSF since it installs stuff as root
3492 # by default.
3493 for ac_prog in ginstall scoinst install; do
3494 for ac_exec_ext in '' $ac_executable_extensions; do
3495 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3496 if test $ac_prog = install &&
3497 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3498 # AIX install. It has an incompatible calling convention.
3499 :
3500 elif test $ac_prog = install &&
3501 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3502 # program-specific install script used by HP pwplus--don't use.
3503 :
3504 else
3505 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3506 break 3
3507 fi
3508 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003509 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 done
3511 ;;
3512esac
3513done
3514
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003515
3516fi
3517 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003519 else
3520 # As a last resort, use the slow shell script. We don't cache a
3521 # path for INSTALL within a source directory, because that will
3522 # break other packages using the cache if that directory is
3523 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003525 fi
3526fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003527echo "$as_me:$LINENO: result: $INSTALL" >&5
3528echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529
3530# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3531# It thinks the first close brace ends the variable substitution.
3532test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003535
3536test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3537
Michael W. Hudson54241132001-12-07 15:38:26 +00003538
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003539# Not every filesystem supports hard links
3540
3541if test -z "$LN" ; then
3542 case $ac_sys_system in
3543 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003544 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003545 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003546 *) LN=ln;;
3547 esac
3548fi
3549
Fred Drake109d9862001-07-11 06:27:56 +00003550# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003551echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3552echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3553
Fred Drake109d9862001-07-11 06:27:56 +00003554# Check whether --with-pydebug or --without-pydebug was given.
3555if test "${with_pydebug+set}" = set; then
3556 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003557
Fred Drake109d9862001-07-11 06:27:56 +00003558if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003559then
3560
3561cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003562#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003563_ACEOF
3564
3565 echo "$as_me:$LINENO: result: yes" >&5
3566echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003567 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003568else echo "$as_me:$LINENO: result: no" >&5
3569echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003570fi
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6
3574fi;
Fred Drake109d9862001-07-11 06:27:56 +00003575
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3577# merged with this chunk of code?
3578
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003580# ------------------------
3581# (The following bit of code is complicated enough - please keep things
3582# indented properly. Just pretend you're editing Python code. ;-)
3583
3584# There are two parallel sets of case statements below, one that checks to
3585# see if OPT was set and one that does BASECFLAGS setting based upon
3586# compiler and platform. BASECFLAGS tweaks need to be made even if the
3587# user set OPT.
3588
3589# tweak OPT based on compiler and platform, only if the user didn't set
3590# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003591
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003592if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003593then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003594 case $GCC in
3595 yes)
3596 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003597 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003598 if test "$Py_DEBUG" = 'true' ; then
3599 # Optimization messes up debuggers, so turn it off for
3600 # debug builds.
3601 OPT="-g -Wall -Wstrict-prototypes"
3602 else
3603 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003604 fi
3605 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003606 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003607 OPT="-O3 -Wall -Wstrict-prototypes"
3608 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003609 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003610 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003611 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3612 ;;
3613 esac
Fred Drake109d9862001-07-11 06:27:56 +00003614 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003616 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003617 OPT="-O"
3618 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003619 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003620
3621 # The current (beta) Monterey compiler dies with optimizations
3622 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003623 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003624 Monterey*)
3625 OPT=""
3626 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003627 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003628
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003629fi
3630
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631
3632# tweak BASECFLAGS based on compiler and platform
3633case $GCC in
3634yes)
3635 case $ac_sys_system in
3636 SCO_SV*)
3637 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3638 ;;
3639 # is there any other compiler on Darwin besides gcc?
3640 Darwin*)
3641 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3642 ;;
3643 esac
3644 ;;
3645
3646*)
3647 case $ac_sys_system in
3648 OpenUNIX*|UnixWare*)
3649 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3650 ;;
3651 SCO_SV*)
3652 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3653 ;;
3654 esac
3655 ;;
3656esac
3657
Fred Drakee1ceaa02001-12-04 20:55:47 +00003658if test "$Py_DEBUG" = 'true'; then
3659 :
3660else
3661 OPT="-DNDEBUG $OPT"
3662fi
3663
Guido van Rossum563e7081996-09-10 18:20:48 +00003664if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003665then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003666 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003667fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3670echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3671if test "${ac_cv_opt_olimit_ok+set}" = set; then
3672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003673else
3674 ac_save_cc="$CC"
3675CC="$CC -OPT:Olimit=0"
3676if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003677 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 cat >conftest.$ac_ext <<_ACEOF
3680#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003681#include "confdefs.h"
3682int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683_ACEOF
3684rm -f conftest$ac_exeext
3685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3686 (eval $ac_link) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3691 (eval $ac_try) 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003695 ac_cv_opt_olimit_ok=yes
3696else
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 echo "$as_me: program exited with status $ac_status" >&5
3698echo "$as_me: failed program was:" >&5
3699cat conftest.$ac_ext >&5
3700( exit $ac_status )
3701ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003702fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003703rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003704fi
Guido van Rossum91922671997-10-09 20:24:13 +00003705CC="$ac_save_cc"
3706fi
3707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3709echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003710if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003711 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003712 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3713 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3714 # environment?
3715 Darwin*)
3716 ;;
3717 *)
3718 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3719 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003720 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003721else
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3723echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3724 if test "${ac_cv_olimit_ok+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003726else
3727 ac_save_cc="$CC"
3728 CC="$CC -Olimit 1500"
3729 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003730 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003731else
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 cat >conftest.$ac_ext <<_ACEOF
3733#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003734#include "confdefs.h"
3735int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736_ACEOF
3737rm -f conftest$ac_exeext
3738if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3739 (eval $ac_link) 2>&5
3740 ac_status=$?
3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3742 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3744 (eval $ac_try) 2>&5
3745 ac_status=$?
3746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3747 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003748 ac_cv_olimit_ok=yes
3749else
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 echo "$as_me: program exited with status $ac_status" >&5
3751echo "$as_me: failed program was:" >&5
3752cat conftest.$ac_ext >&5
3753( exit $ac_status )
3754ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003755fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003756rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003757fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003758 CC="$ac_save_cc"
3759fi
3760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3762echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003763 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003764 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003765 fi
3766fi
3767
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003768# On some compilers, pthreads are available without further options
3769# (e.g. MacOS X). On some of these systems, the compiler will not
3770# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3771# So we have to see first whether pthreads are available without
3772# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003773echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3774echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3775if test "${ac_cv_pthread_is_default+set}" = set; then
3776 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003777else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003778 if test "$cross_compiling" = yes; then
3779 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 cat >conftest.$ac_ext <<_ACEOF
3782#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003784
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003786
3787void* routine(void* p){return NULL;}
3788
3789int main(){
3790 pthread_t p;
3791 if(pthread_create(&p,NULL,routine,NULL)!=0)
3792 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003793 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794 return 0;
3795}
3796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797_ACEOF
3798rm -f conftest$ac_exeext
3799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3800 (eval $ac_link) 2>&5
3801 ac_status=$?
3802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3805 (eval $ac_try) 2>&5
3806 ac_status=$?
3807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003809 ac_cv_pthread_is_default=yes
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 echo "$as_me: program exited with status $ac_status" >&5
3812echo "$as_me: failed program was:" >&5
3813cat conftest.$ac_ext >&5
3814( exit $ac_status )
3815ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003816fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003817rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003818fi
3819
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003820fi
3821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3823echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003824
Michael W. Hudson54241132001-12-07 15:38:26 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003827then
3828 ac_cv_kpthread=no
3829else
3830# -Kpthread, if available, provides the right #defines
3831# and linker options to make pthread_create available
3832# Some compilers won't report that they do not support -Kpthread,
3833# so we need to run a program to see whether it really made the
3834# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003835echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3836echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3837if test "${ac_cv_kpthread+set}" = set; then
3838 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003839else
3840 ac_save_cc="$CC"
3841CC="$CC -Kpthread"
3842if test "$cross_compiling" = yes; then
3843 ac_cv_kpthread=no
3844else
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 cat >conftest.$ac_ext <<_ACEOF
3846#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003847#include "confdefs.h"
3848
3849#include <pthread.h>
3850
3851void* routine(void* p){return NULL;}
3852
3853int main(){
3854 pthread_t p;
3855 if(pthread_create(&p,NULL,routine,NULL)!=0)
3856 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003857 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003858 return 0;
3859}
3860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861_ACEOF
3862rm -f conftest$ac_exeext
3863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3864 (eval $ac_link) 2>&5
3865 ac_status=$?
3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3869 (eval $ac_try) 2>&5
3870 ac_status=$?
3871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3872 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003873 ac_cv_kpthread=yes
3874else
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 echo "$as_me: program exited with status $ac_status" >&5
3876echo "$as_me: failed program was:" >&5
3877cat conftest.$ac_ext >&5
3878( exit $ac_status )
3879ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003881rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003882fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003883CC="$ac_save_cc"
3884fi
3885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3887echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003888fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003889
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003890if test $ac_cv_kpthread = no
3891then
3892# -Kthread, if available, provides the right #defines
3893# and linker options to make pthread_create available
3894# Some compilers won't report that they do not support -Kthread,
3895# so we need to run a program to see whether it really made the
3896# function available.
3897echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3898echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3899if test "${ac_cv_kthread+set}" = set; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3901else
3902 ac_save_cc="$CC"
3903CC="$CC -Kthread"
3904if test "$cross_compiling" = yes; then
3905 ac_cv_kthread=no
3906else
3907 cat >conftest.$ac_ext <<_ACEOF
3908#line $LINENO "configure"
3909#include "confdefs.h"
3910
3911#include <pthread.h>
3912
3913void* routine(void* p){return NULL;}
3914
3915int main(){
3916 pthread_t p;
3917 if(pthread_create(&p,NULL,routine,NULL)!=0)
3918 return 1;
3919 (void)pthread_detach(p);
3920 return 0;
3921}
3922
3923_ACEOF
3924rm -f conftest$ac_exeext
3925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3926 (eval $ac_link) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3931 (eval $ac_try) 2>&5
3932 ac_status=$?
3933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3934 (exit $ac_status); }; }; then
3935 ac_cv_kthread=yes
3936else
3937 echo "$as_me: program exited with status $ac_status" >&5
3938echo "$as_me: failed program was:" >&5
3939cat conftest.$ac_ext >&5
3940( exit $ac_status )
3941ac_cv_kthread=no
3942fi
3943rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3944fi
3945CC="$ac_save_cc"
3946fi
3947
3948echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3949echo "${ECHO_T}$ac_cv_kthread" >&6
3950fi
3951
Michael W. Hudson54241132001-12-07 15:38:26 +00003952
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003954echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3955echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3956if test "${ac_cv_header_stdc+set}" = set; then
3957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003958else
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 cat >conftest.$ac_ext <<_ACEOF
3960#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003961#include "confdefs.h"
3962#include <stdlib.h>
3963#include <stdarg.h>
3964#include <string.h>
3965#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003966
3967_ACEOF
3968if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3969 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3970 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003971 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 rm -f conftest.er1
3973 cat conftest.err >&5
3974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3975 (exit $ac_status); } >/dev/null; then
3976 if test -s conftest.err; then
3977 ac_cpp_err=$ac_c_preproc_warn_flag
3978 else
3979 ac_cpp_err=
3980 fi
3981else
3982 ac_cpp_err=yes
3983fi
3984if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003985 ac_cv_header_stdc=yes
3986else
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003988 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003989 ac_cv_header_stdc=no
3990fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003991rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992
3993if test $ac_cv_header_stdc = yes; then
3994 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 cat >conftest.$ac_ext <<_ACEOF
3996#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997#include "confdefs.h"
3998#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003999
4000_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004002 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004003 :
4004else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004005 ac_cv_header_stdc=no
4006fi
4007rm -f conftest*
4008
4009fi
4010
4011if test $ac_cv_header_stdc = yes; then
4012 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 cat >conftest.$ac_ext <<_ACEOF
4014#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004015#include "confdefs.h"
4016#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004017
4018_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004020 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021 :
4022else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023 ac_cv_header_stdc=no
4024fi
4025rm -f conftest*
4026
4027fi
4028
4029if test $ac_cv_header_stdc = yes; then
4030 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004032 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033else
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 cat >conftest.$ac_ext <<_ACEOF
4035#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004036#include "confdefs.h"
4037#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004038#if ((' ' & 0x0FF) == 0x020)
4039# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4040# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4041#else
4042# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4043 || ('j' <= (c) && (c) <= 'r') \
4044 || ('s' <= (c) && (c) <= 'z'))
4045# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4046#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004047
Martin v. Löwis11437992002-04-12 09:54:03 +00004048#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4049int
4050main ()
4051{
4052 int i;
4053 for (i = 0; i < 256; i++)
4054 if (XOR (islower (i), ISLOWER (i))
4055 || toupper (i) != TOUPPER (i))
4056 exit(2);
4057 exit (0);
4058}
4059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4062 (eval $ac_link) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4067 (eval $ac_try) 2>&5
4068 ac_status=$?
4069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4070 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004071 :
4072else
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 echo "$as_me: program exited with status $ac_status" >&5
4074echo "$as_me: failed program was:" >&5
4075cat conftest.$ac_ext >&5
4076( exit $ac_status )
4077ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004078fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004079rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004080fi
4081fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004082fi
4083echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4084echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004085if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004086
4087cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004088#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004089_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004090
4091fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004092
Martin v. Löwis11437992002-04-12 09:54:03 +00004093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004130
Barry Warsawfe33b792003-01-07 22:42:49 +00004131
Neal Norwitz82251032003-05-23 14:35:24 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004134libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004135signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4136unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004137sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004138sys/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 +00004139sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004140sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004141do
Martin v. Löwis11437992002-04-12 09:54:03 +00004142as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4143if eval "test \"\${$as_ac_Header+set}\" = set"; then
4144 echo "$as_me:$LINENO: checking for $ac_header" >&5
4145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4146if eval "test \"\${$as_ac_Header+set}\" = set"; then
4147 echo $ECHO_N "(cached) $ECHO_C" >&6
4148fi
4149echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4150echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151else
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 # Is the header compilable?
4153echo "$as_me:$LINENO: checking $ac_header usability" >&5
4154echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4155cat >conftest.$ac_ext <<_ACEOF
4156#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004157#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004158$ac_includes_default
4159#include <$ac_header>
4160_ACEOF
4161rm -f conftest.$ac_objext
4162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4163 (eval $ac_compile) 2>&5
4164 ac_status=$?
4165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4166 (exit $ac_status); } &&
4167 { ac_try='test -s conftest.$ac_objext'
4168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4169 (eval $ac_try) 2>&5
4170 ac_status=$?
4171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4172 (exit $ac_status); }; }; then
4173 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004174else
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 echo "$as_me: failed program was:" >&5
4176cat conftest.$ac_ext >&5
4177ac_header_compiler=no
4178fi
4179rm -f conftest.$ac_objext conftest.$ac_ext
4180echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4181echo "${ECHO_T}$ac_header_compiler" >&6
4182
4183# Is the header present?
4184echo "$as_me:$LINENO: checking $ac_header presence" >&5
4185echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4186cat >conftest.$ac_ext <<_ACEOF
4187#line $LINENO "configure"
4188#include "confdefs.h"
4189#include <$ac_header>
4190_ACEOF
4191if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4193 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004194 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 rm -f conftest.er1
4196 cat conftest.err >&5
4197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4198 (exit $ac_status); } >/dev/null; then
4199 if test -s conftest.err; then
4200 ac_cpp_err=$ac_c_preproc_warn_flag
4201 else
4202 ac_cpp_err=
4203 fi
4204else
4205 ac_cpp_err=yes
4206fi
4207if test -z "$ac_cpp_err"; then
4208 ac_header_preproc=yes
4209else
4210 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004211 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004213fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004214rm -f conftest.err conftest.$ac_ext
4215echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4216echo "${ECHO_T}$ac_header_preproc" >&6
4217
4218# So? What about this header?
4219case $ac_header_compiler:$ac_header_preproc in
4220 yes:no )
4221 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4222echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4223 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4224echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4225 no:yes )
4226 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4227echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4228 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4229echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4230 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4231echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4232esac
4233echo "$as_me:$LINENO: checking for $ac_header" >&5
4234echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4235if eval "test \"\${$as_ac_Header+set}\" = set"; then
4236 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004237else
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004240echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4241echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4242
4243fi
4244if test `eval echo '${'$as_ac_Header'}'` = yes; then
4245 cat >>confdefs.h <<_ACEOF
4246#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4247_ACEOF
4248
4249fi
4250
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251done
4252
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
4254
4255
4256
4257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004259for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4260 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4261echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4262echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4263if eval "test \"\${$as_ac_Header+set}\" = set"; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 cat >conftest.$ac_ext <<_ACEOF
4267#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268#include "confdefs.h"
4269#include <sys/types.h>
4270#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
Barry Warsawfe33b792003-01-07 22:42:49 +00004272#ifdef F77_DUMMY_MAIN
4273# ifdef __cplusplus
4274 extern "C"
4275# endif
4276 int F77_DUMMY_MAIN() { return 1; }
4277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004278int
4279main ()
4280{
4281if ((DIR *) 0)
4282return 0;
4283 ;
4284 return 0;
4285}
4286_ACEOF
4287rm -f conftest.$ac_objext
4288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4289 (eval $ac_compile) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); } &&
4293 { ac_try='test -s conftest.$ac_objext'
4294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295 (eval $ac_try) 2>&5
4296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); }; }; then
4299 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004300else
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 echo "$as_me: failed program was:" >&5
4302cat conftest.$ac_ext >&5
4303eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004305rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004307echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4308echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4309if test `eval echo '${'$as_ac_Header'}'` = yes; then
4310 cat >>confdefs.h <<_ACEOF
4311#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4312_ACEOF
4313
4314ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004315fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317done
4318# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4319if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004320 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4321echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4322if test "${ac_cv_search_opendir+set}" = set; then
4323 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324else
Martin v. Löwis11437992002-04-12 09:54:03 +00004325 ac_func_search_save_LIBS=$LIBS
4326ac_cv_search_opendir=no
4327cat >conftest.$ac_ext <<_ACEOF
4328#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004330
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004331/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004332#ifdef __cplusplus
4333extern "C"
4334#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004335/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004336 builtin and then its argument prototype would still apply. */
4337char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004338#ifdef F77_DUMMY_MAIN
4339# ifdef __cplusplus
4340 extern "C"
4341# endif
4342 int F77_DUMMY_MAIN() { return 1; }
4343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004344int
4345main ()
4346{
4347opendir ();
4348 ;
4349 return 0;
4350}
4351_ACEOF
4352rm -f conftest.$ac_objext conftest$ac_exeext
4353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4354 (eval $ac_link) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); } &&
4358 { ac_try='test -s conftest$ac_exeext'
4359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4360 (eval $ac_try) 2>&5
4361 ac_status=$?
4362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4363 (exit $ac_status); }; }; then
4364 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365else
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 echo "$as_me: failed program was:" >&5
4367cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4370if test "$ac_cv_search_opendir" = no; then
4371 for ac_lib in dir; do
4372 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4373 cat >conftest.$ac_ext <<_ACEOF
4374#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004376
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004378#ifdef __cplusplus
4379extern "C"
4380#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004381/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 builtin and then its argument prototype would still apply. */
4383char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004384#ifdef F77_DUMMY_MAIN
4385# ifdef __cplusplus
4386 extern "C"
4387# endif
4388 int F77_DUMMY_MAIN() { return 1; }
4389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004390int
4391main ()
4392{
4393opendir ();
4394 ;
4395 return 0;
4396}
4397_ACEOF
4398rm -f conftest.$ac_objext conftest$ac_exeext
4399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4400 (eval $ac_link) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); } &&
4404 { ac_try='test -s conftest$ac_exeext'
4405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4406 (eval $ac_try) 2>&5
4407 ac_status=$?
4408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4409 (exit $ac_status); }; }; then
4410 ac_cv_search_opendir="-l$ac_lib"
4411break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412else
Martin v. Löwis11437992002-04-12 09:54:03 +00004413 echo "$as_me: failed program was:" >&5
4414cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004416rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4417 done
4418fi
4419LIBS=$ac_func_search_save_LIBS
4420fi
4421echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4422echo "${ECHO_T}$ac_cv_search_opendir" >&6
4423if test "$ac_cv_search_opendir" != no; then
4424 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004427
Michael W. Hudson54241132001-12-07 15:38:26 +00004428else
Martin v. Löwis11437992002-04-12 09:54:03 +00004429 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4430echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4431if test "${ac_cv_search_opendir+set}" = set; then
4432 echo $ECHO_N "(cached) $ECHO_C" >&6
4433else
4434 ac_func_search_save_LIBS=$LIBS
4435ac_cv_search_opendir=no
4436cat >conftest.$ac_ext <<_ACEOF
4437#line $LINENO "configure"
4438#include "confdefs.h"
4439
4440/* Override any gcc2 internal prototype to avoid an error. */
4441#ifdef __cplusplus
4442extern "C"
4443#endif
4444/* We use char because int might match the return type of a gcc2
4445 builtin and then its argument prototype would still apply. */
4446char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004447#ifdef F77_DUMMY_MAIN
4448# ifdef __cplusplus
4449 extern "C"
4450# endif
4451 int F77_DUMMY_MAIN() { return 1; }
4452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004453int
4454main ()
4455{
4456opendir ();
4457 ;
4458 return 0;
4459}
4460_ACEOF
4461rm -f conftest.$ac_objext conftest$ac_exeext
4462if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4463 (eval $ac_link) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); } &&
4467 { ac_try='test -s conftest$ac_exeext'
4468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4469 (eval $ac_try) 2>&5
4470 ac_status=$?
4471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4472 (exit $ac_status); }; }; then
4473 ac_cv_search_opendir="none required"
4474else
4475 echo "$as_me: failed program was:" >&5
4476cat conftest.$ac_ext >&5
4477fi
4478rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4479if test "$ac_cv_search_opendir" = no; then
4480 for ac_lib in x; do
4481 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4482 cat >conftest.$ac_ext <<_ACEOF
4483#line $LINENO "configure"
4484#include "confdefs.h"
4485
4486/* Override any gcc2 internal prototype to avoid an error. */
4487#ifdef __cplusplus
4488extern "C"
4489#endif
4490/* We use char because int might match the return type of a gcc2
4491 builtin and then its argument prototype would still apply. */
4492char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004493#ifdef F77_DUMMY_MAIN
4494# ifdef __cplusplus
4495 extern "C"
4496# endif
4497 int F77_DUMMY_MAIN() { return 1; }
4498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004499int
4500main ()
4501{
4502opendir ();
4503 ;
4504 return 0;
4505}
4506_ACEOF
4507rm -f conftest.$ac_objext conftest$ac_exeext
4508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4509 (eval $ac_link) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); } &&
4513 { ac_try='test -s conftest$ac_exeext'
4514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4515 (eval $ac_try) 2>&5
4516 ac_status=$?
4517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4518 (exit $ac_status); }; }; then
4519 ac_cv_search_opendir="-l$ac_lib"
4520break
4521else
4522 echo "$as_me: failed program was:" >&5
4523cat conftest.$ac_ext >&5
4524fi
4525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4526 done
4527fi
4528LIBS=$ac_func_search_save_LIBS
4529fi
4530echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4531echo "${ECHO_T}$ac_cv_search_opendir" >&6
4532if test "$ac_cv_search_opendir" != no; then
4533 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4534
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535fi
4536
4537fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004539echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4540echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4541if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4542 echo $ECHO_N "(cached) $ECHO_C" >&6
4543else
4544 cat >conftest.$ac_ext <<_ACEOF
4545#line $LINENO "configure"
4546#include "confdefs.h"
4547#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004548#ifdef F77_DUMMY_MAIN
4549# ifdef __cplusplus
4550 extern "C"
4551# endif
4552 int F77_DUMMY_MAIN() { return 1; }
4553#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004554int
4555main ()
4556{
4557return makedev(0, 0);
4558 ;
4559 return 0;
4560}
4561_ACEOF
4562rm -f conftest.$ac_objext conftest$ac_exeext
4563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4564 (eval $ac_link) 2>&5
4565 ac_status=$?
4566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4567 (exit $ac_status); } &&
4568 { ac_try='test -s conftest$ac_exeext'
4569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4570 (eval $ac_try) 2>&5
4571 ac_status=$?
4572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4573 (exit $ac_status); }; }; then
4574 ac_cv_header_sys_types_h_makedev=yes
4575else
4576 echo "$as_me: failed program was:" >&5
4577cat conftest.$ac_ext >&5
4578ac_cv_header_sys_types_h_makedev=no
4579fi
4580rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4581
4582fi
4583echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4584echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4585
4586if test $ac_cv_header_sys_types_h_makedev = no; then
4587if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4588 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4589echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4590if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4591 echo $ECHO_N "(cached) $ECHO_C" >&6
4592fi
4593echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4594echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4595else
4596 # Is the header compilable?
4597echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4598echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4599cat >conftest.$ac_ext <<_ACEOF
4600#line $LINENO "configure"
4601#include "confdefs.h"
4602$ac_includes_default
4603#include <sys/mkdev.h>
4604_ACEOF
4605rm -f conftest.$ac_objext
4606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4607 (eval $ac_compile) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); } &&
4611 { ac_try='test -s conftest.$ac_objext'
4612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4613 (eval $ac_try) 2>&5
4614 ac_status=$?
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); }; }; then
4617 ac_header_compiler=yes
4618else
4619 echo "$as_me: failed program was:" >&5
4620cat conftest.$ac_ext >&5
4621ac_header_compiler=no
4622fi
4623rm -f conftest.$ac_objext conftest.$ac_ext
4624echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4625echo "${ECHO_T}$ac_header_compiler" >&6
4626
4627# Is the header present?
4628echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4629echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4630cat >conftest.$ac_ext <<_ACEOF
4631#line $LINENO "configure"
4632#include "confdefs.h"
4633#include <sys/mkdev.h>
4634_ACEOF
4635if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4636 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4637 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004638 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004639 rm -f conftest.er1
4640 cat conftest.err >&5
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); } >/dev/null; then
4643 if test -s conftest.err; then
4644 ac_cpp_err=$ac_c_preproc_warn_flag
4645 else
4646 ac_cpp_err=
4647 fi
4648else
4649 ac_cpp_err=yes
4650fi
4651if test -z "$ac_cpp_err"; then
4652 ac_header_preproc=yes
4653else
4654 echo "$as_me: failed program was:" >&5
4655 cat conftest.$ac_ext >&5
4656 ac_header_preproc=no
4657fi
4658rm -f conftest.err conftest.$ac_ext
4659echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4660echo "${ECHO_T}$ac_header_preproc" >&6
4661
4662# So? What about this header?
4663case $ac_header_compiler:$ac_header_preproc in
4664 yes:no )
4665 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4666echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4667 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4668echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4669 no:yes )
4670 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4671echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4672 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4673echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4674 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4675echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4676esac
4677echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4678echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4679if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4680 echo $ECHO_N "(cached) $ECHO_C" >&6
4681else
4682 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4683fi
4684echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4685echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4686
4687fi
4688if test $ac_cv_header_sys_mkdev_h = yes; then
4689
4690cat >>confdefs.h <<\_ACEOF
4691#define MAJOR_IN_MKDEV 1
4692_ACEOF
4693
4694fi
4695
4696
4697
4698 if test $ac_cv_header_sys_mkdev_h = no; then
4699 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4700 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4701echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4702if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4703 echo $ECHO_N "(cached) $ECHO_C" >&6
4704fi
4705echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4706echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4707else
4708 # Is the header compilable?
4709echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4710echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4711cat >conftest.$ac_ext <<_ACEOF
4712#line $LINENO "configure"
4713#include "confdefs.h"
4714$ac_includes_default
4715#include <sys/sysmacros.h>
4716_ACEOF
4717rm -f conftest.$ac_objext
4718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4719 (eval $ac_compile) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); } &&
4723 { ac_try='test -s conftest.$ac_objext'
4724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4725 (eval $ac_try) 2>&5
4726 ac_status=$?
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); }; }; then
4729 ac_header_compiler=yes
4730else
4731 echo "$as_me: failed program was:" >&5
4732cat conftest.$ac_ext >&5
4733ac_header_compiler=no
4734fi
4735rm -f conftest.$ac_objext conftest.$ac_ext
4736echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4737echo "${ECHO_T}$ac_header_compiler" >&6
4738
4739# Is the header present?
4740echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4741echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4742cat >conftest.$ac_ext <<_ACEOF
4743#line $LINENO "configure"
4744#include "confdefs.h"
4745#include <sys/sysmacros.h>
4746_ACEOF
4747if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4748 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4749 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004750 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004751 rm -f conftest.er1
4752 cat conftest.err >&5
4753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4754 (exit $ac_status); } >/dev/null; then
4755 if test -s conftest.err; then
4756 ac_cpp_err=$ac_c_preproc_warn_flag
4757 else
4758 ac_cpp_err=
4759 fi
4760else
4761 ac_cpp_err=yes
4762fi
4763if test -z "$ac_cpp_err"; then
4764 ac_header_preproc=yes
4765else
4766 echo "$as_me: failed program was:" >&5
4767 cat conftest.$ac_ext >&5
4768 ac_header_preproc=no
4769fi
4770rm -f conftest.err conftest.$ac_ext
4771echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4772echo "${ECHO_T}$ac_header_preproc" >&6
4773
4774# So? What about this header?
4775case $ac_header_compiler:$ac_header_preproc in
4776 yes:no )
4777 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4778echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4779 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4780echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4781 no:yes )
4782 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4783echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4784 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4785echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4786 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4787echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4788esac
4789echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4790echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4791if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4792 echo $ECHO_N "(cached) $ECHO_C" >&6
4793else
4794 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4795fi
4796echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4797echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4798
4799fi
4800if test $ac_cv_header_sys_sysmacros_h = yes; then
4801
4802cat >>confdefs.h <<\_ACEOF
4803#define MAJOR_IN_SYSMACROS 1
4804_ACEOF
4805
4806fi
4807
4808
4809 fi
4810fi
4811
Michael W. Hudson54241132001-12-07 15:38:26 +00004812
Guido van Rossum627b2d71993-12-24 10:39:16 +00004813# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004814was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004815echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4816echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4817cat >conftest.$ac_ext <<_ACEOF
4818#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004819#include "confdefs.h"
4820#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004821
4822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004824 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004825 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004826else
Martin v. Löwis11437992002-04-12 09:54:03 +00004827
4828
4829cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004831_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004832
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004833
Guido van Rossum627b2d71993-12-24 10:39:16 +00004834fi
4835rm -f conftest*
4836
Martin v. Löwis11437992002-04-12 09:54:03 +00004837echo "$as_me:$LINENO: result: $was_it_defined" >&5
4838echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004839
Neal Norwitz11690112002-07-30 01:08:28 +00004840# Check whether using makedev requires defining _OSF_SOURCE
4841echo "$as_me:$LINENO: checking for makedev" >&5
4842echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4843cat >conftest.$ac_ext <<_ACEOF
4844#line $LINENO "configure"
4845#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004846#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004847#ifdef F77_DUMMY_MAIN
4848# ifdef __cplusplus
4849 extern "C"
4850# endif
4851 int F77_DUMMY_MAIN() { return 1; }
4852#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004853int
4854main ()
4855{
4856 makedev(0, 0)
4857 ;
4858 return 0;
4859}
4860_ACEOF
4861rm -f conftest.$ac_objext conftest$ac_exeext
4862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4863 (eval $ac_link) 2>&5
4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); } &&
4867 { ac_try='test -s conftest$ac_exeext'
4868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4869 (eval $ac_try) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); }; }; then
4873 ac_cv_has_makedev=yes
4874else
4875 echo "$as_me: failed program was:" >&5
4876cat conftest.$ac_ext >&5
4877ac_cv_has_makedev=no
4878fi
4879rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4880if test "$ac_cv_has_makedev" = "no"; then
4881 # we didn't link, try if _OSF_SOURCE will allow us to link
4882 cat >conftest.$ac_ext <<_ACEOF
4883#line $LINENO "configure"
4884#include "confdefs.h"
4885
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004886#define _OSF_SOURCE 1
4887#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004888
Barry Warsawfe33b792003-01-07 22:42:49 +00004889#ifdef F77_DUMMY_MAIN
4890# ifdef __cplusplus
4891 extern "C"
4892# endif
4893 int F77_DUMMY_MAIN() { return 1; }
4894#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004895int
4896main ()
4897{
4898 makedev(0, 0)
4899 ;
4900 return 0;
4901}
4902_ACEOF
4903rm -f conftest.$ac_objext conftest$ac_exeext
4904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4905 (eval $ac_link) 2>&5
4906 ac_status=$?
4907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908 (exit $ac_status); } &&
4909 { ac_try='test -s conftest$ac_exeext'
4910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4911 (eval $ac_try) 2>&5
4912 ac_status=$?
4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914 (exit $ac_status); }; }; then
4915 ac_cv_has_makedev=yes
4916else
4917 echo "$as_me: failed program was:" >&5
4918cat conftest.$ac_ext >&5
4919ac_cv_has_makedev=no
4920fi
4921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4922 if test "$ac_cv_has_makedev" = "yes"; then
4923
4924cat >>confdefs.h <<\_ACEOF
4925#define _OSF_SOURCE 1
4926_ACEOF
4927
4928 fi
4929fi
4930echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4931echo "${ECHO_T}$ac_cv_has_makedev" >&6
4932if test "$ac_cv_has_makedev" = "yes"; then
4933
4934cat >>confdefs.h <<\_ACEOF
4935#define HAVE_MAKEDEV 1
4936_ACEOF
4937
4938fi
4939
Martin v. Löwis399a6892002-10-04 10:22:02 +00004940# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4941# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4942# defined, but the compiler does not support pragma redefine_extname,
4943# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4944# structures (such as rlimit64) without declaring them. As a
4945# work-around, disable LFS on such configurations
4946
4947use_lfs=yes
4948echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4949echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4950cat >conftest.$ac_ext <<_ACEOF
4951#line $LINENO "configure"
4952#include "confdefs.h"
4953
4954#define _LARGEFILE_SOURCE 1
4955#define _FILE_OFFSET_BITS 64
4956#include <sys/resource.h>
4957
Barry Warsawfe33b792003-01-07 22:42:49 +00004958#ifdef F77_DUMMY_MAIN
4959# ifdef __cplusplus
4960 extern "C"
4961# endif
4962 int F77_DUMMY_MAIN() { return 1; }
4963#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004964int
4965main ()
4966{
4967struct rlimit foo;
4968 ;
4969 return 0;
4970}
4971_ACEOF
4972rm -f conftest.$ac_objext
4973if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4974 (eval $ac_compile) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); } &&
4978 { ac_try='test -s conftest.$ac_objext'
4979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4980 (eval $ac_try) 2>&5
4981 ac_status=$?
4982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4983 (exit $ac_status); }; }; then
4984 sol_lfs_bug=no
4985else
4986 echo "$as_me: failed program was:" >&5
4987cat conftest.$ac_ext >&5
4988sol_lfs_bug=yes
4989fi
4990rm -f conftest.$ac_objext conftest.$ac_ext
4991echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4992echo "${ECHO_T}$sol_lfs_bug" >&6
4993if test "$sol_lfs_bug" = "yes"; then
4994 use_lfs=no
4995fi
4996
4997if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004998# Two defines needed to enable largefile support on various platforms
4999# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005000
Martin v. Löwis11437992002-04-12 09:54:03 +00005001cat >>confdefs.h <<\_ACEOF
5002#define _LARGEFILE_SOURCE 1
5003_ACEOF
5004
5005
5006cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005007#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005008_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005009
Martin v. Löwis399a6892002-10-04 10:22:02 +00005010fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005011
Guido van Rossum84e7b241996-08-19 21:59:00 +00005012# Add some code to confdefs.h so that the test for off_t works on SCO
5013cat >> confdefs.h <<\EOF
5014#if defined(SCO_DS)
5015#undef _OFF_T
5016#endif
5017EOF
5018
Guido van Rossumef2255b2000-03-10 22:30:29 +00005019# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005020echo "$as_me:$LINENO: checking for mode_t" >&5
5021echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5022if test "${ac_cv_type_mode_t+set}" = set; then
5023 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024else
Martin v. Löwis11437992002-04-12 09:54:03 +00005025 cat >conftest.$ac_ext <<_ACEOF
5026#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005028$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005029#ifdef F77_DUMMY_MAIN
5030# ifdef __cplusplus
5031 extern "C"
5032# endif
5033 int F77_DUMMY_MAIN() { return 1; }
5034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005035int
5036main ()
5037{
5038if ((mode_t *) 0)
5039 return 0;
5040if (sizeof (mode_t))
5041 return 0;
5042 ;
5043 return 0;
5044}
5045_ACEOF
5046rm -f conftest.$ac_objext
5047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5048 (eval $ac_compile) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); } &&
5052 { ac_try='test -s conftest.$ac_objext'
5053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5054 (eval $ac_try) 2>&5
5055 ac_status=$?
5056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5057 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005058 ac_cv_type_mode_t=yes
5059else
Martin v. Löwis11437992002-04-12 09:54:03 +00005060 echo "$as_me: failed program was:" >&5
5061cat conftest.$ac_ext >&5
5062ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005064rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005066echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5067echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5068if test $ac_cv_type_mode_t = yes; then
5069 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005070else
Martin v. Löwis11437992002-04-12 09:54:03 +00005071
5072cat >>confdefs.h <<_ACEOF
5073#define mode_t int
5074_ACEOF
5075
5076fi
5077
5078echo "$as_me:$LINENO: checking for off_t" >&5
5079echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5080if test "${ac_cv_type_off_t+set}" = set; then
5081 echo $ECHO_N "(cached) $ECHO_C" >&6
5082else
5083 cat >conftest.$ac_ext <<_ACEOF
5084#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005086$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005087#ifdef F77_DUMMY_MAIN
5088# ifdef __cplusplus
5089 extern "C"
5090# endif
5091 int F77_DUMMY_MAIN() { return 1; }
5092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005093int
5094main ()
5095{
5096if ((off_t *) 0)
5097 return 0;
5098if (sizeof (off_t))
5099 return 0;
5100 ;
5101 return 0;
5102}
5103_ACEOF
5104rm -f conftest.$ac_objext
5105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5106 (eval $ac_compile) 2>&5
5107 ac_status=$?
5108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109 (exit $ac_status); } &&
5110 { ac_try='test -s conftest.$ac_objext'
5111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5112 (eval $ac_try) 2>&5
5113 ac_status=$?
5114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005116 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005117else
Martin v. Löwis11437992002-04-12 09:54:03 +00005118 echo "$as_me: failed program was:" >&5
5119cat conftest.$ac_ext >&5
5120ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005121fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005122rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005124echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5125echo "${ECHO_T}$ac_cv_type_off_t" >&6
5126if test $ac_cv_type_off_t = yes; then
5127 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005128else
Martin v. Löwis11437992002-04-12 09:54:03 +00005129
5130cat >>confdefs.h <<_ACEOF
5131#define off_t long
5132_ACEOF
5133
5134fi
5135
5136echo "$as_me:$LINENO: checking for pid_t" >&5
5137echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5138if test "${ac_cv_type_pid_t+set}" = set; then
5139 echo $ECHO_N "(cached) $ECHO_C" >&6
5140else
5141 cat >conftest.$ac_ext <<_ACEOF
5142#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005144$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005145#ifdef F77_DUMMY_MAIN
5146# ifdef __cplusplus
5147 extern "C"
5148# endif
5149 int F77_DUMMY_MAIN() { return 1; }
5150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005151int
5152main ()
5153{
5154if ((pid_t *) 0)
5155 return 0;
5156if (sizeof (pid_t))
5157 return 0;
5158 ;
5159 return 0;
5160}
5161_ACEOF
5162rm -f conftest.$ac_objext
5163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5164 (eval $ac_compile) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } &&
5168 { ac_try='test -s conftest.$ac_objext'
5169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5170 (eval $ac_try) 2>&5
5171 ac_status=$?
5172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5173 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005174 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005175else
Martin v. Löwis11437992002-04-12 09:54:03 +00005176 echo "$as_me: failed program was:" >&5
5177cat conftest.$ac_ext >&5
5178ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005180rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005182echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5183echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5184if test $ac_cv_type_pid_t = yes; then
5185 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005186else
Martin v. Löwis11437992002-04-12 09:54:03 +00005187
5188cat >>confdefs.h <<_ACEOF
5189#define pid_t int
5190_ACEOF
5191
5192fi
5193
5194echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5195echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5196if test "${ac_cv_type_signal+set}" = set; then
5197 echo $ECHO_N "(cached) $ECHO_C" >&6
5198else
5199 cat >conftest.$ac_ext <<_ACEOF
5200#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005201#include "confdefs.h"
5202#include <sys/types.h>
5203#include <signal.h>
5204#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005205# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005206#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005207#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005208extern "C" void (*signal (int, void (*)(int)))(int);
5209#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005210void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005211#endif
5212
Barry Warsawfe33b792003-01-07 22:42:49 +00005213#ifdef F77_DUMMY_MAIN
5214# ifdef __cplusplus
5215 extern "C"
5216# endif
5217 int F77_DUMMY_MAIN() { return 1; }
5218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005219int
5220main ()
5221{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005222int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005223 ;
5224 return 0;
5225}
5226_ACEOF
5227rm -f conftest.$ac_objext
5228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5229 (eval $ac_compile) 2>&5
5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); } &&
5233 { ac_try='test -s conftest.$ac_objext'
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005240else
Martin v. Löwis11437992002-04-12 09:54:03 +00005241 echo "$as_me: failed program was:" >&5
5242cat conftest.$ac_ext >&5
5243ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005244fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005245rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005246fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005247echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5248echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005249
Martin v. Löwis11437992002-04-12 09:54:03 +00005250cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005252_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005253
Michael W. Hudson54241132001-12-07 15:38:26 +00005254
Martin v. Löwis11437992002-04-12 09:54:03 +00005255echo "$as_me:$LINENO: checking for size_t" >&5
5256echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5257if test "${ac_cv_type_size_t+set}" = set; then
5258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005259else
Martin v. Löwis11437992002-04-12 09:54:03 +00005260 cat >conftest.$ac_ext <<_ACEOF
5261#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005263$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005264#ifdef F77_DUMMY_MAIN
5265# ifdef __cplusplus
5266 extern "C"
5267# endif
5268 int F77_DUMMY_MAIN() { return 1; }
5269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005270int
5271main ()
5272{
5273if ((size_t *) 0)
5274 return 0;
5275if (sizeof (size_t))
5276 return 0;
5277 ;
5278 return 0;
5279}
5280_ACEOF
5281rm -f conftest.$ac_objext
5282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5283 (eval $ac_compile) 2>&5
5284 ac_status=$?
5285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286 (exit $ac_status); } &&
5287 { ac_try='test -s conftest.$ac_objext'
5288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5289 (eval $ac_try) 2>&5
5290 ac_status=$?
5291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005293 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005294else
Martin v. Löwis11437992002-04-12 09:54:03 +00005295 echo "$as_me: failed program was:" >&5
5296cat conftest.$ac_ext >&5
5297ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005299rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005301echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5302echo "${ECHO_T}$ac_cv_type_size_t" >&6
5303if test $ac_cv_type_size_t = yes; then
5304 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005305else
Martin v. Löwis11437992002-04-12 09:54:03 +00005306
5307cat >>confdefs.h <<_ACEOF
5308#define size_t unsigned
5309_ACEOF
5310
5311fi
5312
5313echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5314echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5315if test "${ac_cv_type_uid_t+set}" = set; then
5316 echo $ECHO_N "(cached) $ECHO_C" >&6
5317else
5318 cat >conftest.$ac_ext <<_ACEOF
5319#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320#include "confdefs.h"
5321#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005322
5323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005325 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326 ac_cv_type_uid_t=yes
5327else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328 ac_cv_type_uid_t=no
5329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005330rm -f conftest*
5331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005333echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5334echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005335if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005336
Martin v. Löwis11437992002-04-12 09:54:03 +00005337cat >>confdefs.h <<\_ACEOF
5338#define uid_t int
5339_ACEOF
5340
5341
5342cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005343#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005344_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005345
5346fi
5347
Jack Jansendd19cf82001-12-06 22:36:17 +00005348
Michael W. Hudson54241132001-12-07 15:38:26 +00005349# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005350echo "$as_me:$LINENO: checking for int" >&5
5351echo $ECHO_N "checking for int... $ECHO_C" >&6
5352if test "${ac_cv_type_int+set}" = set; then
5353 echo $ECHO_N "(cached) $ECHO_C" >&6
5354else
5355 cat >conftest.$ac_ext <<_ACEOF
5356#line $LINENO "configure"
5357#include "confdefs.h"
5358$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005359#ifdef F77_DUMMY_MAIN
5360# ifdef __cplusplus
5361 extern "C"
5362# endif
5363 int F77_DUMMY_MAIN() { return 1; }
5364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005365int
5366main ()
5367{
5368if ((int *) 0)
5369 return 0;
5370if (sizeof (int))
5371 return 0;
5372 ;
5373 return 0;
5374}
5375_ACEOF
5376rm -f conftest.$ac_objext
5377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5378 (eval $ac_compile) 2>&5
5379 ac_status=$?
5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381 (exit $ac_status); } &&
5382 { ac_try='test -s conftest.$ac_objext'
5383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5384 (eval $ac_try) 2>&5
5385 ac_status=$?
5386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5387 (exit $ac_status); }; }; then
5388 ac_cv_type_int=yes
5389else
5390 echo "$as_me: failed program was:" >&5
5391cat conftest.$ac_ext >&5
5392ac_cv_type_int=no
5393fi
5394rm -f conftest.$ac_objext conftest.$ac_ext
5395fi
5396echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5397echo "${ECHO_T}$ac_cv_type_int" >&6
5398
5399echo "$as_me:$LINENO: checking size of int" >&5
5400echo $ECHO_N "checking size of int... $ECHO_C" >&6
5401if test "${ac_cv_sizeof_int+set}" = set; then
5402 echo $ECHO_N "(cached) $ECHO_C" >&6
5403else
5404 if test "$ac_cv_type_int" = yes; then
5405 # The cast to unsigned long works around a bug in the HP C Compiler
5406 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5407 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5408 # This bug is HP SR number 8606223364.
5409 if test "$cross_compiling" = yes; then
5410 # Depending upon the size, compute the lo and hi bounds.
5411cat >conftest.$ac_ext <<_ACEOF
5412#line $LINENO "configure"
5413#include "confdefs.h"
5414$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005415#ifdef F77_DUMMY_MAIN
5416# ifdef __cplusplus
5417 extern "C"
5418# endif
5419 int F77_DUMMY_MAIN() { return 1; }
5420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005421int
5422main ()
5423{
5424static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5425test_array [0] = 0
5426
5427 ;
5428 return 0;
5429}
5430_ACEOF
5431rm -f conftest.$ac_objext
5432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5433 (eval $ac_compile) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); } &&
5437 { ac_try='test -s conftest.$ac_objext'
5438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5439 (eval $ac_try) 2>&5
5440 ac_status=$?
5441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442 (exit $ac_status); }; }; then
5443 ac_lo=0 ac_mid=0
5444 while :; do
5445 cat >conftest.$ac_ext <<_ACEOF
5446#line $LINENO "configure"
5447#include "confdefs.h"
5448$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005449#ifdef F77_DUMMY_MAIN
5450# ifdef __cplusplus
5451 extern "C"
5452# endif
5453 int F77_DUMMY_MAIN() { return 1; }
5454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005455int
5456main ()
5457{
5458static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5459test_array [0] = 0
5460
5461 ;
5462 return 0;
5463}
5464_ACEOF
5465rm -f conftest.$ac_objext
5466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5467 (eval $ac_compile) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); } &&
5471 { ac_try='test -s conftest.$ac_objext'
5472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5473 (eval $ac_try) 2>&5
5474 ac_status=$?
5475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476 (exit $ac_status); }; }; then
5477 ac_hi=$ac_mid; break
5478else
5479 echo "$as_me: failed program was:" >&5
5480cat conftest.$ac_ext >&5
5481ac_lo=`expr $ac_mid + 1`
5482 if test $ac_lo -le $ac_mid; then
5483 ac_lo= ac_hi=
5484 break
5485 fi
5486 ac_mid=`expr 2 '*' $ac_mid + 1`
5487fi
5488rm -f conftest.$ac_objext conftest.$ac_ext
5489 done
5490else
5491 echo "$as_me: failed program was:" >&5
5492cat conftest.$ac_ext >&5
5493cat >conftest.$ac_ext <<_ACEOF
5494#line $LINENO "configure"
5495#include "confdefs.h"
5496$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005497#ifdef F77_DUMMY_MAIN
5498# ifdef __cplusplus
5499 extern "C"
5500# endif
5501 int F77_DUMMY_MAIN() { return 1; }
5502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005503int
5504main ()
5505{
5506static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5507test_array [0] = 0
5508
5509 ;
5510 return 0;
5511}
5512_ACEOF
5513rm -f conftest.$ac_objext
5514if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5515 (eval $ac_compile) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); } &&
5519 { ac_try='test -s conftest.$ac_objext'
5520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5521 (eval $ac_try) 2>&5
5522 ac_status=$?
5523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524 (exit $ac_status); }; }; then
5525 ac_hi=-1 ac_mid=-1
5526 while :; do
5527 cat >conftest.$ac_ext <<_ACEOF
5528#line $LINENO "configure"
5529#include "confdefs.h"
5530$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005531#ifdef F77_DUMMY_MAIN
5532# ifdef __cplusplus
5533 extern "C"
5534# endif
5535 int F77_DUMMY_MAIN() { return 1; }
5536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005537int
5538main ()
5539{
5540static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5541test_array [0] = 0
5542
5543 ;
5544 return 0;
5545}
5546_ACEOF
5547rm -f conftest.$ac_objext
5548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5549 (eval $ac_compile) 2>&5
5550 ac_status=$?
5551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5552 (exit $ac_status); } &&
5553 { ac_try='test -s conftest.$ac_objext'
5554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5555 (eval $ac_try) 2>&5
5556 ac_status=$?
5557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5558 (exit $ac_status); }; }; then
5559 ac_lo=$ac_mid; break
5560else
5561 echo "$as_me: failed program was:" >&5
5562cat conftest.$ac_ext >&5
5563ac_hi=`expr '(' $ac_mid ')' - 1`
5564 if test $ac_mid -le $ac_hi; then
5565 ac_lo= ac_hi=
5566 break
5567 fi
5568 ac_mid=`expr 2 '*' $ac_mid`
5569fi
5570rm -f conftest.$ac_objext conftest.$ac_ext
5571 done
5572else
5573 echo "$as_me: failed program was:" >&5
5574cat conftest.$ac_ext >&5
5575ac_lo= ac_hi=
5576fi
5577rm -f conftest.$ac_objext conftest.$ac_ext
5578fi
5579rm -f conftest.$ac_objext conftest.$ac_ext
5580# Binary search between lo and hi bounds.
5581while test "x$ac_lo" != "x$ac_hi"; do
5582 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5583 cat >conftest.$ac_ext <<_ACEOF
5584#line $LINENO "configure"
5585#include "confdefs.h"
5586$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005587#ifdef F77_DUMMY_MAIN
5588# ifdef __cplusplus
5589 extern "C"
5590# endif
5591 int F77_DUMMY_MAIN() { return 1; }
5592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005593int
5594main ()
5595{
5596static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5597test_array [0] = 0
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603rm -f conftest.$ac_objext
5604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5605 (eval $ac_compile) 2>&5
5606 ac_status=$?
5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608 (exit $ac_status); } &&
5609 { ac_try='test -s conftest.$ac_objext'
5610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5611 (eval $ac_try) 2>&5
5612 ac_status=$?
5613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5614 (exit $ac_status); }; }; then
5615 ac_hi=$ac_mid
5616else
5617 echo "$as_me: failed program was:" >&5
5618cat conftest.$ac_ext >&5
5619ac_lo=`expr '(' $ac_mid ')' + 1`
5620fi
5621rm -f conftest.$ac_objext conftest.$ac_ext
5622done
5623case $ac_lo in
5624?*) ac_cv_sizeof_int=$ac_lo;;
5625'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5626echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5627 { (exit 1); exit 1; }; } ;;
5628esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005629else
5630 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005631 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5632echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5633 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005634else
Martin v. Löwis11437992002-04-12 09:54:03 +00005635 cat >conftest.$ac_ext <<_ACEOF
5636#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005637#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005638$ac_includes_default
5639long longval () { return (long) (sizeof (int)); }
5640unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005641#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005642#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005643#ifdef F77_DUMMY_MAIN
5644# ifdef __cplusplus
5645 extern "C"
5646# endif
5647 int F77_DUMMY_MAIN() { return 1; }
5648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005649int
5650main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005651{
Martin v. Löwis11437992002-04-12 09:54:03 +00005652
5653 FILE *f = fopen ("conftest.val", "w");
5654 if (! f)
5655 exit (1);
5656 if (((long) (sizeof (int))) < 0)
5657 {
5658 long i = longval ();
5659 if (i != ((long) (sizeof (int))))
5660 exit (1);
5661 fprintf (f, "%ld\n", i);
5662 }
5663 else
5664 {
5665 unsigned long i = ulongval ();
5666 if (i != ((long) (sizeof (int))))
5667 exit (1);
5668 fprintf (f, "%lu\n", i);
5669 }
5670 exit (ferror (f) || fclose (f) != 0);
5671
5672 ;
5673 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005674}
Martin v. Löwis11437992002-04-12 09:54:03 +00005675_ACEOF
5676rm -f conftest$ac_exeext
5677if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5678 (eval $ac_link) 2>&5
5679 ac_status=$?
5680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683 (eval $ac_try) 2>&5
5684 ac_status=$?
5685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005688else
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 echo "$as_me: program exited with status $ac_status" >&5
5690echo "$as_me: failed program was:" >&5
5691cat conftest.$ac_ext >&5
5692( exit $ac_status )
5693{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5694echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5695 { (exit 1); exit 1; }; }
5696fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005697rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005698fi
5699fi
5700rm -f conftest.val
5701else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005702 ac_cv_sizeof_int=0
5703fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005705echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5706echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5707cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005708#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005709_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005710
5711
Martin v. Löwis11437992002-04-12 09:54:03 +00005712echo "$as_me:$LINENO: checking for long" >&5
5713echo $ECHO_N "checking for long... $ECHO_C" >&6
5714if test "${ac_cv_type_long+set}" = set; then
5715 echo $ECHO_N "(cached) $ECHO_C" >&6
5716else
5717 cat >conftest.$ac_ext <<_ACEOF
5718#line $LINENO "configure"
5719#include "confdefs.h"
5720$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005721#ifdef F77_DUMMY_MAIN
5722# ifdef __cplusplus
5723 extern "C"
5724# endif
5725 int F77_DUMMY_MAIN() { return 1; }
5726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005727int
5728main ()
5729{
5730if ((long *) 0)
5731 return 0;
5732if (sizeof (long))
5733 return 0;
5734 ;
5735 return 0;
5736}
5737_ACEOF
5738rm -f conftest.$ac_objext
5739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5740 (eval $ac_compile) 2>&5
5741 ac_status=$?
5742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5743 (exit $ac_status); } &&
5744 { ac_try='test -s conftest.$ac_objext'
5745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5746 (eval $ac_try) 2>&5
5747 ac_status=$?
5748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5749 (exit $ac_status); }; }; then
5750 ac_cv_type_long=yes
5751else
5752 echo "$as_me: failed program was:" >&5
5753cat conftest.$ac_ext >&5
5754ac_cv_type_long=no
5755fi
5756rm -f conftest.$ac_objext conftest.$ac_ext
5757fi
5758echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5759echo "${ECHO_T}$ac_cv_type_long" >&6
5760
5761echo "$as_me:$LINENO: checking size of long" >&5
5762echo $ECHO_N "checking size of long... $ECHO_C" >&6
5763if test "${ac_cv_sizeof_long+set}" = set; then
5764 echo $ECHO_N "(cached) $ECHO_C" >&6
5765else
5766 if test "$ac_cv_type_long" = yes; then
5767 # The cast to unsigned long works around a bug in the HP C Compiler
5768 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5769 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5770 # This bug is HP SR number 8606223364.
5771 if test "$cross_compiling" = yes; then
5772 # Depending upon the size, compute the lo and hi bounds.
5773cat >conftest.$ac_ext <<_ACEOF
5774#line $LINENO "configure"
5775#include "confdefs.h"
5776$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005777#ifdef F77_DUMMY_MAIN
5778# ifdef __cplusplus
5779 extern "C"
5780# endif
5781 int F77_DUMMY_MAIN() { return 1; }
5782#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005783int
5784main ()
5785{
5786static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5787test_array [0] = 0
5788
5789 ;
5790 return 0;
5791}
5792_ACEOF
5793rm -f conftest.$ac_objext
5794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5795 (eval $ac_compile) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); } &&
5799 { ac_try='test -s conftest.$ac_objext'
5800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801 (eval $ac_try) 2>&5
5802 ac_status=$?
5803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804 (exit $ac_status); }; }; then
5805 ac_lo=0 ac_mid=0
5806 while :; do
5807 cat >conftest.$ac_ext <<_ACEOF
5808#line $LINENO "configure"
5809#include "confdefs.h"
5810$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005811#ifdef F77_DUMMY_MAIN
5812# ifdef __cplusplus
5813 extern "C"
5814# endif
5815 int F77_DUMMY_MAIN() { return 1; }
5816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
5820static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5821test_array [0] = 0
5822
5823 ;
5824 return 0;
5825}
5826_ACEOF
5827rm -f conftest.$ac_objext
5828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5829 (eval $ac_compile) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); } &&
5833 { ac_try='test -s conftest.$ac_objext'
5834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5835 (eval $ac_try) 2>&5
5836 ac_status=$?
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); }; }; then
5839 ac_hi=$ac_mid; break
5840else
5841 echo "$as_me: failed program was:" >&5
5842cat conftest.$ac_ext >&5
5843ac_lo=`expr $ac_mid + 1`
5844 if test $ac_lo -le $ac_mid; then
5845 ac_lo= ac_hi=
5846 break
5847 fi
5848 ac_mid=`expr 2 '*' $ac_mid + 1`
5849fi
5850rm -f conftest.$ac_objext conftest.$ac_ext
5851 done
5852else
5853 echo "$as_me: failed program was:" >&5
5854cat conftest.$ac_ext >&5
5855cat >conftest.$ac_ext <<_ACEOF
5856#line $LINENO "configure"
5857#include "confdefs.h"
5858$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005859#ifdef F77_DUMMY_MAIN
5860# ifdef __cplusplus
5861 extern "C"
5862# endif
5863 int F77_DUMMY_MAIN() { return 1; }
5864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005865int
5866main ()
5867{
5868static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5869test_array [0] = 0
5870
5871 ;
5872 return 0;
5873}
5874_ACEOF
5875rm -f conftest.$ac_objext
5876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5877 (eval $ac_compile) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); } &&
5881 { ac_try='test -s conftest.$ac_objext'
5882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5883 (eval $ac_try) 2>&5
5884 ac_status=$?
5885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886 (exit $ac_status); }; }; then
5887 ac_hi=-1 ac_mid=-1
5888 while :; do
5889 cat >conftest.$ac_ext <<_ACEOF
5890#line $LINENO "configure"
5891#include "confdefs.h"
5892$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005893#ifdef F77_DUMMY_MAIN
5894# ifdef __cplusplus
5895 extern "C"
5896# endif
5897 int F77_DUMMY_MAIN() { return 1; }
5898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005899int
5900main ()
5901{
5902static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5903test_array [0] = 0
5904
5905 ;
5906 return 0;
5907}
5908_ACEOF
5909rm -f conftest.$ac_objext
5910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5911 (eval $ac_compile) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); } &&
5915 { ac_try='test -s conftest.$ac_objext'
5916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5917 (eval $ac_try) 2>&5
5918 ac_status=$?
5919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5920 (exit $ac_status); }; }; then
5921 ac_lo=$ac_mid; break
5922else
5923 echo "$as_me: failed program was:" >&5
5924cat conftest.$ac_ext >&5
5925ac_hi=`expr '(' $ac_mid ')' - 1`
5926 if test $ac_mid -le $ac_hi; then
5927 ac_lo= ac_hi=
5928 break
5929 fi
5930 ac_mid=`expr 2 '*' $ac_mid`
5931fi
5932rm -f conftest.$ac_objext conftest.$ac_ext
5933 done
5934else
5935 echo "$as_me: failed program was:" >&5
5936cat conftest.$ac_ext >&5
5937ac_lo= ac_hi=
5938fi
5939rm -f conftest.$ac_objext conftest.$ac_ext
5940fi
5941rm -f conftest.$ac_objext conftest.$ac_ext
5942# Binary search between lo and hi bounds.
5943while test "x$ac_lo" != "x$ac_hi"; do
5944 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5945 cat >conftest.$ac_ext <<_ACEOF
5946#line $LINENO "configure"
5947#include "confdefs.h"
5948$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005949#ifdef F77_DUMMY_MAIN
5950# ifdef __cplusplus
5951 extern "C"
5952# endif
5953 int F77_DUMMY_MAIN() { return 1; }
5954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005955int
5956main ()
5957{
5958static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5959test_array [0] = 0
5960
5961 ;
5962 return 0;
5963}
5964_ACEOF
5965rm -f conftest.$ac_objext
5966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5967 (eval $ac_compile) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); } &&
5971 { ac_try='test -s conftest.$ac_objext'
5972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5973 (eval $ac_try) 2>&5
5974 ac_status=$?
5975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); }; }; then
5977 ac_hi=$ac_mid
5978else
5979 echo "$as_me: failed program was:" >&5
5980cat conftest.$ac_ext >&5
5981ac_lo=`expr '(' $ac_mid ')' + 1`
5982fi
5983rm -f conftest.$ac_objext conftest.$ac_ext
5984done
5985case $ac_lo in
5986?*) ac_cv_sizeof_long=$ac_lo;;
5987'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5988echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5989 { (exit 1); exit 1; }; } ;;
5990esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005991else
5992 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5994echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5995 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005996else
Martin v. Löwis11437992002-04-12 09:54:03 +00005997 cat >conftest.$ac_ext <<_ACEOF
5998#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005999#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006000$ac_includes_default
6001long longval () { return (long) (sizeof (long)); }
6002unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006003#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006004#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006005#ifdef F77_DUMMY_MAIN
6006# ifdef __cplusplus
6007 extern "C"
6008# endif
6009 int F77_DUMMY_MAIN() { return 1; }
6010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006011int
6012main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006013{
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
6015 FILE *f = fopen ("conftest.val", "w");
6016 if (! f)
6017 exit (1);
6018 if (((long) (sizeof (long))) < 0)
6019 {
6020 long i = longval ();
6021 if (i != ((long) (sizeof (long))))
6022 exit (1);
6023 fprintf (f, "%ld\n", i);
6024 }
6025 else
6026 {
6027 unsigned long i = ulongval ();
6028 if (i != ((long) (sizeof (long))))
6029 exit (1);
6030 fprintf (f, "%lu\n", i);
6031 }
6032 exit (ferror (f) || fclose (f) != 0);
6033
6034 ;
6035 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006036}
Martin v. Löwis11437992002-04-12 09:54:03 +00006037_ACEOF
6038rm -f conftest$ac_exeext
6039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6040 (eval $ac_link) 2>&5
6041 ac_status=$?
6042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6045 (eval $ac_try) 2>&5
6046 ac_status=$?
6047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048 (exit $ac_status); }; }; then
6049 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006050else
Martin v. Löwis11437992002-04-12 09:54:03 +00006051 echo "$as_me: program exited with status $ac_status" >&5
6052echo "$as_me: failed program was:" >&5
6053cat conftest.$ac_ext >&5
6054( exit $ac_status )
6055{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6056echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6057 { (exit 1); exit 1; }; }
6058fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006059rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006060fi
6061fi
6062rm -f conftest.val
6063else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006064 ac_cv_sizeof_long=0
6065fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006066fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006067echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6068echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6069cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006070#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006071_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006072
6073
Martin v. Löwis11437992002-04-12 09:54:03 +00006074echo "$as_me:$LINENO: checking for void *" >&5
6075echo $ECHO_N "checking for void *... $ECHO_C" >&6
6076if test "${ac_cv_type_void_p+set}" = set; then
6077 echo $ECHO_N "(cached) $ECHO_C" >&6
6078else
6079 cat >conftest.$ac_ext <<_ACEOF
6080#line $LINENO "configure"
6081#include "confdefs.h"
6082$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006083#ifdef F77_DUMMY_MAIN
6084# ifdef __cplusplus
6085 extern "C"
6086# endif
6087 int F77_DUMMY_MAIN() { return 1; }
6088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006089int
6090main ()
6091{
6092if ((void * *) 0)
6093 return 0;
6094if (sizeof (void *))
6095 return 0;
6096 ;
6097 return 0;
6098}
6099_ACEOF
6100rm -f conftest.$ac_objext
6101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6102 (eval $ac_compile) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); } &&
6106 { ac_try='test -s conftest.$ac_objext'
6107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6108 (eval $ac_try) 2>&5
6109 ac_status=$?
6110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6111 (exit $ac_status); }; }; then
6112 ac_cv_type_void_p=yes
6113else
6114 echo "$as_me: failed program was:" >&5
6115cat conftest.$ac_ext >&5
6116ac_cv_type_void_p=no
6117fi
6118rm -f conftest.$ac_objext conftest.$ac_ext
6119fi
6120echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6121echo "${ECHO_T}$ac_cv_type_void_p" >&6
6122
6123echo "$as_me:$LINENO: checking size of void *" >&5
6124echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6125if test "${ac_cv_sizeof_void_p+set}" = set; then
6126 echo $ECHO_N "(cached) $ECHO_C" >&6
6127else
6128 if test "$ac_cv_type_void_p" = yes; then
6129 # The cast to unsigned long works around a bug in the HP C Compiler
6130 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6131 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6132 # This bug is HP SR number 8606223364.
6133 if test "$cross_compiling" = yes; then
6134 # Depending upon the size, compute the lo and hi bounds.
6135cat >conftest.$ac_ext <<_ACEOF
6136#line $LINENO "configure"
6137#include "confdefs.h"
6138$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006139#ifdef F77_DUMMY_MAIN
6140# ifdef __cplusplus
6141 extern "C"
6142# endif
6143 int F77_DUMMY_MAIN() { return 1; }
6144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006145int
6146main ()
6147{
6148static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6149test_array [0] = 0
6150
6151 ;
6152 return 0;
6153}
6154_ACEOF
6155rm -f conftest.$ac_objext
6156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6157 (eval $ac_compile) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); } &&
6161 { ac_try='test -s conftest.$ac_objext'
6162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6163 (eval $ac_try) 2>&5
6164 ac_status=$?
6165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6166 (exit $ac_status); }; }; then
6167 ac_lo=0 ac_mid=0
6168 while :; do
6169 cat >conftest.$ac_ext <<_ACEOF
6170#line $LINENO "configure"
6171#include "confdefs.h"
6172$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006173#ifdef F77_DUMMY_MAIN
6174# ifdef __cplusplus
6175 extern "C"
6176# endif
6177 int F77_DUMMY_MAIN() { return 1; }
6178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006179int
6180main ()
6181{
6182static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6183test_array [0] = 0
6184
6185 ;
6186 return 0;
6187}
6188_ACEOF
6189rm -f conftest.$ac_objext
6190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6191 (eval $ac_compile) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); } &&
6195 { ac_try='test -s conftest.$ac_objext'
6196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6197 (eval $ac_try) 2>&5
6198 ac_status=$?
6199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6200 (exit $ac_status); }; }; then
6201 ac_hi=$ac_mid; break
6202else
6203 echo "$as_me: failed program was:" >&5
6204cat conftest.$ac_ext >&5
6205ac_lo=`expr $ac_mid + 1`
6206 if test $ac_lo -le $ac_mid; then
6207 ac_lo= ac_hi=
6208 break
6209 fi
6210 ac_mid=`expr 2 '*' $ac_mid + 1`
6211fi
6212rm -f conftest.$ac_objext conftest.$ac_ext
6213 done
6214else
6215 echo "$as_me: failed program was:" >&5
6216cat conftest.$ac_ext >&5
6217cat >conftest.$ac_ext <<_ACEOF
6218#line $LINENO "configure"
6219#include "confdefs.h"
6220$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006221#ifdef F77_DUMMY_MAIN
6222# ifdef __cplusplus
6223 extern "C"
6224# endif
6225 int F77_DUMMY_MAIN() { return 1; }
6226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006227int
6228main ()
6229{
6230static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6231test_array [0] = 0
6232
6233 ;
6234 return 0;
6235}
6236_ACEOF
6237rm -f conftest.$ac_objext
6238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6239 (eval $ac_compile) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); } &&
6243 { ac_try='test -s conftest.$ac_objext'
6244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6245 (eval $ac_try) 2>&5
6246 ac_status=$?
6247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248 (exit $ac_status); }; }; then
6249 ac_hi=-1 ac_mid=-1
6250 while :; do
6251 cat >conftest.$ac_ext <<_ACEOF
6252#line $LINENO "configure"
6253#include "confdefs.h"
6254$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006255#ifdef F77_DUMMY_MAIN
6256# ifdef __cplusplus
6257 extern "C"
6258# endif
6259 int F77_DUMMY_MAIN() { return 1; }
6260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006261int
6262main ()
6263{
6264static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6265test_array [0] = 0
6266
6267 ;
6268 return 0;
6269}
6270_ACEOF
6271rm -f conftest.$ac_objext
6272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6273 (eval $ac_compile) 2>&5
6274 ac_status=$?
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276 (exit $ac_status); } &&
6277 { ac_try='test -s conftest.$ac_objext'
6278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6279 (eval $ac_try) 2>&5
6280 ac_status=$?
6281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282 (exit $ac_status); }; }; then
6283 ac_lo=$ac_mid; break
6284else
6285 echo "$as_me: failed program was:" >&5
6286cat conftest.$ac_ext >&5
6287ac_hi=`expr '(' $ac_mid ')' - 1`
6288 if test $ac_mid -le $ac_hi; then
6289 ac_lo= ac_hi=
6290 break
6291 fi
6292 ac_mid=`expr 2 '*' $ac_mid`
6293fi
6294rm -f conftest.$ac_objext conftest.$ac_ext
6295 done
6296else
6297 echo "$as_me: failed program was:" >&5
6298cat conftest.$ac_ext >&5
6299ac_lo= ac_hi=
6300fi
6301rm -f conftest.$ac_objext conftest.$ac_ext
6302fi
6303rm -f conftest.$ac_objext conftest.$ac_ext
6304# Binary search between lo and hi bounds.
6305while test "x$ac_lo" != "x$ac_hi"; do
6306 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6307 cat >conftest.$ac_ext <<_ACEOF
6308#line $LINENO "configure"
6309#include "confdefs.h"
6310$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006311#ifdef F77_DUMMY_MAIN
6312# ifdef __cplusplus
6313 extern "C"
6314# endif
6315 int F77_DUMMY_MAIN() { return 1; }
6316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006317int
6318main ()
6319{
6320static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6321test_array [0] = 0
6322
6323 ;
6324 return 0;
6325}
6326_ACEOF
6327rm -f conftest.$ac_objext
6328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6329 (eval $ac_compile) 2>&5
6330 ac_status=$?
6331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332 (exit $ac_status); } &&
6333 { ac_try='test -s conftest.$ac_objext'
6334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6335 (eval $ac_try) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); }; }; then
6339 ac_hi=$ac_mid
6340else
6341 echo "$as_me: failed program was:" >&5
6342cat conftest.$ac_ext >&5
6343ac_lo=`expr '(' $ac_mid ')' + 1`
6344fi
6345rm -f conftest.$ac_objext conftest.$ac_ext
6346done
6347case $ac_lo in
6348?*) ac_cv_sizeof_void_p=$ac_lo;;
6349'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6350echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6351 { (exit 1); exit 1; }; } ;;
6352esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006353else
6354 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6356echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6357 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006358else
Martin v. Löwis11437992002-04-12 09:54:03 +00006359 cat >conftest.$ac_ext <<_ACEOF
6360#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006361#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006362$ac_includes_default
6363long longval () { return (long) (sizeof (void *)); }
6364unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006365#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006366#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006367#ifdef F77_DUMMY_MAIN
6368# ifdef __cplusplus
6369 extern "C"
6370# endif
6371 int F77_DUMMY_MAIN() { return 1; }
6372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006373int
6374main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006375{
Martin v. Löwis11437992002-04-12 09:54:03 +00006376
6377 FILE *f = fopen ("conftest.val", "w");
6378 if (! f)
6379 exit (1);
6380 if (((long) (sizeof (void *))) < 0)
6381 {
6382 long i = longval ();
6383 if (i != ((long) (sizeof (void *))))
6384 exit (1);
6385 fprintf (f, "%ld\n", i);
6386 }
6387 else
6388 {
6389 unsigned long i = ulongval ();
6390 if (i != ((long) (sizeof (void *))))
6391 exit (1);
6392 fprintf (f, "%lu\n", i);
6393 }
6394 exit (ferror (f) || fclose (f) != 0);
6395
6396 ;
6397 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006398}
Martin v. Löwis11437992002-04-12 09:54:03 +00006399_ACEOF
6400rm -f conftest$ac_exeext
6401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6402 (eval $ac_link) 2>&5
6403 ac_status=$?
6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6407 (eval $ac_try) 2>&5
6408 ac_status=$?
6409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410 (exit $ac_status); }; }; then
6411 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006412else
Martin v. Löwis11437992002-04-12 09:54:03 +00006413 echo "$as_me: program exited with status $ac_status" >&5
6414echo "$as_me: failed program was:" >&5
6415cat conftest.$ac_ext >&5
6416( exit $ac_status )
6417{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6418echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6419 { (exit 1); exit 1; }; }
6420fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006421rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006422fi
6423fi
6424rm -f conftest.val
6425else
Guido van Rossumad678af1998-10-02 14:42:15 +00006426 ac_cv_sizeof_void_p=0
6427fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006428fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006429echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6430echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6431cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006432#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006433_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006434
6435
Martin v. Löwis11437992002-04-12 09:54:03 +00006436echo "$as_me:$LINENO: checking for char" >&5
6437echo $ECHO_N "checking for char... $ECHO_C" >&6
6438if test "${ac_cv_type_char+set}" = set; then
6439 echo $ECHO_N "(cached) $ECHO_C" >&6
6440else
6441 cat >conftest.$ac_ext <<_ACEOF
6442#line $LINENO "configure"
6443#include "confdefs.h"
6444$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006445#ifdef F77_DUMMY_MAIN
6446# ifdef __cplusplus
6447 extern "C"
6448# endif
6449 int F77_DUMMY_MAIN() { return 1; }
6450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006451int
6452main ()
6453{
6454if ((char *) 0)
6455 return 0;
6456if (sizeof (char))
6457 return 0;
6458 ;
6459 return 0;
6460}
6461_ACEOF
6462rm -f conftest.$ac_objext
6463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6464 (eval $ac_compile) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); } &&
6468 { ac_try='test -s conftest.$ac_objext'
6469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6470 (eval $ac_try) 2>&5
6471 ac_status=$?
6472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6473 (exit $ac_status); }; }; then
6474 ac_cv_type_char=yes
6475else
6476 echo "$as_me: failed program was:" >&5
6477cat conftest.$ac_ext >&5
6478ac_cv_type_char=no
6479fi
6480rm -f conftest.$ac_objext conftest.$ac_ext
6481fi
6482echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6483echo "${ECHO_T}$ac_cv_type_char" >&6
6484
6485echo "$as_me:$LINENO: checking size of char" >&5
6486echo $ECHO_N "checking size of char... $ECHO_C" >&6
6487if test "${ac_cv_sizeof_char+set}" = set; then
6488 echo $ECHO_N "(cached) $ECHO_C" >&6
6489else
6490 if test "$ac_cv_type_char" = yes; then
6491 # The cast to unsigned long works around a bug in the HP C Compiler
6492 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6493 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6494 # This bug is HP SR number 8606223364.
6495 if test "$cross_compiling" = yes; then
6496 # Depending upon the size, compute the lo and hi bounds.
6497cat >conftest.$ac_ext <<_ACEOF
6498#line $LINENO "configure"
6499#include "confdefs.h"
6500$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006501#ifdef F77_DUMMY_MAIN
6502# ifdef __cplusplus
6503 extern "C"
6504# endif
6505 int F77_DUMMY_MAIN() { return 1; }
6506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006507int
6508main ()
6509{
6510static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6511test_array [0] = 0
6512
6513 ;
6514 return 0;
6515}
6516_ACEOF
6517rm -f conftest.$ac_objext
6518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6519 (eval $ac_compile) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest.$ac_objext'
6524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6525 (eval $ac_try) 2>&5
6526 ac_status=$?
6527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 ac_lo=0 ac_mid=0
6530 while :; do
6531 cat >conftest.$ac_ext <<_ACEOF
6532#line $LINENO "configure"
6533#include "confdefs.h"
6534$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006535#ifdef F77_DUMMY_MAIN
6536# ifdef __cplusplus
6537 extern "C"
6538# endif
6539 int F77_DUMMY_MAIN() { return 1; }
6540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006541int
6542main ()
6543{
6544static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6545test_array [0] = 0
6546
6547 ;
6548 return 0;
6549}
6550_ACEOF
6551rm -f conftest.$ac_objext
6552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6553 (eval $ac_compile) 2>&5
6554 ac_status=$?
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); } &&
6557 { ac_try='test -s conftest.$ac_objext'
6558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6559 (eval $ac_try) 2>&5
6560 ac_status=$?
6561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562 (exit $ac_status); }; }; then
6563 ac_hi=$ac_mid; break
6564else
6565 echo "$as_me: failed program was:" >&5
6566cat conftest.$ac_ext >&5
6567ac_lo=`expr $ac_mid + 1`
6568 if test $ac_lo -le $ac_mid; then
6569 ac_lo= ac_hi=
6570 break
6571 fi
6572 ac_mid=`expr 2 '*' $ac_mid + 1`
6573fi
6574rm -f conftest.$ac_objext conftest.$ac_ext
6575 done
6576else
6577 echo "$as_me: failed program was:" >&5
6578cat conftest.$ac_ext >&5
6579cat >conftest.$ac_ext <<_ACEOF
6580#line $LINENO "configure"
6581#include "confdefs.h"
6582$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006583#ifdef F77_DUMMY_MAIN
6584# ifdef __cplusplus
6585 extern "C"
6586# endif
6587 int F77_DUMMY_MAIN() { return 1; }
6588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006589int
6590main ()
6591{
6592static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6593test_array [0] = 0
6594
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
6600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6601 (eval $ac_compile) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); } &&
6605 { ac_try='test -s conftest.$ac_objext'
6606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6607 (eval $ac_try) 2>&5
6608 ac_status=$?
6609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610 (exit $ac_status); }; }; then
6611 ac_hi=-1 ac_mid=-1
6612 while :; do
6613 cat >conftest.$ac_ext <<_ACEOF
6614#line $LINENO "configure"
6615#include "confdefs.h"
6616$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006617#ifdef F77_DUMMY_MAIN
6618# ifdef __cplusplus
6619 extern "C"
6620# endif
6621 int F77_DUMMY_MAIN() { return 1; }
6622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006623int
6624main ()
6625{
6626static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6627test_array [0] = 0
6628
6629 ;
6630 return 0;
6631}
6632_ACEOF
6633rm -f conftest.$ac_objext
6634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6635 (eval $ac_compile) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); } &&
6639 { ac_try='test -s conftest.$ac_objext'
6640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6641 (eval $ac_try) 2>&5
6642 ac_status=$?
6643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6644 (exit $ac_status); }; }; then
6645 ac_lo=$ac_mid; break
6646else
6647 echo "$as_me: failed program was:" >&5
6648cat conftest.$ac_ext >&5
6649ac_hi=`expr '(' $ac_mid ')' - 1`
6650 if test $ac_mid -le $ac_hi; then
6651 ac_lo= ac_hi=
6652 break
6653 fi
6654 ac_mid=`expr 2 '*' $ac_mid`
6655fi
6656rm -f conftest.$ac_objext conftest.$ac_ext
6657 done
6658else
6659 echo "$as_me: failed program was:" >&5
6660cat conftest.$ac_ext >&5
6661ac_lo= ac_hi=
6662fi
6663rm -f conftest.$ac_objext conftest.$ac_ext
6664fi
6665rm -f conftest.$ac_objext conftest.$ac_ext
6666# Binary search between lo and hi bounds.
6667while test "x$ac_lo" != "x$ac_hi"; do
6668 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6669 cat >conftest.$ac_ext <<_ACEOF
6670#line $LINENO "configure"
6671#include "confdefs.h"
6672$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006673#ifdef F77_DUMMY_MAIN
6674# ifdef __cplusplus
6675 extern "C"
6676# endif
6677 int F77_DUMMY_MAIN() { return 1; }
6678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006679int
6680main ()
6681{
6682static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6683test_array [0] = 0
6684
6685 ;
6686 return 0;
6687}
6688_ACEOF
6689rm -f conftest.$ac_objext
6690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6691 (eval $ac_compile) 2>&5
6692 ac_status=$?
6693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694 (exit $ac_status); } &&
6695 { ac_try='test -s conftest.$ac_objext'
6696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6697 (eval $ac_try) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); }; }; then
6701 ac_hi=$ac_mid
6702else
6703 echo "$as_me: failed program was:" >&5
6704cat conftest.$ac_ext >&5
6705ac_lo=`expr '(' $ac_mid ')' + 1`
6706fi
6707rm -f conftest.$ac_objext conftest.$ac_ext
6708done
6709case $ac_lo in
6710?*) ac_cv_sizeof_char=$ac_lo;;
6711'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6712echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6713 { (exit 1); exit 1; }; } ;;
6714esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715else
6716 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6718echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6719 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006720else
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 cat >conftest.$ac_ext <<_ACEOF
6722#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006723#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006724$ac_includes_default
6725long longval () { return (long) (sizeof (char)); }
6726unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006727#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006728#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006729#ifdef F77_DUMMY_MAIN
6730# ifdef __cplusplus
6731 extern "C"
6732# endif
6733 int F77_DUMMY_MAIN() { return 1; }
6734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006735int
6736main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737{
Martin v. Löwis11437992002-04-12 09:54:03 +00006738
6739 FILE *f = fopen ("conftest.val", "w");
6740 if (! f)
6741 exit (1);
6742 if (((long) (sizeof (char))) < 0)
6743 {
6744 long i = longval ();
6745 if (i != ((long) (sizeof (char))))
6746 exit (1);
6747 fprintf (f, "%ld\n", i);
6748 }
6749 else
6750 {
6751 unsigned long i = ulongval ();
6752 if (i != ((long) (sizeof (char))))
6753 exit (1);
6754 fprintf (f, "%lu\n", i);
6755 }
6756 exit (ferror (f) || fclose (f) != 0);
6757
6758 ;
6759 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006760}
Martin v. Löwis11437992002-04-12 09:54:03 +00006761_ACEOF
6762rm -f conftest$ac_exeext
6763if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6764 (eval $ac_link) 2>&5
6765 ac_status=$?
6766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6767 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6769 (eval $ac_try) 2>&5
6770 ac_status=$?
6771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6772 (exit $ac_status); }; }; then
6773 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006774else
Martin v. Löwis11437992002-04-12 09:54:03 +00006775 echo "$as_me: program exited with status $ac_status" >&5
6776echo "$as_me: failed program was:" >&5
6777cat conftest.$ac_ext >&5
6778( exit $ac_status )
6779{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6780echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6781 { (exit 1); exit 1; }; }
6782fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006783rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006784fi
6785fi
6786rm -f conftest.val
6787else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788 ac_cv_sizeof_char=0
6789fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006790fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006791echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6792echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6793cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006794#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006795_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006796
6797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798echo "$as_me:$LINENO: checking for short" >&5
6799echo $ECHO_N "checking for short... $ECHO_C" >&6
6800if test "${ac_cv_type_short+set}" = set; then
6801 echo $ECHO_N "(cached) $ECHO_C" >&6
6802else
6803 cat >conftest.$ac_ext <<_ACEOF
6804#line $LINENO "configure"
6805#include "confdefs.h"
6806$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006807#ifdef F77_DUMMY_MAIN
6808# ifdef __cplusplus
6809 extern "C"
6810# endif
6811 int F77_DUMMY_MAIN() { return 1; }
6812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006813int
6814main ()
6815{
6816if ((short *) 0)
6817 return 0;
6818if (sizeof (short))
6819 return 0;
6820 ;
6821 return 0;
6822}
6823_ACEOF
6824rm -f conftest.$ac_objext
6825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6826 (eval $ac_compile) 2>&5
6827 ac_status=$?
6828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829 (exit $ac_status); } &&
6830 { ac_try='test -s conftest.$ac_objext'
6831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6832 (eval $ac_try) 2>&5
6833 ac_status=$?
6834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6835 (exit $ac_status); }; }; then
6836 ac_cv_type_short=yes
6837else
6838 echo "$as_me: failed program was:" >&5
6839cat conftest.$ac_ext >&5
6840ac_cv_type_short=no
6841fi
6842rm -f conftest.$ac_objext conftest.$ac_ext
6843fi
6844echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6845echo "${ECHO_T}$ac_cv_type_short" >&6
6846
6847echo "$as_me:$LINENO: checking size of short" >&5
6848echo $ECHO_N "checking size of short... $ECHO_C" >&6
6849if test "${ac_cv_sizeof_short+set}" = set; then
6850 echo $ECHO_N "(cached) $ECHO_C" >&6
6851else
6852 if test "$ac_cv_type_short" = yes; then
6853 # The cast to unsigned long works around a bug in the HP C Compiler
6854 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6855 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6856 # This bug is HP SR number 8606223364.
6857 if test "$cross_compiling" = yes; then
6858 # Depending upon the size, compute the lo and hi bounds.
6859cat >conftest.$ac_ext <<_ACEOF
6860#line $LINENO "configure"
6861#include "confdefs.h"
6862$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006863#ifdef F77_DUMMY_MAIN
6864# ifdef __cplusplus
6865 extern "C"
6866# endif
6867 int F77_DUMMY_MAIN() { return 1; }
6868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006869int
6870main ()
6871{
6872static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6873test_array [0] = 0
6874
6875 ;
6876 return 0;
6877}
6878_ACEOF
6879rm -f conftest.$ac_objext
6880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6881 (eval $ac_compile) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); } &&
6885 { ac_try='test -s conftest.$ac_objext'
6886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6887 (eval $ac_try) 2>&5
6888 ac_status=$?
6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890 (exit $ac_status); }; }; then
6891 ac_lo=0 ac_mid=0
6892 while :; do
6893 cat >conftest.$ac_ext <<_ACEOF
6894#line $LINENO "configure"
6895#include "confdefs.h"
6896$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006897#ifdef F77_DUMMY_MAIN
6898# ifdef __cplusplus
6899 extern "C"
6900# endif
6901 int F77_DUMMY_MAIN() { return 1; }
6902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006903int
6904main ()
6905{
6906static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6907test_array [0] = 0
6908
6909 ;
6910 return 0;
6911}
6912_ACEOF
6913rm -f conftest.$ac_objext
6914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6915 (eval $ac_compile) 2>&5
6916 ac_status=$?
6917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918 (exit $ac_status); } &&
6919 { ac_try='test -s conftest.$ac_objext'
6920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6921 (eval $ac_try) 2>&5
6922 ac_status=$?
6923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6924 (exit $ac_status); }; }; then
6925 ac_hi=$ac_mid; break
6926else
6927 echo "$as_me: failed program was:" >&5
6928cat conftest.$ac_ext >&5
6929ac_lo=`expr $ac_mid + 1`
6930 if test $ac_lo -le $ac_mid; then
6931 ac_lo= ac_hi=
6932 break
6933 fi
6934 ac_mid=`expr 2 '*' $ac_mid + 1`
6935fi
6936rm -f conftest.$ac_objext conftest.$ac_ext
6937 done
6938else
6939 echo "$as_me: failed program was:" >&5
6940cat conftest.$ac_ext >&5
6941cat >conftest.$ac_ext <<_ACEOF
6942#line $LINENO "configure"
6943#include "confdefs.h"
6944$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006945#ifdef F77_DUMMY_MAIN
6946# ifdef __cplusplus
6947 extern "C"
6948# endif
6949 int F77_DUMMY_MAIN() { return 1; }
6950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006951int
6952main ()
6953{
6954static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6955test_array [0] = 0
6956
6957 ;
6958 return 0;
6959}
6960_ACEOF
6961rm -f conftest.$ac_objext
6962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6963 (eval $ac_compile) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); } &&
6967 { ac_try='test -s conftest.$ac_objext'
6968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969 (eval $ac_try) 2>&5
6970 ac_status=$?
6971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972 (exit $ac_status); }; }; then
6973 ac_hi=-1 ac_mid=-1
6974 while :; do
6975 cat >conftest.$ac_ext <<_ACEOF
6976#line $LINENO "configure"
6977#include "confdefs.h"
6978$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006979#ifdef F77_DUMMY_MAIN
6980# ifdef __cplusplus
6981 extern "C"
6982# endif
6983 int F77_DUMMY_MAIN() { return 1; }
6984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006985int
6986main ()
6987{
6988static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6989test_array [0] = 0
6990
6991 ;
6992 return 0;
6993}
6994_ACEOF
6995rm -f conftest.$ac_objext
6996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6997 (eval $ac_compile) 2>&5
6998 ac_status=$?
6999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000 (exit $ac_status); } &&
7001 { ac_try='test -s conftest.$ac_objext'
7002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7003 (eval $ac_try) 2>&5
7004 ac_status=$?
7005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7006 (exit $ac_status); }; }; then
7007 ac_lo=$ac_mid; break
7008else
7009 echo "$as_me: failed program was:" >&5
7010cat conftest.$ac_ext >&5
7011ac_hi=`expr '(' $ac_mid ')' - 1`
7012 if test $ac_mid -le $ac_hi; then
7013 ac_lo= ac_hi=
7014 break
7015 fi
7016 ac_mid=`expr 2 '*' $ac_mid`
7017fi
7018rm -f conftest.$ac_objext conftest.$ac_ext
7019 done
7020else
7021 echo "$as_me: failed program was:" >&5
7022cat conftest.$ac_ext >&5
7023ac_lo= ac_hi=
7024fi
7025rm -f conftest.$ac_objext conftest.$ac_ext
7026fi
7027rm -f conftest.$ac_objext conftest.$ac_ext
7028# Binary search between lo and hi bounds.
7029while test "x$ac_lo" != "x$ac_hi"; do
7030 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7031 cat >conftest.$ac_ext <<_ACEOF
7032#line $LINENO "configure"
7033#include "confdefs.h"
7034$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007035#ifdef F77_DUMMY_MAIN
7036# ifdef __cplusplus
7037 extern "C"
7038# endif
7039 int F77_DUMMY_MAIN() { return 1; }
7040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007041int
7042main ()
7043{
7044static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7045test_array [0] = 0
7046
7047 ;
7048 return 0;
7049}
7050_ACEOF
7051rm -f conftest.$ac_objext
7052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7053 (eval $ac_compile) 2>&5
7054 ac_status=$?
7055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056 (exit $ac_status); } &&
7057 { ac_try='test -s conftest.$ac_objext'
7058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7059 (eval $ac_try) 2>&5
7060 ac_status=$?
7061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7062 (exit $ac_status); }; }; then
7063 ac_hi=$ac_mid
7064else
7065 echo "$as_me: failed program was:" >&5
7066cat conftest.$ac_ext >&5
7067ac_lo=`expr '(' $ac_mid ')' + 1`
7068fi
7069rm -f conftest.$ac_objext conftest.$ac_ext
7070done
7071case $ac_lo in
7072?*) ac_cv_sizeof_short=$ac_lo;;
7073'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7074echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7075 { (exit 1); exit 1; }; } ;;
7076esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077else
7078 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007079 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7080echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7081 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007082else
Martin v. Löwis11437992002-04-12 09:54:03 +00007083 cat >conftest.$ac_ext <<_ACEOF
7084#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007085#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007086$ac_includes_default
7087long longval () { return (long) (sizeof (short)); }
7088unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007089#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007090#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007091#ifdef F77_DUMMY_MAIN
7092# ifdef __cplusplus
7093 extern "C"
7094# endif
7095 int F77_DUMMY_MAIN() { return 1; }
7096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007097int
7098main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099{
Martin v. Löwis11437992002-04-12 09:54:03 +00007100
7101 FILE *f = fopen ("conftest.val", "w");
7102 if (! f)
7103 exit (1);
7104 if (((long) (sizeof (short))) < 0)
7105 {
7106 long i = longval ();
7107 if (i != ((long) (sizeof (short))))
7108 exit (1);
7109 fprintf (f, "%ld\n", i);
7110 }
7111 else
7112 {
7113 unsigned long i = ulongval ();
7114 if (i != ((long) (sizeof (short))))
7115 exit (1);
7116 fprintf (f, "%lu\n", i);
7117 }
7118 exit (ferror (f) || fclose (f) != 0);
7119
7120 ;
7121 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007122}
Martin v. Löwis11437992002-04-12 09:54:03 +00007123_ACEOF
7124rm -f conftest$ac_exeext
7125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7126 (eval $ac_link) 2>&5
7127 ac_status=$?
7128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7131 (eval $ac_try) 2>&5
7132 ac_status=$?
7133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7134 (exit $ac_status); }; }; then
7135 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007136else
Martin v. Löwis11437992002-04-12 09:54:03 +00007137 echo "$as_me: program exited with status $ac_status" >&5
7138echo "$as_me: failed program was:" >&5
7139cat conftest.$ac_ext >&5
7140( exit $ac_status )
7141{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7142echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7143 { (exit 1); exit 1; }; }
7144fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007145rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007146fi
7147fi
7148rm -f conftest.val
7149else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150 ac_cv_sizeof_short=0
7151fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007153echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7154echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7155cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007156#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007157_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158
7159
Martin v. Löwis11437992002-04-12 09:54:03 +00007160echo "$as_me:$LINENO: checking for float" >&5
7161echo $ECHO_N "checking for float... $ECHO_C" >&6
7162if test "${ac_cv_type_float+set}" = set; then
7163 echo $ECHO_N "(cached) $ECHO_C" >&6
7164else
7165 cat >conftest.$ac_ext <<_ACEOF
7166#line $LINENO "configure"
7167#include "confdefs.h"
7168$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007169#ifdef F77_DUMMY_MAIN
7170# ifdef __cplusplus
7171 extern "C"
7172# endif
7173 int F77_DUMMY_MAIN() { return 1; }
7174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007175int
7176main ()
7177{
7178if ((float *) 0)
7179 return 0;
7180if (sizeof (float))
7181 return 0;
7182 ;
7183 return 0;
7184}
7185_ACEOF
7186rm -f conftest.$ac_objext
7187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7188 (eval $ac_compile) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); } &&
7192 { ac_try='test -s conftest.$ac_objext'
7193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7194 (eval $ac_try) 2>&5
7195 ac_status=$?
7196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7197 (exit $ac_status); }; }; then
7198 ac_cv_type_float=yes
7199else
7200 echo "$as_me: failed program was:" >&5
7201cat conftest.$ac_ext >&5
7202ac_cv_type_float=no
7203fi
7204rm -f conftest.$ac_objext conftest.$ac_ext
7205fi
7206echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7207echo "${ECHO_T}$ac_cv_type_float" >&6
7208
7209echo "$as_me:$LINENO: checking size of float" >&5
7210echo $ECHO_N "checking size of float... $ECHO_C" >&6
7211if test "${ac_cv_sizeof_float+set}" = set; then
7212 echo $ECHO_N "(cached) $ECHO_C" >&6
7213else
7214 if test "$ac_cv_type_float" = yes; then
7215 # The cast to unsigned long works around a bug in the HP C Compiler
7216 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7217 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7218 # This bug is HP SR number 8606223364.
7219 if test "$cross_compiling" = yes; then
7220 # Depending upon the size, compute the lo and hi bounds.
7221cat >conftest.$ac_ext <<_ACEOF
7222#line $LINENO "configure"
7223#include "confdefs.h"
7224$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007225#ifdef F77_DUMMY_MAIN
7226# ifdef __cplusplus
7227 extern "C"
7228# endif
7229 int F77_DUMMY_MAIN() { return 1; }
7230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007231int
7232main ()
7233{
7234static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7235test_array [0] = 0
7236
7237 ;
7238 return 0;
7239}
7240_ACEOF
7241rm -f conftest.$ac_objext
7242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7243 (eval $ac_compile) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); } &&
7247 { ac_try='test -s conftest.$ac_objext'
7248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7249 (eval $ac_try) 2>&5
7250 ac_status=$?
7251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7252 (exit $ac_status); }; }; then
7253 ac_lo=0 ac_mid=0
7254 while :; do
7255 cat >conftest.$ac_ext <<_ACEOF
7256#line $LINENO "configure"
7257#include "confdefs.h"
7258$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007259#ifdef F77_DUMMY_MAIN
7260# ifdef __cplusplus
7261 extern "C"
7262# endif
7263 int F77_DUMMY_MAIN() { return 1; }
7264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007265int
7266main ()
7267{
7268static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7269test_array [0] = 0
7270
7271 ;
7272 return 0;
7273}
7274_ACEOF
7275rm -f conftest.$ac_objext
7276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7277 (eval $ac_compile) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); } &&
7281 { ac_try='test -s conftest.$ac_objext'
7282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7283 (eval $ac_try) 2>&5
7284 ac_status=$?
7285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7286 (exit $ac_status); }; }; then
7287 ac_hi=$ac_mid; break
7288else
7289 echo "$as_me: failed program was:" >&5
7290cat conftest.$ac_ext >&5
7291ac_lo=`expr $ac_mid + 1`
7292 if test $ac_lo -le $ac_mid; then
7293 ac_lo= ac_hi=
7294 break
7295 fi
7296 ac_mid=`expr 2 '*' $ac_mid + 1`
7297fi
7298rm -f conftest.$ac_objext conftest.$ac_ext
7299 done
7300else
7301 echo "$as_me: failed program was:" >&5
7302cat conftest.$ac_ext >&5
7303cat >conftest.$ac_ext <<_ACEOF
7304#line $LINENO "configure"
7305#include "confdefs.h"
7306$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007307#ifdef F77_DUMMY_MAIN
7308# ifdef __cplusplus
7309 extern "C"
7310# endif
7311 int F77_DUMMY_MAIN() { return 1; }
7312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007313int
7314main ()
7315{
7316static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7317test_array [0] = 0
7318
7319 ;
7320 return 0;
7321}
7322_ACEOF
7323rm -f conftest.$ac_objext
7324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7325 (eval $ac_compile) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); } &&
7329 { ac_try='test -s conftest.$ac_objext'
7330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7331 (eval $ac_try) 2>&5
7332 ac_status=$?
7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334 (exit $ac_status); }; }; then
7335 ac_hi=-1 ac_mid=-1
7336 while :; do
7337 cat >conftest.$ac_ext <<_ACEOF
7338#line $LINENO "configure"
7339#include "confdefs.h"
7340$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007341#ifdef F77_DUMMY_MAIN
7342# ifdef __cplusplus
7343 extern "C"
7344# endif
7345 int F77_DUMMY_MAIN() { return 1; }
7346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007347int
7348main ()
7349{
7350static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7351test_array [0] = 0
7352
7353 ;
7354 return 0;
7355}
7356_ACEOF
7357rm -f conftest.$ac_objext
7358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7359 (eval $ac_compile) 2>&5
7360 ac_status=$?
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
7363 { ac_try='test -s conftest.$ac_objext'
7364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7365 (eval $ac_try) 2>&5
7366 ac_status=$?
7367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368 (exit $ac_status); }; }; then
7369 ac_lo=$ac_mid; break
7370else
7371 echo "$as_me: failed program was:" >&5
7372cat conftest.$ac_ext >&5
7373ac_hi=`expr '(' $ac_mid ')' - 1`
7374 if test $ac_mid -le $ac_hi; then
7375 ac_lo= ac_hi=
7376 break
7377 fi
7378 ac_mid=`expr 2 '*' $ac_mid`
7379fi
7380rm -f conftest.$ac_objext conftest.$ac_ext
7381 done
7382else
7383 echo "$as_me: failed program was:" >&5
7384cat conftest.$ac_ext >&5
7385ac_lo= ac_hi=
7386fi
7387rm -f conftest.$ac_objext conftest.$ac_ext
7388fi
7389rm -f conftest.$ac_objext conftest.$ac_ext
7390# Binary search between lo and hi bounds.
7391while test "x$ac_lo" != "x$ac_hi"; do
7392 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7393 cat >conftest.$ac_ext <<_ACEOF
7394#line $LINENO "configure"
7395#include "confdefs.h"
7396$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007397#ifdef F77_DUMMY_MAIN
7398# ifdef __cplusplus
7399 extern "C"
7400# endif
7401 int F77_DUMMY_MAIN() { return 1; }
7402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007403int
7404main ()
7405{
7406static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7407test_array [0] = 0
7408
7409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7415 (eval $ac_compile) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); } &&
7419 { ac_try='test -s conftest.$ac_objext'
7420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7421 (eval $ac_try) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 ac_hi=$ac_mid
7426else
7427 echo "$as_me: failed program was:" >&5
7428cat conftest.$ac_ext >&5
7429ac_lo=`expr '(' $ac_mid ')' + 1`
7430fi
7431rm -f conftest.$ac_objext conftest.$ac_ext
7432done
7433case $ac_lo in
7434?*) ac_cv_sizeof_float=$ac_lo;;
7435'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7436echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7437 { (exit 1); exit 1; }; } ;;
7438esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007439else
7440 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7442echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7443 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444else
Martin v. Löwis11437992002-04-12 09:54:03 +00007445 cat >conftest.$ac_ext <<_ACEOF
7446#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007448$ac_includes_default
7449long longval () { return (long) (sizeof (float)); }
7450unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007451#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007452#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007453#ifdef F77_DUMMY_MAIN
7454# ifdef __cplusplus
7455 extern "C"
7456# endif
7457 int F77_DUMMY_MAIN() { return 1; }
7458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007459int
7460main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007461{
Martin v. Löwis11437992002-04-12 09:54:03 +00007462
7463 FILE *f = fopen ("conftest.val", "w");
7464 if (! f)
7465 exit (1);
7466 if (((long) (sizeof (float))) < 0)
7467 {
7468 long i = longval ();
7469 if (i != ((long) (sizeof (float))))
7470 exit (1);
7471 fprintf (f, "%ld\n", i);
7472 }
7473 else
7474 {
7475 unsigned long i = ulongval ();
7476 if (i != ((long) (sizeof (float))))
7477 exit (1);
7478 fprintf (f, "%lu\n", i);
7479 }
7480 exit (ferror (f) || fclose (f) != 0);
7481
7482 ;
7483 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007484}
Martin v. Löwis11437992002-04-12 09:54:03 +00007485_ACEOF
7486rm -f conftest$ac_exeext
7487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7488 (eval $ac_link) 2>&5
7489 ac_status=$?
7490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7493 (eval $ac_try) 2>&5
7494 ac_status=$?
7495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7496 (exit $ac_status); }; }; then
7497 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007498else
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 echo "$as_me: program exited with status $ac_status" >&5
7500echo "$as_me: failed program was:" >&5
7501cat conftest.$ac_ext >&5
7502( exit $ac_status )
7503{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7504echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7505 { (exit 1); exit 1; }; }
7506fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007507rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007508fi
7509fi
7510rm -f conftest.val
7511else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512 ac_cv_sizeof_float=0
7513fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007514fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007515echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7516echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7517cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007518#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007519_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007520
7521
Martin v. Löwis11437992002-04-12 09:54:03 +00007522echo "$as_me:$LINENO: checking for double" >&5
7523echo $ECHO_N "checking for double... $ECHO_C" >&6
7524if test "${ac_cv_type_double+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527 cat >conftest.$ac_ext <<_ACEOF
7528#line $LINENO "configure"
7529#include "confdefs.h"
7530$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007531#ifdef F77_DUMMY_MAIN
7532# ifdef __cplusplus
7533 extern "C"
7534# endif
7535 int F77_DUMMY_MAIN() { return 1; }
7536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007537int
7538main ()
7539{
7540if ((double *) 0)
7541 return 0;
7542if (sizeof (double))
7543 return 0;
7544 ;
7545 return 0;
7546}
7547_ACEOF
7548rm -f conftest.$ac_objext
7549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7550 (eval $ac_compile) 2>&5
7551 ac_status=$?
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553 (exit $ac_status); } &&
7554 { ac_try='test -s conftest.$ac_objext'
7555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7556 (eval $ac_try) 2>&5
7557 ac_status=$?
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); }; }; then
7560 ac_cv_type_double=yes
7561else
7562 echo "$as_me: failed program was:" >&5
7563cat conftest.$ac_ext >&5
7564ac_cv_type_double=no
7565fi
7566rm -f conftest.$ac_objext conftest.$ac_ext
7567fi
7568echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7569echo "${ECHO_T}$ac_cv_type_double" >&6
7570
7571echo "$as_me:$LINENO: checking size of double" >&5
7572echo $ECHO_N "checking size of double... $ECHO_C" >&6
7573if test "${ac_cv_sizeof_double+set}" = set; then
7574 echo $ECHO_N "(cached) $ECHO_C" >&6
7575else
7576 if test "$ac_cv_type_double" = yes; then
7577 # The cast to unsigned long works around a bug in the HP C Compiler
7578 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7579 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7580 # This bug is HP SR number 8606223364.
7581 if test "$cross_compiling" = yes; then
7582 # Depending upon the size, compute the lo and hi bounds.
7583cat >conftest.$ac_ext <<_ACEOF
7584#line $LINENO "configure"
7585#include "confdefs.h"
7586$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007587#ifdef F77_DUMMY_MAIN
7588# ifdef __cplusplus
7589 extern "C"
7590# endif
7591 int F77_DUMMY_MAIN() { return 1; }
7592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007593int
7594main ()
7595{
7596static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7597test_array [0] = 0
7598
7599 ;
7600 return 0;
7601}
7602_ACEOF
7603rm -f conftest.$ac_objext
7604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7605 (eval $ac_compile) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); } &&
7609 { ac_try='test -s conftest.$ac_objext'
7610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; }; then
7615 ac_lo=0 ac_mid=0
7616 while :; do
7617 cat >conftest.$ac_ext <<_ACEOF
7618#line $LINENO "configure"
7619#include "confdefs.h"
7620$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007621#ifdef F77_DUMMY_MAIN
7622# ifdef __cplusplus
7623 extern "C"
7624# endif
7625 int F77_DUMMY_MAIN() { return 1; }
7626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007627int
7628main ()
7629{
7630static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7631test_array [0] = 0
7632
7633 ;
7634 return 0;
7635}
7636_ACEOF
7637rm -f conftest.$ac_objext
7638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7639 (eval $ac_compile) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); } &&
7643 { ac_try='test -s conftest.$ac_objext'
7644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7645 (eval $ac_try) 2>&5
7646 ac_status=$?
7647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7648 (exit $ac_status); }; }; then
7649 ac_hi=$ac_mid; break
7650else
7651 echo "$as_me: failed program was:" >&5
7652cat conftest.$ac_ext >&5
7653ac_lo=`expr $ac_mid + 1`
7654 if test $ac_lo -le $ac_mid; then
7655 ac_lo= ac_hi=
7656 break
7657 fi
7658 ac_mid=`expr 2 '*' $ac_mid + 1`
7659fi
7660rm -f conftest.$ac_objext conftest.$ac_ext
7661 done
7662else
7663 echo "$as_me: failed program was:" >&5
7664cat conftest.$ac_ext >&5
7665cat >conftest.$ac_ext <<_ACEOF
7666#line $LINENO "configure"
7667#include "confdefs.h"
7668$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007669#ifdef F77_DUMMY_MAIN
7670# ifdef __cplusplus
7671 extern "C"
7672# endif
7673 int F77_DUMMY_MAIN() { return 1; }
7674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007675int
7676main ()
7677{
7678static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7679test_array [0] = 0
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685rm -f conftest.$ac_objext
7686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7687 (eval $ac_compile) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); } &&
7691 { ac_try='test -s conftest.$ac_objext'
7692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7693 (eval $ac_try) 2>&5
7694 ac_status=$?
7695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696 (exit $ac_status); }; }; then
7697 ac_hi=-1 ac_mid=-1
7698 while :; do
7699 cat >conftest.$ac_ext <<_ACEOF
7700#line $LINENO "configure"
7701#include "confdefs.h"
7702$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007703#ifdef F77_DUMMY_MAIN
7704# ifdef __cplusplus
7705 extern "C"
7706# endif
7707 int F77_DUMMY_MAIN() { return 1; }
7708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007709int
7710main ()
7711{
7712static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7713test_array [0] = 0
7714
7715 ;
7716 return 0;
7717}
7718_ACEOF
7719rm -f conftest.$ac_objext
7720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7721 (eval $ac_compile) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); } &&
7725 { ac_try='test -s conftest.$ac_objext'
7726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7727 (eval $ac_try) 2>&5
7728 ac_status=$?
7729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7730 (exit $ac_status); }; }; then
7731 ac_lo=$ac_mid; break
7732else
7733 echo "$as_me: failed program was:" >&5
7734cat conftest.$ac_ext >&5
7735ac_hi=`expr '(' $ac_mid ')' - 1`
7736 if test $ac_mid -le $ac_hi; then
7737 ac_lo= ac_hi=
7738 break
7739 fi
7740 ac_mid=`expr 2 '*' $ac_mid`
7741fi
7742rm -f conftest.$ac_objext conftest.$ac_ext
7743 done
7744else
7745 echo "$as_me: failed program was:" >&5
7746cat conftest.$ac_ext >&5
7747ac_lo= ac_hi=
7748fi
7749rm -f conftest.$ac_objext conftest.$ac_ext
7750fi
7751rm -f conftest.$ac_objext conftest.$ac_ext
7752# Binary search between lo and hi bounds.
7753while test "x$ac_lo" != "x$ac_hi"; do
7754 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7755 cat >conftest.$ac_ext <<_ACEOF
7756#line $LINENO "configure"
7757#include "confdefs.h"
7758$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007759#ifdef F77_DUMMY_MAIN
7760# ifdef __cplusplus
7761 extern "C"
7762# endif
7763 int F77_DUMMY_MAIN() { return 1; }
7764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007765int
7766main ()
7767{
7768static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7769test_array [0] = 0
7770
7771 ;
7772 return 0;
7773}
7774_ACEOF
7775rm -f conftest.$ac_objext
7776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7777 (eval $ac_compile) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); } &&
7781 { ac_try='test -s conftest.$ac_objext'
7782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7783 (eval $ac_try) 2>&5
7784 ac_status=$?
7785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7786 (exit $ac_status); }; }; then
7787 ac_hi=$ac_mid
7788else
7789 echo "$as_me: failed program was:" >&5
7790cat conftest.$ac_ext >&5
7791ac_lo=`expr '(' $ac_mid ')' + 1`
7792fi
7793rm -f conftest.$ac_objext conftest.$ac_ext
7794done
7795case $ac_lo in
7796?*) ac_cv_sizeof_double=$ac_lo;;
7797'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7798echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7799 { (exit 1); exit 1; }; } ;;
7800esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007801else
7802 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7804echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7805 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806else
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 cat >conftest.$ac_ext <<_ACEOF
7808#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007809#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007810$ac_includes_default
7811long longval () { return (long) (sizeof (double)); }
7812unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007813#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007814#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007815#ifdef F77_DUMMY_MAIN
7816# ifdef __cplusplus
7817 extern "C"
7818# endif
7819 int F77_DUMMY_MAIN() { return 1; }
7820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007821int
7822main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007823{
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
7825 FILE *f = fopen ("conftest.val", "w");
7826 if (! f)
7827 exit (1);
7828 if (((long) (sizeof (double))) < 0)
7829 {
7830 long i = longval ();
7831 if (i != ((long) (sizeof (double))))
7832 exit (1);
7833 fprintf (f, "%ld\n", i);
7834 }
7835 else
7836 {
7837 unsigned long i = ulongval ();
7838 if (i != ((long) (sizeof (double))))
7839 exit (1);
7840 fprintf (f, "%lu\n", i);
7841 }
7842 exit (ferror (f) || fclose (f) != 0);
7843
7844 ;
7845 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007846}
Martin v. Löwis11437992002-04-12 09:54:03 +00007847_ACEOF
7848rm -f conftest$ac_exeext
7849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7850 (eval $ac_link) 2>&5
7851 ac_status=$?
7852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7855 (eval $ac_try) 2>&5
7856 ac_status=$?
7857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7858 (exit $ac_status); }; }; then
7859 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007860else
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 echo "$as_me: program exited with status $ac_status" >&5
7862echo "$as_me: failed program was:" >&5
7863cat conftest.$ac_ext >&5
7864( exit $ac_status )
7865{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7866echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7867 { (exit 1); exit 1; }; }
7868fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007869rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007870fi
7871fi
7872rm -f conftest.val
7873else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874 ac_cv_sizeof_double=0
7875fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007877echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7878echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7879cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007880#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007882
7883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884echo "$as_me:$LINENO: checking for fpos_t" >&5
7885echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7886if test "${ac_cv_type_fpos_t+set}" = set; then
7887 echo $ECHO_N "(cached) $ECHO_C" >&6
7888else
7889 cat >conftest.$ac_ext <<_ACEOF
7890#line $LINENO "configure"
7891#include "confdefs.h"
7892$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007893#ifdef F77_DUMMY_MAIN
7894# ifdef __cplusplus
7895 extern "C"
7896# endif
7897 int F77_DUMMY_MAIN() { return 1; }
7898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007899int
7900main ()
7901{
7902if ((fpos_t *) 0)
7903 return 0;
7904if (sizeof (fpos_t))
7905 return 0;
7906 ;
7907 return 0;
7908}
7909_ACEOF
7910rm -f conftest.$ac_objext
7911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7912 (eval $ac_compile) 2>&5
7913 ac_status=$?
7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915 (exit $ac_status); } &&
7916 { ac_try='test -s conftest.$ac_objext'
7917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7918 (eval $ac_try) 2>&5
7919 ac_status=$?
7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7921 (exit $ac_status); }; }; then
7922 ac_cv_type_fpos_t=yes
7923else
7924 echo "$as_me: failed program was:" >&5
7925cat conftest.$ac_ext >&5
7926ac_cv_type_fpos_t=no
7927fi
7928rm -f conftest.$ac_objext conftest.$ac_ext
7929fi
7930echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7931echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7932
7933echo "$as_me:$LINENO: checking size of fpos_t" >&5
7934echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7935if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7937else
7938 if test "$ac_cv_type_fpos_t" = yes; then
7939 # The cast to unsigned long works around a bug in the HP C Compiler
7940 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7941 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7942 # This bug is HP SR number 8606223364.
7943 if test "$cross_compiling" = yes; then
7944 # Depending upon the size, compute the lo and hi bounds.
7945cat >conftest.$ac_ext <<_ACEOF
7946#line $LINENO "configure"
7947#include "confdefs.h"
7948$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007949#ifdef F77_DUMMY_MAIN
7950# ifdef __cplusplus
7951 extern "C"
7952# endif
7953 int F77_DUMMY_MAIN() { return 1; }
7954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007955int
7956main ()
7957{
7958static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7959test_array [0] = 0
7960
7961 ;
7962 return 0;
7963}
7964_ACEOF
7965rm -f conftest.$ac_objext
7966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7967 (eval $ac_compile) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); } &&
7971 { ac_try='test -s conftest.$ac_objext'
7972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7973 (eval $ac_try) 2>&5
7974 ac_status=$?
7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7976 (exit $ac_status); }; }; then
7977 ac_lo=0 ac_mid=0
7978 while :; do
7979 cat >conftest.$ac_ext <<_ACEOF
7980#line $LINENO "configure"
7981#include "confdefs.h"
7982$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007983#ifdef F77_DUMMY_MAIN
7984# ifdef __cplusplus
7985 extern "C"
7986# endif
7987 int F77_DUMMY_MAIN() { return 1; }
7988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007989int
7990main ()
7991{
7992static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7993test_array [0] = 0
7994
7995 ;
7996 return 0;
7997}
7998_ACEOF
7999rm -f conftest.$ac_objext
8000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8001 (eval $ac_compile) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); } &&
8005 { ac_try='test -s conftest.$ac_objext'
8006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8007 (eval $ac_try) 2>&5
8008 ac_status=$?
8009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010 (exit $ac_status); }; }; then
8011 ac_hi=$ac_mid; break
8012else
8013 echo "$as_me: failed program was:" >&5
8014cat conftest.$ac_ext >&5
8015ac_lo=`expr $ac_mid + 1`
8016 if test $ac_lo -le $ac_mid; then
8017 ac_lo= ac_hi=
8018 break
8019 fi
8020 ac_mid=`expr 2 '*' $ac_mid + 1`
8021fi
8022rm -f conftest.$ac_objext conftest.$ac_ext
8023 done
8024else
8025 echo "$as_me: failed program was:" >&5
8026cat conftest.$ac_ext >&5
8027cat >conftest.$ac_ext <<_ACEOF
8028#line $LINENO "configure"
8029#include "confdefs.h"
8030$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008031#ifdef F77_DUMMY_MAIN
8032# ifdef __cplusplus
8033 extern "C"
8034# endif
8035 int F77_DUMMY_MAIN() { return 1; }
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
8040static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
8048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8049 (eval $ac_compile) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); } &&
8053 { ac_try='test -s conftest.$ac_objext'
8054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8055 (eval $ac_try) 2>&5
8056 ac_status=$?
8057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058 (exit $ac_status); }; }; then
8059 ac_hi=-1 ac_mid=-1
8060 while :; do
8061 cat >conftest.$ac_ext <<_ACEOF
8062#line $LINENO "configure"
8063#include "confdefs.h"
8064$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008065#ifdef F77_DUMMY_MAIN
8066# ifdef __cplusplus
8067 extern "C"
8068# endif
8069 int F77_DUMMY_MAIN() { return 1; }
8070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
8074static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8075test_array [0] = 0
8076
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_lo=$ac_mid; break
8094else
8095 echo "$as_me: failed program was:" >&5
8096cat conftest.$ac_ext >&5
8097ac_hi=`expr '(' $ac_mid ')' - 1`
8098 if test $ac_mid -le $ac_hi; then
8099 ac_lo= ac_hi=
8100 break
8101 fi
8102 ac_mid=`expr 2 '*' $ac_mid`
8103fi
8104rm -f conftest.$ac_objext conftest.$ac_ext
8105 done
8106else
8107 echo "$as_me: failed program was:" >&5
8108cat conftest.$ac_ext >&5
8109ac_lo= ac_hi=
8110fi
8111rm -f conftest.$ac_objext conftest.$ac_ext
8112fi
8113rm -f conftest.$ac_objext conftest.$ac_ext
8114# Binary search between lo and hi bounds.
8115while test "x$ac_lo" != "x$ac_hi"; do
8116 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8117 cat >conftest.$ac_ext <<_ACEOF
8118#line $LINENO "configure"
8119#include "confdefs.h"
8120$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008121#ifdef F77_DUMMY_MAIN
8122# ifdef __cplusplus
8123 extern "C"
8124# endif
8125 int F77_DUMMY_MAIN() { return 1; }
8126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008127int
8128main ()
8129{
8130static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8131test_array [0] = 0
8132
8133 ;
8134 return 0;
8135}
8136_ACEOF
8137rm -f conftest.$ac_objext
8138if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8139 (eval $ac_compile) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); } &&
8143 { ac_try='test -s conftest.$ac_objext'
8144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8145 (eval $ac_try) 2>&5
8146 ac_status=$?
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8149 ac_hi=$ac_mid
8150else
8151 echo "$as_me: failed program was:" >&5
8152cat conftest.$ac_ext >&5
8153ac_lo=`expr '(' $ac_mid ')' + 1`
8154fi
8155rm -f conftest.$ac_objext conftest.$ac_ext
8156done
8157case $ac_lo in
8158?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8159'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8160echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8161 { (exit 1); exit 1; }; } ;;
8162esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008163else
8164 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8166echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8167 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008168else
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 cat >conftest.$ac_ext <<_ACEOF
8170#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008171#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008172$ac_includes_default
8173long longval () { return (long) (sizeof (fpos_t)); }
8174unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008175#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008176#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008177#ifdef F77_DUMMY_MAIN
8178# ifdef __cplusplus
8179 extern "C"
8180# endif
8181 int F77_DUMMY_MAIN() { return 1; }
8182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008185{
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187 FILE *f = fopen ("conftest.val", "w");
8188 if (! f)
8189 exit (1);
8190 if (((long) (sizeof (fpos_t))) < 0)
8191 {
8192 long i = longval ();
8193 if (i != ((long) (sizeof (fpos_t))))
8194 exit (1);
8195 fprintf (f, "%ld\n", i);
8196 }
8197 else
8198 {
8199 unsigned long i = ulongval ();
8200 if (i != ((long) (sizeof (fpos_t))))
8201 exit (1);
8202 fprintf (f, "%lu\n", i);
8203 }
8204 exit (ferror (f) || fclose (f) != 0);
8205
8206 ;
8207 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008208}
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210rm -f conftest$ac_exeext
8211if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8212 (eval $ac_link) 2>&5
8213 ac_status=$?
8214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8217 (eval $ac_try) 2>&5
8218 ac_status=$?
8219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8220 (exit $ac_status); }; }; then
8221 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008222else
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 echo "$as_me: program exited with status $ac_status" >&5
8224echo "$as_me: failed program was:" >&5
8225cat conftest.$ac_ext >&5
8226( exit $ac_status )
8227{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8228echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8229 { (exit 1); exit 1; }; }
8230fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008231rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008232fi
8233fi
8234rm -f conftest.val
8235else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008236 ac_cv_sizeof_fpos_t=0
8237fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008239echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8240echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8241cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008242#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008244
Michael W. Hudson54241132001-12-07 15:38:26 +00008245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247echo "$as_me:$LINENO: checking for long long support" >&5
8248echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008249have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008250cat >conftest.$ac_ext <<_ACEOF
8251#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008252#include "confdefs.h"
8253
Barry Warsawfe33b792003-01-07 22:42:49 +00008254#ifdef F77_DUMMY_MAIN
8255# ifdef __cplusplus
8256 extern "C"
8257# endif
8258 int F77_DUMMY_MAIN() { return 1; }
8259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008260int
8261main ()
8262{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008263long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 ;
8265 return 0;
8266}
8267_ACEOF
8268rm -f conftest.$ac_objext
8269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8270 (eval $ac_compile) 2>&5
8271 ac_status=$?
8272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273 (exit $ac_status); } &&
8274 { ac_try='test -s conftest.$ac_objext'
8275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8276 (eval $ac_try) 2>&5
8277 ac_status=$?
8278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8279 (exit $ac_status); }; }; then
8280
8281
8282cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008283#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008284_ACEOF
8285
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008286 have_long_long=yes
8287
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008288else
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 echo "$as_me: failed program was:" >&5
8290cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008292rm -f conftest.$ac_objext conftest.$ac_ext
8293echo "$as_me:$LINENO: result: $have_long_long" >&5
8294echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008295if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008296echo "$as_me:$LINENO: checking for long long" >&5
8297echo $ECHO_N "checking for long long... $ECHO_C" >&6
8298if test "${ac_cv_type_long_long+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
8302#line $LINENO "configure"
8303#include "confdefs.h"
8304$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008305#ifdef F77_DUMMY_MAIN
8306# ifdef __cplusplus
8307 extern "C"
8308# endif
8309 int F77_DUMMY_MAIN() { return 1; }
8310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008311int
8312main ()
8313{
8314if ((long long *) 0)
8315 return 0;
8316if (sizeof (long long))
8317 return 0;
8318 ;
8319 return 0;
8320}
8321_ACEOF
8322rm -f conftest.$ac_objext
8323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8324 (eval $ac_compile) 2>&5
8325 ac_status=$?
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); } &&
8328 { ac_try='test -s conftest.$ac_objext'
8329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8330 (eval $ac_try) 2>&5
8331 ac_status=$?
8332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333 (exit $ac_status); }; }; then
8334 ac_cv_type_long_long=yes
8335else
8336 echo "$as_me: failed program was:" >&5
8337cat conftest.$ac_ext >&5
8338ac_cv_type_long_long=no
8339fi
8340rm -f conftest.$ac_objext conftest.$ac_ext
8341fi
8342echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8343echo "${ECHO_T}$ac_cv_type_long_long" >&6
8344
8345echo "$as_me:$LINENO: checking size of long long" >&5
8346echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8347if test "${ac_cv_sizeof_long_long+set}" = set; then
8348 echo $ECHO_N "(cached) $ECHO_C" >&6
8349else
8350 if test "$ac_cv_type_long_long" = yes; then
8351 # The cast to unsigned long works around a bug in the HP C Compiler
8352 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354 # This bug is HP SR number 8606223364.
8355 if test "$cross_compiling" = yes; then
8356 # Depending upon the size, compute the lo and hi bounds.
8357cat >conftest.$ac_ext <<_ACEOF
8358#line $LINENO "configure"
8359#include "confdefs.h"
8360$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008361#ifdef F77_DUMMY_MAIN
8362# ifdef __cplusplus
8363 extern "C"
8364# endif
8365 int F77_DUMMY_MAIN() { return 1; }
8366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008367int
8368main ()
8369{
8370static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8371test_array [0] = 0
8372
8373 ;
8374 return 0;
8375}
8376_ACEOF
8377rm -f conftest.$ac_objext
8378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8379 (eval $ac_compile) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); } &&
8383 { ac_try='test -s conftest.$ac_objext'
8384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; }; then
8389 ac_lo=0 ac_mid=0
8390 while :; do
8391 cat >conftest.$ac_ext <<_ACEOF
8392#line $LINENO "configure"
8393#include "confdefs.h"
8394$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008395#ifdef F77_DUMMY_MAIN
8396# ifdef __cplusplus
8397 extern "C"
8398# endif
8399 int F77_DUMMY_MAIN() { return 1; }
8400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008401int
8402main ()
8403{
8404static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8405test_array [0] = 0
8406
8407 ;
8408 return 0;
8409}
8410_ACEOF
8411rm -f conftest.$ac_objext
8412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8413 (eval $ac_compile) 2>&5
8414 ac_status=$?
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); } &&
8417 { ac_try='test -s conftest.$ac_objext'
8418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8419 (eval $ac_try) 2>&5
8420 ac_status=$?
8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422 (exit $ac_status); }; }; then
8423 ac_hi=$ac_mid; break
8424else
8425 echo "$as_me: failed program was:" >&5
8426cat conftest.$ac_ext >&5
8427ac_lo=`expr $ac_mid + 1`
8428 if test $ac_lo -le $ac_mid; then
8429 ac_lo= ac_hi=
8430 break
8431 fi
8432 ac_mid=`expr 2 '*' $ac_mid + 1`
8433fi
8434rm -f conftest.$ac_objext conftest.$ac_ext
8435 done
8436else
8437 echo "$as_me: failed program was:" >&5
8438cat conftest.$ac_ext >&5
8439cat >conftest.$ac_ext <<_ACEOF
8440#line $LINENO "configure"
8441#include "confdefs.h"
8442$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008443#ifdef F77_DUMMY_MAIN
8444# ifdef __cplusplus
8445 extern "C"
8446# endif
8447 int F77_DUMMY_MAIN() { return 1; }
8448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008449int
8450main ()
8451{
8452static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8453test_array [0] = 0
8454
8455 ;
8456 return 0;
8457}
8458_ACEOF
8459rm -f conftest.$ac_objext
8460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8461 (eval $ac_compile) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); } &&
8465 { ac_try='test -s conftest.$ac_objext'
8466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8467 (eval $ac_try) 2>&5
8468 ac_status=$?
8469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8470 (exit $ac_status); }; }; then
8471 ac_hi=-1 ac_mid=-1
8472 while :; do
8473 cat >conftest.$ac_ext <<_ACEOF
8474#line $LINENO "configure"
8475#include "confdefs.h"
8476$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008477#ifdef F77_DUMMY_MAIN
8478# ifdef __cplusplus
8479 extern "C"
8480# endif
8481 int F77_DUMMY_MAIN() { return 1; }
8482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008483int
8484main ()
8485{
8486static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8487test_array [0] = 0
8488
8489 ;
8490 return 0;
8491}
8492_ACEOF
8493rm -f conftest.$ac_objext
8494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8495 (eval $ac_compile) 2>&5
8496 ac_status=$?
8497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8498 (exit $ac_status); } &&
8499 { ac_try='test -s conftest.$ac_objext'
8500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8501 (eval $ac_try) 2>&5
8502 ac_status=$?
8503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8504 (exit $ac_status); }; }; then
8505 ac_lo=$ac_mid; break
8506else
8507 echo "$as_me: failed program was:" >&5
8508cat conftest.$ac_ext >&5
8509ac_hi=`expr '(' $ac_mid ')' - 1`
8510 if test $ac_mid -le $ac_hi; then
8511 ac_lo= ac_hi=
8512 break
8513 fi
8514 ac_mid=`expr 2 '*' $ac_mid`
8515fi
8516rm -f conftest.$ac_objext conftest.$ac_ext
8517 done
8518else
8519 echo "$as_me: failed program was:" >&5
8520cat conftest.$ac_ext >&5
8521ac_lo= ac_hi=
8522fi
8523rm -f conftest.$ac_objext conftest.$ac_ext
8524fi
8525rm -f conftest.$ac_objext conftest.$ac_ext
8526# Binary search between lo and hi bounds.
8527while test "x$ac_lo" != "x$ac_hi"; do
8528 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8529 cat >conftest.$ac_ext <<_ACEOF
8530#line $LINENO "configure"
8531#include "confdefs.h"
8532$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008533#ifdef F77_DUMMY_MAIN
8534# ifdef __cplusplus
8535 extern "C"
8536# endif
8537 int F77_DUMMY_MAIN() { return 1; }
8538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008539int
8540main ()
8541{
8542static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
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_hi=$ac_mid
8562else
8563 echo "$as_me: failed program was:" >&5
8564cat conftest.$ac_ext >&5
8565ac_lo=`expr '(' $ac_mid ')' + 1`
8566fi
8567rm -f conftest.$ac_objext conftest.$ac_ext
8568done
8569case $ac_lo in
8570?*) ac_cv_sizeof_long_long=$ac_lo;;
8571'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8572echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8573 { (exit 1); exit 1; }; } ;;
8574esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008575else
8576 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8578echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8579 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008580else
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 cat >conftest.$ac_ext <<_ACEOF
8582#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008583#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008584$ac_includes_default
8585long longval () { return (long) (sizeof (long long)); }
8586unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008587#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008589#ifdef F77_DUMMY_MAIN
8590# ifdef __cplusplus
8591 extern "C"
8592# endif
8593 int F77_DUMMY_MAIN() { return 1; }
8594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008595int
8596main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008597{
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599 FILE *f = fopen ("conftest.val", "w");
8600 if (! f)
8601 exit (1);
8602 if (((long) (sizeof (long long))) < 0)
8603 {
8604 long i = longval ();
8605 if (i != ((long) (sizeof (long long))))
8606 exit (1);
8607 fprintf (f, "%ld\n", i);
8608 }
8609 else
8610 {
8611 unsigned long i = ulongval ();
8612 if (i != ((long) (sizeof (long long))))
8613 exit (1);
8614 fprintf (f, "%lu\n", i);
8615 }
8616 exit (ferror (f) || fclose (f) != 0);
8617
8618 ;
8619 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008620}
Martin v. Löwis11437992002-04-12 09:54:03 +00008621_ACEOF
8622rm -f conftest$ac_exeext
8623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8624 (eval $ac_link) 2>&5
8625 ac_status=$?
8626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8629 (eval $ac_try) 2>&5
8630 ac_status=$?
8631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632 (exit $ac_status); }; }; then
8633 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008634else
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 echo "$as_me: program exited with status $ac_status" >&5
8636echo "$as_me: failed program was:" >&5
8637cat conftest.$ac_ext >&5
8638( exit $ac_status )
8639{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8640echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8641 { (exit 1); exit 1; }; }
8642fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008643rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
8645fi
8646rm -f conftest.val
8647else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648 ac_cv_sizeof_long_long=0
8649fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008650fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8652echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8653cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008654#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008655_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008656
Michael W. Hudson54241132001-12-07 15:38:26 +00008657
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008658fi
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8661echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008662have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >conftest.$ac_ext <<_ACEOF
8664#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008665#include "confdefs.h"
8666
Barry Warsawfe33b792003-01-07 22:42:49 +00008667#ifdef F77_DUMMY_MAIN
8668# ifdef __cplusplus
8669 extern "C"
8670# endif
8671 int F77_DUMMY_MAIN() { return 1; }
8672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
8675{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008676uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ;
8678 return 0;
8679}
8680_ACEOF
8681rm -f conftest.$ac_objext
8682if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8683 (eval $ac_compile) 2>&5
8684 ac_status=$?
8685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8686 (exit $ac_status); } &&
8687 { ac_try='test -s conftest.$ac_objext'
8688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8689 (eval $ac_try) 2>&5
8690 ac_status=$?
8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8692 (exit $ac_status); }; }; then
8693
8694
8695cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008696#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008697_ACEOF
8698
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008699 have_uintptr_t=yes
8700
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008701else
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 echo "$as_me: failed program was:" >&5
8703cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008705rm -f conftest.$ac_objext conftest.$ac_ext
8706echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8707echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008708if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008709echo "$as_me:$LINENO: checking for uintptr_t" >&5
8710echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8711if test "${ac_cv_type_uintptr_t+set}" = set; then
8712 echo $ECHO_N "(cached) $ECHO_C" >&6
8713else
8714 cat >conftest.$ac_ext <<_ACEOF
8715#line $LINENO "configure"
8716#include "confdefs.h"
8717$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008718#ifdef F77_DUMMY_MAIN
8719# ifdef __cplusplus
8720 extern "C"
8721# endif
8722 int F77_DUMMY_MAIN() { return 1; }
8723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008724int
8725main ()
8726{
8727if ((uintptr_t *) 0)
8728 return 0;
8729if (sizeof (uintptr_t))
8730 return 0;
8731 ;
8732 return 0;
8733}
8734_ACEOF
8735rm -f conftest.$ac_objext
8736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8737 (eval $ac_compile) 2>&5
8738 ac_status=$?
8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8740 (exit $ac_status); } &&
8741 { ac_try='test -s conftest.$ac_objext'
8742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8743 (eval $ac_try) 2>&5
8744 ac_status=$?
8745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8746 (exit $ac_status); }; }; then
8747 ac_cv_type_uintptr_t=yes
8748else
8749 echo "$as_me: failed program was:" >&5
8750cat conftest.$ac_ext >&5
8751ac_cv_type_uintptr_t=no
8752fi
8753rm -f conftest.$ac_objext conftest.$ac_ext
8754fi
8755echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8756echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8757
8758echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8759echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8760if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8761 echo $ECHO_N "(cached) $ECHO_C" >&6
8762else
8763 if test "$ac_cv_type_uintptr_t" = yes; then
8764 # The cast to unsigned long works around a bug in the HP C Compiler
8765 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767 # This bug is HP SR number 8606223364.
8768 if test "$cross_compiling" = yes; then
8769 # Depending upon the size, compute the lo and hi bounds.
8770cat >conftest.$ac_ext <<_ACEOF
8771#line $LINENO "configure"
8772#include "confdefs.h"
8773$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008774#ifdef F77_DUMMY_MAIN
8775# ifdef __cplusplus
8776 extern "C"
8777# endif
8778 int F77_DUMMY_MAIN() { return 1; }
8779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
8783static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8784test_array [0] = 0
8785
8786 ;
8787 return 0;
8788}
8789_ACEOF
8790rm -f conftest.$ac_objext
8791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8792 (eval $ac_compile) 2>&5
8793 ac_status=$?
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); } &&
8796 { ac_try='test -s conftest.$ac_objext'
8797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8798 (eval $ac_try) 2>&5
8799 ac_status=$?
8800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8801 (exit $ac_status); }; }; then
8802 ac_lo=0 ac_mid=0
8803 while :; do
8804 cat >conftest.$ac_ext <<_ACEOF
8805#line $LINENO "configure"
8806#include "confdefs.h"
8807$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008808#ifdef F77_DUMMY_MAIN
8809# ifdef __cplusplus
8810 extern "C"
8811# endif
8812 int F77_DUMMY_MAIN() { return 1; }
8813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
8817static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8818test_array [0] = 0
8819
8820 ;
8821 return 0;
8822}
8823_ACEOF
8824rm -f conftest.$ac_objext
8825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8826 (eval $ac_compile) 2>&5
8827 ac_status=$?
8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8829 (exit $ac_status); } &&
8830 { ac_try='test -s conftest.$ac_objext'
8831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8832 (eval $ac_try) 2>&5
8833 ac_status=$?
8834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8835 (exit $ac_status); }; }; then
8836 ac_hi=$ac_mid; break
8837else
8838 echo "$as_me: failed program was:" >&5
8839cat conftest.$ac_ext >&5
8840ac_lo=`expr $ac_mid + 1`
8841 if test $ac_lo -le $ac_mid; then
8842 ac_lo= ac_hi=
8843 break
8844 fi
8845 ac_mid=`expr 2 '*' $ac_mid + 1`
8846fi
8847rm -f conftest.$ac_objext conftest.$ac_ext
8848 done
8849else
8850 echo "$as_me: failed program was:" >&5
8851cat conftest.$ac_ext >&5
8852cat >conftest.$ac_ext <<_ACEOF
8853#line $LINENO "configure"
8854#include "confdefs.h"
8855$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008856#ifdef F77_DUMMY_MAIN
8857# ifdef __cplusplus
8858 extern "C"
8859# endif
8860 int F77_DUMMY_MAIN() { return 1; }
8861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
8865static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8866test_array [0] = 0
8867
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872rm -f conftest.$ac_objext
8873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8874 (eval $ac_compile) 2>&5
8875 ac_status=$?
8876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877 (exit $ac_status); } &&
8878 { ac_try='test -s conftest.$ac_objext'
8879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8880 (eval $ac_try) 2>&5
8881 ac_status=$?
8882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8883 (exit $ac_status); }; }; then
8884 ac_hi=-1 ac_mid=-1
8885 while :; do
8886 cat >conftest.$ac_ext <<_ACEOF
8887#line $LINENO "configure"
8888#include "confdefs.h"
8889$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008890#ifdef F77_DUMMY_MAIN
8891# ifdef __cplusplus
8892 extern "C"
8893# endif
8894 int F77_DUMMY_MAIN() { return 1; }
8895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
8899static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8900test_array [0] = 0
8901
8902 ;
8903 return 0;
8904}
8905_ACEOF
8906rm -f conftest.$ac_objext
8907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8908 (eval $ac_compile) 2>&5
8909 ac_status=$?
8910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911 (exit $ac_status); } &&
8912 { ac_try='test -s conftest.$ac_objext'
8913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8914 (eval $ac_try) 2>&5
8915 ac_status=$?
8916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917 (exit $ac_status); }; }; then
8918 ac_lo=$ac_mid; break
8919else
8920 echo "$as_me: failed program was:" >&5
8921cat conftest.$ac_ext >&5
8922ac_hi=`expr '(' $ac_mid ')' - 1`
8923 if test $ac_mid -le $ac_hi; then
8924 ac_lo= ac_hi=
8925 break
8926 fi
8927 ac_mid=`expr 2 '*' $ac_mid`
8928fi
8929rm -f conftest.$ac_objext conftest.$ac_ext
8930 done
8931else
8932 echo "$as_me: failed program was:" >&5
8933cat conftest.$ac_ext >&5
8934ac_lo= ac_hi=
8935fi
8936rm -f conftest.$ac_objext conftest.$ac_ext
8937fi
8938rm -f conftest.$ac_objext conftest.$ac_ext
8939# Binary search between lo and hi bounds.
8940while test "x$ac_lo" != "x$ac_hi"; do
8941 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8942 cat >conftest.$ac_ext <<_ACEOF
8943#line $LINENO "configure"
8944#include "confdefs.h"
8945$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008946#ifdef F77_DUMMY_MAIN
8947# ifdef __cplusplus
8948 extern "C"
8949# endif
8950 int F77_DUMMY_MAIN() { return 1; }
8951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
8955static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8956test_array [0] = 0
8957
8958 ;
8959 return 0;
8960}
8961_ACEOF
8962rm -f conftest.$ac_objext
8963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8964 (eval $ac_compile) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); } &&
8968 { ac_try='test -s conftest.$ac_objext'
8969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970 (eval $ac_try) 2>&5
8971 ac_status=$?
8972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973 (exit $ac_status); }; }; then
8974 ac_hi=$ac_mid
8975else
8976 echo "$as_me: failed program was:" >&5
8977cat conftest.$ac_ext >&5
8978ac_lo=`expr '(' $ac_mid ')' + 1`
8979fi
8980rm -f conftest.$ac_objext conftest.$ac_ext
8981done
8982case $ac_lo in
8983?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8984'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8985echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8986 { (exit 1); exit 1; }; } ;;
8987esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988else
8989 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8991echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8992 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008993else
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 cat >conftest.$ac_ext <<_ACEOF
8995#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008996#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008997$ac_includes_default
8998long longval () { return (long) (sizeof (uintptr_t)); }
8999unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009000#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009001#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009002#ifdef F77_DUMMY_MAIN
9003# ifdef __cplusplus
9004 extern "C"
9005# endif
9006 int F77_DUMMY_MAIN() { return 1; }
9007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009010{
Martin v. Löwis11437992002-04-12 09:54:03 +00009011
9012 FILE *f = fopen ("conftest.val", "w");
9013 if (! f)
9014 exit (1);
9015 if (((long) (sizeof (uintptr_t))) < 0)
9016 {
9017 long i = longval ();
9018 if (i != ((long) (sizeof (uintptr_t))))
9019 exit (1);
9020 fprintf (f, "%ld\n", i);
9021 }
9022 else
9023 {
9024 unsigned long i = ulongval ();
9025 if (i != ((long) (sizeof (uintptr_t))))
9026 exit (1);
9027 fprintf (f, "%lu\n", i);
9028 }
9029 exit (ferror (f) || fclose (f) != 0);
9030
9031 ;
9032 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009033}
Martin v. Löwis11437992002-04-12 09:54:03 +00009034_ACEOF
9035rm -f conftest$ac_exeext
9036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9037 (eval $ac_link) 2>&5
9038 ac_status=$?
9039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9042 (eval $ac_try) 2>&5
9043 ac_status=$?
9044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9045 (exit $ac_status); }; }; then
9046 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009047else
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 echo "$as_me: program exited with status $ac_status" >&5
9049echo "$as_me: failed program was:" >&5
9050cat conftest.$ac_ext >&5
9051( exit $ac_status )
9052{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9053echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9054 { (exit 1); exit 1; }; }
9055fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009056rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009057fi
9058fi
9059rm -f conftest.val
9060else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061 ac_cv_sizeof_uintptr_t=0
9062fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009063fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009064echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9065echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9066cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009067#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009069
Michael W. Hudson54241132001-12-07 15:38:26 +00009070
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009071fi
9072
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009073# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009074echo "$as_me:$LINENO: checking size of off_t" >&5
9075echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9076if test "${ac_cv_sizeof_off_t+set}" = set; then
9077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009078else
9079 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009080 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009081else
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 cat >conftest.$ac_ext <<_ACEOF
9083#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009084#include "confdefs.h"
9085#include <stdio.h>
9086#include <sys/types.h>
9087main()
9088{
9089 FILE *f=fopen("conftestval", "w");
9090 if (!f) exit(1);
9091 fprintf(f, "%d\n", sizeof(off_t));
9092 exit(0);
9093}
Martin v. Löwis11437992002-04-12 09:54:03 +00009094_ACEOF
9095rm -f conftest$ac_exeext
9096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9097 (eval $ac_link) 2>&5
9098 ac_status=$?
9099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9102 (eval $ac_try) 2>&5
9103 ac_status=$?
9104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9105 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009106 ac_cv_sizeof_off_t=`cat conftestval`
9107else
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 echo "$as_me: program exited with status $ac_status" >&5
9109echo "$as_me: failed program was:" >&5
9110cat conftest.$ac_ext >&5
9111( exit $ac_status )
9112ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009113fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009114rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009115fi
9116
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009117fi
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9120echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9121
9122cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009123#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009124_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009125
Michael W. Hudson54241132001-12-07 15:38:26 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9128echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009129if test "$have_long_long" = yes -a \
9130 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9131 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009132
Martin v. Löwis11437992002-04-12 09:54:03 +00009133cat >>confdefs.h <<\_ACEOF
9134#define HAVE_LARGEFILE_SUPPORT 1
9135_ACEOF
9136
9137 echo "$as_me:$LINENO: result: yes" >&5
9138echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009139else
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 echo "$as_me:$LINENO: result: no" >&5
9141echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009142fi
9143
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009144# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009145echo "$as_me:$LINENO: checking size of time_t" >&5
9146echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9147if test "${ac_cv_sizeof_time_t+set}" = set; then
9148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009149else
9150 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009151 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009152else
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 cat >conftest.$ac_ext <<_ACEOF
9154#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009155#include "confdefs.h"
9156#include <stdio.h>
9157#include <time.h>
9158main()
9159{
9160 FILE *f=fopen("conftestval", "w");
9161 if (!f) exit(1);
9162 fprintf(f, "%d\n", sizeof(time_t));
9163 exit(0);
9164}
Martin v. Löwis11437992002-04-12 09:54:03 +00009165_ACEOF
9166rm -f conftest$ac_exeext
9167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9168 (eval $ac_link) 2>&5
9169 ac_status=$?
9170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009177 ac_cv_sizeof_time_t=`cat conftestval`
9178else
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 echo "$as_me: program exited with status $ac_status" >&5
9180echo "$as_me: failed program was:" >&5
9181cat conftest.$ac_ext >&5
9182( exit $ac_status )
9183ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009184fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009185rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009186fi
9187
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009188fi
9189
Martin v. Löwis11437992002-04-12 09:54:03 +00009190echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9191echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9192
9193cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009194#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009196
Michael W. Hudson54241132001-12-07 15:38:26 +00009197
9198
Trent Mick635f6fb2000-08-23 21:33:05 +00009199# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009200ac_save_cc="$CC"
9201if test "$ac_cv_kpthread" = "yes"
9202then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009203elif test "$ac_cv_kthread" = "yes"
9204then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009205fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009206echo "$as_me:$LINENO: checking for pthread_t" >&5
9207echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009208have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009209cat >conftest.$ac_ext <<_ACEOF
9210#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009211#include "confdefs.h"
9212#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009213#ifdef F77_DUMMY_MAIN
9214# ifdef __cplusplus
9215 extern "C"
9216# endif
9217 int F77_DUMMY_MAIN() { return 1; }
9218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009219int
9220main ()
9221{
Guido van Rossum12580492000-09-24 16:47:19 +00009222pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
9228if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9229 (eval $ac_compile) 2>&5
9230 ac_status=$?
9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232 (exit $ac_status); } &&
9233 { ac_try='test -s conftest.$ac_objext'
9234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235 (eval $ac_try) 2>&5
9236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009239 have_pthread_t=yes
9240else
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 echo "$as_me: failed program was:" >&5
9242cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009244rm -f conftest.$ac_objext conftest.$ac_ext
9245echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9246echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009247if test "$have_pthread_t" = yes ; then
9248 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9250echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9251 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9252 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009253else
9254 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009255 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009256else
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 cat >conftest.$ac_ext <<_ACEOF
9258#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009259#include "confdefs.h"
9260#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009261#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009262 main()
9263 {
9264 FILE *f=fopen("conftestval", "w");
9265 if (!f) exit(1);
9266 fprintf(f, "%d\n", sizeof(pthread_t));
9267 exit(0);
9268 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009269_ACEOF
9270rm -f conftest$ac_exeext
9271if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9272 (eval $ac_link) 2>&5
9273 ac_status=$?
9274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9277 (eval $ac_try) 2>&5
9278 ac_status=$?
9279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9280 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009281 ac_cv_sizeof_pthread_t=`cat conftestval`
9282else
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 echo "$as_me: program exited with status $ac_status" >&5
9284echo "$as_me: failed program was:" >&5
9285cat conftest.$ac_ext >&5
9286( exit $ac_status )
9287ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009288fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009289rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009290fi
9291
Trent Mick635f6fb2000-08-23 21:33:05 +00009292fi
9293
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9295echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9296
9297cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009298#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009299_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009300
9301fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009302CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009303
Martin v. Löwis11437992002-04-12 09:54:03 +00009304echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9305echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009306# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9307if test "${enable_toolbox_glue+set}" = set; then
9308 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009309
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi;
Jack Jansene578a632001-08-15 01:27:14 +00009311
9312if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009313then
Jack Jansene578a632001-08-15 01:27:14 +00009314 case $ac_sys_system/$ac_sys_release in
9315 Darwin/*)
9316 enable_toolbox_glue="yes";;
9317 *)
9318 enable_toolbox_glue="no";;
9319 esac
9320fi
9321case "$enable_toolbox_glue" in
9322yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009323 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009324 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009325 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009326
9327cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009328#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009330
9331 ;;
9332*)
9333 extra_frameworks=""
9334 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009335 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009336 ;;
9337esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009338echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9339echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009340
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009341
9342case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009343 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009344 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009345 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009348 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009349 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009350 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009353esac
9354
Martin v. Löwis11437992002-04-12 09:54:03 +00009355echo "$as_me:$LINENO: checking for --enable-framework" >&5
9356echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009357if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009358then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009359 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009361 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009362 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363
Martin v. Löwis11437992002-04-12 09:54:03 +00009364cat >>confdefs.h <<\_ACEOF
9365#define WITH_NEXT_FRAMEWORK 1
9366_ACEOF
9367
9368 echo "$as_me:$LINENO: result: yes" >&5
9369echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009370else
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 echo "$as_me:$LINENO: result: no" >&5
9372echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009373fi
9374
Martin v. Löwis11437992002-04-12 09:54:03 +00009375echo "$as_me:$LINENO: checking for dyld" >&5
9376echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009377case $ac_sys_system/$ac_sys_release in
9378 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009379
Martin v. Löwis11437992002-04-12 09:54:03 +00009380cat >>confdefs.h <<\_ACEOF
9381#define WITH_DYLD 1
9382_ACEOF
9383
9384 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9385echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009386 ;;
9387 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 echo "$as_me:$LINENO: result: no" >&5
9389echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009390 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009391esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009392
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009394
Michael W. Hudson54241132001-12-07 15:38:26 +00009395
9396
9397
9398
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009400# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009401echo "$as_me:$LINENO: checking SO" >&5
9402echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403if test -z "$SO"
9404then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009405 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009406 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009407 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009408 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009410fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009411echo "$as_me:$LINENO: result: $SO" >&5
9412echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009414# -- "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 +00009415# (Shared libraries in this instance are shared modules to be loaded into
9416# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009417echo "$as_me:$LINENO: checking LDSHARED" >&5
9418echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009419if test -z "$LDSHARED"
9420then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009421 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009422 AIX*)
9423 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009424 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009425 ;;
9426 BeOS*)
9427 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009428 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009429 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009430 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009431 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009434 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009435 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009436 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009437 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009438 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009439 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9440 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009441 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009442 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9443 if test "$enable_framework" ; then
9444 # Link against the framework. All externals should be defined.
9445 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9446 else
9447 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009448 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009449 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009450 Darwin/*)
9451 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9452 if test "$enable_framework" ; then
9453 # Link against the framework. All externals should be defined.
9454 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9455 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009456 # No framework, use the Python app as bundle-loader
9457 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009458 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009459 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009460 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009461 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009462 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009463 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009464 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009465 then
9466 LDSHARED="cc -shared ${LDFLAGS}"
9467 else
9468 LDSHARED="ld -Bshareable ${LDFLAGS}"
9469 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009470 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009471 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009472 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009473 then LDSHARED='$(CC) -shared'
9474 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009475 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009476 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009477 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009478 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009479 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480 *) LDSHARED="ld";;
9481 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009483echo "$as_me:$LINENO: result: $LDSHARED" >&5
9484echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009485BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009487# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009488echo "$as_me:$LINENO: checking CCSHARED" >&5
9489echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009490if test -z "$CCSHARED"
9491then
Guido van Rossum07397971997-04-29 21:49:50 +00009492 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009493 SunOS*) if test "$GCC" = yes;
9494 then CCSHARED="-fPIC";
9495 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009496 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009497 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009498 else CCSHARED="+z";
9499 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009500 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009501 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009502 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009503 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009504 if test "$GCC" = "yes"
9505 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009506 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009507 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009508 SCO_SV*)
9509 if test "$GCC" = "yes"
9510 then CCSHARED="-fPIC"
9511 else CCSHARED="-Kpic -belf"
9512 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009513 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009514 IRIX*/6*) case $CC in
9515 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009516 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009517 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009518 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009521echo "$as_me:$LINENO: result: $CCSHARED" >&5
9522echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009523# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009525echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9526echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527if test -z "$LINKFORSHARED"
9528then
Guido van Rossum07397971997-04-29 21:49:50 +00009529 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009530 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009531 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009532 LINKFORSHARED="-Wl,-E -Wl,+s";;
9533# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009534 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009535 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009536 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009538 # -u __dummy makes the linker aware of the objc runtime
9539 # in System.framework; otherwise, __objcInit (referenced in
9540 # crt1.o) gets erroneously defined as common, which breaks dynamic
9541 # loading of any modules which reference it in System.framework.
9542 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9543 # not used by the core itself but which needs to be in the core so
9544 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009545 # -prebind is no longer used, because it actually seems to give a
9546 # slowdown in stead of a speedup, maybe due to the large number of
9547 # dynamic loads Python does.
9548 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009549 if test "$enable_framework"
9550 then
9551 LINKFORSHARED="$LINKFORSHARED -framework Python"
9552 fi
9553 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009554 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009555 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009556 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009557 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009558 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9559 then
9560 LINKFORSHARED="-Wl,--export-dynamic"
9561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009562 SunOS/5*) case $CC in
9563 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009564 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009565 then
9566 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009567 fi;;
9568 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009571echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9572echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009573
Michael W. Hudson54241132001-12-07 15:38:26 +00009574
Martin v. Löwis11437992002-04-12 09:54:03 +00009575echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9576echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009577if test ! "$LIBRARY" = "$LDLIBRARY"
9578then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009579 case $ac_sys_system in
9580 CYGWIN*)
9581 # Cygwin needs CCSHARED when building extension DLLs
9582 # but not when building the interpreter DLL.
9583 CFLAGSFORSHARED='';;
9584 *)
9585 CFLAGSFORSHARED='$(CCSHARED)'
9586 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009587fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009588echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9589echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009590
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009591# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9592# library (with --enable-shared).
9593# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009594# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9595# if it is not required, since it creates a dependency of the shared library
9596# to LIBS. This, in turn, means that applications linking the shared libpython
9597# don't need to link LIBS explicitly. The default should be only changed
9598# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599
9600echo "$as_me:$LINENO: checking SHLIBS" >&5
9601echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9602case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009603 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009604 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009605esac
9606echo "$as_me:$LINENO: result: $SHLIBS" >&5
9607echo "${ECHO_T}$SHLIBS" >&6
9608
9609
Guido van Rossum627b2d71993-12-24 10:39:16 +00009610# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
9612echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9613echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9614if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009616else
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009618LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009619cat >conftest.$ac_ext <<_ACEOF
9620#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009621#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009622
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009623/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624#ifdef __cplusplus
9625extern "C"
9626#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009627/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 builtin and then its argument prototype would still apply. */
9629char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009630#ifdef F77_DUMMY_MAIN
9631# ifdef __cplusplus
9632 extern "C"
9633# endif
9634 int F77_DUMMY_MAIN() { return 1; }
9635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009636int
9637main ()
9638{
9639dlopen ();
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644rm -f conftest.$ac_objext conftest$ac_exeext
9645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9646 (eval $ac_link) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
9650 { ac_try='test -s conftest$ac_exeext'
9651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9652 (eval $ac_try) 2>&5
9653 ac_status=$?
9654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9655 (exit $ac_status); }; }; then
9656 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 echo "$as_me: failed program was:" >&5
9659cat conftest.$ac_ext >&5
9660ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009661fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9663LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009665echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9666echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9667if test $ac_cv_lib_dl_dlopen = yes; then
9668 cat >>confdefs.h <<_ACEOF
9669#define HAVE_LIBDL 1
9670_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009672 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009673
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674fi
9675 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009676
9677echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9678echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9679if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9680 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009681else
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009683LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009684cat >conftest.$ac_ext <<_ACEOF
9685#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009687
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009688/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009689#ifdef __cplusplus
9690extern "C"
9691#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009692/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 builtin and then its argument prototype would still apply. */
9694char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009695#ifdef F77_DUMMY_MAIN
9696# ifdef __cplusplus
9697 extern "C"
9698# endif
9699 int F77_DUMMY_MAIN() { return 1; }
9700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009701int
9702main ()
9703{
9704shl_load ();
9705 ;
9706 return 0;
9707}
9708_ACEOF
9709rm -f conftest.$ac_objext conftest$ac_exeext
9710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9711 (eval $ac_link) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); } &&
9715 { ac_try='test -s conftest$ac_exeext'
9716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9717 (eval $ac_try) 2>&5
9718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); }; }; then
9721 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009722else
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me: failed program was:" >&5
9724cat conftest.$ac_ext >&5
9725ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009727rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9728LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009730echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9731echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9732if test $ac_cv_lib_dld_shl_load = yes; then
9733 cat >>confdefs.h <<_ACEOF
9734#define HAVE_LIBDLD 1
9735_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009736
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009737 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009739fi
9740 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009741echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9742echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9743if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009745else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009746 ac_func_search_save_LIBS=$LIBS
9747ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009748cat >conftest.$ac_ext <<_ACEOF
9749#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009750#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009751
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009752/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753#ifdef __cplusplus
9754extern "C"
9755#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009756/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 builtin and then its argument prototype would still apply. */
9758char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009759#ifdef F77_DUMMY_MAIN
9760# ifdef __cplusplus
9761 extern "C"
9762# endif
9763 int F77_DUMMY_MAIN() { return 1; }
9764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009765int
9766main ()
9767{
9768sem_init ();
9769 ;
9770 return 0;
9771}
9772_ACEOF
9773rm -f conftest.$ac_objext conftest$ac_exeext
9774if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9775 (eval $ac_link) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); } &&
9779 { ac_try='test -s conftest$ac_exeext'
9780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9781 (eval $ac_try) 2>&5
9782 ac_status=$?
9783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9784 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009785 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009786else
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 echo "$as_me: failed program was:" >&5
9788cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009790rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009791if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009792 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009793 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9794 cat >conftest.$ac_ext <<_ACEOF
9795#line $LINENO "configure"
9796#include "confdefs.h"
9797
9798/* Override any gcc2 internal prototype to avoid an error. */
9799#ifdef __cplusplus
9800extern "C"
9801#endif
9802/* We use char because int might match the return type of a gcc2
9803 builtin and then its argument prototype would still apply. */
9804char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009805#ifdef F77_DUMMY_MAIN
9806# ifdef __cplusplus
9807 extern "C"
9808# endif
9809 int F77_DUMMY_MAIN() { return 1; }
9810#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009811int
9812main ()
9813{
9814sem_init ();
9815 ;
9816 return 0;
9817}
Martin v. Löwis11437992002-04-12 09:54:03 +00009818_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009819rm -f conftest.$ac_objext conftest$ac_exeext
9820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9821 (eval $ac_link) 2>&5
9822 ac_status=$?
9823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824 (exit $ac_status); } &&
9825 { ac_try='test -s conftest$ac_exeext'
9826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9827 (eval $ac_try) 2>&5
9828 ac_status=$?
9829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9830 (exit $ac_status); }; }; then
9831 ac_cv_search_sem_init="-l$ac_lib"
9832break
9833else
9834 echo "$as_me: failed program was:" >&5
9835cat conftest.$ac_ext >&5
9836fi
9837rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9838 done
9839fi
9840LIBS=$ac_func_search_save_LIBS
9841fi
9842echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9843echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9844if test "$ac_cv_search_sem_init" != no; then
9845 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009846
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009847fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009848 # 'Real Time' functions on Solaris
9849 # posix4 on Solaris 2.6
9850 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009851
9852# checks for system dependent C++ extensions support
9853case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9855echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9856 cat >conftest.$ac_ext <<_ACEOF
9857#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009858#include "confdefs.h"
9859#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009860#ifdef F77_DUMMY_MAIN
9861# ifdef __cplusplus
9862 extern "C"
9863# endif
9864 int F77_DUMMY_MAIN() { return 1; }
9865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009869loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
9874rm -f conftest.$ac_objext conftest$ac_exeext
9875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9876 (eval $ac_link) 2>&5
9877 ac_status=$?
9878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9879 (exit $ac_status); } &&
9880 { ac_try='test -s conftest$ac_exeext'
9881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9882 (eval $ac_try) 2>&5
9883 ac_status=$?
9884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9885 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009886
Martin v. Löwis11437992002-04-12 09:54:03 +00009887cat >>confdefs.h <<\_ACEOF
9888#define AIX_GENUINE_CPLUSPLUS 1
9889_ACEOF
9890
9891 echo "$as_me:$LINENO: result: yes" >&5
9892echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009893else
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 echo "$as_me: failed program was:" >&5
9895cat conftest.$ac_ext >&5
9896echo "$as_me:$LINENO: result: no" >&5
9897echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009898fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009899rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009900 *) ;;
9901esac
9902
Guido van Rossum70c7f481998-03-26 18:44:10 +00009903# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009904# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009905# BeOS' sockets are stashed in libnet.
9906case "$ac_sys_system" in
9907IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009908*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009909echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9910echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9911if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009913else
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009915LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009916cat >conftest.$ac_ext <<_ACEOF
9917#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009918#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009919
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009920/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009921#ifdef __cplusplus
9922extern "C"
9923#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009924/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 builtin and then its argument prototype would still apply. */
9926char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009927#ifdef F77_DUMMY_MAIN
9928# ifdef __cplusplus
9929 extern "C"
9930# endif
9931 int F77_DUMMY_MAIN() { return 1; }
9932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009933int
9934main ()
9935{
9936t_open ();
9937 ;
9938 return 0;
9939}
9940_ACEOF
9941rm -f conftest.$ac_objext conftest$ac_exeext
9942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9943 (eval $ac_link) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); } &&
9947 { ac_try='test -s conftest$ac_exeext'
9948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9949 (eval $ac_try) 2>&5
9950 ac_status=$?
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); }; }; then
9953 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009954else
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 echo "$as_me: failed program was:" >&5
9956cat conftest.$ac_ext >&5
9957ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9960LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009962echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9963echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9964if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009965 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009966fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009967 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009968echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9969echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9970if test "${ac_cv_lib_socket_socket+set}" = set; then
9971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009972else
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009974LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009975cat >conftest.$ac_ext <<_ACEOF
9976#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009978
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009979/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009980#ifdef __cplusplus
9981extern "C"
9982#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009983/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 builtin and then its argument prototype would still apply. */
9985char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009986#ifdef F77_DUMMY_MAIN
9987# ifdef __cplusplus
9988 extern "C"
9989# endif
9990 int F77_DUMMY_MAIN() { return 1; }
9991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
9995socket ();
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext conftest$ac_exeext
10001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10002 (eval $ac_link) 2>&5
10003 ac_status=$?
10004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005 (exit $ac_status); } &&
10006 { ac_try='test -s conftest$ac_exeext'
10007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10008 (eval $ac_try) 2>&5
10009 ac_status=$?
10010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10011 (exit $ac_status); }; }; then
10012 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010013else
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 echo "$as_me: failed program was:" >&5
10015cat conftest.$ac_ext >&5
10016ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10019LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010020fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010021echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10022echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10023if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010024 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010025fi
10026 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010027;;
10028esac
10029case "$ac_sys_system" in
10030BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010031echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10032echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10033if test "${ac_cv_lib_net_socket+set}" = set; then
10034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010035else
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010037LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010038cat >conftest.$ac_ext <<_ACEOF
10039#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010040#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010041
Guido van Rossumad678af1998-10-02 14:42:15 +000010042/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043#ifdef __cplusplus
10044extern "C"
10045#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010046/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010047 builtin and then its argument prototype would still apply. */
10048char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010049#ifdef F77_DUMMY_MAIN
10050# ifdef __cplusplus
10051 extern "C"
10052# endif
10053 int F77_DUMMY_MAIN() { return 1; }
10054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010055int
10056main ()
10057{
10058socket ();
10059 ;
10060 return 0;
10061}
10062_ACEOF
10063rm -f conftest.$ac_objext conftest$ac_exeext
10064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10065 (eval $ac_link) 2>&5
10066 ac_status=$?
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); } &&
10069 { ac_try='test -s conftest$ac_exeext'
10070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10071 (eval $ac_try) 2>&5
10072 ac_status=$?
10073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10074 (exit $ac_status); }; }; then
10075 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010076else
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 echo "$as_me: failed program was:" >&5
10078cat conftest.$ac_ext >&5
10079ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010081rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10082LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010084echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10085echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10086if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010087 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010088fi
10089 # BeOS
10090;;
10091esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010092
Martin v. Löwis11437992002-04-12 09:54:03 +000010093echo "$as_me:$LINENO: checking for --with-libs" >&5
10094echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10095
Guido van Rossuma68acba1996-07-31 17:36:39 +000010096# Check whether --with-libs or --without-libs was given.
10097if test "${with_libs+set}" = set; then
10098 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010099
10100echo "$as_me:$LINENO: result: $withval" >&5
10101echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010102LIBS="$withval $LIBS"
10103
10104else
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 echo "$as_me:$LINENO: result: no" >&5
10106echo "${ECHO_T}no" >&6
10107fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010108
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010109# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010110
10111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10113echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10114
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010115# Check whether --with-signal-module or --without-signal-module was given.
10116if test "${with_signal_module+set}" = set; then
10117 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010118
Martin v. Löwis11437992002-04-12 09:54:03 +000010119fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010120
10121if test -z "$with_signal_module"
10122then with_signal_module="yes"
10123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010124echo "$as_me:$LINENO: result: $with_signal_module" >&5
10125echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010126
10127if test "${with_signal_module}" = "yes"; then
10128 USE_SIGNAL_MODULE=""
10129 SIGNAL_OBJS=""
10130else
10131 USE_SIGNAL_MODULE="#"
10132 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10133fi
10134
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010135# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010136
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010137USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010138
Martin v. Löwis11437992002-04-12 09:54:03 +000010139echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10140echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10141
Guido van Rossumec2f0731997-01-22 20:54:01 +000010142
10143# Check whether --with-dec-threads or --without-dec-threads was given.
10144if test "${with_dec_threads+set}" = set; then
10145 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010146
10147echo "$as_me:$LINENO: result: $withval" >&5
10148echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010149LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010150if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010151 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010152fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010153else
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 echo "$as_me:$LINENO: result: no" >&5
10155echo "${ECHO_T}no" >&6
10156fi;
10157
10158# Templates for things AC_DEFINEd more than once.
10159# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010160
10161
Martin v. Löwis11437992002-04-12 09:54:03 +000010162
10163
10164
10165
10166
10167echo "$as_me:$LINENO: checking for --with-threads" >&5
10168echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10169
Guido van Rossumec2f0731997-01-22 20:54:01 +000010170# Check whether --with-threads or --without-threads was given.
10171if test "${with_threads+set}" = set; then
10172 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010175
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010176# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010178# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010179if test "${with_thread+set}" = set; then
10180 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010181 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010182fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010183
10184if test -z "$with_threads"
10185then with_threads="yes"
10186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010187echo "$as_me:$LINENO: result: $with_threads" >&5
10188echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010189
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010190
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010191if test "$with_threads" = "no"
10192then
10193 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010194elif test "$ac_cv_pthread_is_default" = yes
10195then
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010198_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010200 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010204
10205 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010207elif test "$ac_cv_kpthread" = "yes"
10208then
10209 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010211#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010212_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010213
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010215 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010216elif test "$ac_cv_kthread" = "yes"
10217then
10218 CC="$CC -Kthread"
10219 cat >>confdefs.h <<\_ACEOF
10220#define WITH_THREAD 1
10221_ACEOF
10222
10223 posix_threads=yes
10224 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010225else
10226 if test ! -z "$with_threads" -a -d "$with_threads"
10227 then LDFLAGS="$LDFLAGS -L$with_threads"
10228 fi
10229 if test ! -z "$withval" -a -d "$withval"
10230 then LDFLAGS="$LDFLAGS -L$withval"
10231 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010232
10233 # According to the POSIX spec, a pthreads implementation must
10234 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10236echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10237 cat >conftest.$ac_ext <<_ACEOF
10238#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010240
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010242#ifdef _POSIX_THREADS
10243yes
10244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
10246_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010248 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249 unistd_defines_pthreads=yes
10250else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251 unistd_defines_pthreads=no
10252fi
10253rm -f conftest*
10254
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10256echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010259#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010261
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 if test "${ac_cv_header_cthreads_h+set}" = set; then
10263 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10264echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10265if test "${ac_cv_header_cthreads_h+set}" = set; then
10266 echo $ECHO_N "(cached) $ECHO_C" >&6
10267fi
10268echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10269echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010270else
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 # Is the header compilable?
10272echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10273echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10274cat >conftest.$ac_ext <<_ACEOF
10275#line $LINENO "configure"
10276#include "confdefs.h"
10277$ac_includes_default
10278#include <cthreads.h>
10279_ACEOF
10280rm -f conftest.$ac_objext
10281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10282 (eval $ac_compile) 2>&5
10283 ac_status=$?
10284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285 (exit $ac_status); } &&
10286 { ac_try='test -s conftest.$ac_objext'
10287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10288 (eval $ac_try) 2>&5
10289 ac_status=$?
10290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291 (exit $ac_status); }; }; then
10292 ac_header_compiler=yes
10293else
10294 echo "$as_me: failed program was:" >&5
10295cat conftest.$ac_ext >&5
10296ac_header_compiler=no
10297fi
10298rm -f conftest.$ac_objext conftest.$ac_ext
10299echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10300echo "${ECHO_T}$ac_header_compiler" >&6
10301
10302# Is the header present?
10303echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10304echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10305cat >conftest.$ac_ext <<_ACEOF
10306#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010307#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010308#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010309_ACEOF
10310if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10312 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010313 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 rm -f conftest.er1
10315 cat conftest.err >&5
10316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10317 (exit $ac_status); } >/dev/null; then
10318 if test -s conftest.err; then
10319 ac_cpp_err=$ac_c_preproc_warn_flag
10320 else
10321 ac_cpp_err=
10322 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010323else
Martin v. Löwis11437992002-04-12 09:54:03 +000010324 ac_cpp_err=yes
10325fi
10326if test -z "$ac_cpp_err"; then
10327 ac_header_preproc=yes
10328else
10329 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010330 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010333rm -f conftest.err conftest.$ac_ext
10334echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10335echo "${ECHO_T}$ac_header_preproc" >&6
10336
10337# So? What about this header?
10338case $ac_header_compiler:$ac_header_preproc in
10339 yes:no )
10340 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10341echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10342 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10343echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10344 no:yes )
10345 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10346echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10347 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10348echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10349 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10350echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10351esac
10352echo "$as_me:$LINENO: checking for cthreads.h" >&5
10353echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10354if test "${ac_cv_header_cthreads_h+set}" = set; then
10355 echo $ECHO_N "(cached) $ECHO_C" >&6
10356else
10357 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010359echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10360echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10361
10362fi
10363if test $ac_cv_header_cthreads_h = yes; then
10364 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010366_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010367
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010369#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010370_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372
10373cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010374#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010375_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010376
10377 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010378 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010379else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010380
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10382 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10383echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10384if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10385 echo $ECHO_N "(cached) $ECHO_C" >&6
10386fi
10387echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10388echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010389else
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 # Is the header compilable?
10391echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10392echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10393cat >conftest.$ac_ext <<_ACEOF
10394#line $LINENO "configure"
10395#include "confdefs.h"
10396$ac_includes_default
10397#include <mach/cthreads.h>
10398_ACEOF
10399rm -f conftest.$ac_objext
10400if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10401 (eval $ac_compile) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); } &&
10405 { ac_try='test -s conftest.$ac_objext'
10406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10407 (eval $ac_try) 2>&5
10408 ac_status=$?
10409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10410 (exit $ac_status); }; }; then
10411 ac_header_compiler=yes
10412else
10413 echo "$as_me: failed program was:" >&5
10414cat conftest.$ac_ext >&5
10415ac_header_compiler=no
10416fi
10417rm -f conftest.$ac_objext conftest.$ac_ext
10418echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10419echo "${ECHO_T}$ac_header_compiler" >&6
10420
10421# Is the header present?
10422echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10423echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10424cat >conftest.$ac_ext <<_ACEOF
10425#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010426#include "confdefs.h"
10427#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010428_ACEOF
10429if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10430 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10431 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010432 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 rm -f conftest.er1
10434 cat conftest.err >&5
10435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10436 (exit $ac_status); } >/dev/null; then
10437 if test -s conftest.err; then
10438 ac_cpp_err=$ac_c_preproc_warn_flag
10439 else
10440 ac_cpp_err=
10441 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010442else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_cpp_err=yes
10444fi
10445if test -z "$ac_cpp_err"; then
10446 ac_header_preproc=yes
10447else
10448 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010449 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010452rm -f conftest.err conftest.$ac_ext
10453echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10454echo "${ECHO_T}$ac_header_preproc" >&6
10455
10456# So? What about this header?
10457case $ac_header_compiler:$ac_header_preproc in
10458 yes:no )
10459 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10460echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10461 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10462echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10463 no:yes )
10464 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10465echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10466 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10467echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10468 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10469echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10470esac
10471echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10472echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10473if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10474 echo $ECHO_N "(cached) $ECHO_C" >&6
10475else
10476 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010478echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10479echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10480
10481fi
10482if test $ac_cv_header_mach_cthreads_h = yes; then
10483 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010484#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010485_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010486
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010488#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010489_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010490
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
10492cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010493#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010494_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010495
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010496 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010497else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010498
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 echo "$as_me:$LINENO: checking for --with-pth" >&5
10500echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10501
10502# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010503if test "${with_pth+set}" = set; then
10504 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010505 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010506echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010507 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010508#define WITH_THREAD 1
10509_ACEOF
10510
10511
10512cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010513#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010514_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010515
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010516 LIBS="-lpth $LIBS"
10517 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010518else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010519 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010520echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010521
10522 # Just looking for pthread_create in libpthread is not enough:
10523 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10524 # So we really have to include pthread.h, and then link.
10525 _libs=$LIBS
10526 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10528echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10529 cat >conftest.$ac_ext <<_ACEOF
10530#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010531#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010532#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010533
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010534void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010535#ifdef F77_DUMMY_MAIN
10536# ifdef __cplusplus
10537 extern "C"
10538# endif
10539 int F77_DUMMY_MAIN() { return 1; }
10540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541int
10542main ()
10543{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010544
10545pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
10550rm -f conftest.$ac_objext conftest$ac_exeext
10551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10552 (eval $ac_link) 2>&5
10553 ac_status=$?
10554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10555 (exit $ac_status); } &&
10556 { ac_try='test -s conftest$ac_exeext'
10557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10558 (eval $ac_try) 2>&5
10559 ac_status=$?
10560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10561 (exit $ac_status); }; }; then
10562
10563 echo "$as_me:$LINENO: result: yes" >&5
10564echo "${ECHO_T}yes" >&6
10565 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010566#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010567_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010568
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010569 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010570 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010571else
Martin v. Löwis11437992002-04-12 09:54:03 +000010572 echo "$as_me: failed program was:" >&5
10573cat conftest.$ac_ext >&5
10574
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010575 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10577echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10578if test "${ac_cv_func_pthread_detach+set}" = set; then
10579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010580else
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 cat >conftest.$ac_ext <<_ACEOF
10582#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010583#include "confdefs.h"
10584/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010586#include <assert.h>
10587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010588#ifdef __cplusplus
10589extern "C"
10590#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010591/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 builtin and then its argument prototype would still apply. */
10593char pthread_detach ();
10594char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010595
Barry Warsawfe33b792003-01-07 22:42:49 +000010596#ifdef F77_DUMMY_MAIN
10597# ifdef __cplusplus
10598 extern "C"
10599# endif
10600 int F77_DUMMY_MAIN() { return 1; }
10601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010602int
10603main ()
10604{
Guido van Rossumad678af1998-10-02 14:42:15 +000010605/* The GNU C library defines this for functions which it implements
10606 to always fail with ENOSYS. Some functions are actually named
10607 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010608#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010609choke me
10610#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010612#endif
10613
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ;
10615 return 0;
10616}
10617_ACEOF
10618rm -f conftest.$ac_objext conftest$ac_exeext
10619if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10620 (eval $ac_link) 2>&5
10621 ac_status=$?
10622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); } &&
10624 { ac_try='test -s conftest$ac_exeext'
10625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10626 (eval $ac_try) 2>&5
10627 ac_status=$?
10628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10629 (exit $ac_status); }; }; then
10630 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010631else
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 echo "$as_me: failed program was:" >&5
10633cat conftest.$ac_ext >&5
10634ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010636rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010638echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10639echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10640if test $ac_cv_func_pthread_detach = yes; then
10641 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010642#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010643_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010644
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010645 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010646 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010647else
Guido van Rossumad678af1998-10-02 14:42:15 +000010648
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010649 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10650 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10651echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10652if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10653 echo $ECHO_N "(cached) $ECHO_C" >&6
10654fi
10655echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10656echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10657else
10658 # Is the header compilable?
10659echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10660echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10661cat >conftest.$ac_ext <<_ACEOF
10662#line $LINENO "configure"
10663#include "confdefs.h"
10664$ac_includes_default
10665#include <atheos/threads.h>
10666_ACEOF
10667rm -f conftest.$ac_objext
10668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10669 (eval $ac_compile) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); } &&
10673 { ac_try='test -s conftest.$ac_objext'
10674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10675 (eval $ac_try) 2>&5
10676 ac_status=$?
10677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10678 (exit $ac_status); }; }; then
10679 ac_header_compiler=yes
10680else
10681 echo "$as_me: failed program was:" >&5
10682cat conftest.$ac_ext >&5
10683ac_header_compiler=no
10684fi
10685rm -f conftest.$ac_objext conftest.$ac_ext
10686echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10687echo "${ECHO_T}$ac_header_compiler" >&6
10688
10689# Is the header present?
10690echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10691echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10692cat >conftest.$ac_ext <<_ACEOF
10693#line $LINENO "configure"
10694#include "confdefs.h"
10695#include <atheos/threads.h>
10696_ACEOF
10697if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10699 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010700 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010701 rm -f conftest.er1
10702 cat conftest.err >&5
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); } >/dev/null; then
10705 if test -s conftest.err; then
10706 ac_cpp_err=$ac_c_preproc_warn_flag
10707 else
10708 ac_cpp_err=
10709 fi
10710else
10711 ac_cpp_err=yes
10712fi
10713if test -z "$ac_cpp_err"; then
10714 ac_header_preproc=yes
10715else
10716 echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 ac_header_preproc=no
10719fi
10720rm -f conftest.err conftest.$ac_ext
10721echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10722echo "${ECHO_T}$ac_header_preproc" >&6
10723
10724# So? What about this header?
10725case $ac_header_compiler:$ac_header_preproc in
10726 yes:no )
10727 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10728echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10729 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10730echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10731 no:yes )
10732 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10733echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10734 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10735echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10736 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10737echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10738esac
10739echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10740echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10741if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10742 echo $ECHO_N "(cached) $ECHO_C" >&6
10743else
10744 ac_cv_header_atheos_threads_h=$ac_header_preproc
10745fi
10746echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10747echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10748
10749fi
10750if test $ac_cv_header_atheos_threads_h = yes; then
10751 cat >>confdefs.h <<\_ACEOF
10752#define WITH_THREAD 1
10753_ACEOF
10754
10755
10756cat >>confdefs.h <<\_ACEOF
10757#define ATHEOS_THREADS 1
10758_ACEOF
10759
10760 THREADOBJ="Python/thread.o"
10761else
10762
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10764 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10765echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10766if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10767 echo $ECHO_N "(cached) $ECHO_C" >&6
10768fi
10769echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10770echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010771else
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 # Is the header compilable?
10773echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10774echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10775cat >conftest.$ac_ext <<_ACEOF
10776#line $LINENO "configure"
10777#include "confdefs.h"
10778$ac_includes_default
10779#include <kernel/OS.h>
10780_ACEOF
10781rm -f conftest.$ac_objext
10782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10783 (eval $ac_compile) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); } &&
10787 { ac_try='test -s conftest.$ac_objext'
10788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10789 (eval $ac_try) 2>&5
10790 ac_status=$?
10791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10792 (exit $ac_status); }; }; then
10793 ac_header_compiler=yes
10794else
10795 echo "$as_me: failed program was:" >&5
10796cat conftest.$ac_ext >&5
10797ac_header_compiler=no
10798fi
10799rm -f conftest.$ac_objext conftest.$ac_ext
10800echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10801echo "${ECHO_T}$ac_header_compiler" >&6
10802
10803# Is the header present?
10804echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10805echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10806cat >conftest.$ac_ext <<_ACEOF
10807#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010808#include "confdefs.h"
10809#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
10811if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10812 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10813 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010814 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 rm -f conftest.er1
10816 cat conftest.err >&5
10817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10818 (exit $ac_status); } >/dev/null; then
10819 if test -s conftest.err; then
10820 ac_cpp_err=$ac_c_preproc_warn_flag
10821 else
10822 ac_cpp_err=
10823 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010824else
Martin v. Löwis11437992002-04-12 09:54:03 +000010825 ac_cpp_err=yes
10826fi
10827if test -z "$ac_cpp_err"; then
10828 ac_header_preproc=yes
10829else
10830 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010831 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010832 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010834rm -f conftest.err conftest.$ac_ext
10835echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10836echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010837
Martin v. Löwis11437992002-04-12 09:54:03 +000010838# So? What about this header?
10839case $ac_header_compiler:$ac_header_preproc in
10840 yes:no )
10841 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10842echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10843 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10844echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10845 no:yes )
10846 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10847echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10848 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10849echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10850 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10851echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10852esac
10853echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10854echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10855if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10856 echo $ECHO_N "(cached) $ECHO_C" >&6
10857else
10858 ac_cv_header_kernel_OS_h=$ac_header_preproc
10859fi
10860echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10861echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10862
10863fi
10864if test $ac_cv_header_kernel_OS_h = yes; then
10865 cat >>confdefs.h <<\_ACEOF
10866#define WITH_THREAD 1
10867_ACEOF
10868
10869
10870cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010871#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010872_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010873
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010874 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010875else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010876
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10878echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10879if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881else
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010883LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010884cat >conftest.$ac_ext <<_ACEOF
10885#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010886#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010887
Greg Steinadf63d62000-07-05 10:38:09 +000010888/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010889#ifdef __cplusplus
10890extern "C"
10891#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010892/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010893 builtin and then its argument prototype would still apply. */
10894char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010895#ifdef F77_DUMMY_MAIN
10896# ifdef __cplusplus
10897 extern "C"
10898# endif
10899 int F77_DUMMY_MAIN() { return 1; }
10900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010901int
10902main ()
10903{
10904pthread_create ();
10905 ;
10906 return 0;
10907}
10908_ACEOF
10909rm -f conftest.$ac_objext conftest$ac_exeext
10910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10911 (eval $ac_link) 2>&5
10912 ac_status=$?
10913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10914 (exit $ac_status); } &&
10915 { ac_try='test -s conftest$ac_exeext'
10916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10917 (eval $ac_try) 2>&5
10918 ac_status=$?
10919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10920 (exit $ac_status); }; }; then
10921 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010922else
Martin v. Löwis11437992002-04-12 09:54:03 +000010923 echo "$as_me: failed program was:" >&5
10924cat conftest.$ac_ext >&5
10925ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010926fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10928LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010930echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10931echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10932if test $ac_cv_lib_pthreads_pthread_create = yes; then
10933 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010934#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010935_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010936
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010937 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010938 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010939 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010940else
Greg Steinadf63d62000-07-05 10:38:09 +000010941
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10943echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10944if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10945 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010946else
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010948LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010949cat >conftest.$ac_ext <<_ACEOF
10950#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010951#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Guido van Rossum49545951997-12-02 19:28:29 +000010953/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010954#ifdef __cplusplus
10955extern "C"
10956#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010957/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 builtin and then its argument prototype would still apply. */
10959char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010960#ifdef F77_DUMMY_MAIN
10961# ifdef __cplusplus
10962 extern "C"
10963# endif
10964 int F77_DUMMY_MAIN() { return 1; }
10965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010966int
10967main ()
10968{
10969pthread_create ();
10970 ;
10971 return 0;
10972}
10973_ACEOF
10974rm -f conftest.$ac_objext conftest$ac_exeext
10975if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10976 (eval $ac_link) 2>&5
10977 ac_status=$?
10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979 (exit $ac_status); } &&
10980 { ac_try='test -s conftest$ac_exeext'
10981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10982 (eval $ac_try) 2>&5
10983 ac_status=$?
10984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985 (exit $ac_status); }; }; then
10986 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010987else
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 echo "$as_me: failed program was:" >&5
10989cat conftest.$ac_ext >&5
10990ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010992rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10993LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010995echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10996echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10997if test $ac_cv_lib_c_r_pthread_create = yes; then
10998 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010999#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011000_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011001
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011002 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011003 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011004 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011005else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011006
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11008echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11009if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011011else
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011013LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011014cat >conftest.$ac_ext <<_ACEOF
11015#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011016#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011019#ifdef __cplusplus
11020extern "C"
11021#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 builtin and then its argument prototype would still apply. */
11024char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011025#ifdef F77_DUMMY_MAIN
11026# ifdef __cplusplus
11027 extern "C"
11028# endif
11029 int F77_DUMMY_MAIN() { return 1; }
11030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011031int
11032main ()
11033{
11034__d6_pthread_create ();
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039rm -f conftest.$ac_objext conftest$ac_exeext
11040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11041 (eval $ac_link) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); } &&
11045 { ac_try='test -s conftest$ac_exeext'
11046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11047 (eval $ac_try) 2>&5
11048 ac_status=$?
11049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11050 (exit $ac_status); }; }; then
11051 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011052else
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 echo "$as_me: failed program was:" >&5
11054cat conftest.$ac_ext >&5
11055ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11058LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011060echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11061echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11062if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11063 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011064#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011066
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011067 echo Systems with __d6_pthread_create are not supported anymore.
11068 echo See README
11069 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011070 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011071 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011072 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011073else
Guido van Rossum49545951997-12-02 19:28:29 +000011074
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11076echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11077if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011079else
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011081LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011082cat >conftest.$ac_ext <<_ACEOF
11083#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011085
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011087#ifdef __cplusplus
11088extern "C"
11089#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 builtin and then its argument prototype would still apply. */
11092char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011093#ifdef F77_DUMMY_MAIN
11094# ifdef __cplusplus
11095 extern "C"
11096# endif
11097 int F77_DUMMY_MAIN() { return 1; }
11098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011099int
11100main ()
11101{
11102__pthread_create_system ();
11103 ;
11104 return 0;
11105}
11106_ACEOF
11107rm -f conftest.$ac_objext conftest$ac_exeext
11108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11109 (eval $ac_link) 2>&5
11110 ac_status=$?
11111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11112 (exit $ac_status); } &&
11113 { ac_try='test -s conftest$ac_exeext'
11114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11115 (eval $ac_try) 2>&5
11116 ac_status=$?
11117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11118 (exit $ac_status); }; }; then
11119 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011120else
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 echo "$as_me: failed program was:" >&5
11122cat conftest.$ac_ext >&5
11123ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011124fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011125rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011127fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011128echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11129echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11130if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11131 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011132#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011133_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011134
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011135 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011136 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011137 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011138else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011139
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11141echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11142if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011144else
Martin v. Löwis11437992002-04-12 09:54:03 +000011145 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011146LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011147cat >conftest.$ac_ext <<_ACEOF
11148#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011149#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011150
Guido van Rossumb93a8621998-05-07 13:27:32 +000011151/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011152#ifdef __cplusplus
11153extern "C"
11154#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011155/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 builtin and then its argument prototype would still apply. */
11157char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011158#ifdef F77_DUMMY_MAIN
11159# ifdef __cplusplus
11160 extern "C"
11161# endif
11162 int F77_DUMMY_MAIN() { return 1; }
11163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011164int
11165main ()
11166{
11167pthread_create ();
11168 ;
11169 return 0;
11170}
11171_ACEOF
11172rm -f conftest.$ac_objext conftest$ac_exeext
11173if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11174 (eval $ac_link) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); } &&
11178 { ac_try='test -s conftest$ac_exeext'
11179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11180 (eval $ac_try) 2>&5
11181 ac_status=$?
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11183 (exit $ac_status); }; }; then
11184 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011185else
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 echo "$as_me: failed program was:" >&5
11187cat conftest.$ac_ext >&5
11188ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11191LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011193echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11194echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11195if test $ac_cv_lib_cma_pthread_create = yes; then
11196 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011198_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011200 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011201 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011202 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011203else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011204
Martin v. Löwis130fb172001-07-19 11:00:41 +000011205 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011206fi
11207
Guido van Rossum627b2d71993-12-24 10:39:16 +000011208
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011209fi
11210
Guido van Rossum0be3e491997-05-22 20:33:33 +000011211fi
11212
Guido van Rossum49545951997-12-02 19:28:29 +000011213fi
11214
Guido van Rossumb93a8621998-05-07 13:27:32 +000011215fi
11216
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011217fi
11218
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011219
Michael W. Hudson54241132001-12-07 15:38:26 +000011220fi
11221
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011222
11223fi
11224
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11227fi;
11228fi
11229
11230
11231fi
11232
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011233
Michael W. Hudson54241132001-12-07 15:38:26 +000011234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011235 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011236 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
11238cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011239#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011240_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011241
11242 fi
11243
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011244 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11245 case $ac_sys_system/$ac_sys_release in
11246 SunOS/5.8)
11247cat >>confdefs.h <<\_ACEOF
11248#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11249_ACEOF
11250;;
11251 esac
11252
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11254echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11255 if test "${ac_cv_pthread_system_supported+set}" = set; then
11256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011257else
11258 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011259 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011260else
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 cat >conftest.$ac_ext <<_ACEOF
11262#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011263#include "confdefs.h"
11264#include <pthread.h>
11265 void *foo(void *parm) {
11266 return NULL;
11267 }
11268 main() {
11269 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011270 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011271 if (pthread_attr_init(&attr)) exit(-1);
11272 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011273 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011274 exit(0);
11275 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011276_ACEOF
11277rm -f conftest$ac_exeext
11278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11279 (eval $ac_link) 2>&5
11280 ac_status=$?
11281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
11286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011288 ac_cv_pthread_system_supported=yes
11289else
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 echo "$as_me: program exited with status $ac_status" >&5
11291echo "$as_me: failed program was:" >&5
11292cat conftest.$ac_ext >&5
11293( exit $ac_status )
11294ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011295fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011296rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011297fi
11298
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011299fi
11300
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11302echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011303 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
11305cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011306#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011307_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011308
11309 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
11311for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011312do
Martin v. Löwis11437992002-04-12 09:54:03 +000011313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11314echo "$as_me:$LINENO: checking for $ac_func" >&5
11315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11316if eval "test \"\${$as_ac_var+set}\" = set"; then
11317 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011318else
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 cat >conftest.$ac_ext <<_ACEOF
11320#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011321#include "confdefs.h"
11322/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011324#include <assert.h>
11325/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011326#ifdef __cplusplus
11327extern "C"
11328#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011329/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 builtin and then its argument prototype would still apply. */
11331char $ac_func ();
11332char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011333
Barry Warsawfe33b792003-01-07 22:42:49 +000011334#ifdef F77_DUMMY_MAIN
11335# ifdef __cplusplus
11336 extern "C"
11337# endif
11338 int F77_DUMMY_MAIN() { return 1; }
11339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011343/* The GNU C library defines this for functions which it implements
11344 to always fail with ENOSYS. Some functions are actually named
11345 something starting with __ and the normal name is an alias. */
11346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11347choke me
11348#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011349f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011350#endif
11351
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ;
11353 return 0;
11354}
11355_ACEOF
11356rm -f conftest.$ac_objext conftest$ac_exeext
11357if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11358 (eval $ac_link) 2>&5
11359 ac_status=$?
11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361 (exit $ac_status); } &&
11362 { ac_try='test -s conftest$ac_exeext'
11363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11364 (eval $ac_try) 2>&5
11365 ac_status=$?
11366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11367 (exit $ac_status); }; }; then
11368 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011369else
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 echo "$as_me: failed program was:" >&5
11371cat conftest.$ac_ext >&5
11372eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011374rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011375fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011376echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11377echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11378if test `eval echo '${'$as_ac_var'}'` = yes; then
11379 cat >>confdefs.h <<_ACEOF
11380#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11381_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011382
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011383fi
11384done
11385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011386 fi
11387
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11389echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11390if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11391 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392else
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011394LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011395cat >conftest.$ac_ext <<_ACEOF
11396#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011397#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011399/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011400#ifdef __cplusplus
11401extern "C"
11402#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011403/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 builtin and then its argument prototype would still apply. */
11405char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011406#ifdef F77_DUMMY_MAIN
11407# ifdef __cplusplus
11408 extern "C"
11409# endif
11410 int F77_DUMMY_MAIN() { return 1; }
11411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011412int
11413main ()
11414{
11415usconfig ();
11416 ;
11417 return 0;
11418}
11419_ACEOF
11420rm -f conftest.$ac_objext conftest$ac_exeext
11421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11422 (eval $ac_link) 2>&5
11423 ac_status=$?
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425 (exit $ac_status); } &&
11426 { ac_try='test -s conftest$ac_exeext'
11427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11428 (eval $ac_try) 2>&5
11429 ac_status=$?
11430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11431 (exit $ac_status); }; }; then
11432 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011433else
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 echo "$as_me: failed program was:" >&5
11435cat conftest.$ac_ext >&5
11436ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11439LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011441echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11442echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11443if test $ac_cv_lib_mpc_usconfig = yes; then
11444 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447
Martin v. Löwis130fb172001-07-19 11:00:41 +000011448 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011449 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011450 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011451fi
11452
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011453
Neal Norwitza978ab02002-11-02 16:58:05 +000011454 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11456echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11457if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11458 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011459else
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011461LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011462cat >conftest.$ac_ext <<_ACEOF
11463#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011466/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011467#ifdef __cplusplus
11468extern "C"
11469#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011470/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 builtin and then its argument prototype would still apply. */
11472char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011473#ifdef F77_DUMMY_MAIN
11474# ifdef __cplusplus
11475 extern "C"
11476# endif
11477 int F77_DUMMY_MAIN() { return 1; }
11478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
11481{
11482thr_create ();
11483 ;
11484 return 0;
11485}
11486_ACEOF
11487rm -f conftest.$ac_objext conftest$ac_exeext
11488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11489 (eval $ac_link) 2>&5
11490 ac_status=$?
11491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11492 (exit $ac_status); } &&
11493 { ac_try='test -s conftest$ac_exeext'
11494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11495 (eval $ac_try) 2>&5
11496 ac_status=$?
11497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); }; }; then
11499 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500else
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 echo "$as_me: failed program was:" >&5
11502cat conftest.$ac_ext >&5
11503ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011504fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11506LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011507fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011508echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11509echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11510if test $ac_cv_lib_thread_thr_create = yes; then
11511 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011512#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011513_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011514
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011515 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011516 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011517 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011518fi
11519
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011520 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011521
Martin v. Löwis130fb172001-07-19 11:00:41 +000011522 if test "$USE_THREAD_MODULE" != "#"
11523 then
11524 # If the above checks didn't disable threads, (at least) OSF1
11525 # needs this '-threads' argument during linking.
11526 case $ac_sys_system in
11527 OSF1) LDLAST=-threads;;
11528 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011529 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011530
11531 if test "$posix_threads" = yes -a \
11532 "$ac_sys_system" = "SunOS" -a \
11533 "$ac_sys_release" = "5.6"; then
11534
11535cat >>confdefs.h <<\_ACEOF
11536#define HAVE_PTHREAD_DESTRUCTOR 1
11537_ACEOF
11538
11539 fi
11540
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541fi
11542
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011543# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011544
11545
11546echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11547echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011548# Check whether --enable-ipv6 or --disable-ipv6 was given.
11549if test "${enable_ipv6+set}" = set; then
11550 enableval="$enable_ipv6"
11551 case "$enableval" in
11552 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 echo "$as_me:$LINENO: result: no" >&5
11554echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011555 ipv6=no
11556 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 *) echo "$as_me:$LINENO: result: yes" >&5
11558echo "${ECHO_T}yes" >&6
11559 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011561_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011562
11563 ipv6=yes
11564 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011566else
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011568 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 echo "$as_me:$LINENO: result: no" >&5
11570echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011571 ipv6=no
11572
11573else
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 cat >conftest.$ac_ext <<_ACEOF
11575#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011576#include "confdefs.h"
11577 /* AF_INET6 available check */
11578#include <sys/types.h>
11579#include <sys/socket.h>
11580main()
11581{
11582 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11583 exit(1);
11584 else
11585 exit(0);
11586}
11587
Martin v. Löwis11437992002-04-12 09:54:03 +000011588_ACEOF
11589rm -f conftest$ac_exeext
11590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11591 (eval $ac_link) 2>&5
11592 ac_status=$?
11593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11596 (eval $ac_try) 2>&5
11597 ac_status=$?
11598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599 (exit $ac_status); }; }; then
11600 echo "$as_me:$LINENO: result: yes" >&5
11601echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011602 ipv6=yes
11603else
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 echo "$as_me: program exited with status $ac_status" >&5
11605echo "$as_me: failed program was:" >&5
11606cat conftest.$ac_ext >&5
11607( exit $ac_status )
11608echo "$as_me:$LINENO: result: no" >&5
11609echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011610 ipv6=no
11611fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011612rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011613fi
11614
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011615if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011616 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11617echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11618 cat >conftest.$ac_ext <<_ACEOF
11619#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011620#include "confdefs.h"
11621#include <sys/types.h>
11622#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011623#ifdef F77_DUMMY_MAIN
11624# ifdef __cplusplus
11625 extern "C"
11626# endif
11627 int F77_DUMMY_MAIN() { return 1; }
11628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011629int
11630main ()
11631{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011632struct sockaddr_in6 x;
11633x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
11639if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11640 (eval $ac_compile) 2>&5
11641 ac_status=$?
11642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11643 (exit $ac_status); } &&
11644 { ac_try='test -s conftest.$ac_objext'
11645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11646 (eval $ac_try) 2>&5
11647 ac_status=$?
11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649 (exit $ac_status); }; }; then
11650 echo "$as_me:$LINENO: result: yes" >&5
11651echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011652 ipv6=yes
11653else
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 echo "$as_me: failed program was:" >&5
11655cat conftest.$ac_ext >&5
11656echo "$as_me:$LINENO: result: no" >&5
11657echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011658 ipv6=no
11659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011660rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011661fi
11662
11663if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011665#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011666_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011667
11668fi
11669
Martin v. Löwis11437992002-04-12 09:54:03 +000011670fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011671
11672ipv6type=unknown
11673ipv6lib=none
11674ipv6trylibc=no
11675
11676if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11678echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011679 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11680 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681 case $i in
11682 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011683 cat >conftest.$ac_ext <<_ACEOF
11684#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011685#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011686
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011687#include <netinet/in.h>
11688#ifdef IPV6_INRIA_VERSION
11689yes
11690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011691_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011693 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011694 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011695fi
11696rm -f conftest*
11697
11698 ;;
11699 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >conftest.$ac_ext <<_ACEOF
11701#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011702#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011703
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011704#include <netinet/in.h>
11705#ifdef __KAME__
11706yes
11707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011708_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011710 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011711 ipv6type=$i;
11712 ipv6lib=inet6
11713 ipv6libdir=/usr/local/v6/lib
11714 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011715fi
11716rm -f conftest*
11717
11718 ;;
11719 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011720 cat >conftest.$ac_ext <<_ACEOF
11721#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011722#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011723
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011724#include <features.h>
11725#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11726yes
11727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011728_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011730 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011731 ipv6type=$i;
11732 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011733fi
11734rm -f conftest*
11735
11736 ;;
11737 linux-inet6)
11738 if test -d /usr/inet6; then
11739 ipv6type=$i
11740 ipv6lib=inet6
11741 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011742 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011743 fi
11744 ;;
11745 solaris)
11746 if test -f /etc/netconfig; then
11747 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11748 ipv6type=$i
11749 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011750 fi
11751 fi
11752 ;;
11753 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 cat >conftest.$ac_ext <<_ACEOF
11755#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011756#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011758#include <sys/param.h>
11759#ifdef _TOSHIBA_INET6
11760yes
11761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011762_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011764 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011765 ipv6type=$i;
11766 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011767 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011768fi
11769rm -f conftest*
11770
11771 ;;
11772 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011773 cat >conftest.$ac_ext <<_ACEOF
11774#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011775#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011777#include </usr/local/v6/include/sys/v6config.h>
11778#ifdef __V6D__
11779yes
11780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011783 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011784 ipv6type=$i;
11785 ipv6lib=v6;
11786 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011787 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011788fi
11789rm -f conftest*
11790
11791 ;;
11792 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 cat >conftest.$ac_ext <<_ACEOF
11794#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011795#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011796
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011797#include <sys/param.h>
11798#ifdef _ZETA_MINAMI_INET6
11799yes
11800#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011803 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011804 ipv6type=$i;
11805 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011806 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011807fi
11808rm -f conftest*
11809
11810 ;;
11811 esac
11812 if test "$ipv6type" != "unknown"; then
11813 break
11814 fi
11815 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 echo "$as_me:$LINENO: result: $ipv6type" >&5
11817echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011818fi
11819
11820if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11821 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11822 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11823 echo "using lib$ipv6lib"
11824 else
11825 if test $ipv6trylibc = "yes"; then
11826 echo "using libc"
11827 else
11828 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11829 echo "You need to fetch lib$ipv6lib.a from appropriate"
11830 echo 'ipv6 kit and compile beforehand.'
11831 exit 1
11832 fi
11833 fi
11834fi
11835
Jack Jansen7b8c7542002-04-14 20:12:41 +000011836# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011837echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11838echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011839
11840# Check whether --with-universal-newlines or --without-universal-newlines was given.
11841if test "${with_universal_newlines+set}" = set; then
11842 withval="$with_universal_newlines"
11843
11844fi;
11845
11846if test -z "$with_universal_newlines"
11847then with_universal_newlines="yes"
11848fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011849if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011850then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011851 echo --without-universal-newlines is unsupported, see README
11852 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011853else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011854
11855cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011856#define WITH_UNIVERSAL_NEWLINES 1
11857_ACEOF
11858
11859fi
11860echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11861echo "${ECHO_T}$with_universal_newlines" >&6
11862
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011863# Check for --with-doc-strings
11864echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11865echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11866
11867# Check whether --with-doc-strings or --without-doc-strings was given.
11868if test "${with_doc_strings+set}" = set; then
11869 withval="$with_doc_strings"
11870
11871fi;
11872
11873if test -z "$with_doc_strings"
11874then with_doc_strings="yes"
11875fi
11876if test "$with_doc_strings" != "no"
11877then
11878
11879cat >>confdefs.h <<\_ACEOF
11880#define WITH_DOC_STRINGS 1
11881_ACEOF
11882
11883fi
11884echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11885echo "${ECHO_T}$with_doc_strings" >&6
11886
Neil Schemenauera35c6882001-02-27 04:45:05 +000011887# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011888echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11889echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11890
Neil Schemenauera35c6882001-02-27 04:45:05 +000011891# Check whether --with-pymalloc or --without-pymalloc was given.
11892if test "${with_pymalloc+set}" = set; then
11893 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011894
Martin v. Löwis11437992002-04-12 09:54:03 +000011895fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011896
Neil Schemenauer16c22972002-03-22 15:34:49 +000011897if test -z "$with_pymalloc"
11898then with_pymalloc="yes"
11899fi
11900if test "$with_pymalloc" != "no"
11901then
Martin v. Löwis11437992002-04-12 09:54:03 +000011902
11903cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011904#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011905_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011906
11907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011908echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11909echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011910
Barry Warsawef82cd72000-06-30 16:21:01 +000011911# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011912echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11913echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11914
Barry Warsawef82cd72000-06-30 16:21:01 +000011915# Check whether --with-wctype-functions or --without-wctype-functions was given.
11916if test "${with_wctype_functions+set}" = set; then
11917 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011918
Barry Warsawef82cd72000-06-30 16:21:01 +000011919if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011920then
11921
11922cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011923#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011924_ACEOF
11925
11926 echo "$as_me:$LINENO: result: yes" >&5
11927echo "${ECHO_T}yes" >&6
11928else echo "$as_me:$LINENO: result: no" >&5
11929echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011930fi
11931else
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 echo "$as_me:$LINENO: result: no" >&5
11933echo "${ECHO_T}no" >&6
11934fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011936# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011937
Guido van Rossum98935bf2001-09-05 19:13:16 +000011938DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11941echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11942
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011943# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011944if test "${with_sgi_dl+set}" = set; then
11945 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011946
11947echo "$as_me:$LINENO: result: $withval" >&5
11948echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011949echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011950exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011951
11952cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011954_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011955
Guido van Rossume97ee181999-12-20 21:27:22 +000011956DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011957dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011958if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011959then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011960else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11961echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11962 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011963fi
11964DLINCLDIR=${dldir}
11965LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011966else
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 echo "$as_me:$LINENO: result: no" >&5
11968echo "${ECHO_T}no" >&6
11969fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11972echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011973
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011975if test "${with_dl_dld+set}" = set; then
11976 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
11978echo "$as_me:$LINENO: result: $withval" >&5
11979echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011980echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011981exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011982
11983cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011985_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011986
Guido van Rossume97ee181999-12-20 21:27:22 +000011987DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011988dldir=`echo "$withval" | sed 's/,.*//'`
11989dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011990if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011991then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011992else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11993echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11994 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011995fi
11996DLINCLDIR=${dldir}
11997LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011998else
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 echo "$as_me:$LINENO: result: no" >&5
12000echo "${ECHO_T}no" >&6
12001fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012002
Guido van Rossume97ee181999-12-20 21:27:22 +000012003# the dlopen() function means we might want to use dynload_shlib.o. some
12004# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Thomas Wouters3a584202000-08-05 23:28:51 +000012006for ac_func in dlopen
12007do
Martin v. Löwis11437992002-04-12 09:54:03 +000012008as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12009echo "$as_me:$LINENO: checking for $ac_func" >&5
12010echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12011if eval "test \"\${$as_ac_var+set}\" = set"; then
12012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 cat >conftest.$ac_ext <<_ACEOF
12015#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012016#include "confdefs.h"
12017/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012019#include <assert.h>
12020/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012021#ifdef __cplusplus
12022extern "C"
12023#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 builtin and then its argument prototype would still apply. */
12026char $ac_func ();
12027char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012028
Barry Warsawfe33b792003-01-07 22:42:49 +000012029#ifdef F77_DUMMY_MAIN
12030# ifdef __cplusplus
12031 extern "C"
12032# endif
12033 int F77_DUMMY_MAIN() { return 1; }
12034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012035int
12036main ()
12037{
Guido van Rossume97ee181999-12-20 21:27:22 +000012038/* The GNU C library defines this for functions which it implements
12039 to always fail with ENOSYS. Some functions are actually named
12040 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012041#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012042choke me
12043#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012044f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012045#endif
12046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest.$ac_objext conftest$ac_exeext
12052if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12053 (eval $ac_link) 2>&5
12054 ac_status=$?
12055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12056 (exit $ac_status); } &&
12057 { ac_try='test -s conftest$ac_exeext'
12058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12059 (eval $ac_try) 2>&5
12060 ac_status=$?
12061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12062 (exit $ac_status); }; }; then
12063 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012064else
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 echo "$as_me: failed program was:" >&5
12066cat conftest.$ac_ext >&5
12067eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012069rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012071echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12072echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12073if test `eval echo '${'$as_ac_var'}'` = yes; then
12074 cat >>confdefs.h <<_ACEOF
12075#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12076_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012077
Guido van Rossume97ee181999-12-20 21:27:22 +000012078fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012079done
Guido van Rossume97ee181999-12-20 21:27:22 +000012080
Michael W. Hudson54241132001-12-07 15:38:26 +000012081
Guido van Rossume97ee181999-12-20 21:27:22 +000012082# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12083# loading of modules.
12084
Martin v. Löwis11437992002-04-12 09:54:03 +000012085echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12086echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012087if test -z "$DYNLOADFILE"
12088then
12089 case $ac_sys_system/$ac_sys_release in
12090 AIX*) DYNLOADFILE="dynload_aix.o";;
12091 BeOS*) DYNLOADFILE="dynload_beos.o";;
12092 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012093 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012094 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012095 *)
12096 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12097 # out any dynamic loading
12098 if test "$ac_cv_func_dlopen" = yes
12099 then DYNLOADFILE="dynload_shlib.o"
12100 else DYNLOADFILE="dynload_stub.o"
12101 fi
12102 ;;
12103 esac
12104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012105echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12106echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012107if test "$DYNLOADFILE" != "dynload_stub.o"
12108then
Martin v. Löwis11437992002-04-12 09:54:03 +000012109
12110cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012111#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012112_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012113
12114fi
12115
Neil Schemenauer4e425612001-06-19 15:44:15 +000012116# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12117
Michael W. Hudson54241132001-12-07 15:38:26 +000012118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12120echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012121if test -z "$MACHDEP_OBJS"
12122then
Jack Jansene578a632001-08-15 01:27:14 +000012123 MACHDEP_OBJS=$extra_machdep_objs
12124else
12125 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012127echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12128echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012129
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012204
Martin v. Löwisd5843682002-11-21 20:41:28 +000012205for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012206 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012207 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12208 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012209 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012210 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012211 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012212 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012213 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012214 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012215 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012216 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217do
Martin v. Löwis11437992002-04-12 09:54:03 +000012218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12219echo "$as_me:$LINENO: checking for $ac_func" >&5
12220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12221if eval "test \"\${$as_ac_var+set}\" = set"; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223else
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 cat >conftest.$ac_ext <<_ACEOF
12225#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012226#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012227/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012228 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012229#include <assert.h>
12230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012231#ifdef __cplusplus
12232extern "C"
12233#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 builtin and then its argument prototype would still apply. */
12236char $ac_func ();
12237char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012238
Barry Warsawfe33b792003-01-07 22:42:49 +000012239#ifdef F77_DUMMY_MAIN
12240# ifdef __cplusplus
12241 extern "C"
12242# endif
12243 int F77_DUMMY_MAIN() { return 1; }
12244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012248/* The GNU C library defines this for functions which it implements
12249 to always fail with ENOSYS. Some functions are actually named
12250 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012252choke me
12253#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012254f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext conftest$ac_exeext
12262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12263 (eval $ac_link) 2>&5
12264 ac_status=$?
12265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266 (exit $ac_status); } &&
12267 { ac_try='test -s conftest$ac_exeext'
12268 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12269 (eval $ac_try) 2>&5
12270 ac_status=$?
12271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12272 (exit $ac_status); }; }; then
12273 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012274else
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 echo "$as_me: failed program was:" >&5
12276cat conftest.$ac_ext >&5
12277eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012279rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012281echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12282echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12283if test `eval echo '${'$as_ac_var'}'` = yes; then
12284 cat >>confdefs.h <<_ACEOF
12285#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12286_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012287
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012288fi
12289done
12290
Michael W. Hudson54241132001-12-07 15:38:26 +000012291
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012292# For some functions, having a definition is not sufficient, since
12293# we want to take their address.
12294echo "$as_me:$LINENO: checking for chroot" >&5
12295echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12296cat >conftest.$ac_ext <<_ACEOF
12297#line $LINENO "configure"
12298#include "confdefs.h"
12299#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012300#ifdef F77_DUMMY_MAIN
12301# ifdef __cplusplus
12302 extern "C"
12303# endif
12304 int F77_DUMMY_MAIN() { return 1; }
12305#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012306int
12307main ()
12308{
12309void *x=chroot
12310 ;
12311 return 0;
12312}
12313_ACEOF
12314rm -f conftest.$ac_objext
12315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12316 (eval $ac_compile) 2>&5
12317 ac_status=$?
12318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319 (exit $ac_status); } &&
12320 { ac_try='test -s conftest.$ac_objext'
12321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12322 (eval $ac_try) 2>&5
12323 ac_status=$?
12324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12325 (exit $ac_status); }; }; then
12326
12327cat >>confdefs.h <<\_ACEOF
12328#define HAVE_CHROOT 1
12329_ACEOF
12330
12331 echo "$as_me:$LINENO: result: yes" >&5
12332echo "${ECHO_T}yes" >&6
12333else
12334 echo "$as_me: failed program was:" >&5
12335cat conftest.$ac_ext >&5
12336echo "$as_me:$LINENO: result: no" >&5
12337echo "${ECHO_T}no" >&6
12338
12339fi
12340rm -f conftest.$ac_objext conftest.$ac_ext
12341echo "$as_me:$LINENO: checking for link" >&5
12342echo $ECHO_N "checking for link... $ECHO_C" >&6
12343cat >conftest.$ac_ext <<_ACEOF
12344#line $LINENO "configure"
12345#include "confdefs.h"
12346#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012347#ifdef F77_DUMMY_MAIN
12348# ifdef __cplusplus
12349 extern "C"
12350# endif
12351 int F77_DUMMY_MAIN() { return 1; }
12352#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012353int
12354main ()
12355{
12356void *x=link
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext
12362if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12363 (eval $ac_compile) 2>&5
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); } &&
12367 { ac_try='test -s conftest.$ac_objext'
12368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12369 (eval $ac_try) 2>&5
12370 ac_status=$?
12371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12372 (exit $ac_status); }; }; then
12373
12374cat >>confdefs.h <<\_ACEOF
12375#define HAVE_LINK 1
12376_ACEOF
12377
12378 echo "$as_me:$LINENO: result: yes" >&5
12379echo "${ECHO_T}yes" >&6
12380else
12381 echo "$as_me: failed program was:" >&5
12382cat conftest.$ac_ext >&5
12383echo "$as_me:$LINENO: result: no" >&5
12384echo "${ECHO_T}no" >&6
12385
12386fi
12387rm -f conftest.$ac_objext conftest.$ac_ext
12388echo "$as_me:$LINENO: checking for symlink" >&5
12389echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12390cat >conftest.$ac_ext <<_ACEOF
12391#line $LINENO "configure"
12392#include "confdefs.h"
12393#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012394#ifdef F77_DUMMY_MAIN
12395# ifdef __cplusplus
12396 extern "C"
12397# endif
12398 int F77_DUMMY_MAIN() { return 1; }
12399#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012400int
12401main ()
12402{
12403void *x=symlink
12404 ;
12405 return 0;
12406}
12407_ACEOF
12408rm -f conftest.$ac_objext
12409if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12410 (eval $ac_compile) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); } &&
12414 { ac_try='test -s conftest.$ac_objext'
12415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12416 (eval $ac_try) 2>&5
12417 ac_status=$?
12418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12419 (exit $ac_status); }; }; then
12420
12421cat >>confdefs.h <<\_ACEOF
12422#define HAVE_SYMLINK 1
12423_ACEOF
12424
12425 echo "$as_me:$LINENO: result: yes" >&5
12426echo "${ECHO_T}yes" >&6
12427else
12428 echo "$as_me: failed program was:" >&5
12429cat conftest.$ac_ext >&5
12430echo "$as_me:$LINENO: result: no" >&5
12431echo "${ECHO_T}no" >&6
12432
12433fi
12434rm -f conftest.$ac_objext conftest.$ac_ext
12435
Martin v. Löwisd5843682002-11-21 20:41:28 +000012436# On some systems (eg. FreeBSD 5), we would find a definition of the
12437# functions ctermid_r, setgroups in the library, but no prototype
12438# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12439# address to avoid compiler warnings and potential miscompilations
12440# because of the missing prototypes.
12441
12442echo "$as_me:$LINENO: checking for ctermid_r" >&5
12443echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12444cat >conftest.$ac_ext <<_ACEOF
12445#line $LINENO "configure"
12446#include "confdefs.h"
12447
12448#include "confdefs.h"
12449#include <stdio.h>
12450
Barry Warsawfe33b792003-01-07 22:42:49 +000012451#ifdef F77_DUMMY_MAIN
12452# ifdef __cplusplus
12453 extern "C"
12454# endif
12455 int F77_DUMMY_MAIN() { return 1; }
12456#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012457int
12458main ()
12459{
12460void* p = ctermid_r
12461 ;
12462 return 0;
12463}
12464_ACEOF
12465rm -f conftest.$ac_objext
12466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12467 (eval $ac_compile) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); } &&
12471 { ac_try='test -s conftest.$ac_objext'
12472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12473 (eval $ac_try) 2>&5
12474 ac_status=$?
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); }; }; then
12477
12478cat >>confdefs.h <<\_ACEOF
12479#define HAVE_CTERMID_R 1
12480_ACEOF
12481
12482 echo "$as_me:$LINENO: result: yes" >&5
12483echo "${ECHO_T}yes" >&6
12484else
12485 echo "$as_me: failed program was:" >&5
12486cat conftest.$ac_ext >&5
12487echo "$as_me:$LINENO: result: no" >&5
12488echo "${ECHO_T}no" >&6
12489
12490fi
12491rm -f conftest.$ac_objext conftest.$ac_ext
12492
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012493echo "$as_me:$LINENO: checking for flock" >&5
12494echo $ECHO_N "checking for flock... $ECHO_C" >&6
12495cat >conftest.$ac_ext <<_ACEOF
12496#line $LINENO "configure"
12497#include "confdefs.h"
12498
12499#include "confdefs.h"
12500#include <sys/file.h>
12501
12502#ifdef F77_DUMMY_MAIN
12503# ifdef __cplusplus
12504 extern "C"
12505# endif
12506 int F77_DUMMY_MAIN() { return 1; }
12507#endif
12508int
12509main ()
12510{
12511void* p = flock
12512 ;
12513 return 0;
12514}
12515_ACEOF
12516rm -f conftest.$ac_objext
12517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12518 (eval $ac_compile) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); } &&
12522 { ac_try='test -s conftest.$ac_objext'
12523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12524 (eval $ac_try) 2>&5
12525 ac_status=$?
12526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12527 (exit $ac_status); }; }; then
12528
12529cat >>confdefs.h <<\_ACEOF
12530#define HAVE_FLOCK 1
12531_ACEOF
12532
12533 echo "$as_me:$LINENO: result: yes" >&5
12534echo "${ECHO_T}yes" >&6
12535else
12536 echo "$as_me: failed program was:" >&5
12537cat conftest.$ac_ext >&5
12538echo "$as_me:$LINENO: result: no" >&5
12539echo "${ECHO_T}no" >&6
12540
12541fi
12542rm -f conftest.$ac_objext conftest.$ac_ext
12543
12544echo "$as_me:$LINENO: checking for getpagesize" >&5
12545echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12546cat >conftest.$ac_ext <<_ACEOF
12547#line $LINENO "configure"
12548#include "confdefs.h"
12549
12550#include "confdefs.h"
12551#include <unistd.h>
12552
12553#ifdef F77_DUMMY_MAIN
12554# ifdef __cplusplus
12555 extern "C"
12556# endif
12557 int F77_DUMMY_MAIN() { return 1; }
12558#endif
12559int
12560main ()
12561{
12562void* p = getpagesize
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567rm -f conftest.$ac_objext
12568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12569 (eval $ac_compile) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); } &&
12573 { ac_try='test -s conftest.$ac_objext'
12574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12575 (eval $ac_try) 2>&5
12576 ac_status=$?
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); }; }; then
12579
12580cat >>confdefs.h <<\_ACEOF
12581#define HAVE_GETPAGESIZE 1
12582_ACEOF
12583
12584 echo "$as_me:$LINENO: result: yes" >&5
12585echo "${ECHO_T}yes" >&6
12586else
12587 echo "$as_me: failed program was:" >&5
12588cat conftest.$ac_ext >&5
12589echo "$as_me:$LINENO: result: no" >&5
12590echo "${ECHO_T}no" >&6
12591
12592fi
12593rm -f conftest.$ac_objext conftest.$ac_ext
12594
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012595echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12596echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12597if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12598 echo $ECHO_N "(cached) $ECHO_C" >&6
12599else
12600 ac_check_lib_save_LIBS=$LIBS
12601LIBS="-lc $LIBS"
12602cat >conftest.$ac_ext <<_ACEOF
12603#line $LINENO "configure"
12604#include "confdefs.h"
12605
12606/* Override any gcc2 internal prototype to avoid an error. */
12607#ifdef __cplusplus
12608extern "C"
12609#endif
12610/* We use char because int might match the return type of a gcc2
12611 builtin and then its argument prototype would still apply. */
12612char inet_aton ();
12613#ifdef F77_DUMMY_MAIN
12614# ifdef __cplusplus
12615 extern "C"
12616# endif
12617 int F77_DUMMY_MAIN() { return 1; }
12618#endif
12619int
12620main ()
12621{
12622inet_aton ();
12623 ;
12624 return 0;
12625}
12626_ACEOF
12627rm -f conftest.$ac_objext conftest$ac_exeext
12628if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12629 (eval $ac_link) 2>&5
12630 ac_status=$?
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); } &&
12633 { ac_try='test -s conftest$ac_exeext'
12634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12635 (eval $ac_try) 2>&5
12636 ac_status=$?
12637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12638 (exit $ac_status); }; }; then
12639 ac_cv_lib_c_inet_aton=yes
12640else
12641 echo "$as_me: failed program was:" >&5
12642cat conftest.$ac_ext >&5
12643ac_cv_lib_c_inet_aton=no
12644fi
12645rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12646LIBS=$ac_check_lib_save_LIBS
12647fi
12648echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12649echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12650if test $ac_cv_lib_c_inet_aton = yes; then
12651 /bin/true
12652else
12653
12654echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12655echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12656if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12657 echo $ECHO_N "(cached) $ECHO_C" >&6
12658else
12659 ac_check_lib_save_LIBS=$LIBS
12660LIBS="-lresolv $LIBS"
12661cat >conftest.$ac_ext <<_ACEOF
12662#line $LINENO "configure"
12663#include "confdefs.h"
12664
12665/* Override any gcc2 internal prototype to avoid an error. */
12666#ifdef __cplusplus
12667extern "C"
12668#endif
12669/* We use char because int might match the return type of a gcc2
12670 builtin and then its argument prototype would still apply. */
12671char inet_aton ();
12672#ifdef F77_DUMMY_MAIN
12673# ifdef __cplusplus
12674 extern "C"
12675# endif
12676 int F77_DUMMY_MAIN() { return 1; }
12677#endif
12678int
12679main ()
12680{
12681inet_aton ();
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest.$ac_objext conftest$ac_exeext
12687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12688 (eval $ac_link) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); } &&
12692 { ac_try='test -s conftest$ac_exeext'
12693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12694 (eval $ac_try) 2>&5
12695 ac_status=$?
12696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12697 (exit $ac_status); }; }; then
12698 ac_cv_lib_resolv_inet_aton=yes
12699else
12700 echo "$as_me: failed program was:" >&5
12701cat conftest.$ac_ext >&5
12702ac_cv_lib_resolv_inet_aton=no
12703fi
12704rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12705LIBS=$ac_check_lib_save_LIBS
12706fi
12707echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12708echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12709if test $ac_cv_lib_resolv_inet_aton = yes; then
12710 cat >>confdefs.h <<_ACEOF
12711#define HAVE_LIBRESOLV 1
12712_ACEOF
12713
12714 LIBS="-lresolv $LIBS"
12715
12716fi
12717
12718
12719fi
12720
12721
Martin v. Löwise9416172003-05-03 10:12:45 +000012722echo "$as_me:$LINENO: checking for hstrerror" >&5
12723echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12724cat >conftest.$ac_ext <<_ACEOF
12725#line $LINENO "configure"
12726#include "confdefs.h"
12727
12728#include "confdefs.h"
12729#include <netdb.h>
12730
12731#ifdef F77_DUMMY_MAIN
12732# ifdef __cplusplus
12733 extern "C"
12734# endif
12735 int F77_DUMMY_MAIN() { return 1; }
12736#endif
12737int
12738main ()
12739{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012740void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012741 ;
12742 return 0;
12743}
12744_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012745rm -f conftest.$ac_objext conftest$ac_exeext
12746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12747 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012751 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753 (eval $ac_try) 2>&5
12754 ac_status=$?
12755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756 (exit $ac_status); }; }; then
12757
12758cat >>confdefs.h <<\_ACEOF
12759#define HAVE_HSTRERROR 1
12760_ACEOF
12761
12762 echo "$as_me:$LINENO: result: yes" >&5
12763echo "${ECHO_T}yes" >&6
12764else
12765 echo "$as_me: failed program was:" >&5
12766cat conftest.$ac_ext >&5
12767echo "$as_me:$LINENO: result: no" >&5
12768echo "${ECHO_T}no" >&6
12769
12770fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012771rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012772
12773echo "$as_me:$LINENO: checking for inet_aton" >&5
12774echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12775cat >conftest.$ac_ext <<_ACEOF
12776#line $LINENO "configure"
12777#include "confdefs.h"
12778
12779#include "confdefs.h"
12780#include <sys/socket.h>
12781#include <netinet/in.h>
12782#include <arpa/inet.h>
12783
12784#ifdef F77_DUMMY_MAIN
12785# ifdef __cplusplus
12786 extern "C"
12787# endif
12788 int F77_DUMMY_MAIN() { return 1; }
12789#endif
12790int
12791main ()
12792{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012793void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012794 ;
12795 return 0;
12796}
12797_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012798rm -f conftest.$ac_objext conftest$ac_exeext
12799if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12800 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012801 ac_status=$?
12802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012804 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12806 (eval $ac_try) 2>&5
12807 ac_status=$?
12808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12809 (exit $ac_status); }; }; then
12810
12811cat >>confdefs.h <<\_ACEOF
12812#define HAVE_INET_ATON 1
12813_ACEOF
12814
12815 echo "$as_me:$LINENO: result: yes" >&5
12816echo "${ECHO_T}yes" >&6
12817else
12818 echo "$as_me: failed program was:" >&5
12819cat conftest.$ac_ext >&5
12820echo "$as_me:$LINENO: result: no" >&5
12821echo "${ECHO_T}no" >&6
12822
12823fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012824rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012825
12826echo "$as_me:$LINENO: checking for inet_pton" >&5
12827echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12828cat >conftest.$ac_ext <<_ACEOF
12829#line $LINENO "configure"
12830#include "confdefs.h"
12831
12832#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012833#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012834#include <sys/socket.h>
12835#include <netinet/in.h>
12836#include <arpa/inet.h>
12837
12838#ifdef F77_DUMMY_MAIN
12839# ifdef __cplusplus
12840 extern "C"
12841# endif
12842 int F77_DUMMY_MAIN() { return 1; }
12843#endif
12844int
12845main ()
12846{
12847void* p = inet_pton
12848 ;
12849 return 0;
12850}
12851_ACEOF
12852rm -f conftest.$ac_objext
12853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12854 (eval $ac_compile) 2>&5
12855 ac_status=$?
12856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12857 (exit $ac_status); } &&
12858 { ac_try='test -s conftest.$ac_objext'
12859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12860 (eval $ac_try) 2>&5
12861 ac_status=$?
12862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12863 (exit $ac_status); }; }; then
12864
12865cat >>confdefs.h <<\_ACEOF
12866#define HAVE_INET_PTON 1
12867_ACEOF
12868
12869 echo "$as_me:$LINENO: result: yes" >&5
12870echo "${ECHO_T}yes" >&6
12871else
12872 echo "$as_me: failed program was:" >&5
12873cat conftest.$ac_ext >&5
12874echo "$as_me:$LINENO: result: no" >&5
12875echo "${ECHO_T}no" >&6
12876
12877fi
12878rm -f conftest.$ac_objext conftest.$ac_ext
12879
Martin v. Löwisd5843682002-11-21 20:41:28 +000012880echo "$as_me:$LINENO: checking for setgroups" >&5
12881echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12882cat >conftest.$ac_ext <<_ACEOF
12883#line $LINENO "configure"
12884#include "confdefs.h"
12885
12886#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012887#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000012888
Barry Warsawfe33b792003-01-07 22:42:49 +000012889#ifdef F77_DUMMY_MAIN
12890# ifdef __cplusplus
12891 extern "C"
12892# endif
12893 int F77_DUMMY_MAIN() { return 1; }
12894#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012895int
12896main ()
12897{
12898void* p = setgroups
12899 ;
12900 return 0;
12901}
12902_ACEOF
12903rm -f conftest.$ac_objext
12904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12905 (eval $ac_compile) 2>&5
12906 ac_status=$?
12907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12908 (exit $ac_status); } &&
12909 { ac_try='test -s conftest.$ac_objext'
12910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12911 (eval $ac_try) 2>&5
12912 ac_status=$?
12913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12914 (exit $ac_status); }; }; then
12915
12916cat >>confdefs.h <<\_ACEOF
12917#define HAVE_SETGROUPS 1
12918_ACEOF
12919
12920 echo "$as_me:$LINENO: result: yes" >&5
12921echo "${ECHO_T}yes" >&6
12922else
12923 echo "$as_me: failed program was:" >&5
12924cat conftest.$ac_ext >&5
12925echo "$as_me:$LINENO: result: no" >&5
12926echo "${ECHO_T}no" >&6
12927
12928fi
12929rm -f conftest.$ac_objext conftest.$ac_ext
12930
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012931# check for openpty and forkpty
12932
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012934for ac_func in openpty
12935do
Martin v. Löwis11437992002-04-12 09:54:03 +000012936as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12937echo "$as_me:$LINENO: checking for $ac_func" >&5
12938echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12939if eval "test \"\${$as_ac_var+set}\" = set"; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012941else
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 cat >conftest.$ac_ext <<_ACEOF
12943#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012944#include "confdefs.h"
12945/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012947#include <assert.h>
12948/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012949#ifdef __cplusplus
12950extern "C"
12951#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012952/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 builtin and then its argument prototype would still apply. */
12954char $ac_func ();
12955char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012956
Barry Warsawfe33b792003-01-07 22:42:49 +000012957#ifdef F77_DUMMY_MAIN
12958# ifdef __cplusplus
12959 extern "C"
12960# endif
12961 int F77_DUMMY_MAIN() { return 1; }
12962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012966/* The GNU C library defines this for functions which it implements
12967 to always fail with ENOSYS. Some functions are actually named
12968 something starting with __ and the normal name is an alias. */
12969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12970choke me
12971#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012973#endif
12974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 ;
12976 return 0;
12977}
12978_ACEOF
12979rm -f conftest.$ac_objext conftest$ac_exeext
12980if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12981 (eval $ac_link) 2>&5
12982 ac_status=$?
12983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12984 (exit $ac_status); } &&
12985 { ac_try='test -s conftest$ac_exeext'
12986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12987 (eval $ac_try) 2>&5
12988 ac_status=$?
12989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12990 (exit $ac_status); }; }; then
12991 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012992else
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 echo "$as_me: failed program was:" >&5
12994cat conftest.$ac_ext >&5
12995eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012999echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13000echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13001if test `eval echo '${'$as_ac_var'}'` = yes; then
13002 cat >>confdefs.h <<_ACEOF
13003#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13004_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013005
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013006else
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13008echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13009if test "${ac_cv_lib_util_openpty+set}" = set; then
13010 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013011else
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013013LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013014cat >conftest.$ac_ext <<_ACEOF
13015#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013016#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Fred Drake8cef4cf2000-06-28 16:40:38 +000013018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013019#ifdef __cplusplus
13020extern "C"
13021#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 builtin and then its argument prototype would still apply. */
13024char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013025#ifdef F77_DUMMY_MAIN
13026# ifdef __cplusplus
13027 extern "C"
13028# endif
13029 int F77_DUMMY_MAIN() { return 1; }
13030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013031int
13032main ()
13033{
13034openpty ();
13035 ;
13036 return 0;
13037}
13038_ACEOF
13039rm -f conftest.$ac_objext conftest$ac_exeext
13040if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13041 (eval $ac_link) 2>&5
13042 ac_status=$?
13043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13044 (exit $ac_status); } &&
13045 { ac_try='test -s conftest$ac_exeext'
13046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13047 (eval $ac_try) 2>&5
13048 ac_status=$?
13049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13050 (exit $ac_status); }; }; then
13051 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013052else
Martin v. Löwis11437992002-04-12 09:54:03 +000013053 echo "$as_me: failed program was:" >&5
13054cat conftest.$ac_ext >&5
13055ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13058LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013060echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13061echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13062if test $ac_cv_lib_util_openpty = yes; then
13063 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013064#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013065_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013066 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013067fi
13068
13069fi
13070done
13071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
Fred Drake8cef4cf2000-06-28 16:40:38 +000013073for ac_func in forkpty
13074do
Martin v. Löwis11437992002-04-12 09:54:03 +000013075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13076echo "$as_me:$LINENO: checking for $ac_func" >&5
13077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13078if eval "test \"\${$as_ac_var+set}\" = set"; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 cat >conftest.$ac_ext <<_ACEOF
13082#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013083#include "confdefs.h"
13084/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013086#include <assert.h>
13087/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013088#ifdef __cplusplus
13089extern "C"
13090#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013091/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 builtin and then its argument prototype would still apply. */
13093char $ac_func ();
13094char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013095
Barry Warsawfe33b792003-01-07 22:42:49 +000013096#ifdef F77_DUMMY_MAIN
13097# ifdef __cplusplus
13098 extern "C"
13099# endif
13100 int F77_DUMMY_MAIN() { return 1; }
13101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013105/* The GNU C library defines this for functions which it implements
13106 to always fail with ENOSYS. Some functions are actually named
13107 something starting with __ and the normal name is an alias. */
13108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13109choke me
13110#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013111f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013112#endif
13113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ;
13115 return 0;
13116}
13117_ACEOF
13118rm -f conftest.$ac_objext conftest$ac_exeext
13119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13120 (eval $ac_link) 2>&5
13121 ac_status=$?
13122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123 (exit $ac_status); } &&
13124 { ac_try='test -s conftest$ac_exeext'
13125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13127 ac_status=$?
13128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13129 (exit $ac_status); }; }; then
13130 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013131else
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 echo "$as_me: failed program was:" >&5
13133cat conftest.$ac_ext >&5
13134eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013135fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013136rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013137fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013138echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13139echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13140if test `eval echo '${'$as_ac_var'}'` = yes; then
13141 cat >>confdefs.h <<_ACEOF
13142#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13143_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013144
Fred Drake8cef4cf2000-06-28 16:40:38 +000013145else
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13147echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13148if test "${ac_cv_lib_util_forkpty+set}" = set; then
13149 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013150else
Martin v. Löwis11437992002-04-12 09:54:03 +000013151 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013152LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013153cat >conftest.$ac_ext <<_ACEOF
13154#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013155#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013156
Fred Drake8cef4cf2000-06-28 16:40:38 +000013157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013158#ifdef __cplusplus
13159extern "C"
13160#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013161/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 builtin and then its argument prototype would still apply. */
13163char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013164#ifdef F77_DUMMY_MAIN
13165# ifdef __cplusplus
13166 extern "C"
13167# endif
13168 int F77_DUMMY_MAIN() { return 1; }
13169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
13173forkpty ();
13174 ;
13175 return 0;
13176}
13177_ACEOF
13178rm -f conftest.$ac_objext conftest$ac_exeext
13179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13180 (eval $ac_link) 2>&5
13181 ac_status=$?
13182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183 (exit $ac_status); } &&
13184 { ac_try='test -s conftest$ac_exeext'
13185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13186 (eval $ac_try) 2>&5
13187 ac_status=$?
13188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13189 (exit $ac_status); }; }; then
13190 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013191else
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 echo "$as_me: failed program was:" >&5
13193cat conftest.$ac_ext >&5
13194ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013196rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013199echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13200echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13201if test $ac_cv_lib_util_forkpty = yes; then
13202 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013203#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013204_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013205 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013206fi
13207
13208fi
13209done
13210
Jack Jansendd19cf82001-12-06 22:36:17 +000013211
Michael W. Hudson54241132001-12-07 15:38:26 +000013212# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
13214
13215
13216
13217
13218
Fred Drake8cef4cf2000-06-28 16:40:38 +000013219for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13220do
Martin v. Löwis11437992002-04-12 09:54:03 +000013221as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13222echo "$as_me:$LINENO: checking for $ac_func" >&5
13223echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13224if eval "test \"\${$as_ac_var+set}\" = set"; then
13225 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013226else
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 cat >conftest.$ac_ext <<_ACEOF
13228#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013229#include "confdefs.h"
13230/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013232#include <assert.h>
13233/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013234#ifdef __cplusplus
13235extern "C"
13236#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013237/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013238 builtin and then its argument prototype would still apply. */
13239char $ac_func ();
13240char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013241
Barry Warsawfe33b792003-01-07 22:42:49 +000013242#ifdef F77_DUMMY_MAIN
13243# ifdef __cplusplus
13244 extern "C"
13245# endif
13246 int F77_DUMMY_MAIN() { return 1; }
13247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013248int
13249main ()
13250{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013251/* The GNU C library defines this for functions which it implements
13252 to always fail with ENOSYS. Some functions are actually named
13253 something starting with __ and the normal name is an alias. */
13254#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13255choke me
13256#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013257f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013258#endif
13259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 ;
13261 return 0;
13262}
13263_ACEOF
13264rm -f conftest.$ac_objext conftest$ac_exeext
13265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13266 (eval $ac_link) 2>&5
13267 ac_status=$?
13268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269 (exit $ac_status); } &&
13270 { ac_try='test -s conftest$ac_exeext'
13271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13272 (eval $ac_try) 2>&5
13273 ac_status=$?
13274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275 (exit $ac_status); }; }; then
13276 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277else
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 echo "$as_me: failed program was:" >&5
13279cat conftest.$ac_ext >&5
13280eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013284echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13285echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13286if test `eval echo '${'$as_ac_var'}'` = yes; then
13287 cat >>confdefs.h <<_ACEOF
13288#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13289_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013291fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013292done
13293
Michael W. Hudson54241132001-12-07 15:38:26 +000013294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295
13296
13297
13298
13299
Martin v. Löwis1142de32002-03-29 16:28:31 +000013300for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013301do
Martin v. Löwis11437992002-04-12 09:54:03 +000013302as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13303echo "$as_me:$LINENO: checking for $ac_func" >&5
13304echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13305if eval "test \"\${$as_ac_var+set}\" = set"; then
13306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307else
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 cat >conftest.$ac_ext <<_ACEOF
13309#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013310#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013311/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013313#include <assert.h>
13314/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013315#ifdef __cplusplus
13316extern "C"
13317#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013318/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013319 builtin and then its argument prototype would still apply. */
13320char $ac_func ();
13321char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013322
Barry Warsawfe33b792003-01-07 22:42:49 +000013323#ifdef F77_DUMMY_MAIN
13324# ifdef __cplusplus
13325 extern "C"
13326# endif
13327 int F77_DUMMY_MAIN() { return 1; }
13328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013329int
13330main ()
13331{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332/* The GNU C library defines this for functions which it implements
13333 to always fail with ENOSYS. Some functions are actually named
13334 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013335#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013336choke me
13337#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013338f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013339#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
13345rm -f conftest.$ac_objext conftest$ac_exeext
13346if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13347 (eval $ac_link) 2>&5
13348 ac_status=$?
13349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350 (exit $ac_status); } &&
13351 { ac_try='test -s conftest$ac_exeext'
13352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13353 (eval $ac_try) 2>&5
13354 ac_status=$?
13355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13356 (exit $ac_status); }; }; then
13357 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013358else
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 echo "$as_me: failed program was:" >&5
13360cat conftest.$ac_ext >&5
13361eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013365echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13366echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13367if test `eval echo '${'$as_ac_var'}'` = yes; then
13368 cat >>confdefs.h <<_ACEOF
13369#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13370_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013371
Martin v. Löwis1142de32002-03-29 16:28:31 +000013372else
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013374fi
13375done
13376
13377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Martin v. Löwis1142de32002-03-29 16:28:31 +000013379for ac_func in getpgrp
13380do
Martin v. Löwis11437992002-04-12 09:54:03 +000013381as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13382echo "$as_me:$LINENO: checking for $ac_func" >&5
13383echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13384if eval "test \"\${$as_ac_var+set}\" = set"; then
13385 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013386else
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 cat >conftest.$ac_ext <<_ACEOF
13388#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013389#include "confdefs.h"
13390/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013392#include <assert.h>
13393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013394#ifdef __cplusplus
13395extern "C"
13396#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 builtin and then its argument prototype would still apply. */
13399char $ac_func ();
13400char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013401
Barry Warsawfe33b792003-01-07 22:42:49 +000013402#ifdef F77_DUMMY_MAIN
13403# ifdef __cplusplus
13404 extern "C"
13405# endif
13406 int F77_DUMMY_MAIN() { return 1; }
13407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013408int
13409main ()
13410{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013411/* The GNU C library defines this for functions which it implements
13412 to always fail with ENOSYS. Some functions are actually named
13413 something starting with __ and the normal name is an alias. */
13414#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13415choke me
13416#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013417f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013418#endif
13419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
13424rm -f conftest.$ac_objext conftest$ac_exeext
13425if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13426 (eval $ac_link) 2>&5
13427 ac_status=$?
13428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13429 (exit $ac_status); } &&
13430 { ac_try='test -s conftest$ac_exeext'
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 eval "$as_ac_var=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
13440eval "$as_ac_var=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_exeext 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: `eval echo '${'$as_ac_var'}'`" >&5
13445echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13446if test `eval echo '${'$as_ac_var'}'` = yes; then
13447 cat >>confdefs.h <<_ACEOF
13448#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13449_ACEOF
13450 cat >conftest.$ac_ext <<_ACEOF
13451#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452#include "confdefs.h"
13453#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013454#ifdef F77_DUMMY_MAIN
13455# ifdef __cplusplus
13456 extern "C"
13457# endif
13458 int F77_DUMMY_MAIN() { return 1; }
13459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013460int
13461main ()
13462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ;
13465 return 0;
13466}
13467_ACEOF
13468rm -f conftest.$ac_objext
13469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13470 (eval $ac_compile) 2>&5
13471 ac_status=$?
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); } &&
13474 { ac_try='test -s conftest.$ac_objext'
13475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13476 (eval $ac_try) 2>&5
13477 ac_status=$?
13478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13479 (exit $ac_status); }; }; then
13480
13481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485
Guido van Rossumf78abae1997-01-21 22:02:36 +000013486else
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 echo "$as_me: failed program was:" >&5
13488cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013490rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013491
Guido van Rossum627b2d71993-12-24 10:39:16 +000013492fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013493done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013494
Jack Jansen150753c2003-03-29 22:07:47 +000013495
13496for ac_func in setpgrp
13497do
13498as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13499echo "$as_me:$LINENO: checking for $ac_func" >&5
13500echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13501if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503else
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 cat >conftest.$ac_ext <<_ACEOF
13505#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013506#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013507/* System header to define __stub macros and hopefully few prototypes,
13508 which can conflict with char $ac_func (); below. */
13509#include <assert.h>
13510/* Override any gcc2 internal prototype to avoid an error. */
13511#ifdef __cplusplus
13512extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013513#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013514/* We use char because int might match the return type of a gcc2
13515 builtin and then its argument prototype would still apply. */
13516char $ac_func ();
13517char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013518
Barry Warsawfe33b792003-01-07 22:42:49 +000013519#ifdef F77_DUMMY_MAIN
13520# ifdef __cplusplus
13521 extern "C"
13522# endif
13523 int F77_DUMMY_MAIN() { return 1; }
13524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Jack Jansen150753c2003-03-29 22:07:47 +000013528/* The GNU C library defines this for functions which it implements
13529 to always fail with ENOSYS. Some functions are actually named
13530 something starting with __ and the normal name is an alias. */
13531#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13532choke me
13533#else
13534f = $ac_func;
13535#endif
13536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ;
13538 return 0;
13539}
13540_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013541rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013542if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13543 (eval $ac_link) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013546 (exit $ac_status); } &&
13547 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13549 (eval $ac_try) 2>&5
13550 ac_status=$?
13551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13552 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013553 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013554else
Jack Jansen150753c2003-03-29 22:07:47 +000013555 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013556cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013557eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013558fi
Jack Jansen150753c2003-03-29 22:07:47 +000013559rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013560fi
Jack Jansen150753c2003-03-29 22:07:47 +000013561echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13562echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13563if test `eval echo '${'$as_ac_var'}'` = yes; then
13564 cat >>confdefs.h <<_ACEOF
13565#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13566_ACEOF
13567 cat >conftest.$ac_ext <<_ACEOF
13568#line $LINENO "configure"
13569#include "confdefs.h"
13570#include <unistd.h>
13571#ifdef F77_DUMMY_MAIN
13572# ifdef __cplusplus
13573 extern "C"
13574# endif
13575 int F77_DUMMY_MAIN() { return 1; }
13576#endif
13577int
13578main ()
13579{
13580setpgrp(0,0);
13581 ;
13582 return 0;
13583}
13584_ACEOF
13585rm -f conftest.$ac_objext
13586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13587 (eval $ac_compile) 2>&5
13588 ac_status=$?
13589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13590 (exit $ac_status); } &&
13591 { ac_try='test -s conftest.$ac_objext'
13592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13593 (eval $ac_try) 2>&5
13594 ac_status=$?
13595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
13598cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013599#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013600_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013601
Jack Jansen150753c2003-03-29 22:07:47 +000013602
13603else
13604 echo "$as_me: failed program was:" >&5
13605cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013606fi
Jack Jansen150753c2003-03-29 22:07:47 +000013607rm -f conftest.$ac_objext conftest.$ac_ext
13608
13609fi
13610done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Thomas Wouters3a584202000-08-05 23:28:51 +000013613for ac_func in gettimeofday
13614do
Martin v. Löwis11437992002-04-12 09:54:03 +000013615as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13616echo "$as_me:$LINENO: checking for $ac_func" >&5
13617echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13618if eval "test \"\${$as_ac_var+set}\" = set"; then
13619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013620else
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 cat >conftest.$ac_ext <<_ACEOF
13622#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013623#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013624/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013626#include <assert.h>
13627/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013628#ifdef __cplusplus
13629extern "C"
13630#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013631/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 builtin and then its argument prototype would still apply. */
13633char $ac_func ();
13634char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013635
Barry Warsawfe33b792003-01-07 22:42:49 +000013636#ifdef F77_DUMMY_MAIN
13637# ifdef __cplusplus
13638 extern "C"
13639# endif
13640 int F77_DUMMY_MAIN() { return 1; }
13641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013642int
13643main ()
13644{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645/* The GNU C library defines this for functions which it implements
13646 to always fail with ENOSYS. Some functions are actually named
13647 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013648#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649choke me
13650#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013651f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013652#endif
13653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654 ;
13655 return 0;
13656}
13657_ACEOF
13658rm -f conftest.$ac_objext conftest$ac_exeext
13659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13660 (eval $ac_link) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); } &&
13664 { ac_try='test -s conftest$ac_exeext'
13665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13667 ac_status=$?
13668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
13670 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013671else
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 echo "$as_me: failed program was:" >&5
13673cat conftest.$ac_ext >&5
13674eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013678echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13679echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13680if test `eval echo '${'$as_ac_var'}'` = yes; then
13681 cat >>confdefs.h <<_ACEOF
13682#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13683_ACEOF
13684 cat >conftest.$ac_ext <<_ACEOF
13685#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013686#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013687#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013688#ifdef F77_DUMMY_MAIN
13689# ifdef __cplusplus
13690 extern "C"
13691# endif
13692 int F77_DUMMY_MAIN() { return 1; }
13693#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013697gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ;
13699 return 0;
13700}
13701_ACEOF
13702rm -f conftest.$ac_objext
13703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13704 (eval $ac_compile) 2>&5
13705 ac_status=$?
13706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } &&
13708 { ac_try='test -s conftest.$ac_objext'
13709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710 (eval $ac_try) 2>&5
13711 ac_status=$?
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013714 :
13715else
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 echo "$as_me: failed program was:" >&5
13717cat conftest.$ac_ext >&5
13718
13719cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013722
Martin v. Löwis11437992002-04-12 09:54:03 +000013723
Guido van Rossum627b2d71993-12-24 10:39:16 +000013724fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013725rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013728done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729
Michael W. Hudson54241132001-12-07 15:38:26 +000013730
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013731echo "$as_me:$LINENO: checking for major" >&5
13732echo $ECHO_N "checking for major... $ECHO_C" >&6
13733cat >conftest.$ac_ext <<_ACEOF
13734#line $LINENO "configure"
13735#include "confdefs.h"
13736
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013737#if defined(MAJOR_IN_MKDEV)
13738#include <sys/mkdev.h>
13739#elif defined(MAJOR_IN_SYSMACROS)
13740#include <sys/sysmacros.h>
13741#else
13742#include <sys/types.h>
13743#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013744
Barry Warsawfe33b792003-01-07 22:42:49 +000013745#ifdef F77_DUMMY_MAIN
13746# ifdef __cplusplus
13747 extern "C"
13748# endif
13749 int F77_DUMMY_MAIN() { return 1; }
13750#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013751int
13752main ()
13753{
13754
13755 makedev(major(0),minor(0));
13756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013761rm -f conftest.$ac_objext conftest$ac_exeext
13762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13763 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013764 ac_status=$?
13765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13766 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013767 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13769 (eval $ac_try) 2>&5
13770 ac_status=$?
13771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13772 (exit $ac_status); }; }; then
13773
13774
13775cat >>confdefs.h <<\_ACEOF
13776#define HAVE_DEVICE_MACROS 1
13777_ACEOF
13778
13779 echo "$as_me:$LINENO: result: yes" >&5
13780echo "${ECHO_T}yes" >&6
13781
13782else
13783 echo "$as_me: failed program was:" >&5
13784cat conftest.$ac_ext >&5
13785
13786 echo "$as_me:$LINENO: result: no" >&5
13787echo "${ECHO_T}no" >&6
13788
13789fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013790rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013791
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013792# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013793# for [no]getaddrinfo in netdb.h.
13794echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13795echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13796cat >conftest.$ac_ext <<_ACEOF
13797#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013798#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013799
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013800#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013801#include <sys/socket.h>
13802#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013803#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013804
Barry Warsawfe33b792003-01-07 22:42:49 +000013805#ifdef F77_DUMMY_MAIN
13806# ifdef __cplusplus
13807 extern "C"
13808# endif
13809 int F77_DUMMY_MAIN() { return 1; }
13810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013811int
13812main ()
13813{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013814
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013815getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013816
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
13821rm -f conftest.$ac_objext conftest$ac_exeext
13822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13823 (eval $ac_link) 2>&5
13824 ac_status=$?
13825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13826 (exit $ac_status); } &&
13827 { ac_try='test -s conftest$ac_exeext'
13828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13830 ac_status=$?
13831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); }; }; then
13833
13834echo "$as_me:$LINENO: result: yes" >&5
13835echo "${ECHO_T}yes" >&6
13836echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13837echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013838if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013839 echo "$as_me:$LINENO: result: buggy" >&5
13840echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013841buggygetaddrinfo=yes
13842else
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 cat >conftest.$ac_ext <<_ACEOF
13844#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013845#include "confdefs.h"
13846
13847#include <sys/types.h>
13848#include <netdb.h>
13849#include <string.h>
13850#include <sys/socket.h>
13851#include <netinet/in.h>
13852
13853main()
13854{
13855 int passive, gaierr, inet4 = 0, inet6 = 0;
13856 struct addrinfo hints, *ai, *aitop;
13857 char straddr[INET6_ADDRSTRLEN], strport[16];
13858
13859 for (passive = 0; passive <= 1; passive++) {
13860 memset(&hints, 0, sizeof(hints));
13861 hints.ai_family = AF_UNSPEC;
13862 hints.ai_flags = passive ? AI_PASSIVE : 0;
13863 hints.ai_socktype = SOCK_STREAM;
13864 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13865 (void)gai_strerror(gaierr);
13866 goto bad;
13867 }
13868 for (ai = aitop; ai; ai = ai->ai_next) {
13869 if (ai->ai_addr == NULL ||
13870 ai->ai_addrlen == 0 ||
13871 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13872 straddr, sizeof(straddr), strport, sizeof(strport),
13873 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13874 goto bad;
13875 }
13876 switch (ai->ai_family) {
13877 case AF_INET:
13878 if (strcmp(strport, "54321") != 0) {
13879 goto bad;
13880 }
13881 if (passive) {
13882 if (strcmp(straddr, "0.0.0.0") != 0) {
13883 goto bad;
13884 }
13885 } else {
13886 if (strcmp(straddr, "127.0.0.1") != 0) {
13887 goto bad;
13888 }
13889 }
13890 inet4++;
13891 break;
13892 case AF_INET6:
13893 if (strcmp(strport, "54321") != 0) {
13894 goto bad;
13895 }
13896 if (passive) {
13897 if (strcmp(straddr, "::") != 0) {
13898 goto bad;
13899 }
13900 } else {
13901 if (strcmp(straddr, "::1") != 0) {
13902 goto bad;
13903 }
13904 }
13905 inet6++;
13906 break;
13907 case AF_UNSPEC:
13908 goto bad;
13909 break;
13910 default:
13911 /* another family support? */
13912 break;
13913 }
13914 }
13915 }
13916
13917 if (!(inet4 == 0 || inet4 == 2))
13918 goto bad;
13919 if (!(inet6 == 0 || inet6 == 2))
13920 goto bad;
13921
13922 if (aitop)
13923 freeaddrinfo(aitop);
13924 exit(0);
13925
13926 bad:
13927 if (aitop)
13928 freeaddrinfo(aitop);
13929 exit(1);
13930}
13931
Martin v. Löwis11437992002-04-12 09:54:03 +000013932_ACEOF
13933rm -f conftest$ac_exeext
13934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13935 (eval $ac_link) 2>&5
13936 ac_status=$?
13937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13940 (eval $ac_try) 2>&5
13941 ac_status=$?
13942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13943 (exit $ac_status); }; }; then
13944 echo "$as_me:$LINENO: result: good" >&5
13945echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946buggygetaddrinfo=no
13947else
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 echo "$as_me: program exited with status $ac_status" >&5
13949echo "$as_me: failed program was:" >&5
13950cat conftest.$ac_ext >&5
13951( exit $ac_status )
13952echo "$as_me:$LINENO: result: buggy" >&5
13953echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013954buggygetaddrinfo=yes
13955fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013956rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958else
Martin v. Löwis11437992002-04-12 09:54:03 +000013959 echo "$as_me: failed program was:" >&5
13960cat conftest.$ac_ext >&5
13961
13962echo "$as_me:$LINENO: result: no" >&5
13963echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013964buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013965
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013966fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013967rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013968
13969if test "$buggygetaddrinfo" = "yes"; then
13970 if test "$ipv6" = "yes"; then
13971 echo 'Fatal: You must get working getaddrinfo() function.'
13972 echo ' or you can specify "--disable-ipv6"'.
13973 exit 1
13974 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013975else
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
13977cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013978#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013979_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013980
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013983for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013984do
Martin v. Löwis11437992002-04-12 09:54:03 +000013985as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13986echo "$as_me:$LINENO: checking for $ac_func" >&5
13987echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13988if eval "test \"\${$as_ac_var+set}\" = set"; then
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013990else
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 cat >conftest.$ac_ext <<_ACEOF
13992#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013993#include "confdefs.h"
13994/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013996#include <assert.h>
13997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013998#ifdef __cplusplus
13999extern "C"
14000#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 builtin and then its argument prototype would still apply. */
14003char $ac_func ();
14004char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014005
Barry Warsawfe33b792003-01-07 22:42:49 +000014006#ifdef F77_DUMMY_MAIN
14007# ifdef __cplusplus
14008 extern "C"
14009# endif
14010 int F77_DUMMY_MAIN() { return 1; }
14011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014012int
14013main ()
14014{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014015/* The GNU C library defines this for functions which it implements
14016 to always fail with ENOSYS. Some functions are actually named
14017 something starting with __ and the normal name is an alias. */
14018#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14019choke me
14020#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014021f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014022#endif
14023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext conftest$ac_exeext
14029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14030 (eval $ac_link) 2>&5
14031 ac_status=$?
14032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033 (exit $ac_status); } &&
14034 { ac_try='test -s conftest$ac_exeext'
14035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14036 (eval $ac_try) 2>&5
14037 ac_status=$?
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); }; }; then
14040 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014041else
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 echo "$as_me: failed program was:" >&5
14043cat conftest.$ac_ext >&5
14044eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014048echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14049echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14050if test `eval echo '${'$as_ac_var'}'` = yes; then
14051 cat >>confdefs.h <<_ACEOF
14052#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14053_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014054
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014055fi
14056done
14057
Michael W. Hudson54241132001-12-07 15:38:26 +000014058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014059# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014060echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14061echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14062if test "${ac_cv_header_time+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014064else
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 cat >conftest.$ac_ext <<_ACEOF
14066#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014067#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068#include <sys/types.h>
14069#include <sys/time.h>
14070#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Barry Warsawfe33b792003-01-07 22:42:49 +000014072#ifdef F77_DUMMY_MAIN
14073# ifdef __cplusplus
14074 extern "C"
14075# endif
14076 int F77_DUMMY_MAIN() { return 1; }
14077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014078int
14079main ()
14080{
14081if ((struct tm *) 0)
14082return 0;
14083 ;
14084 return 0;
14085}
14086_ACEOF
14087rm -f conftest.$ac_objext
14088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14089 (eval $ac_compile) 2>&5
14090 ac_status=$?
14091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092 (exit $ac_status); } &&
14093 { ac_try='test -s conftest.$ac_objext'
14094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14095 (eval $ac_try) 2>&5
14096 ac_status=$?
14097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14098 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014099 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 echo "$as_me: failed program was:" >&5
14102cat conftest.$ac_ext >&5
14103ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014105rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014107echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14108echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014109if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
14111cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014113_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114
14115fi
14116
Martin v. Löwis11437992002-04-12 09:54:03 +000014117echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14118echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14119if test "${ac_cv_struct_tm+set}" = set; then
14120 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014121else
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 cat >conftest.$ac_ext <<_ACEOF
14123#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014124#include "confdefs.h"
14125#include <sys/types.h>
14126#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
Barry Warsawfe33b792003-01-07 22:42:49 +000014128#ifdef F77_DUMMY_MAIN
14129# ifdef __cplusplus
14130 extern "C"
14131# endif
14132 int F77_DUMMY_MAIN() { return 1; }
14133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014134int
14135main ()
14136{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014137struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 ;
14139 return 0;
14140}
14141_ACEOF
14142rm -f conftest.$ac_objext
14143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14144 (eval $ac_compile) 2>&5
14145 ac_status=$?
14146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14147 (exit $ac_status); } &&
14148 { ac_try='test -s conftest.$ac_objext'
14149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14150 (eval $ac_try) 2>&5
14151 ac_status=$?
14152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14153 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014154 ac_cv_struct_tm=time.h
14155else
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 echo "$as_me: failed program was:" >&5
14157cat conftest.$ac_ext >&5
14158ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014160rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014161fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014162echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14163echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014164if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014165
14166cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014167#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169
14170fi
14171
Martin v. Löwis11437992002-04-12 09:54:03 +000014172echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14173echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14174if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 cat >conftest.$ac_ext <<_ACEOF
14178#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179#include "confdefs.h"
14180#include <sys/types.h>
14181#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
14183
Barry Warsawfe33b792003-01-07 22:42:49 +000014184#ifdef F77_DUMMY_MAIN
14185# ifdef __cplusplus
14186 extern "C"
14187# endif
14188 int F77_DUMMY_MAIN() { return 1; }
14189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014190int
14191main ()
14192{
14193static struct tm ac_aggr;
14194if (ac_aggr.tm_zone)
14195return 0;
14196 ;
14197 return 0;
14198}
14199_ACEOF
14200rm -f conftest.$ac_objext
14201if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14202 (eval $ac_compile) 2>&5
14203 ac_status=$?
14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); } &&
14206 { ac_try='test -s conftest.$ac_objext'
14207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14208 (eval $ac_try) 2>&5
14209 ac_status=$?
14210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14211 (exit $ac_status); }; }; then
14212 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014213else
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 echo "$as_me: failed program was:" >&5
14215cat conftest.$ac_ext >&5
14216ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014218rm -f conftest.$ac_objext conftest.$ac_ext
14219fi
14220echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14221echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14222if test $ac_cv_member_struct_tm_tm_zone = yes; then
14223
14224cat >>confdefs.h <<_ACEOF
14225#define HAVE_STRUCT_TM_TM_ZONE 1
14226_ACEOF
14227
14228
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014230
Martin v. Löwis11437992002-04-12 09:54:03 +000014231if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14232
14233cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014234#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014236
14237else
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 echo "$as_me:$LINENO: checking for tzname" >&5
14239echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14240if test "${ac_cv_var_tzname+set}" = set; then
14241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014242else
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 cat >conftest.$ac_ext <<_ACEOF
14244#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014245#include "confdefs.h"
14246#include <time.h>
14247#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014248extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014250
Barry Warsawfe33b792003-01-07 22:42:49 +000014251#ifdef F77_DUMMY_MAIN
14252# ifdef __cplusplus
14253 extern "C"
14254# endif
14255 int F77_DUMMY_MAIN() { return 1; }
14256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014257int
14258main ()
14259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014260atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
14265rm -f conftest.$ac_objext conftest$ac_exeext
14266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14267 (eval $ac_link) 2>&5
14268 ac_status=$?
14269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14270 (exit $ac_status); } &&
14271 { ac_try='test -s conftest$ac_exeext'
14272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14273 (eval $ac_try) 2>&5
14274 ac_status=$?
14275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14276 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014277 ac_cv_var_tzname=yes
14278else
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 echo "$as_me: failed program was:" >&5
14280cat conftest.$ac_ext >&5
14281ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014283rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014284fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014285echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14286echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014287 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014288
14289cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014290#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014291_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014293 fi
14294fi
14295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14297echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14298if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14299 echo $ECHO_N "(cached) $ECHO_C" >&6
14300else
14301 cat >conftest.$ac_ext <<_ACEOF
14302#line $LINENO "configure"
14303#include "confdefs.h"
14304$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014305#ifdef F77_DUMMY_MAIN
14306# ifdef __cplusplus
14307 extern "C"
14308# endif
14309 int F77_DUMMY_MAIN() { return 1; }
14310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014311int
14312main ()
14313{
14314static struct stat ac_aggr;
14315if (ac_aggr.st_rdev)
14316return 0;
14317 ;
14318 return 0;
14319}
14320_ACEOF
14321rm -f conftest.$ac_objext
14322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14323 (eval $ac_compile) 2>&5
14324 ac_status=$?
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); } &&
14327 { ac_try='test -s conftest.$ac_objext'
14328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14329 (eval $ac_try) 2>&5
14330 ac_status=$?
14331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14332 (exit $ac_status); }; }; then
14333 ac_cv_member_struct_stat_st_rdev=yes
14334else
14335 echo "$as_me: failed program was:" >&5
14336cat conftest.$ac_ext >&5
14337ac_cv_member_struct_stat_st_rdev=no
14338fi
14339rm -f conftest.$ac_objext conftest.$ac_ext
14340fi
14341echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14342echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14343if test $ac_cv_member_struct_stat_st_rdev = yes; then
14344
14345cat >>confdefs.h <<_ACEOF
14346#define HAVE_STRUCT_STAT_ST_RDEV 1
14347_ACEOF
14348
14349
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014350fi
14351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14353echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14354if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14355 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014356else
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 cat >conftest.$ac_ext <<_ACEOF
14358#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014359#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014360$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014361#ifdef F77_DUMMY_MAIN
14362# ifdef __cplusplus
14363 extern "C"
14364# endif
14365 int F77_DUMMY_MAIN() { return 1; }
14366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014367int
14368main ()
14369{
14370static struct stat ac_aggr;
14371if (ac_aggr.st_blksize)
14372return 0;
14373 ;
14374 return 0;
14375}
14376_ACEOF
14377rm -f conftest.$ac_objext
14378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14379 (eval $ac_compile) 2>&5
14380 ac_status=$?
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14382 (exit $ac_status); } &&
14383 { ac_try='test -s conftest.$ac_objext'
14384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14385 (eval $ac_try) 2>&5
14386 ac_status=$?
14387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); }; }; then
14389 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 echo "$as_me: failed program was:" >&5
14392cat conftest.$ac_ext >&5
14393ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014395rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014397echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14398echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14399if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401cat >>confdefs.h <<_ACEOF
14402#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14403_ACEOF
14404
14405
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014406fi
14407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14409echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14410if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014412else
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 cat >conftest.$ac_ext <<_ACEOF
14414#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014415#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014416$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014417#ifdef F77_DUMMY_MAIN
14418# ifdef __cplusplus
14419 extern "C"
14420# endif
14421 int F77_DUMMY_MAIN() { return 1; }
14422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014423int
14424main ()
14425{
14426static struct stat ac_aggr;
14427if (ac_aggr.st_blocks)
14428return 0;
14429 ;
14430 return 0;
14431}
14432_ACEOF
14433rm -f conftest.$ac_objext
14434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14435 (eval $ac_compile) 2>&5
14436 ac_status=$?
14437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14438 (exit $ac_status); } &&
14439 { ac_try='test -s conftest.$ac_objext'
14440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14442 ac_status=$?
14443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }; then
14445 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014446else
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 echo "$as_me: failed program was:" >&5
14448cat conftest.$ac_ext >&5
14449ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014451rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014452fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014453echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14454echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14455if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457cat >>confdefs.h <<_ACEOF
14458#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14459_ACEOF
14460
14461
14462cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014463#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014465
14466else
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014468fi
14469
Michael W. Hudson54241132001-12-07 15:38:26 +000014470
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
14472echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14473echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14474if test "${ac_cv_header_time_altzone+set}" = set; then
14475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014476else
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 cat >conftest.$ac_ext <<_ACEOF
14478#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014479#include "confdefs.h"
14480#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014481#ifdef F77_DUMMY_MAIN
14482# ifdef __cplusplus
14483 extern "C"
14484# endif
14485 int F77_DUMMY_MAIN() { return 1; }
14486#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014487int
14488main ()
14489{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014490return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 ;
14492 return 0;
14493}
14494_ACEOF
14495rm -f conftest.$ac_objext
14496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14497 (eval $ac_compile) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); } &&
14501 { ac_try='test -s conftest.$ac_objext'
14502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507 ac_cv_header_time_altzone=yes
14508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 echo "$as_me: failed program was:" >&5
14510cat conftest.$ac_ext >&5
14511ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014513rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014514fi
14515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14517echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014518if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014521#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014523
14524fi
14525
Guido van Rossumda88dad1995-01-26 00:46:29 +000014526was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014527echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14528echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14529cat >conftest.$ac_ext <<_ACEOF
14530#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014531#include "confdefs.h"
14532
14533#include <sys/types.h>
14534#include <sys/select.h>
14535#include <sys/time.h>
14536
Barry Warsawfe33b792003-01-07 22:42:49 +000014537#ifdef F77_DUMMY_MAIN
14538# ifdef __cplusplus
14539 extern "C"
14540# endif
14541 int F77_DUMMY_MAIN() { return 1; }
14542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014543int
14544main ()
14545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014546;
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ;
14548 return 0;
14549}
14550_ACEOF
14551rm -f conftest.$ac_objext
14552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14553 (eval $ac_compile) 2>&5
14554 ac_status=$?
14555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); } &&
14557 { ac_try='test -s conftest.$ac_objext'
14558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14559 (eval $ac_try) 2>&5
14560 ac_status=$?
14561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14562 (exit $ac_status); }; }; then
14563
14564
14565cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014566#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014567_ACEOF
14568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014569 was_it_defined=yes
14570
Guido van Rossumf78abae1997-01-21 22:02:36 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 echo "$as_me: failed program was:" >&5
14573cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014575rm -f conftest.$ac_objext conftest.$ac_ext
14576echo "$as_me:$LINENO: result: $was_it_defined" >&5
14577echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579echo "$as_me:$LINENO: checking for addrinfo" >&5
14580echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14581if test "${ac_cv_struct_addrinfo+set}" = set; then
14582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014583else
Martin v. Löwis11437992002-04-12 09:54:03 +000014584 cat >conftest.$ac_ext <<_ACEOF
14585#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014586#include "confdefs.h"
14587
14588# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014589#ifdef F77_DUMMY_MAIN
14590# ifdef __cplusplus
14591 extern "C"
14592# endif
14593 int F77_DUMMY_MAIN() { return 1; }
14594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014595int
14596main ()
14597{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014598struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014599 ;
14600 return 0;
14601}
14602_ACEOF
14603rm -f conftest.$ac_objext
14604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14605 (eval $ac_compile) 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); } &&
14609 { ac_try='test -s conftest.$ac_objext'
14610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14611 (eval $ac_try) 2>&5
14612 ac_status=$?
14613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14614 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014615 ac_cv_struct_addrinfo=yes
14616else
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 echo "$as_me: failed program was:" >&5
14618cat conftest.$ac_ext >&5
14619ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014620fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014621rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014622fi
14623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14625echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014626if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
14628cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014629#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014630_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014631
14632fi
14633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14635echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14636if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014638else
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 cat >conftest.$ac_ext <<_ACEOF
14640#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014641#include "confdefs.h"
14642
14643# include <sys/types.h>
14644# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014645#ifdef F77_DUMMY_MAIN
14646# ifdef __cplusplus
14647 extern "C"
14648# endif
14649 int F77_DUMMY_MAIN() { return 1; }
14650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014651int
14652main ()
14653{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014654struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 ;
14656 return 0;
14657}
14658_ACEOF
14659rm -f conftest.$ac_objext
14660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14661 (eval $ac_compile) 2>&5
14662 ac_status=$?
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664 (exit $ac_status); } &&
14665 { ac_try='test -s conftest.$ac_objext'
14666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14667 (eval $ac_try) 2>&5
14668 ac_status=$?
14669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14670 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014671 ac_cv_struct_sockaddr_storage=yes
14672else
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 echo "$as_me: failed program was:" >&5
14674cat conftest.$ac_ext >&5
14675ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014676fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014677rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014678fi
14679
Martin v. Löwis11437992002-04-12 09:54:03 +000014680echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14681echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014682if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014683
14684cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014685#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014686_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014687
14688fi
14689
Guido van Rossum627b2d71993-12-24 10:39:16 +000014690# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014691
Michael W. Hudson54241132001-12-07 15:38:26 +000014692
Martin v. Löwis11437992002-04-12 09:54:03 +000014693echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14694echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14695if test "${ac_cv_c_char_unsigned+set}" = set; then
14696 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 cat >conftest.$ac_ext <<_ACEOF
14699#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014700#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014701$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014702#ifdef F77_DUMMY_MAIN
14703# ifdef __cplusplus
14704 extern "C"
14705# endif
14706 int F77_DUMMY_MAIN() { return 1; }
14707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014708int
14709main ()
14710{
14711static int test_array [1 - 2 * !(((char) -1) < 0)];
14712test_array [0] = 0
14713
14714 ;
14715 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014716}
Martin v. Löwis11437992002-04-12 09:54:03 +000014717_ACEOF
14718rm -f conftest.$ac_objext
14719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14720 (eval $ac_compile) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); } &&
14724 { ac_try='test -s conftest.$ac_objext'
14725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14727 ac_status=$?
14728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014730 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014731else
14732 echo "$as_me: failed program was:" >&5
14733cat conftest.$ac_ext >&5
14734ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014735fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014736rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014737fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014738echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14739echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014740if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014741 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014742#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014743_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014744
14745fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014746
Barry Warsawfe33b792003-01-07 22:42:49 +000014747echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14748echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14749if test "${ac_cv_prog_cc_stdc+set}" = set; then
14750 echo $ECHO_N "(cached) $ECHO_C" >&6
14751else
14752 ac_cv_prog_cc_stdc=no
14753ac_save_CC=$CC
14754cat >conftest.$ac_ext <<_ACEOF
14755#line $LINENO "configure"
14756#include "confdefs.h"
14757#include <stdarg.h>
14758#include <stdio.h>
14759#include <sys/types.h>
14760#include <sys/stat.h>
14761/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14762struct buf { int x; };
14763FILE * (*rcsopen) (struct buf *, struct stat *, int);
14764static char *e (p, i)
14765 char **p;
14766 int i;
14767{
14768 return p[i];
14769}
14770static char *f (char * (*g) (char **, int), char **p, ...)
14771{
14772 char *s;
14773 va_list v;
14774 va_start (v,p);
14775 s = g (p, va_arg (v,int));
14776 va_end (v);
14777 return s;
14778}
14779int test (int i, double x);
14780struct s1 {int (*f) (int a);};
14781struct s2 {int (*f) (double a);};
14782int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14783int argc;
14784char **argv;
14785#ifdef F77_DUMMY_MAIN
14786# ifdef __cplusplus
14787 extern "C"
14788# endif
14789 int F77_DUMMY_MAIN() { return 1; }
14790#endif
14791int
14792main ()
14793{
14794return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14795 ;
14796 return 0;
14797}
14798_ACEOF
14799# Don't try gcc -ansi; that turns off useful extensions and
14800# breaks some systems' header files.
14801# AIX -qlanglvl=ansi
14802# Ultrix and OSF/1 -std1
14803# HP-UX 10.20 and later -Ae
14804# HP-UX older versions -Aa -D_HPUX_SOURCE
14805# SVR4 -Xc -D__EXTENSIONS__
14806for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14807do
14808 CC="$ac_save_CC $ac_arg"
14809 rm -f conftest.$ac_objext
14810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14811 (eval $ac_compile) 2>&5
14812 ac_status=$?
14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814 (exit $ac_status); } &&
14815 { ac_try='test -s conftest.$ac_objext'
14816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817 (eval $ac_try) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); }; }; then
14821 ac_cv_prog_cc_stdc=$ac_arg
14822break
14823else
14824 echo "$as_me: failed program was:" >&5
14825cat conftest.$ac_ext >&5
14826fi
14827rm -f conftest.$ac_objext
14828done
14829rm -f conftest.$ac_ext conftest.$ac_objext
14830CC=$ac_save_CC
14831
14832fi
14833
14834case "x$ac_cv_prog_cc_stdc" in
14835 x|xno)
14836 echo "$as_me:$LINENO: result: none needed" >&5
14837echo "${ECHO_T}none needed" >&6 ;;
14838 *)
14839 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14840echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14841 CC="$CC $ac_cv_prog_cc_stdc" ;;
14842esac
14843
Martin v. Löwis11437992002-04-12 09:54:03 +000014844echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14845echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14846if test "${ac_cv_c_const+set}" = set; then
14847 echo $ECHO_N "(cached) $ECHO_C" >&6
14848else
14849 cat >conftest.$ac_ext <<_ACEOF
14850#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014851#include "confdefs.h"
14852
Barry Warsawfe33b792003-01-07 22:42:49 +000014853#ifdef F77_DUMMY_MAIN
14854# ifdef __cplusplus
14855 extern "C"
14856# endif
14857 int F77_DUMMY_MAIN() { return 1; }
14858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014859int
14860main ()
14861{
14862/* FIXME: Include the comments suggested by Paul. */
14863#ifndef __cplusplus
14864 /* Ultrix mips cc rejects this. */
14865 typedef int charset[2];
14866 const charset x;
14867 /* SunOS 4.1.1 cc rejects this. */
14868 char const *const *ccp;
14869 char **p;
14870 /* NEC SVR4.0.2 mips cc rejects this. */
14871 struct point {int x, y;};
14872 static struct point const zero = {0,0};
14873 /* AIX XL C 1.02.0.0 rejects this.
14874 It does not let you subtract one const X* pointer from another in
14875 an arm of an if-expression whose if-part is not a constant
14876 expression */
14877 const char *g = "string";
14878 ccp = &g + (g ? g-g : 0);
14879 /* HPUX 7.0 cc rejects these. */
14880 ++ccp;
14881 p = (char**) ccp;
14882 ccp = (char const *const *) p;
14883 { /* SCO 3.2v4 cc rejects this. */
14884 char *t;
14885 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014886
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 *t++ = 0;
14888 }
14889 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14890 int x[] = {25, 17};
14891 const int *foo = &x[0];
14892 ++foo;
14893 }
14894 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14895 typedef const int *iptr;
14896 iptr p = 0;
14897 ++p;
14898 }
14899 { /* AIX XL C 1.02.0.0 rejects this saying
14900 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14901 struct s { int j; const int *ap[3]; };
14902 struct s *b; b->j = 5;
14903 }
14904 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14905 const int foo = 10;
14906 }
14907#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014908
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ;
14910 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014911}
Martin v. Löwis11437992002-04-12 09:54:03 +000014912_ACEOF
14913rm -f conftest.$ac_objext
14914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14915 (eval $ac_compile) 2>&5
14916 ac_status=$?
14917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918 (exit $ac_status); } &&
14919 { ac_try='test -s conftest.$ac_objext'
14920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14921 (eval $ac_try) 2>&5
14922 ac_status=$?
14923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14924 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014925 ac_cv_c_const=yes
14926else
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 echo "$as_me: failed program was:" >&5
14928cat conftest.$ac_ext >&5
14929ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014931rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014933echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14934echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014935if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014936
14937cat >>confdefs.h <<\_ACEOF
14938#define const
14939_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014940
14941fi
14942
Michael W. Hudson54241132001-12-07 15:38:26 +000014943
Guido van Rossumda88dad1995-01-26 00:46:29 +000014944works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014945echo "$as_me:$LINENO: checking for working volatile" >&5
14946echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14947cat >conftest.$ac_ext <<_ACEOF
14948#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014949#include "confdefs.h"
14950
Barry Warsawfe33b792003-01-07 22:42:49 +000014951#ifdef F77_DUMMY_MAIN
14952# ifdef __cplusplus
14953 extern "C"
14954# endif
14955 int F77_DUMMY_MAIN() { return 1; }
14956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014957int
14958main ()
14959{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014960volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ;
14962 return 0;
14963}
14964_ACEOF
14965rm -f conftest.$ac_objext
14966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14967 (eval $ac_compile) 2>&5
14968 ac_status=$?
14969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14970 (exit $ac_status); } &&
14971 { ac_try='test -s conftest.$ac_objext'
14972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14973 (eval $ac_try) 2>&5
14974 ac_status=$?
14975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14976 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014977 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014978else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 echo "$as_me: failed program was:" >&5
14980cat conftest.$ac_ext >&5
14981
14982cat >>confdefs.h <<\_ACEOF
14983#define volatile
14984_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014985
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014986
Guido van Rossum627b2d71993-12-24 10:39:16 +000014987fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014988rm -f conftest.$ac_objext conftest.$ac_ext
14989echo "$as_me:$LINENO: result: $works" >&5
14990echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014991
Guido van Rossumda88dad1995-01-26 00:46:29 +000014992works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014993echo "$as_me:$LINENO: checking for working signed char" >&5
14994echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14995cat >conftest.$ac_ext <<_ACEOF
14996#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014997#include "confdefs.h"
14998
Barry Warsawfe33b792003-01-07 22:42:49 +000014999#ifdef F77_DUMMY_MAIN
15000# ifdef __cplusplus
15001 extern "C"
15002# endif
15003 int F77_DUMMY_MAIN() { return 1; }
15004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015005int
15006main ()
15007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015008signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ;
15010 return 0;
15011}
15012_ACEOF
15013rm -f conftest.$ac_objext
15014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15015 (eval $ac_compile) 2>&5
15016 ac_status=$?
15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018 (exit $ac_status); } &&
15019 { ac_try='test -s conftest.$ac_objext'
15020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15021 (eval $ac_try) 2>&5
15022 ac_status=$?
15023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15024 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015025 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015026else
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 echo "$as_me: failed program was:" >&5
15028cat conftest.$ac_ext >&5
15029
15030cat >>confdefs.h <<\_ACEOF
15031#define signed
15032_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015033
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015034
Guido van Rossum7f43da71994-08-01 12:15:30 +000015035fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015036rm -f conftest.$ac_objext conftest.$ac_ext
15037echo "$as_me:$LINENO: result: $works" >&5
15038echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015039
Guido van Rossumda88dad1995-01-26 00:46:29 +000015040have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015041echo "$as_me:$LINENO: checking for prototypes" >&5
15042echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15043cat >conftest.$ac_ext <<_ACEOF
15044#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015045#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015046int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015047#ifdef F77_DUMMY_MAIN
15048# ifdef __cplusplus
15049 extern "C"
15050# endif
15051 int F77_DUMMY_MAIN() { return 1; }
15052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015053int
15054main ()
15055{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015056return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 ;
15058 return 0;
15059}
15060_ACEOF
15061rm -f conftest.$ac_objext
15062if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15063 (eval $ac_compile) 2>&5
15064 ac_status=$?
15065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15066 (exit $ac_status); } &&
15067 { ac_try='test -s conftest.$ac_objext'
15068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15069 (eval $ac_try) 2>&5
15070 ac_status=$?
15071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15072 (exit $ac_status); }; }; then
15073
15074
15075cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015077_ACEOF
15078
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015079 have_prototypes=yes
15080
Guido van Rossumf78abae1997-01-21 22:02:36 +000015081else
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 echo "$as_me: failed program was:" >&5
15083cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015085rm -f conftest.$ac_objext conftest.$ac_ext
15086echo "$as_me:$LINENO: result: $have_prototypes" >&5
15087echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088
Guido van Rossumda88dad1995-01-26 00:46:29 +000015089works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015090echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15091echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15092cat >conftest.$ac_ext <<_ACEOF
15093#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015094#include "confdefs.h"
15095
15096#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015097int foo(int x, ...) {
15098 va_list va;
15099 va_start(va, x);
15100 va_arg(va, int);
15101 va_arg(va, char *);
15102 va_arg(va, double);
15103 return 0;
15104}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015105
Barry Warsawfe33b792003-01-07 22:42:49 +000015106#ifdef F77_DUMMY_MAIN
15107# ifdef __cplusplus
15108 extern "C"
15109# endif
15110 int F77_DUMMY_MAIN() { return 1; }
15111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015112int
15113main ()
15114{
Guido van Rossum90eea071996-08-30 20:58:57 +000015115return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ;
15117 return 0;
15118}
15119_ACEOF
15120rm -f conftest.$ac_objext
15121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15122 (eval $ac_compile) 2>&5
15123 ac_status=$?
15124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15125 (exit $ac_status); } &&
15126 { ac_try='test -s conftest.$ac_objext'
15127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15128 (eval $ac_try) 2>&5
15129 ac_status=$?
15130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15131 (exit $ac_status); }; }; then
15132
15133
15134cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015135#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015136_ACEOF
15137
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015138 works=yes
15139
Guido van Rossumf78abae1997-01-21 22:02:36 +000015140else
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 echo "$as_me: failed program was:" >&5
15142cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015144rm -f conftest.$ac_objext conftest.$ac_ext
15145echo "$as_me:$LINENO: result: $works" >&5
15146echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015147
Guido van Rossumda88dad1995-01-26 00:46:29 +000015148if test "$have_prototypes" = yes; then
15149bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015150echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15151echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15152cat >conftest.$ac_ext <<_ACEOF
15153#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015154#include "confdefs.h"
15155#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015156#ifdef F77_DUMMY_MAIN
15157# ifdef __cplusplus
15158 extern "C"
15159# endif
15160 int F77_DUMMY_MAIN() { return 1; }
15161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015162int
15163main ()
15164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015165char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;
15167 return 0;
15168}
15169_ACEOF
15170rm -f conftest.$ac_objext
15171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15172 (eval $ac_compile) 2>&5
15173 ac_status=$?
15174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15175 (exit $ac_status); } &&
15176 { ac_try='test -s conftest.$ac_objext'
15177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15178 (eval $ac_try) 2>&5
15179 ac_status=$?
15180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15181 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015182 :
15183else
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 echo "$as_me: failed program was:" >&5
15185cat conftest.$ac_ext >&5
15186
15187cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015189_ACEOF
15190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015191 bad_prototypes=yes
15192
Guido van Rossum627b2d71993-12-24 10:39:16 +000015193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015194rm -f conftest.$ac_objext conftest.$ac_ext
15195echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15196echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015197fi
15198
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015199# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015200echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15201echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15202cat >conftest.$ac_ext <<_ACEOF
15203#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015204#include "confdefs.h"
15205#include <sys/types.h>
15206#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015207#ifdef F77_DUMMY_MAIN
15208# ifdef __cplusplus
15209 extern "C"
15210# endif
15211 int F77_DUMMY_MAIN() { return 1; }
15212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015213int
15214main ()
15215{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015216struct sockaddr x;
15217x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ;
15219 return 0;
15220}
15221_ACEOF
15222rm -f conftest.$ac_objext
15223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15224 (eval $ac_compile) 2>&5
15225 ac_status=$?
15226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15227 (exit $ac_status); } &&
15228 { ac_try='test -s conftest.$ac_objext'
15229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15230 (eval $ac_try) 2>&5
15231 ac_status=$?
15232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15233 (exit $ac_status); }; }; then
15234 echo "$as_me:$LINENO: result: yes" >&5
15235echo "${ECHO_T}yes" >&6
15236
15237cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015238#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015239_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015240
15241else
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 echo "$as_me: failed program was:" >&5
15243cat conftest.$ac_ext >&5
15244echo "$as_me:$LINENO: result: no" >&5
15245echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015247rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015248
Guido van Rossumda88dad1995-01-26 00:46:29 +000015249va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015250echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15251echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15252cat >conftest.$ac_ext <<_ACEOF
15253#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254#include "confdefs.h"
15255
15256#ifdef HAVE_STDARG_PROTOTYPES
15257#include <stdarg.h>
15258#else
15259#include <varargs.h>
15260#endif
15261
Barry Warsawfe33b792003-01-07 22:42:49 +000015262#ifdef F77_DUMMY_MAIN
15263# ifdef __cplusplus
15264 extern "C"
15265# endif
15266 int F77_DUMMY_MAIN() { return 1; }
15267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015268int
15269main ()
15270{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015271va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ;
15273 return 0;
15274}
15275_ACEOF
15276rm -f conftest.$ac_objext
15277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15278 (eval $ac_compile) 2>&5
15279 ac_status=$?
15280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15281 (exit $ac_status); } &&
15282 { ac_try='test -s conftest.$ac_objext'
15283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15284 (eval $ac_try) 2>&5
15285 ac_status=$?
15286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15287 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288 :
15289else
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 echo "$as_me: failed program was:" >&5
15291cat conftest.$ac_ext >&5
15292
15293
15294cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015295#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015296_ACEOF
15297
Guido van Rossumda88dad1995-01-26 00:46:29 +000015298 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015300fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015301rm -f conftest.$ac_objext conftest.$ac_ext
15302echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15303echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015305# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015306
15307
15308
15309echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15310echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15311if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 cat >conftest.$ac_ext <<_ACEOF
15315#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015316#include "confdefs.h"
15317/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015319#include <assert.h>
15320/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015321#ifdef __cplusplus
15322extern "C"
15323#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015324/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 builtin and then its argument prototype would still apply. */
15326char gethostbyname_r ();
15327char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015328
Barry Warsawfe33b792003-01-07 22:42:49 +000015329#ifdef F77_DUMMY_MAIN
15330# ifdef __cplusplus
15331 extern "C"
15332# endif
15333 int F77_DUMMY_MAIN() { return 1; }
15334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015335int
15336main ()
15337{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015338/* The GNU C library defines this for functions which it implements
15339 to always fail with ENOSYS. Some functions are actually named
15340 something starting with __ and the normal name is an alias. */
15341#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15342choke me
15343#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015344f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015345#endif
15346
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 ;
15348 return 0;
15349}
15350_ACEOF
15351rm -f conftest.$ac_objext conftest$ac_exeext
15352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15353 (eval $ac_link) 2>&5
15354 ac_status=$?
15355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15356 (exit $ac_status); } &&
15357 { ac_try='test -s conftest$ac_exeext'
15358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15359 (eval $ac_try) 2>&5
15360 ac_status=$?
15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362 (exit $ac_status); }; }; then
15363 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015364else
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 echo "$as_me: failed program was:" >&5
15366cat conftest.$ac_ext >&5
15367ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015368fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015369rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015371echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15372echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15373if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015374
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015376#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015377_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015378
Martin v. Löwis11437992002-04-12 09:54:03 +000015379 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15380echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015381 OLD_CFLAGS=$CFLAGS
15382 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 cat >conftest.$ac_ext <<_ACEOF
15384#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015385#include "confdefs.h"
15386
15387# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Barry Warsawfe33b792003-01-07 22:42:49 +000015389#ifdef F77_DUMMY_MAIN
15390# ifdef __cplusplus
15391 extern "C"
15392# endif
15393 int F77_DUMMY_MAIN() { return 1; }
15394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015395int
15396main ()
15397{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015398
15399 char *name;
15400 struct hostent *he, *res;
15401 char buffer[2048];
15402 int buflen = 2048;
15403 int h_errnop;
15404
15405 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
15407 ;
15408 return 0;
15409}
15410_ACEOF
15411rm -f conftest.$ac_objext
15412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15413 (eval $ac_compile) 2>&5
15414 ac_status=$?
15415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15416 (exit $ac_status); } &&
15417 { ac_try='test -s conftest.$ac_objext'
15418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15419 (eval $ac_try) 2>&5
15420 ac_status=$?
15421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422 (exit $ac_status); }; }; then
15423
15424 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015425#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015426_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015427
Martin v. Löwis11437992002-04-12 09:54:03 +000015428
15429cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015430#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015431_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015432
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 echo "$as_me:$LINENO: result: yes" >&5
15434echo "${ECHO_T}yes" >&6
15435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015436else
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 echo "$as_me: failed program was:" >&5
15438cat conftest.$ac_ext >&5
15439
15440 echo "$as_me:$LINENO: result: no" >&5
15441echo "${ECHO_T}no" >&6
15442 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15443echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15444 cat >conftest.$ac_ext <<_ACEOF
15445#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015446#include "confdefs.h"
15447
15448# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015449
Barry Warsawfe33b792003-01-07 22:42:49 +000015450#ifdef F77_DUMMY_MAIN
15451# ifdef __cplusplus
15452 extern "C"
15453# endif
15454 int F77_DUMMY_MAIN() { return 1; }
15455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015456int
15457main ()
15458{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015459
15460 char *name;
15461 struct hostent *he;
15462 char buffer[2048];
15463 int buflen = 2048;
15464 int h_errnop;
15465
15466 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
15468 ;
15469 return 0;
15470}
15471_ACEOF
15472rm -f conftest.$ac_objext
15473if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15474 (eval $ac_compile) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); } &&
15478 { ac_try='test -s conftest.$ac_objext'
15479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480 (eval $ac_try) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); }; }; then
15484
15485 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015486#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015487_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015488
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
15490cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015491#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015492_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494 echo "$as_me:$LINENO: result: yes" >&5
15495echo "${ECHO_T}yes" >&6
15496
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015497else
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 echo "$as_me: failed program was:" >&5
15499cat conftest.$ac_ext >&5
15500
15501 echo "$as_me:$LINENO: result: no" >&5
15502echo "${ECHO_T}no" >&6
15503 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15504echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15505 cat >conftest.$ac_ext <<_ACEOF
15506#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015507#include "confdefs.h"
15508
15509# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015510
Barry Warsawfe33b792003-01-07 22:42:49 +000015511#ifdef F77_DUMMY_MAIN
15512# ifdef __cplusplus
15513 extern "C"
15514# endif
15515 int F77_DUMMY_MAIN() { return 1; }
15516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015517int
15518main ()
15519{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015520
15521 char *name;
15522 struct hostent *he;
15523 struct hostent_data data;
15524
15525 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
15527 ;
15528 return 0;
15529}
15530_ACEOF
15531rm -f conftest.$ac_objext
15532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15533 (eval $ac_compile) 2>&5
15534 ac_status=$?
15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15536 (exit $ac_status); } &&
15537 { ac_try='test -s conftest.$ac_objext'
15538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15539 (eval $ac_try) 2>&5
15540 ac_status=$?
15541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); }; }; then
15543
15544 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015545#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015547
Martin v. Löwis11437992002-04-12 09:54:03 +000015548
15549cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015550#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553 echo "$as_me:$LINENO: result: yes" >&5
15554echo "${ECHO_T}yes" >&6
15555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015556else
Martin v. Löwis11437992002-04-12 09:54:03 +000015557 echo "$as_me: failed program was:" >&5
15558cat conftest.$ac_ext >&5
15559
15560 echo "$as_me:$LINENO: result: no" >&5
15561echo "${ECHO_T}no" >&6
15562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015564rm -f conftest.$ac_objext conftest.$ac_ext
15565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015566fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567rm -f conftest.$ac_objext conftest.$ac_ext
15568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015570rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015571 CFLAGS=$OLD_CFLAGS
15572
15573else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015574
Martin v. Löwis11437992002-04-12 09:54:03 +000015575
15576for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015577do
Martin v. Löwis11437992002-04-12 09:54:03 +000015578as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15579echo "$as_me:$LINENO: checking for $ac_func" >&5
15580echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15581if eval "test \"\${$as_ac_var+set}\" = set"; then
15582 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 cat >conftest.$ac_ext <<_ACEOF
15585#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015586#include "confdefs.h"
15587/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015589#include <assert.h>
15590/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015591#ifdef __cplusplus
15592extern "C"
15593#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015594/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 builtin and then its argument prototype would still apply. */
15596char $ac_func ();
15597char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015598
Barry Warsawfe33b792003-01-07 22:42:49 +000015599#ifdef F77_DUMMY_MAIN
15600# ifdef __cplusplus
15601 extern "C"
15602# endif
15603 int F77_DUMMY_MAIN() { return 1; }
15604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015605int
15606main ()
15607{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015608/* The GNU C library defines this for functions which it implements
15609 to always fail with ENOSYS. Some functions are actually named
15610 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015611#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015612choke me
15613#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015615#endif
15616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617 ;
15618 return 0;
15619}
15620_ACEOF
15621rm -f conftest.$ac_objext conftest$ac_exeext
15622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15623 (eval $ac_link) 2>&5
15624 ac_status=$?
15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626 (exit $ac_status); } &&
15627 { ac_try='test -s conftest$ac_exeext'
15628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15629 (eval $ac_try) 2>&5
15630 ac_status=$?
15631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15632 (exit $ac_status); }; }; then
15633 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015634else
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 echo "$as_me: failed program was:" >&5
15636cat conftest.$ac_ext >&5
15637eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015638fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015641echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15642echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15643if test `eval echo '${'$as_ac_var'}'` = yes; then
15644 cat >>confdefs.h <<_ACEOF
15645#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15646_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015648fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015649done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015650
Michael W. Hudson54241132001-12-07 15:38:26 +000015651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015652fi
15653
Michael W. Hudson54241132001-12-07 15:38:26 +000015654
15655
15656
15657
15658
15659
Guido van Rossum627b2d71993-12-24 10:39:16 +000015660# checks for system services
15661# (none yet)
15662
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015663# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015664echo "$as_me:$LINENO: checking for __fpu_control" >&5
15665echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15666if test "${ac_cv_func___fpu_control+set}" = set; then
15667 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015668else
Martin v. Löwis11437992002-04-12 09:54:03 +000015669 cat >conftest.$ac_ext <<_ACEOF
15670#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015671#include "confdefs.h"
15672/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015674#include <assert.h>
15675/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015676#ifdef __cplusplus
15677extern "C"
15678#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015679/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 builtin and then its argument prototype would still apply. */
15681char __fpu_control ();
15682char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015683
Barry Warsawfe33b792003-01-07 22:42:49 +000015684#ifdef F77_DUMMY_MAIN
15685# ifdef __cplusplus
15686 extern "C"
15687# endif
15688 int F77_DUMMY_MAIN() { return 1; }
15689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015690int
15691main ()
15692{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015693/* The GNU C library defines this for functions which it implements
15694 to always fail with ENOSYS. Some functions are actually named
15695 something starting with __ and the normal name is an alias. */
15696#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15697choke me
15698#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015699f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015700#endif
15701
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 ;
15703 return 0;
15704}
15705_ACEOF
15706rm -f conftest.$ac_objext conftest$ac_exeext
15707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15708 (eval $ac_link) 2>&5
15709 ac_status=$?
15710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); } &&
15712 { ac_try='test -s conftest$ac_exeext'
15713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15714 (eval $ac_try) 2>&5
15715 ac_status=$?
15716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15717 (exit $ac_status); }; }; then
15718 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015719else
Martin v. Löwis11437992002-04-12 09:54:03 +000015720 echo "$as_me: failed program was:" >&5
15721cat conftest.$ac_ext >&5
15722ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015725fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015726echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15727echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15728if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015729 :
15730else
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
15732echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15733echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15734if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015738LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015739cat >conftest.$ac_ext <<_ACEOF
15740#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015741#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015743/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015744#ifdef __cplusplus
15745extern "C"
15746#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015747/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 builtin and then its argument prototype would still apply. */
15749char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015750#ifdef F77_DUMMY_MAIN
15751# ifdef __cplusplus
15752 extern "C"
15753# endif
15754 int F77_DUMMY_MAIN() { return 1; }
15755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015756int
15757main ()
15758{
15759__fpu_control ();
15760 ;
15761 return 0;
15762}
15763_ACEOF
15764rm -f conftest.$ac_objext conftest$ac_exeext
15765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15766 (eval $ac_link) 2>&5
15767 ac_status=$?
15768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15769 (exit $ac_status); } &&
15770 { ac_try='test -s conftest$ac_exeext'
15771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15772 (eval $ac_try) 2>&5
15773 ac_status=$?
15774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15775 (exit $ac_status); }; }; then
15776 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015777else
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 echo "$as_me: failed program was:" >&5
15779cat conftest.$ac_ext >&5
15780ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015781fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015782rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015785echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15786echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15787if test $ac_cv_lib_ieee___fpu_control = yes; then
15788 cat >>confdefs.h <<_ACEOF
15789#define HAVE_LIBIEEE 1
15790_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015792 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015793
Guido van Rossum627b2d71993-12-24 10:39:16 +000015794fi
15795
Michael W. Hudson54241132001-12-07 15:38:26 +000015796
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015797fi
15798
Michael W. Hudson54241132001-12-07 15:38:26 +000015799
Guido van Rossum7f253911997-05-09 02:42:48 +000015800# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015801echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15802echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15803
Guido van Rossum7f253911997-05-09 02:42:48 +000015804# Check whether --with-fpectl or --without-fpectl was given.
15805if test "${with_fpectl+set}" = set; then
15806 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015807
Guido van Rossum7f253911997-05-09 02:42:48 +000015808if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015809then
15810
15811cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015812#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015813_ACEOF
15814
15815 echo "$as_me:$LINENO: result: yes" >&5
15816echo "${ECHO_T}yes" >&6
15817else echo "$as_me:$LINENO: result: no" >&5
15818echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015819fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015820else
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 echo "$as_me:$LINENO: result: no" >&5
15822echo "${ECHO_T}no" >&6
15823fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015824
Guido van Rossum7f43da71994-08-01 12:15:30 +000015825# check for --with-libm=...
15826
Guido van Rossum563e7081996-09-10 18:20:48 +000015827case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015828Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015829BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015830*) LIBM=-lm
15831esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015832echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15833echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15834
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015835# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015836if test "${with_libm+set}" = set; then
15837 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
Guido van Rossum7f253911997-05-09 02:42:48 +000015839if test "$withval" = no
15840then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15842echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015843elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015844then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15846echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15847else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15848echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15849 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015850fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015851else
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15853echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15854fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015855
15856# check for --with-libc=...
15857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15859echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15860
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015861# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015862if test "${with_libc+set}" = set; then
15863 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015864
Guido van Rossum7f253911997-05-09 02:42:48 +000015865if test "$withval" = no
15866then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15868echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015869elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015870then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15872echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15873else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15874echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15875 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015876fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015877else
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15879echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15880fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015881
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015882# check for hypot() in math library
15883LIBS_SAVE=$LIBS
15884LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015886for ac_func in hypot
15887do
Martin v. Löwis11437992002-04-12 09:54:03 +000015888as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15889echo "$as_me:$LINENO: checking for $ac_func" >&5
15890echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15891if eval "test \"\${$as_ac_var+set}\" = set"; then
15892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015893else
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 cat >conftest.$ac_ext <<_ACEOF
15895#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015896#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015897/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015899#include <assert.h>
15900/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015901#ifdef __cplusplus
15902extern "C"
15903#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015904/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 builtin and then its argument prototype would still apply. */
15906char $ac_func ();
15907char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015908
Barry Warsawfe33b792003-01-07 22:42:49 +000015909#ifdef F77_DUMMY_MAIN
15910# ifdef __cplusplus
15911 extern "C"
15912# endif
15913 int F77_DUMMY_MAIN() { return 1; }
15914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015915int
15916main ()
15917{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015918/* The GNU C library defines this for functions which it implements
15919 to always fail with ENOSYS. Some functions are actually named
15920 something starting with __ and the normal name is an alias. */
15921#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15922choke me
15923#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015924f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015925#endif
15926
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 ;
15928 return 0;
15929}
15930_ACEOF
15931rm -f conftest.$ac_objext conftest$ac_exeext
15932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15933 (eval $ac_link) 2>&5
15934 ac_status=$?
15935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15936 (exit $ac_status); } &&
15937 { ac_try='test -s conftest$ac_exeext'
15938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15939 (eval $ac_try) 2>&5
15940 ac_status=$?
15941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15942 (exit $ac_status); }; }; then
15943 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015944else
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 echo "$as_me: failed program was:" >&5
15946cat conftest.$ac_ext >&5
15947eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015949rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15952echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15953if test `eval echo '${'$as_ac_var'}'` = yes; then
15954 cat >>confdefs.h <<_ACEOF
15955#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15956_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015957
Michael W. Hudson54241132001-12-07 15:38:26 +000015958else
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015960fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015961done
15962
Michael W. Hudson54241132001-12-07 15:38:26 +000015963
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015964LIBS=$LIBS_SAVE
15965
Guido van Rossumef2255b2000-03-10 22:30:29 +000015966# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015967if test "${ac_cv_header_wchar_h+set}" = set; then
15968 echo "$as_me:$LINENO: checking for wchar.h" >&5
15969echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15970if test "${ac_cv_header_wchar_h+set}" = set; then
15971 echo $ECHO_N "(cached) $ECHO_C" >&6
15972fi
15973echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15974echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015975else
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 # Is the header compilable?
15977echo "$as_me:$LINENO: checking wchar.h usability" >&5
15978echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15979cat >conftest.$ac_ext <<_ACEOF
15980#line $LINENO "configure"
15981#include "confdefs.h"
15982$ac_includes_default
15983#include <wchar.h>
15984_ACEOF
15985rm -f conftest.$ac_objext
15986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15987 (eval $ac_compile) 2>&5
15988 ac_status=$?
15989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15990 (exit $ac_status); } &&
15991 { ac_try='test -s conftest.$ac_objext'
15992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15993 (eval $ac_try) 2>&5
15994 ac_status=$?
15995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15996 (exit $ac_status); }; }; then
15997 ac_header_compiler=yes
15998else
15999 echo "$as_me: failed program was:" >&5
16000cat conftest.$ac_ext >&5
16001ac_header_compiler=no
16002fi
16003rm -f conftest.$ac_objext conftest.$ac_ext
16004echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16005echo "${ECHO_T}$ac_header_compiler" >&6
16006
16007# Is the header present?
16008echo "$as_me:$LINENO: checking wchar.h presence" >&5
16009echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16010cat >conftest.$ac_ext <<_ACEOF
16011#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016012#include "confdefs.h"
16013#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016014_ACEOF
16015if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16016 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16017 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016018 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 rm -f conftest.er1
16020 cat conftest.err >&5
16021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16022 (exit $ac_status); } >/dev/null; then
16023 if test -s conftest.err; then
16024 ac_cpp_err=$ac_c_preproc_warn_flag
16025 else
16026 ac_cpp_err=
16027 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016028else
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 ac_cpp_err=yes
16030fi
16031if test -z "$ac_cpp_err"; then
16032 ac_header_preproc=yes
16033else
16034 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016035 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016038rm -f conftest.err conftest.$ac_ext
16039echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16040echo "${ECHO_T}$ac_header_preproc" >&6
16041
16042# So? What about this header?
16043case $ac_header_compiler:$ac_header_preproc in
16044 yes:no )
16045 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16046echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16047 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16048echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16049 no:yes )
16050 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16051echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16052 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16053echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16054 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16055echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16056esac
16057echo "$as_me:$LINENO: checking for wchar.h" >&5
16058echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16059if test "${ac_cv_header_wchar_h+set}" = set; then
16060 echo $ECHO_N "(cached) $ECHO_C" >&6
16061else
16062 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016064echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16065echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16066
16067fi
16068if test $ac_cv_header_wchar_h = yes; then
16069
16070
16071cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016072#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016073_ACEOF
16074
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016075 wchar_h="yes"
16076
Guido van Rossumef2255b2000-03-10 22:30:29 +000016077else
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016079
16080fi
16081
Michael W. Hudson54241132001-12-07 15:38:26 +000016082
Martin v. Löwis11437992002-04-12 09:54:03 +000016083
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016084# determine wchar_t size
16085if test "$wchar_h" = yes
16086then
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 echo "$as_me:$LINENO: checking for wchar_t" >&5
16088echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16089if test "${ac_cv_type_wchar_t+set}" = set; then
16090 echo $ECHO_N "(cached) $ECHO_C" >&6
16091else
16092 cat >conftest.$ac_ext <<_ACEOF
16093#line $LINENO "configure"
16094#include "confdefs.h"
16095#include <wchar.h>
16096
Barry Warsawfe33b792003-01-07 22:42:49 +000016097#ifdef F77_DUMMY_MAIN
16098# ifdef __cplusplus
16099 extern "C"
16100# endif
16101 int F77_DUMMY_MAIN() { return 1; }
16102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016103int
16104main ()
16105{
16106if ((wchar_t *) 0)
16107 return 0;
16108if (sizeof (wchar_t))
16109 return 0;
16110 ;
16111 return 0;
16112}
16113_ACEOF
16114rm -f conftest.$ac_objext
16115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16116 (eval $ac_compile) 2>&5
16117 ac_status=$?
16118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119 (exit $ac_status); } &&
16120 { ac_try='test -s conftest.$ac_objext'
16121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16122 (eval $ac_try) 2>&5
16123 ac_status=$?
16124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16125 (exit $ac_status); }; }; then
16126 ac_cv_type_wchar_t=yes
16127else
16128 echo "$as_me: failed program was:" >&5
16129cat conftest.$ac_ext >&5
16130ac_cv_type_wchar_t=no
16131fi
16132rm -f conftest.$ac_objext conftest.$ac_ext
16133fi
16134echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16135echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16136
16137echo "$as_me:$LINENO: checking size of wchar_t" >&5
16138echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16139if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16140 echo $ECHO_N "(cached) $ECHO_C" >&6
16141else
16142 if test "$ac_cv_type_wchar_t" = yes; then
16143 # The cast to unsigned long works around a bug in the HP C Compiler
16144 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16145 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16146 # This bug is HP SR number 8606223364.
16147 if test "$cross_compiling" = yes; then
16148 # Depending upon the size, compute the lo and hi bounds.
16149cat >conftest.$ac_ext <<_ACEOF
16150#line $LINENO "configure"
16151#include "confdefs.h"
16152#include <wchar.h>
16153
Barry Warsawfe33b792003-01-07 22:42:49 +000016154#ifdef F77_DUMMY_MAIN
16155# ifdef __cplusplus
16156 extern "C"
16157# endif
16158 int F77_DUMMY_MAIN() { return 1; }
16159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016160int
16161main ()
16162{
16163static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16164test_array [0] = 0
16165
16166 ;
16167 return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext
16171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16172 (eval $ac_compile) 2>&5
16173 ac_status=$?
16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); } &&
16176 { ac_try='test -s conftest.$ac_objext'
16177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16178 (eval $ac_try) 2>&5
16179 ac_status=$?
16180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16181 (exit $ac_status); }; }; then
16182 ac_lo=0 ac_mid=0
16183 while :; do
16184 cat >conftest.$ac_ext <<_ACEOF
16185#line $LINENO "configure"
16186#include "confdefs.h"
16187#include <wchar.h>
16188
Barry Warsawfe33b792003-01-07 22:42:49 +000016189#ifdef F77_DUMMY_MAIN
16190# ifdef __cplusplus
16191 extern "C"
16192# endif
16193 int F77_DUMMY_MAIN() { return 1; }
16194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016195int
16196main ()
16197{
16198static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16199test_array [0] = 0
16200
16201 ;
16202 return 0;
16203}
16204_ACEOF
16205rm -f conftest.$ac_objext
16206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16207 (eval $ac_compile) 2>&5
16208 ac_status=$?
16209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); } &&
16211 { ac_try='test -s conftest.$ac_objext'
16212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16213 (eval $ac_try) 2>&5
16214 ac_status=$?
16215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16216 (exit $ac_status); }; }; then
16217 ac_hi=$ac_mid; break
16218else
16219 echo "$as_me: failed program was:" >&5
16220cat conftest.$ac_ext >&5
16221ac_lo=`expr $ac_mid + 1`
16222 if test $ac_lo -le $ac_mid; then
16223 ac_lo= ac_hi=
16224 break
16225 fi
16226 ac_mid=`expr 2 '*' $ac_mid + 1`
16227fi
16228rm -f conftest.$ac_objext conftest.$ac_ext
16229 done
16230else
16231 echo "$as_me: failed program was:" >&5
16232cat conftest.$ac_ext >&5
16233cat >conftest.$ac_ext <<_ACEOF
16234#line $LINENO "configure"
16235#include "confdefs.h"
16236#include <wchar.h>
16237
Barry Warsawfe33b792003-01-07 22:42:49 +000016238#ifdef F77_DUMMY_MAIN
16239# ifdef __cplusplus
16240 extern "C"
16241# endif
16242 int F77_DUMMY_MAIN() { return 1; }
16243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016244int
16245main ()
16246{
16247static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16248test_array [0] = 0
16249
16250 ;
16251 return 0;
16252}
16253_ACEOF
16254rm -f conftest.$ac_objext
16255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16256 (eval $ac_compile) 2>&5
16257 ac_status=$?
16258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259 (exit $ac_status); } &&
16260 { ac_try='test -s conftest.$ac_objext'
16261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16262 (eval $ac_try) 2>&5
16263 ac_status=$?
16264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16265 (exit $ac_status); }; }; then
16266 ac_hi=-1 ac_mid=-1
16267 while :; do
16268 cat >conftest.$ac_ext <<_ACEOF
16269#line $LINENO "configure"
16270#include "confdefs.h"
16271#include <wchar.h>
16272
Barry Warsawfe33b792003-01-07 22:42:49 +000016273#ifdef F77_DUMMY_MAIN
16274# ifdef __cplusplus
16275 extern "C"
16276# endif
16277 int F77_DUMMY_MAIN() { return 1; }
16278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016279int
16280main ()
16281{
16282static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16283test_array [0] = 0
16284
16285 ;
16286 return 0;
16287}
16288_ACEOF
16289rm -f conftest.$ac_objext
16290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16291 (eval $ac_compile) 2>&5
16292 ac_status=$?
16293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16294 (exit $ac_status); } &&
16295 { ac_try='test -s conftest.$ac_objext'
16296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16297 (eval $ac_try) 2>&5
16298 ac_status=$?
16299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16300 (exit $ac_status); }; }; then
16301 ac_lo=$ac_mid; break
16302else
16303 echo "$as_me: failed program was:" >&5
16304cat conftest.$ac_ext >&5
16305ac_hi=`expr '(' $ac_mid ')' - 1`
16306 if test $ac_mid -le $ac_hi; then
16307 ac_lo= ac_hi=
16308 break
16309 fi
16310 ac_mid=`expr 2 '*' $ac_mid`
16311fi
16312rm -f conftest.$ac_objext conftest.$ac_ext
16313 done
16314else
16315 echo "$as_me: failed program was:" >&5
16316cat conftest.$ac_ext >&5
16317ac_lo= ac_hi=
16318fi
16319rm -f conftest.$ac_objext conftest.$ac_ext
16320fi
16321rm -f conftest.$ac_objext conftest.$ac_ext
16322# Binary search between lo and hi bounds.
16323while test "x$ac_lo" != "x$ac_hi"; do
16324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16325 cat >conftest.$ac_ext <<_ACEOF
16326#line $LINENO "configure"
16327#include "confdefs.h"
16328#include <wchar.h>
16329
Barry Warsawfe33b792003-01-07 22:42:49 +000016330#ifdef F77_DUMMY_MAIN
16331# ifdef __cplusplus
16332 extern "C"
16333# endif
16334 int F77_DUMMY_MAIN() { return 1; }
16335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016336int
16337main ()
16338{
16339static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16340test_array [0] = 0
16341
16342 ;
16343 return 0;
16344}
16345_ACEOF
16346rm -f conftest.$ac_objext
16347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16348 (eval $ac_compile) 2>&5
16349 ac_status=$?
16350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16351 (exit $ac_status); } &&
16352 { ac_try='test -s conftest.$ac_objext'
16353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16354 (eval $ac_try) 2>&5
16355 ac_status=$?
16356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16357 (exit $ac_status); }; }; then
16358 ac_hi=$ac_mid
16359else
16360 echo "$as_me: failed program was:" >&5
16361cat conftest.$ac_ext >&5
16362ac_lo=`expr '(' $ac_mid ')' + 1`
16363fi
16364rm -f conftest.$ac_objext conftest.$ac_ext
16365done
16366case $ac_lo in
16367?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16368'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16369echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16370 { (exit 1); exit 1; }; } ;;
16371esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016372else
16373 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16375echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16376 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016377else
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 cat >conftest.$ac_ext <<_ACEOF
16379#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016380#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016381#include <wchar.h>
16382
16383long longval () { return (long) (sizeof (wchar_t)); }
16384unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016385#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016386#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016387#ifdef F77_DUMMY_MAIN
16388# ifdef __cplusplus
16389 extern "C"
16390# endif
16391 int F77_DUMMY_MAIN() { return 1; }
16392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016393int
16394main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016395{
Martin v. Löwis11437992002-04-12 09:54:03 +000016396
16397 FILE *f = fopen ("conftest.val", "w");
16398 if (! f)
16399 exit (1);
16400 if (((long) (sizeof (wchar_t))) < 0)
16401 {
16402 long i = longval ();
16403 if (i != ((long) (sizeof (wchar_t))))
16404 exit (1);
16405 fprintf (f, "%ld\n", i);
16406 }
16407 else
16408 {
16409 unsigned long i = ulongval ();
16410 if (i != ((long) (sizeof (wchar_t))))
16411 exit (1);
16412 fprintf (f, "%lu\n", i);
16413 }
16414 exit (ferror (f) || fclose (f) != 0);
16415
16416 ;
16417 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016418}
Martin v. Löwis11437992002-04-12 09:54:03 +000016419_ACEOF
16420rm -f conftest$ac_exeext
16421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16422 (eval $ac_link) 2>&5
16423 ac_status=$?
16424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16425 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16427 (eval $ac_try) 2>&5
16428 ac_status=$?
16429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430 (exit $ac_status); }; }; then
16431 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016432else
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 echo "$as_me: program exited with status $ac_status" >&5
16434echo "$as_me: failed program was:" >&5
16435cat conftest.$ac_ext >&5
16436( exit $ac_status )
16437{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16438echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16439 { (exit 1); exit 1; }; }
16440fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016441rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016442fi
16443fi
16444rm -f conftest.val
16445else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016446 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016447fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016449echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16450echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16451cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016452#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016453_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016454
Michael W. Hudson54241132001-12-07 15:38:26 +000016455
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016456fi
16457
Martin v. Löwis11437992002-04-12 09:54:03 +000016458echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16459echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016460# Check whether --enable-unicode or --disable-unicode was given.
16461if test "${enable_unicode+set}" = set; then
16462 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016464else
16465 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016466fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016467
16468if test $enable_unicode = yes
16469then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016470 # Without any arguments, Py_UNICODE defaults to two-byte mode
16471 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016472fi
16473
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016474
16475
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016476case "$enable_unicode" in
16477ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016478 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016479#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016480_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016481
16482 ;;
16483ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016484 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016485#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016486_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016487
16488 ;;
16489esac
16490
Michael W. Hudson54241132001-12-07 15:38:26 +000016491
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
16493
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016494
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016495if test "$enable_unicode" = "no"
16496then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016497 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016498 echo "$as_me:$LINENO: result: not used" >&5
16499echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016500else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016501 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
16503cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016504#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016505_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016506
16507 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16508 then
16509 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016510
Martin v. Löwis11437992002-04-12 09:54:03 +000016511cat >>confdefs.h <<\_ACEOF
16512#define HAVE_USABLE_WCHAR_T 1
16513_ACEOF
16514
16515 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016516#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016517_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016518
16519 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16520 then
16521 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016523#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016524_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016525
16526 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16527 then
16528 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016530#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016531_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016532
16533 else
16534 PY_UNICODE_TYPE="no type found"
16535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16537echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016538fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016539
16540# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016541echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16542echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16543if test "${ac_cv_c_bigendian+set}" = set; then
16544 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016545else
Martin v. Löwis11437992002-04-12 09:54:03 +000016546 # See if sys/param.h defines the BYTE_ORDER macro.
16547cat >conftest.$ac_ext <<_ACEOF
16548#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016549#include "confdefs.h"
16550#include <sys/types.h>
16551#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016552
Barry Warsawfe33b792003-01-07 22:42:49 +000016553#ifdef F77_DUMMY_MAIN
16554# ifdef __cplusplus
16555 extern "C"
16556# endif
16557 int F77_DUMMY_MAIN() { return 1; }
16558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016559int
16560main ()
16561{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016562#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16563 bogus endian macros
16564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016565
16566 ;
16567 return 0;
16568}
16569_ACEOF
16570rm -f conftest.$ac_objext
16571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16572 (eval $ac_compile) 2>&5
16573 ac_status=$?
16574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575 (exit $ac_status); } &&
16576 { ac_try='test -s conftest.$ac_objext'
16577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16578 (eval $ac_try) 2>&5
16579 ac_status=$?
16580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16581 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016582 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016583cat >conftest.$ac_ext <<_ACEOF
16584#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016585#include "confdefs.h"
16586#include <sys/types.h>
16587#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016588
Barry Warsawfe33b792003-01-07 22:42:49 +000016589#ifdef F77_DUMMY_MAIN
16590# ifdef __cplusplus
16591 extern "C"
16592# endif
16593 int F77_DUMMY_MAIN() { return 1; }
16594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016595int
16596main ()
16597{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016598#if BYTE_ORDER != BIG_ENDIAN
16599 not big endian
16600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
16602 ;
16603 return 0;
16604}
16605_ACEOF
16606rm -f conftest.$ac_objext
16607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16608 (eval $ac_compile) 2>&5
16609 ac_status=$?
16610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16611 (exit $ac_status); } &&
16612 { ac_try='test -s conftest.$ac_objext'
16613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16614 (eval $ac_try) 2>&5
16615 ac_status=$?
16616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16617 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016618 ac_cv_c_bigendian=yes
16619else
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 echo "$as_me: failed program was:" >&5
16621cat conftest.$ac_ext >&5
16622ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016623fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016624rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016625else
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 echo "$as_me: failed program was:" >&5
16627cat conftest.$ac_ext >&5
16628# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016629if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016630 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016631 ac_cv_c_bigendian=unknown
16632 cat >conftest.$ac_ext <<_ACEOF
16633#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016634#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016635short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16636short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16637void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16638short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16639short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16640void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016641#ifdef F77_DUMMY_MAIN
16642# ifdef __cplusplus
16643 extern "C"
16644# endif
16645 int F77_DUMMY_MAIN() { return 1; }
16646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016647int
16648main ()
16649{
16650 _ascii (); _ebcdic ();
16651 ;
16652 return 0;
16653}
16654_ACEOF
16655rm -f conftest.$ac_objext
16656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16657 (eval $ac_compile) 2>&5
16658 ac_status=$?
16659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16660 (exit $ac_status); } &&
16661 { ac_try='test -s conftest.$ac_objext'
16662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16663 (eval $ac_try) 2>&5
16664 ac_status=$?
16665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16666 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016667 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 ac_cv_c_bigendian=yes
16669fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016670if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016671 if test "$ac_cv_c_bigendian" = unknown; then
16672 ac_cv_c_bigendian=no
16673 else
16674 # finding both strings is unlikely to happen, but who knows?
16675 ac_cv_c_bigendian=unknown
16676 fi
16677fi
16678else
16679 echo "$as_me: failed program was:" >&5
16680cat conftest.$ac_ext >&5
16681fi
16682rm -f conftest.$ac_objext conftest.$ac_ext
16683else
16684 cat >conftest.$ac_ext <<_ACEOF
16685#line $LINENO "configure"
16686#include "confdefs.h"
16687int
16688main ()
16689{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016690 /* Are we little or big endian? From Harbison&Steele. */
16691 union
16692 {
16693 long l;
16694 char c[sizeof (long)];
16695 } u;
16696 u.l = 1;
16697 exit (u.c[sizeof (long) - 1] == 1);
16698}
Martin v. Löwis11437992002-04-12 09:54:03 +000016699_ACEOF
16700rm -f conftest$ac_exeext
16701if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16702 (eval $ac_link) 2>&5
16703 ac_status=$?
16704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16705 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16707 (eval $ac_try) 2>&5
16708 ac_status=$?
16709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16710 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016711 ac_cv_c_bigendian=no
16712else
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 echo "$as_me: program exited with status $ac_status" >&5
16714echo "$as_me: failed program was:" >&5
16715cat conftest.$ac_ext >&5
16716( exit $ac_status )
16717ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016718fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016719rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016721fi
16722rm -f conftest.$ac_objext conftest.$ac_ext
16723fi
16724echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16725echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16726case $ac_cv_c_bigendian in
16727 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016728
Martin v. Löwis11437992002-04-12 09:54:03 +000016729cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016730#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016731_ACEOF
16732 ;;
16733 no)
16734 ;;
16735 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016736 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016737presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016738echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016739presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16740 { (exit 1); exit 1; }; } ;;
16741esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016742
Michael W. Hudson54241132001-12-07 15:38:26 +000016743
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016744# Check whether right shifting a negative integer extends the sign bit
16745# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016746echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16747echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16748if test "${ac_cv_rshift_extends_sign+set}" = set; then
16749 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016750else
Martin v. Löwis11437992002-04-12 09:54:03 +000016751
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016752if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016753 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016754else
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 cat >conftest.$ac_ext <<_ACEOF
16756#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016757#include "confdefs.h"
16758
16759int main()
16760{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016761 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016762}
16763
Martin v. Löwis11437992002-04-12 09:54:03 +000016764_ACEOF
16765rm -f conftest$ac_exeext
16766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16767 (eval $ac_link) 2>&5
16768 ac_status=$?
16769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772 (eval $ac_try) 2>&5
16773 ac_status=$?
16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016776 ac_cv_rshift_extends_sign=yes
16777else
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 echo "$as_me: program exited with status $ac_status" >&5
16779echo "$as_me: failed program was:" >&5
16780cat conftest.$ac_ext >&5
16781( exit $ac_status )
16782ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016783fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016784rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016785fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016786fi
16787
Martin v. Löwis11437992002-04-12 09:54:03 +000016788echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16789echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016790if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016791then
Martin v. Löwis11437992002-04-12 09:54:03 +000016792
16793cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016794#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016795_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016796
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016797fi
16798
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016799# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016800echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16801echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16802if test "${ac_cv_have_getc_unlocked+set}" = set; then
16803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016804else
Martin v. Löwis11437992002-04-12 09:54:03 +000016805
16806cat >conftest.$ac_ext <<_ACEOF
16807#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016808#include "confdefs.h"
16809#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016810#ifdef F77_DUMMY_MAIN
16811# ifdef __cplusplus
16812 extern "C"
16813# endif
16814 int F77_DUMMY_MAIN() { return 1; }
16815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016816int
16817main ()
16818{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016819
16820 FILE *f = fopen("/dev/null", "r");
16821 flockfile(f);
16822 getc_unlocked(f);
16823 funlockfile(f);
16824
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext conftest$ac_exeext
16830if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16831 (eval $ac_link) 2>&5
16832 ac_status=$?
16833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); } &&
16835 { ac_try='test -s conftest$ac_exeext'
16836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16837 (eval $ac_try) 2>&5
16838 ac_status=$?
16839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16840 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016841 ac_cv_have_getc_unlocked=yes
16842else
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 echo "$as_me: failed program was:" >&5
16844cat conftest.$ac_ext >&5
16845ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016847rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016848fi
16849
Martin v. Löwis11437992002-04-12 09:54:03 +000016850echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16851echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016852if test "$ac_cv_have_getc_unlocked" = yes
16853then
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
16855cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016856#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016857_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016858
16859fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016860
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016861# check for readline 2.2
16862cat >conftest.$ac_ext <<_ACEOF
16863#line $LINENO "configure"
16864#include "confdefs.h"
16865#include <readline/readline.h>
16866_ACEOF
16867if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16868 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16869 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016870 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016871 rm -f conftest.er1
16872 cat conftest.err >&5
16873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16874 (exit $ac_status); } >/dev/null; then
16875 if test -s conftest.err; then
16876 ac_cpp_err=$ac_c_preproc_warn_flag
16877 else
16878 ac_cpp_err=
16879 fi
16880else
16881 ac_cpp_err=yes
16882fi
16883if test -z "$ac_cpp_err"; then
16884 have_readline=yes
16885else
16886 echo "$as_me: failed program was:" >&5
16887 cat conftest.$ac_ext >&5
16888 have_readline=no
16889fi
16890rm -f conftest.err conftest.$ac_ext
16891if test $have_readline = yes
16892then
16893 cat >conftest.$ac_ext <<_ACEOF
16894#line $LINENO "configure"
16895#include "confdefs.h"
16896#include <readline/readline.h>
16897
16898_ACEOF
16899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016900 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016901
16902cat >>confdefs.h <<\_ACEOF
16903#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16904_ACEOF
16905
16906fi
16907rm -f conftest*
16908
16909fi
16910
Martin v. Löwis0daad592001-09-30 21:09:59 +000016911# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016912echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16913echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16914if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016916else
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016918LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016919cat >conftest.$ac_ext <<_ACEOF
16920#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016921#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016922
Guido van Rossum353ae582001-07-10 16:45:32 +000016923/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016924#ifdef __cplusplus
16925extern "C"
16926#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016927/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 builtin and then its argument prototype would still apply. */
16929char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016930#ifdef F77_DUMMY_MAIN
16931# ifdef __cplusplus
16932 extern "C"
16933# endif
16934 int F77_DUMMY_MAIN() { return 1; }
16935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016936int
16937main ()
16938{
16939rl_pre_input_hook ();
16940 ;
16941 return 0;
16942}
16943_ACEOF
16944rm -f conftest.$ac_objext conftest$ac_exeext
16945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16946 (eval $ac_link) 2>&5
16947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); } &&
16950 { ac_try='test -s conftest$ac_exeext'
16951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952 (eval $ac_try) 2>&5
16953 ac_status=$?
16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); }; }; then
16956 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016957else
Martin v. Löwis11437992002-04-12 09:54:03 +000016958 echo "$as_me: failed program was:" >&5
16959cat conftest.$ac_ext >&5
16960ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016961fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16963LIBS=$ac_check_lib_save_LIBS
16964fi
16965echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16966echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16967if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016970#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016971_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016972
Martin v. Löwis0daad592001-09-30 21:09:59 +000016973fi
16974
Michael W. Hudson54241132001-12-07 15:38:26 +000016975
Martin v. Löwis0daad592001-09-30 21:09:59 +000016976# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016977echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16978echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16979if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16980 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016981else
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016983LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016984cat >conftest.$ac_ext <<_ACEOF
16985#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016986#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016987
Martin v. Löwis0daad592001-09-30 21:09:59 +000016988/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016989#ifdef __cplusplus
16990extern "C"
16991#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016992/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 builtin and then its argument prototype would still apply. */
16994char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016995#ifdef F77_DUMMY_MAIN
16996# ifdef __cplusplus
16997 extern "C"
16998# endif
16999 int F77_DUMMY_MAIN() { return 1; }
17000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017001int
17002main ()
17003{
17004rl_completion_matches ();
17005 ;
17006 return 0;
17007}
17008_ACEOF
17009rm -f conftest.$ac_objext conftest$ac_exeext
17010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17011 (eval $ac_link) 2>&5
17012 ac_status=$?
17013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17014 (exit $ac_status); } &&
17015 { ac_try='test -s conftest$ac_exeext'
17016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17017 (eval $ac_try) 2>&5
17018 ac_status=$?
17019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17020 (exit $ac_status); }; }; then
17021 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017022else
Martin v. Löwis11437992002-04-12 09:54:03 +000017023 echo "$as_me: failed program was:" >&5
17024cat conftest.$ac_ext >&5
17025ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017027rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17028LIBS=$ac_check_lib_save_LIBS
17029fi
17030echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17031echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17032if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017035#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017036_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017037
Guido van Rossum353ae582001-07-10 16:45:32 +000017038fi
17039
Jack Jansendd19cf82001-12-06 22:36:17 +000017040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041echo "$as_me:$LINENO: checking for broken nice()" >&5
17042echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17043if test "${ac_cv_broken_nice+set}" = set; then
17044 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017045else
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017047if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017048 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017049else
Martin v. Löwis11437992002-04-12 09:54:03 +000017050 cat >conftest.$ac_ext <<_ACEOF
17051#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017052#include "confdefs.h"
17053
17054int main()
17055{
17056 int val1 = nice(1);
17057 if (val1 != -1 && val1 == nice(2))
17058 exit(0);
17059 exit(1);
17060}
17061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062_ACEOF
17063rm -f conftest$ac_exeext
17064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17065 (eval $ac_link) 2>&5
17066 ac_status=$?
17067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17070 (eval $ac_try) 2>&5
17071 ac_status=$?
17072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17073 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017074 ac_cv_broken_nice=yes
17075else
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 echo "$as_me: program exited with status $ac_status" >&5
17077echo "$as_me: failed program was:" >&5
17078cat conftest.$ac_ext >&5
17079( exit $ac_status )
17080ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017081fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017082rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017083fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017084fi
17085
Martin v. Löwis11437992002-04-12 09:54:03 +000017086echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17087echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017088if test "$ac_cv_broken_nice" = yes
17089then
Martin v. Löwis11437992002-04-12 09:54:03 +000017090
17091cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017092#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017093_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017094
17095fi
17096
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017097# tzset(3) exists and works like we expect it to
17098echo "$as_me:$LINENO: checking for working tzset()" >&5
17099echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17100if test "${ac_cv_working_tzset+set}" = set; then
17101 echo $ECHO_N "(cached) $ECHO_C" >&6
17102else
17103
17104if test "$cross_compiling" = yes; then
17105 ac_cv_working_tzset=no
17106else
17107 cat >conftest.$ac_ext <<_ACEOF
17108#line $LINENO "configure"
17109#include "confdefs.h"
17110
17111#include <stdlib.h>
17112#include <time.h>
17113int main()
17114{
17115 int gmt_hour;
17116 int eastern_hour;
17117 time_t now;
17118 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017119 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017120 tzset();
17121 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017122 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017123 tzset();
17124 eastern_hour = localtime(&now)->tm_hour;
17125 if (eastern_hour == gmt_hour)
17126 exit(1);
17127 exit(0);
17128}
17129
17130_ACEOF
17131rm -f conftest$ac_exeext
17132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17133 (eval $ac_link) 2>&5
17134 ac_status=$?
17135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17138 (eval $ac_try) 2>&5
17139 ac_status=$?
17140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17141 (exit $ac_status); }; }; then
17142 ac_cv_working_tzset=yes
17143else
17144 echo "$as_me: program exited with status $ac_status" >&5
17145echo "$as_me: failed program was:" >&5
17146cat conftest.$ac_ext >&5
17147( exit $ac_status )
17148ac_cv_working_tzset=no
17149fi
17150rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17151fi
17152fi
17153
17154echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17155echo "${ECHO_T}$ac_cv_working_tzset" >&6
17156if test "$ac_cv_working_tzset" = yes
17157then
17158
17159cat >>confdefs.h <<\_ACEOF
17160#define HAVE_WORKING_TZSET 1
17161_ACEOF
17162
17163fi
17164
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017165# Look for subsecond timestamps in struct stat
17166echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17167echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17168if test "${ac_cv_stat_tv_nsec+set}" = set; then
17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17170else
17171 cat >conftest.$ac_ext <<_ACEOF
17172#line $LINENO "configure"
17173#include "confdefs.h"
17174#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017175#ifdef F77_DUMMY_MAIN
17176# ifdef __cplusplus
17177 extern "C"
17178# endif
17179 int F77_DUMMY_MAIN() { return 1; }
17180#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017181int
17182main ()
17183{
17184
17185struct stat st;
17186st.st_mtim.tv_nsec = 1;
17187
17188 ;
17189 return 0;
17190}
17191_ACEOF
17192rm -f conftest.$ac_objext
17193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17194 (eval $ac_compile) 2>&5
17195 ac_status=$?
17196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197 (exit $ac_status); } &&
17198 { ac_try='test -s conftest.$ac_objext'
17199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17200 (eval $ac_try) 2>&5
17201 ac_status=$?
17202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17203 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017204 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017205else
17206 echo "$as_me: failed program was:" >&5
17207cat conftest.$ac_ext >&5
17208ac_cv_stat_tv_nsec=no
17209fi
17210rm -f conftest.$ac_objext conftest.$ac_ext
17211fi
17212
17213echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17214echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17215if test "$ac_cv_stat_tv_nsec" = yes
17216then
17217
17218cat >>confdefs.h <<\_ACEOF
17219#define HAVE_STAT_TV_NSEC 1
17220_ACEOF
17221
17222fi
17223
Jack Jansen666b1e72001-10-31 12:11:48 +000017224# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017225echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17226echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17227if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17228 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017229else
Martin v. Löwis11437992002-04-12 09:54:03 +000017230 cat >conftest.$ac_ext <<_ACEOF
17231#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017232#include "confdefs.h"
17233#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017234#ifdef F77_DUMMY_MAIN
17235# ifdef __cplusplus
17236 extern "C"
17237# endif
17238 int F77_DUMMY_MAIN() { return 1; }
17239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017240int
17241main ()
17242{
Jack Jansen666b1e72001-10-31 12:11:48 +000017243
17244 int rtn;
17245 rtn = mvwdelch(0,0,0);
17246
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 ;
17248 return 0;
17249}
17250_ACEOF
17251rm -f conftest.$ac_objext
17252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17253 (eval $ac_compile) 2>&5
17254 ac_status=$?
17255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17256 (exit $ac_status); } &&
17257 { ac_try='test -s conftest.$ac_objext'
17258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17259 (eval $ac_try) 2>&5
17260 ac_status=$?
17261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17262 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017263 ac_cv_mvwdelch_is_expression=yes
17264else
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 echo "$as_me: failed program was:" >&5
17266cat conftest.$ac_ext >&5
17267ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017269rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017270fi
17271
Martin v. Löwis11437992002-04-12 09:54:03 +000017272echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17273echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017274
17275if test "$ac_cv_mvwdelch_is_expression" = yes
17276then
Martin v. Löwis11437992002-04-12 09:54:03 +000017277
17278cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017279#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017280_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017281
17282fi
17283
Martin v. Löwis11437992002-04-12 09:54:03 +000017284echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17285echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17286if test "${ac_cv_window_has_flags+set}" = set; then
17287 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017288else
Martin v. Löwis11437992002-04-12 09:54:03 +000017289 cat >conftest.$ac_ext <<_ACEOF
17290#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017291#include "confdefs.h"
17292#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017293#ifdef F77_DUMMY_MAIN
17294# ifdef __cplusplus
17295 extern "C"
17296# endif
17297 int F77_DUMMY_MAIN() { return 1; }
17298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017299int
17300main ()
17301{
Jack Jansen666b1e72001-10-31 12:11:48 +000017302
17303 WINDOW *w;
17304 w->_flags = 0;
17305
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 ;
17307 return 0;
17308}
17309_ACEOF
17310rm -f conftest.$ac_objext
17311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17312 (eval $ac_compile) 2>&5
17313 ac_status=$?
17314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17315 (exit $ac_status); } &&
17316 { ac_try='test -s conftest.$ac_objext'
17317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17318 (eval $ac_try) 2>&5
17319 ac_status=$?
17320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17321 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017322 ac_cv_window_has_flags=yes
17323else
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 echo "$as_me: failed program was:" >&5
17325cat conftest.$ac_ext >&5
17326ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017328rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017329fi
17330
Martin v. Löwis11437992002-04-12 09:54:03 +000017331echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17332echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017333
Jack Jansen666b1e72001-10-31 12:11:48 +000017334
17335if test "$ac_cv_window_has_flags" = yes
17336then
Martin v. Löwis11437992002-04-12 09:54:03 +000017337
17338cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017339#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017340_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017341
17342fi
17343
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017344echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17345echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17346
17347if test -e /dev/ptmx
17348then
17349 echo "$as_me:$LINENO: result: yes" >&5
17350echo "${ECHO_T}yes" >&6
17351
17352cat >>confdefs.h <<\_ACEOF
17353#define HAVE_DEV_PTMX 1
17354_ACEOF
17355
17356else
17357 echo "$as_me:$LINENO: result: no" >&5
17358echo "${ECHO_T}no" >&6
17359fi
17360
Neal Norwitz865400f2003-03-21 01:42:58 +000017361echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17362echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17363
17364if test -e /dev/ptc
17365then
17366 echo "$as_me:$LINENO: result: yes" >&5
17367echo "${ECHO_T}yes" >&6
17368
17369cat >>confdefs.h <<\_ACEOF
17370#define HAVE_DEV_PTC 1
17371_ACEOF
17372
17373else
17374 echo "$as_me:$LINENO: result: no" >&5
17375echo "${ECHO_T}no" >&6
17376fi
17377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378echo "$as_me:$LINENO: checking for socklen_t" >&5
17379echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17380if test "${ac_cv_type_socklen_t+set}" = set; then
17381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017382else
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 cat >conftest.$ac_ext <<_ACEOF
17384#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017385#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017386
17387#ifdef HAVE_SYS_TYPES_H
17388#include <sys/types.h>
17389#endif
17390#ifdef HAVE_SYS_SOCKET_H
17391#include <sys/socket.h>
17392#endif
17393
17394
Barry Warsawfe33b792003-01-07 22:42:49 +000017395#ifdef F77_DUMMY_MAIN
17396# ifdef __cplusplus
17397 extern "C"
17398# endif
17399 int F77_DUMMY_MAIN() { return 1; }
17400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017401int
17402main ()
17403{
17404if ((socklen_t *) 0)
17405 return 0;
17406if (sizeof (socklen_t))
17407 return 0;
17408 ;
17409 return 0;
17410}
17411_ACEOF
17412rm -f conftest.$ac_objext
17413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17414 (eval $ac_compile) 2>&5
17415 ac_status=$?
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); } &&
17418 { ac_try='test -s conftest.$ac_objext'
17419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17421 ac_status=$?
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017424 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017425else
Martin v. Löwis11437992002-04-12 09:54:03 +000017426 echo "$as_me: failed program was:" >&5
17427cat conftest.$ac_ext >&5
17428ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017429fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017430rm -f conftest.$ac_objext conftest.$ac_ext
17431fi
17432echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17433echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17434if test $ac_cv_type_socklen_t = yes; then
17435 :
17436else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017437
Martin v. Löwis01c04012002-11-11 14:58:44 +000017438cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017439#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017440_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017441
17442fi
17443
Michael W. Hudson54241132001-12-07 15:38:26 +000017444
Michael W. Hudson54241132001-12-07 15:38:26 +000017445
17446
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017447for h in `(cd $srcdir;echo Python/thread_*.h)`
17448do
17449 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17450done
17451
Michael W. Hudson54241132001-12-07 15:38:26 +000017452
Jack Jansen0b06be72002-06-21 14:48:38 +000017453SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017454echo "$as_me:$LINENO: checking for build directories" >&5
17455echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017456for dir in $SRCDIRS; do
17457 if test ! -d $dir; then
17458 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017459 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017460done
Martin v. Löwis11437992002-04-12 09:54:03 +000017461echo "$as_me:$LINENO: result: done" >&5
17462echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017463
Guido van Rossum627b2d71993-12-24 10:39:16 +000017464# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017465ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017466
Martin v. Löwis11437992002-04-12 09:54:03 +000017467cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017468# This file is a shell script that caches the results of configure
17469# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017470# scripts and configure runs, see configure's option --config-cache.
17471# It is not useful on other systems. If it contains results you don't
17472# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017473#
Martin v. Löwis11437992002-04-12 09:54:03 +000017474# config.status only pays attention to the cache file if you give it
17475# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017476#
Barry Warsawfe33b792003-01-07 22:42:49 +000017477# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017478# loading this file, other *unset* `ac_cv_foo' will be assigned the
17479# following values.
17480
17481_ACEOF
17482
Guido van Rossumf78abae1997-01-21 22:02:36 +000017483# The following way of writing the cache mishandles newlines in values,
17484# but we know of no workaround that is simple, portable, and efficient.
17485# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017486# Ultrix sh set writes to stderr and can't be redirected directly,
17487# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017488{
17489 (set) 2>&1 |
17490 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17491 *ac_space=\ *)
17492 # `set' does not quote correctly, so add quotes (double-quote
17493 # substitution turns \\\\ into \\, and sed turns \\ into \).
17494 sed -n \
17495 "s/'/'\\\\''/g;
17496 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17497 ;;
17498 *)
17499 # `set' quotes correctly as required by POSIX, so do not add quotes.
17500 sed -n \
17501 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17502 ;;
17503 esac;
17504} |
17505 sed '
17506 t clear
17507 : clear
17508 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17509 t end
17510 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17511 : end' >>confcache
17512if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017513 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017514 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17515 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017516 else
17517 echo "not updating unwritable cache $cache_file"
17518 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017519fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017520rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017522test "x$prefix" = xNONE && prefix=$ac_default_prefix
17523# Let make expand exec_prefix.
17524test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017525
Martin v. Löwis11437992002-04-12 09:54:03 +000017526# VPATH may cause trouble with some makes, so we remove $(srcdir),
17527# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17528# trailing colons and then remove the whole line if VPATH becomes empty
17529# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017530if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17532s/:*\$(srcdir):*/:/;
17533s/:*\${srcdir}:*/:/;
17534s/:*@srcdir@:*/:/;
17535s/^\([^=]*=[ ]*\):*/\1/;
17536s/:*$//;
17537s/^[^=]*=[ ]*$//;
17538}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017539fi
17540
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017541DEFS=-DHAVE_CONFIG_H
17542
Martin v. Löwis11437992002-04-12 09:54:03 +000017543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017544: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017545ac_clean_files_save=$ac_clean_files
17546ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17547{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17548echo "$as_me: creating $CONFIG_STATUS" >&6;}
17549cat >$CONFIG_STATUS <<_ACEOF
17550#! $SHELL
17551# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017552# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017553# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017554# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017555
Martin v. Löwis11437992002-04-12 09:54:03 +000017556debug=false
17557SHELL=\${CONFIG_SHELL-$SHELL}
17558_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017559
Martin v. Löwis11437992002-04-12 09:54:03 +000017560cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017561
Martin v. Löwis11437992002-04-12 09:54:03 +000017562## --------------------- ##
17563## M4sh Initialization. ##
17564## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017565
Martin v. Löwis11437992002-04-12 09:54:03 +000017566# Be Bourne compatible
17567if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17568 emulate sh
17569 NULLCMD=:
17570elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17571 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017572fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017573
Barry Warsawfe33b792003-01-07 22:42:49 +000017574# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017575# Support unset when possible.
17576if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17577 as_unset=unset
17578else
17579 as_unset=false
17580fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017581
Barry Warsawfe33b792003-01-07 22:42:49 +000017582(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17583 { $as_unset LANG || test "${LANG+set}" != set; } ||
17584 { LANG=C; export LANG; }
17585(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17586 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17587 { LC_ALL=C; export LC_ALL; }
17588(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17589 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17590 { LC_TIME=C; export LC_TIME; }
17591(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17592 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17593 { LC_CTYPE=C; export LC_CTYPE; }
17594(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17595 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17596 { LANGUAGE=C; export LANGUAGE; }
17597(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17598 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17599 { LC_COLLATE=C; export LC_COLLATE; }
17600(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17601 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17602 { LC_NUMERIC=C; export LC_NUMERIC; }
17603(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17604 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17605 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017606
17607
17608# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017609as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017610$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17611 X"$0" : 'X\(//\)$' \| \
17612 X"$0" : 'X\(/\)$' \| \
17613 . : '\(.\)' 2>/dev/null ||
17614echo X/"$0" |
17615 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17616 /^X\/\(\/\/\)$/{ s//\1/; q; }
17617 /^X\/\(\/\).*/{ s//\1/; q; }
17618 s/.*/./; q'`
17619
17620# PATH needs CR, and LINENO needs CR and PATH.
17621# Avoid depending upon Character Ranges.
17622as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17623as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17624as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17625as_cr_digits='0123456789'
17626as_cr_alnum=$as_cr_Letters$as_cr_digits
17627
17628# The user is always right.
17629if test "${PATH_SEPARATOR+set}" != set; then
17630 echo "#! /bin/sh" >conftest.sh
17631 echo "exit 0" >>conftest.sh
17632 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017633 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 PATH_SEPARATOR=';'
17635 else
17636 PATH_SEPARATOR=:
17637 fi
17638 rm -f conftest.sh
17639fi
17640
17641
17642 as_lineno_1=$LINENO
17643 as_lineno_2=$LINENO
17644 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17645 test "x$as_lineno_1" != "x$as_lineno_2" &&
17646 test "x$as_lineno_3" = "x$as_lineno_2" || {
17647 # Find who we are. Look in the path if we contain no path at all
17648 # relative or not.
17649 case $0 in
17650 *[\\/]* ) as_myself=$0 ;;
17651 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17652for as_dir in $PATH
17653do
17654 IFS=$as_save_IFS
17655 test -z "$as_dir" && as_dir=.
17656 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17657done
17658
17659 ;;
17660 esac
17661 # We did not find ourselves, most probably we were run as `sh COMMAND'
17662 # in which case we are not to be found in the path.
17663 if test "x$as_myself" = x; then
17664 as_myself=$0
17665 fi
17666 if test ! -f "$as_myself"; then
17667 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17668echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17669 { (exit 1); exit 1; }; }
17670 fi
17671 case $CONFIG_SHELL in
17672 '')
17673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17674for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17675do
17676 IFS=$as_save_IFS
17677 test -z "$as_dir" && as_dir=.
17678 for as_base in sh bash ksh sh5; do
17679 case $as_dir in
17680 /*)
17681 if ("$as_dir/$as_base" -c '
17682 as_lineno_1=$LINENO
17683 as_lineno_2=$LINENO
17684 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17685 test "x$as_lineno_1" != "x$as_lineno_2" &&
17686 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17687 CONFIG_SHELL=$as_dir/$as_base
17688 export CONFIG_SHELL
17689 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17690 fi;;
17691 esac
17692 done
17693done
17694;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017695 esac
17696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17698 # uniformly replaced by the line number. The first 'sed' inserts a
17699 # line-number line before each line; the second 'sed' does the real
17700 # work. The second script uses 'N' to pair each line-number line
17701 # with the numbered line, and appends trailing '-' during
17702 # substitution so that $LINENO is not a special case at line end.
17703 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17704 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17705 sed '=' <$as_myself |
17706 sed '
17707 N
17708 s,$,-,
17709 : loop
17710 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17711 t loop
17712 s,-$,,
17713 s,^['$as_cr_digits']*\n,,
17714 ' >$as_me.lineno &&
17715 chmod +x $as_me.lineno ||
17716 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17717echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17718 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017719
Martin v. Löwis11437992002-04-12 09:54:03 +000017720 # Don't try to exec as it changes $[0], causing all sort of problems
17721 # (the dirname of $[0] is not the place where we might find the
17722 # original and so on. Autoconf is especially sensible to this).
17723 . ./$as_me.lineno
17724 # Exit status is that of the last command.
17725 exit
17726}
17727
17728
17729case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17730 *c*,-n*) ECHO_N= ECHO_C='
17731' ECHO_T=' ' ;;
17732 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17733 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17734esac
17735
17736if expr a : '\(a\)' >/dev/null 2>&1; then
17737 as_expr=expr
17738else
17739 as_expr=false
17740fi
17741
17742rm -f conf$$ conf$$.exe conf$$.file
17743echo >conf$$.file
17744if ln -s conf$$.file conf$$ 2>/dev/null; then
17745 # We could just check for DJGPP; but this test a) works b) is more generic
17746 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17747 if test -f conf$$.exe; then
17748 # Don't use ln at all; we don't have any links
17749 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017750 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017751 as_ln_s='ln -s'
17752 fi
17753elif ln conf$$.file conf$$ 2>/dev/null; then
17754 as_ln_s=ln
17755else
17756 as_ln_s='cp -p'
17757fi
17758rm -f conf$$ conf$$.exe conf$$.file
17759
17760as_executable_p="test -f"
17761
17762# Sed expression to map a string onto a valid CPP name.
17763as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17764
17765# Sed expression to map a string onto a valid variable name.
17766as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17767
17768
17769# IFS
17770# We need space, tab and new line, in precisely that order.
17771as_nl='
17772'
17773IFS=" $as_nl"
17774
17775# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017776$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017777
17778exec 6>&1
17779
17780# Open the log real soon, to keep \$[0] and so on meaningful, and to
17781# report actual input values of CONFIG_FILES etc. instead of their
17782# values after options handling. Logging --version etc. is OK.
17783exec 5>>config.log
17784{
17785 echo
17786 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17787## Running $as_me. ##
17788_ASBOX
17789} >&5
17790cat >&5 <<_CSEOF
17791
Martin v. Löwis88afe662002-10-26 13:47:44 +000017792This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017793generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
17795 CONFIG_FILES = $CONFIG_FILES
17796 CONFIG_HEADERS = $CONFIG_HEADERS
17797 CONFIG_LINKS = $CONFIG_LINKS
17798 CONFIG_COMMANDS = $CONFIG_COMMANDS
17799 $ $0 $@
17800
17801_CSEOF
17802echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17803echo >&5
17804_ACEOF
17805
17806# Files that config.status was made for.
17807if test -n "$ac_config_files"; then
17808 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17809fi
17810
17811if test -n "$ac_config_headers"; then
17812 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17813fi
17814
17815if test -n "$ac_config_links"; then
17816 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17817fi
17818
17819if test -n "$ac_config_commands"; then
17820 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17821fi
17822
17823cat >>$CONFIG_STATUS <<\_ACEOF
17824
17825ac_cs_usage="\
17826\`$as_me' instantiates files from templates according to the
17827current configuration.
17828
17829Usage: $0 [OPTIONS] [FILE]...
17830
17831 -h, --help print this help, then exit
17832 -V, --version print version number, then exit
17833 -d, --debug don't remove temporary files
17834 --recheck update $as_me by reconfiguring in the same conditions
17835 --file=FILE[:TEMPLATE]
17836 instantiate the configuration file FILE
17837 --header=FILE[:TEMPLATE]
17838 instantiate the configuration header FILE
17839
17840Configuration files:
17841$config_files
17842
17843Configuration headers:
17844$config_headers
17845
17846Report bugs to <bug-autoconf@gnu.org>."
17847_ACEOF
17848
17849cat >>$CONFIG_STATUS <<_ACEOF
17850ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017851python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017852configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17854
17855Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17856Free Software Foundation, Inc.
17857This config.status script is free software; the Free Software Foundation
17858gives unlimited permission to copy, distribute and modify it."
17859srcdir=$srcdir
17860INSTALL="$INSTALL"
17861_ACEOF
17862
17863cat >>$CONFIG_STATUS <<\_ACEOF
17864# If no file are specified by the user, then we need to provide default
17865# value. By we need to know if files were specified by the user.
17866ac_need_defaults=:
17867while test $# != 0
17868do
17869 case $1 in
17870 --*=*)
17871 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17872 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017873 shift
17874 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17875 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017877 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 *) # This is not an option, so the user has probably given explicit
17879 # arguments.
17880 ac_need_defaults=false;;
17881 esac
17882
Barry Warsawfe33b792003-01-07 22:42:49 +000017883 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017884 # Handling of the options.
17885_ACEOF
17886cat >>$CONFIG_STATUS <<_ACEOF
17887 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17888 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17889 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17890_ACEOF
17891cat >>$CONFIG_STATUS <<\_ACEOF
17892 --version | --vers* | -V )
17893 echo "$ac_cs_version"; exit 0 ;;
17894 --he | --h)
17895 # Conflict between --help and --header
17896 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17897Try \`$0 --help' for more information." >&5
17898echo "$as_me: error: ambiguous option: $1
17899Try \`$0 --help' for more information." >&2;}
17900 { (exit 1); exit 1; }; };;
17901 --help | --hel | -h )
17902 echo "$ac_cs_usage"; exit 0 ;;
17903 --debug | --d* | -d )
17904 debug=: ;;
17905 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017906 shift
17907 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017908 ac_need_defaults=false;;
17909 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017910 shift
17911 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 ac_need_defaults=false;;
17913
17914 # This is an error.
17915 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17916Try \`$0 --help' for more information." >&5
17917echo "$as_me: error: unrecognized option: $1
17918Try \`$0 --help' for more information." >&2;}
17919 { (exit 1); exit 1; }; } ;;
17920
17921 *) ac_config_targets="$ac_config_targets $1" ;;
17922
17923 esac
17924 shift
17925done
17926
17927_ACEOF
17928
17929
17930
17931
17932
17933cat >>$CONFIG_STATUS <<\_ACEOF
17934for ac_config_target in $ac_config_targets
17935do
17936 case "$ac_config_target" in
17937 # Handling of arguments.
17938 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17939 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17940 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17941 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17942echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17943 { (exit 1); exit 1; }; };;
17944 esac
17945done
17946
17947# If the user did not use the arguments to specify the items to instantiate,
17948# then the envvar interface is used. Set only those that are not.
17949# We use the long form for the default assignment because of an extremely
17950# bizarre bug on SunOS 4.1.3.
17951if $ac_need_defaults; then
17952 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17953 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17954fi
17955
17956# Create a temporary directory, and hook for its removal unless debugging.
17957$debug ||
17958{
17959 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17960 trap '{ (exit 1); exit 1; }' 1 2 13 15
17961}
17962
17963# Create a (secure) tmp directory for tmp files.
17964: ${TMPDIR=/tmp}
17965{
17966 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17967 test -n "$tmp" && test -d "$tmp"
17968} ||
17969{
17970 tmp=$TMPDIR/cs$$-$RANDOM
17971 (umask 077 && mkdir $tmp)
17972} ||
17973{
17974 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17975 { (exit 1); exit 1; }
17976}
17977
17978_ACEOF
17979
17980cat >>$CONFIG_STATUS <<_ACEOF
17981
17982#
17983# CONFIG_FILES section.
17984#
17985
17986# No need to generate the scripts if there are no CONFIG_FILES.
17987# This happens for instance when ./config.status config.h
17988if test -n "\$CONFIG_FILES"; then
17989 # Protect against being on the right side of a sed subst in config.status.
17990 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17991 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17992s,@SHELL@,$SHELL,;t t
17993s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17994s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17995s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17996s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17997s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17998s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17999s,@exec_prefix@,$exec_prefix,;t t
18000s,@prefix@,$prefix,;t t
18001s,@program_transform_name@,$program_transform_name,;t t
18002s,@bindir@,$bindir,;t t
18003s,@sbindir@,$sbindir,;t t
18004s,@libexecdir@,$libexecdir,;t t
18005s,@datadir@,$datadir,;t t
18006s,@sysconfdir@,$sysconfdir,;t t
18007s,@sharedstatedir@,$sharedstatedir,;t t
18008s,@localstatedir@,$localstatedir,;t t
18009s,@libdir@,$libdir,;t t
18010s,@includedir@,$includedir,;t t
18011s,@oldincludedir@,$oldincludedir,;t t
18012s,@infodir@,$infodir,;t t
18013s,@mandir@,$mandir,;t t
18014s,@build_alias@,$build_alias,;t t
18015s,@host_alias@,$host_alias,;t t
18016s,@target_alias@,$target_alias,;t t
18017s,@DEFS@,$DEFS,;t t
18018s,@ECHO_C@,$ECHO_C,;t t
18019s,@ECHO_N@,$ECHO_N,;t t
18020s,@ECHO_T@,$ECHO_T,;t t
18021s,@LIBS@,$LIBS,;t t
18022s,@VERSION@,$VERSION,;t t
18023s,@SOVERSION@,$SOVERSION,;t t
18024s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18025s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18026s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18027s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18028s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18029s,@MACHDEP@,$MACHDEP,;t t
18030s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018031s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018032s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018033s,@CXX@,$CXX,;t t
18034s,@MAINOBJ@,$MAINOBJ,;t t
18035s,@EXEEXT@,$EXEEXT,;t t
18036s,@CC@,$CC,;t t
18037s,@CFLAGS@,$CFLAGS,;t t
18038s,@LDFLAGS@,$LDFLAGS,;t t
18039s,@CPPFLAGS@,$CPPFLAGS,;t t
18040s,@ac_ct_CC@,$ac_ct_CC,;t t
18041s,@OBJEXT@,$OBJEXT,;t t
18042s,@CPP@,$CPP,;t t
18043s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18044s,@LIBRARY@,$LIBRARY,;t t
18045s,@LDLIBRARY@,$LDLIBRARY,;t t
18046s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18047s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18048s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18049s,@INSTSONAME@,$INSTSONAME,;t t
18050s,@RUNSHARED@,$RUNSHARED,;t t
18051s,@LINKCC@,$LINKCC,;t t
18052s,@RANLIB@,$RANLIB,;t t
18053s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18054s,@AR@,$AR,;t t
18055s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18056s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18057s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18058s,@LN@,$LN,;t t
18059s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018060s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018061s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18062s,@SO@,$SO,;t t
18063s,@LDSHARED@,$LDSHARED,;t t
18064s,@BLDSHARED@,$BLDSHARED,;t t
18065s,@CCSHARED@,$CCSHARED,;t t
18066s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18067s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018068s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018069s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18070s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18071s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18072s,@LDLAST@,$LDLAST,;t t
18073s,@THREADOBJ@,$THREADOBJ,;t t
18074s,@DLINCLDIR@,$DLINCLDIR,;t t
18075s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18076s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18077s,@LIBOBJS@,$LIBOBJS,;t t
18078s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18079s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18080s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18081s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18082s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18083s,@LIBM@,$LIBM,;t t
18084s,@LIBC@,$LIBC,;t t
18085s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18086s,@THREADHEADERS@,$THREADHEADERS,;t t
18087s,@SRCDIRS@,$SRCDIRS,;t t
18088CEOF
18089
18090_ACEOF
18091
18092 cat >>$CONFIG_STATUS <<\_ACEOF
18093 # Split the substitutions into bite-sized pieces for seds with
18094 # small command number limits, like on Digital OSF/1 and HP-UX.
18095 ac_max_sed_lines=48
18096 ac_sed_frag=1 # Number of current file.
18097 ac_beg=1 # First line for current file.
18098 ac_end=$ac_max_sed_lines # Line after last line for current file.
18099 ac_more_lines=:
18100 ac_sed_cmds=
18101 while $ac_more_lines; do
18102 if test $ac_beg -gt 1; then
18103 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18104 else
18105 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18106 fi
18107 if test ! -s $tmp/subs.frag; then
18108 ac_more_lines=false
18109 else
18110 # The purpose of the label and of the branching condition is to
18111 # speed up the sed processing (if there are no `@' at all, there
18112 # is no need to browse any of the substitutions).
18113 # These are the two extra sed commands mentioned above.
18114 (echo ':t
18115 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18116 if test -z "$ac_sed_cmds"; then
18117 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18118 else
18119 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18120 fi
18121 ac_sed_frag=`expr $ac_sed_frag + 1`
18122 ac_beg=$ac_end
18123 ac_end=`expr $ac_end + $ac_max_sed_lines`
18124 fi
18125 done
18126 if test -z "$ac_sed_cmds"; then
18127 ac_sed_cmds=cat
18128 fi
18129fi # test -n "$CONFIG_FILES"
18130
18131_ACEOF
18132cat >>$CONFIG_STATUS <<\_ACEOF
18133for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18134 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18135 case $ac_file in
18136 - | *:- | *:-:* ) # input from stdin
18137 cat >$tmp/stdin
18138 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18139 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18140 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18141 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18142 * ) ac_file_in=$ac_file.in ;;
18143 esac
18144
18145 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18146 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18147$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18148 X"$ac_file" : 'X\(//\)[^/]' \| \
18149 X"$ac_file" : 'X\(//\)$' \| \
18150 X"$ac_file" : 'X\(/\)' \| \
18151 . : '\(.\)' 2>/dev/null ||
18152echo X"$ac_file" |
18153 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18154 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18155 /^X\(\/\/\)$/{ s//\1/; q; }
18156 /^X\(\/\).*/{ s//\1/; q; }
18157 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018158 { case "$ac_dir" in
18159 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18160 *) as_incr_dir=.;;
18161esac
18162as_dummy="$ac_dir"
18163for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18164 case $as_mkdir_dir in
18165 # Skip DOS drivespec
18166 ?:) as_incr_dir=$as_mkdir_dir ;;
18167 *)
18168 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18169 test -d "$as_incr_dir" ||
18170 mkdir "$as_incr_dir" ||
18171 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18172echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18173 { (exit 1); exit 1; }; }
18174 ;;
18175 esac
18176done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018177
18178 ac_builddir=.
18179
18180if test "$ac_dir" != .; then
18181 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18182 # A "../" for each directory in $ac_dir_suffix.
18183 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18184else
18185 ac_dir_suffix= ac_top_builddir=
18186fi
18187
18188case $srcdir in
18189 .) # No --srcdir option. We are building in place.
18190 ac_srcdir=.
18191 if test -z "$ac_top_builddir"; then
18192 ac_top_srcdir=.
18193 else
18194 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18195 fi ;;
18196 [\\/]* | ?:[\\/]* ) # Absolute path.
18197 ac_srcdir=$srcdir$ac_dir_suffix;
18198 ac_top_srcdir=$srcdir ;;
18199 *) # Relative path.
18200 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18201 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18202esac
18203# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18204# absolute.
18205ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis858f8172003-05-24 12:35:47 +000018206ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018207ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18208ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18209
18210
18211 case $INSTALL in
18212 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18213 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18214 esac
18215
18216 if test x"$ac_file" != x-; then
18217 { echo "$as_me:$LINENO: creating $ac_file" >&5
18218echo "$as_me: creating $ac_file" >&6;}
18219 rm -f "$ac_file"
18220 fi
18221 # Let's still pretend it is `configure' which instantiates (i.e., don't
18222 # use $as_me), people would be surprised to read:
18223 # /* config.h. Generated by config.status. */
18224 if test x"$ac_file" = x-; then
18225 configure_input=
18226 else
18227 configure_input="$ac_file. "
18228 fi
18229 configure_input=$configure_input"Generated from `echo $ac_file_in |
18230 sed 's,.*/,,'` by configure."
18231
18232 # First look for the input files in the build tree, otherwise in the
18233 # src tree.
18234 ac_file_inputs=`IFS=:
18235 for f in $ac_file_in; do
18236 case $f in
18237 -) echo $tmp/stdin ;;
18238 [\\/$]*)
18239 # Absolute (can't be DOS-style, as IFS=:)
18240 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18241echo "$as_me: error: cannot find input file: $f" >&2;}
18242 { (exit 1); exit 1; }; }
18243 echo $f;;
18244 *) # Relative
18245 if test -f "$f"; then
18246 # Build tree
18247 echo $f
18248 elif test -f "$srcdir/$f"; then
18249 # Source tree
18250 echo $srcdir/$f
18251 else
18252 # /dev/null tree
18253 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18254echo "$as_me: error: cannot find input file: $f" >&2;}
18255 { (exit 1); exit 1; }; }
18256 fi;;
18257 esac
18258 done` || { (exit 1); exit 1; }
18259_ACEOF
18260cat >>$CONFIG_STATUS <<_ACEOF
18261 sed "$ac_vpsub
18262$extrasub
18263_ACEOF
18264cat >>$CONFIG_STATUS <<\_ACEOF
18265:t
18266/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18267s,@configure_input@,$configure_input,;t t
18268s,@srcdir@,$ac_srcdir,;t t
18269s,@abs_srcdir@,$ac_abs_srcdir,;t t
18270s,@top_srcdir@,$ac_top_srcdir,;t t
18271s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18272s,@builddir@,$ac_builddir,;t t
18273s,@abs_builddir@,$ac_abs_builddir,;t t
18274s,@top_builddir@,$ac_top_builddir,;t t
18275s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18276s,@INSTALL@,$ac_INSTALL,;t t
18277" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18278 rm -f $tmp/stdin
18279 if test x"$ac_file" != x-; then
18280 mv $tmp/out $ac_file
18281 else
18282 cat $tmp/out
18283 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018284 fi
18285
Martin v. Löwis11437992002-04-12 09:54:03 +000018286done
18287_ACEOF
18288cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018289
Martin v. Löwis11437992002-04-12 09:54:03 +000018290#
18291# CONFIG_HEADER section.
18292#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018294# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18295# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018296#
18297# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018298ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18299ac_dB='[ ].*$,\1#\2'
18300ac_dC=' '
18301ac_dD=',;t'
18302# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18303ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18304ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018305ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018306ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018309 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 case $ac_file in
18311 - | *:- | *:-:* ) # input from stdin
18312 cat >$tmp/stdin
18313 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18314 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18315 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18316 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18317 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018318 esac
18319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18321echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018322
Martin v. Löwis11437992002-04-12 09:54:03 +000018323 # First look for the input files in the build tree, otherwise in the
18324 # src tree.
18325 ac_file_inputs=`IFS=:
18326 for f in $ac_file_in; do
18327 case $f in
18328 -) echo $tmp/stdin ;;
18329 [\\/$]*)
18330 # Absolute (can't be DOS-style, as IFS=:)
18331 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18332echo "$as_me: error: cannot find input file: $f" >&2;}
18333 { (exit 1); exit 1; }; }
18334 echo $f;;
18335 *) # Relative
18336 if test -f "$f"; then
18337 # Build tree
18338 echo $f
18339 elif test -f "$srcdir/$f"; then
18340 # Source tree
18341 echo $srcdir/$f
18342 else
18343 # /dev/null tree
18344 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18345echo "$as_me: error: cannot find input file: $f" >&2;}
18346 { (exit 1); exit 1; }; }
18347 fi;;
18348 esac
18349 done` || { (exit 1); exit 1; }
18350 # Remove the trailing spaces.
18351 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018352
Martin v. Löwis11437992002-04-12 09:54:03 +000018353_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018354
Martin v. Löwis11437992002-04-12 09:54:03 +000018355# Transform confdefs.h into two sed scripts, `conftest.defines' and
18356# `conftest.undefs', that substitutes the proper values into
18357# config.h.in to produce config.h. The first handles `#define'
18358# templates, and the second `#undef' templates.
18359# And first: Protect against being on the right side of a sed subst in
18360# config.status. Protect against being in an unquoted here document
18361# in config.status.
18362rm -f conftest.defines conftest.undefs
18363# Using a here document instead of a string reduces the quoting nightmare.
18364# Putting comments in sed scripts is not portable.
18365#
18366# `end' is used to avoid that the second main sed command (meant for
18367# 0-ary CPP macros) applies to n-ary macro definitions.
18368# See the Autoconf documentation for `clear'.
18369cat >confdef2sed.sed <<\_ACEOF
18370s/[\\&,]/\\&/g
18371s,[\\$`],\\&,g
18372t clear
18373: clear
18374s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18375t end
18376s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18377: end
18378_ACEOF
18379# If some macros were called several times there might be several times
18380# the same #defines, which is useless. Nevertheless, we may not want to
18381# sort them, since we want the *last* AC-DEFINE to be honored.
18382uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18383sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18384rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018385
18386# This sed command replaces #undef with comments. This is necessary, for
18387# example, in the case of _POSIX_SOURCE, which is predefined and required
18388# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018389cat >>conftest.undefs <<\_ACEOF
18390s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18391_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018392
Martin v. Löwis11437992002-04-12 09:54:03 +000018393# Break up conftest.defines because some shells have a limit on the size
18394# of here documents, and old seds have small limits too (100 cmds).
18395echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018396echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018397echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18398echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018399rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018400while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018401do
Martin v. Löwis11437992002-04-12 09:54:03 +000018402 # Write a limited-size here document to $tmp/defines.sed.
18403 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18404 # Speed up: don't consider the non `#define' lines.
18405 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18406 # Work around the forget-to-reset-the-flag bug.
18407 echo 't clr' >>$CONFIG_STATUS
18408 echo ': clr' >>$CONFIG_STATUS
18409 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018410 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018411 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18412 rm -f $tmp/in
18413 mv $tmp/out $tmp/in
18414' >>$CONFIG_STATUS
18415 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18416 rm -f conftest.defines
18417 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018418done
Martin v. Löwis11437992002-04-12 09:54:03 +000018419rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018420echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018421echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018422
Martin v. Löwis11437992002-04-12 09:54:03 +000018423# Break up conftest.undefs because some shells have a limit on the size
18424# of here documents, and old seds have small limits too (100 cmds).
18425echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18426rm -f conftest.tail
18427while grep . conftest.undefs >/dev/null
18428do
18429 # Write a limited-size here document to $tmp/undefs.sed.
18430 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18431 # Speed up: don't consider the non `#undef'
18432 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18433 # Work around the forget-to-reset-the-flag bug.
18434 echo 't clr' >>$CONFIG_STATUS
18435 echo ': clr' >>$CONFIG_STATUS
18436 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18437 echo 'CEOF
18438 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18439 rm -f $tmp/in
18440 mv $tmp/out $tmp/in
18441' >>$CONFIG_STATUS
18442 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18443 rm -f conftest.undefs
18444 mv conftest.tail conftest.undefs
18445done
18446rm -f conftest.undefs
18447
18448cat >>$CONFIG_STATUS <<\_ACEOF
18449 # Let's still pretend it is `configure' which instantiates (i.e., don't
18450 # use $as_me), people would be surprised to read:
18451 # /* config.h. Generated by config.status. */
18452 if test x"$ac_file" = x-; then
18453 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018454 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018456 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 cat $tmp/in >>$tmp/config.h
18458 rm -f $tmp/in
18459 if test x"$ac_file" != x-; then
18460 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18461 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18462echo "$as_me: $ac_file is unchanged" >&6;}
18463 else
18464 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18465$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18466 X"$ac_file" : 'X\(//\)[^/]' \| \
18467 X"$ac_file" : 'X\(//\)$' \| \
18468 X"$ac_file" : 'X\(/\)' \| \
18469 . : '\(.\)' 2>/dev/null ||
18470echo X"$ac_file" |
18471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18472 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18473 /^X\(\/\/\)$/{ s//\1/; q; }
18474 /^X\(\/\).*/{ s//\1/; q; }
18475 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018476 { case "$ac_dir" in
18477 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18478 *) as_incr_dir=.;;
18479esac
18480as_dummy="$ac_dir"
18481for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18482 case $as_mkdir_dir in
18483 # Skip DOS drivespec
18484 ?:) as_incr_dir=$as_mkdir_dir ;;
18485 *)
18486 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18487 test -d "$as_incr_dir" ||
18488 mkdir "$as_incr_dir" ||
18489 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18490echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18491 { (exit 1); exit 1; }; }
18492 ;;
18493 esac
18494done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018495
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 rm -f $ac_file
18497 mv $tmp/config.h $ac_file
18498 fi
18499 else
18500 cat $tmp/config.h
18501 rm -f $tmp/config.h
18502 fi
18503done
18504_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018505
Martin v. Löwis11437992002-04-12 09:54:03 +000018506cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018507
Martin v. Löwis11437992002-04-12 09:54:03 +000018508{ (exit 0); exit 0; }
18509_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018510chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018511ac_clean_files=$ac_clean_files_save
18512
18513
18514# configure is writing to config.log, and then calls config.status.
18515# config.status does its own redirection, appending to config.log.
18516# Unfortunately, on DOS this fails, as config.log is still kept open
18517# by configure, so config.status won't be able to write to it; its
18518# output is simply discarded. So we exec the FD to /dev/null,
18519# effectively closing config.log, so it can be properly (re)opened and
18520# appended to by config.status. When coming back to configure, we
18521# need to make the FD available again.
18522if test "$no_create" != yes; then
18523 ac_cs_success=:
18524 exec 5>/dev/null
18525 $SHELL $CONFIG_STATUS || ac_cs_success=false
18526 exec 5>>config.log
18527 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18528 # would make configure fail if this is the last instruction.
18529 $ac_cs_success || { (exit 1); exit 1; }
18530fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018531
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018532
18533echo "creating Setup"
18534if test ! -f Modules/Setup
18535then
18536 cp $srcdir/Modules/Setup.dist Modules/Setup
18537fi
18538
18539echo "creating Setup.local"
18540if test ! -f Modules/Setup.local
18541then
18542 echo "# Edit this file for local setup changes" >Modules/Setup.local
18543fi
18544
18545echo "creating Makefile"
18546$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18547 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018548 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018549mv config.c Modules