blob: 31f7ae63a268e77ac61a0f42cc2b8fd1216d3d86 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002# From configure.in Revision: 1.406 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Barry Warsawfe33b792003-01-07 22:42:49 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
Barry Warsawfe33b792003-01-07 22:42:49 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
Barry Warsawfe33b792003-01-07 22:42:49 +000038(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +0000911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915 cd $ac_dir
916 # Check for guested configure; otherwise get Cygnus style configure.
917 if test -f $ac_srcdir/configure.gnu; then
918 echo
919 $SHELL $ac_srcdir/configure.gnu --help=recursive
920 elif test -f $ac_srcdir/configure; then
921 echo
922 $SHELL $ac_srcdir/configure --help=recursive
923 elif test -f $ac_srcdir/configure.ac ||
924 test -f $ac_srcdir/configure.in; then
925 echo
926 $ac_configure --help
927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929 fi
930 cd $ac_popdir
931 done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000937python configure 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +0000938generated by GNU Autoconf 2.53
Martin v. Löwis11437992002-04-12 09:54:03 +0000939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945 exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
Martin v. Löwis88afe662002-10-26 13:47:44 +0000952It was created by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +0000953generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
955 $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
972
973/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
974/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
977/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
978/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
979/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986 IFS=$as_save_IFS
987 test -z "$as_dir" && as_dir=.
988 echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Also quote any args containing shell meta-characters.
1006ac_configure_args=
1007ac_sep=
1008for ac_arg
1009do
1010 case $ac_arg in
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n ) continue ;;
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 continue ;;
1016 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1017 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1018 esac
Barry Warsawfe33b792003-01-07 22:42:49 +00001019 case " $ac_configure_args " in
1020 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1021 *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1022 ac_sep=" " ;;
1023 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 # Get rid of the leading space.
1025done
1026
1027# When interrupted or exit'd, cleanup temporary files, and complete
1028# config.log. We remove comments because anyway the quotes in there
1029# would cause problems or look ugly.
1030# WARNING: Be sure not to use single quotes in there, as some shells,
1031# such as our DU 5.0 friend, will then `close' the trap.
1032trap 'exit_status=$?
1033 # Save into config.log some information that might help in debugging.
1034 {
1035 echo
1036 cat <<\_ASBOX
1037## ---------------- ##
1038## Cache variables. ##
1039## ---------------- ##
1040_ASBOX
1041 echo
1042 # The following way of writing the cache mishandles newlines in values,
1043{
1044 (set) 2>&1 |
1045 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1046 *ac_space=\ *)
1047 sed -n \
1048 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1049 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1050 ;;
1051 *)
1052 sed -n \
1053 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1054 ;;
1055 esac;
1056}
1057 echo
1058 if test -s confdefs.h; then
1059 cat <<\_ASBOX
1060## ----------- ##
1061## confdefs.h. ##
1062## ----------- ##
1063_ASBOX
1064 echo
Barry Warsawfe33b792003-01-07 22:42:49 +00001065 sed "/^$/d" confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 echo
1067 fi
1068 test "$ac_signal" != 0 &&
1069 echo "$as_me: caught signal $ac_signal"
1070 echo "$as_me: exit $exit_status"
1071 } >&5
1072 rm -f core core.* *.core &&
1073 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1074 exit $exit_status
1075 ' 0
1076for ac_signal in 1 2 13 15; do
1077 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1078done
1079ac_signal=0
1080
1081# confdefs.h avoids OS command line length limits that DEFS can exceed.
1082rm -rf conftest* confdefs.h
1083# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1084echo >confdefs.h
1085
1086# Predefined preprocessor variables.
1087
1088cat >>confdefs.h <<_ACEOF
1089#define PACKAGE_NAME "$PACKAGE_NAME"
1090_ACEOF
1091
1092
1093cat >>confdefs.h <<_ACEOF
1094#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1095_ACEOF
1096
1097
1098cat >>confdefs.h <<_ACEOF
1099#define PACKAGE_VERSION "$PACKAGE_VERSION"
1100_ACEOF
1101
1102
1103cat >>confdefs.h <<_ACEOF
1104#define PACKAGE_STRING "$PACKAGE_STRING"
1105_ACEOF
1106
1107
1108cat >>confdefs.h <<_ACEOF
1109#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1110_ACEOF
1111
1112
1113# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114# Prefer explicitly selected file to automatically selected ones.
1115if test -z "$CONFIG_SITE"; then
1116 if test "x$prefix" != xNONE; then
1117 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1118 else
1119 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1120 fi
1121fi
1122for ac_site_file in $CONFIG_SITE; do
1123 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1125echo "$as_me: loading site script $ac_site_file" >&6;}
1126 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 . "$ac_site_file"
1128 fi
1129done
1130
1131if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 # Some versions of bash will fail to source /dev/null (special
1133 # files actually), so we avoid doing that.
1134 if test -f "$cache_file"; then
1135 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1136echo "$as_me: loading cache $cache_file" >&6;}
1137 case $cache_file in
1138 [\\/]* | ?:[\\/]* ) . $cache_file;;
1139 *) . ./$cache_file;;
1140 esac
1141 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1144echo "$as_me: creating cache $cache_file" >&6;}
1145 >$cache_file
1146fi
1147
1148# Check that the precious variables saved in the cache have kept the same
1149# value.
1150ac_cache_corrupted=false
1151for ac_var in `(set) 2>&1 |
1152 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1153 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1154 eval ac_new_set=\$ac_env_${ac_var}_set
1155 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1156 eval ac_new_val="\$ac_env_${ac_var}_value"
1157 case $ac_old_set,$ac_new_set in
1158 set,)
1159 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1160echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1161 ac_cache_corrupted=: ;;
1162 ,set)
1163 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1164echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1165 ac_cache_corrupted=: ;;
1166 ,);;
1167 *)
1168 if test "x$ac_old_val" != "x$ac_new_val"; then
1169 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1170echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1171 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1172echo "$as_me: former value: $ac_old_val" >&2;}
1173 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1174echo "$as_me: current value: $ac_new_val" >&2;}
1175 ac_cache_corrupted=:
1176 fi;;
1177 esac
1178 # Pass precious variables to config.status.
1179 if test "$ac_new_set" = set; then
1180 case $ac_new_val in
1181 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1182 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1183 *) ac_arg=$ac_var=$ac_new_val ;;
1184 esac
1185 case " $ac_configure_args " in
1186 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1187 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1188 esac
1189 fi
1190done
1191if $ac_cache_corrupted; then
1192 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1193echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1194 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1195echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1196 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197fi
1198
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1203ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
Michael W. Hudson54241132001-12-07 15:38:26 +00001206
1207
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
Martin v. Löwis88afe662002-10-26 13:47:44 +00001222
1223
1224
1225
1226
1227
1228
1229
1230
Barry Warsawfe33b792003-01-07 22:42:49 +00001231ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001232
1233
1234# This is for stuff that absolutely must end up in pyconfig.h.
1235# Please use pyport.h instead, if possible.
1236
1237
1238
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001239
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001240
1241
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001242VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001243
Martin v. Löwis1142de32002-03-29 16:28:31 +00001244
1245SOVERSION=1.0
1246
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001247# The later defininition of _XOPEN_SOURCE disables certain features
1248# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1249
1250cat >>confdefs.h <<\_ACEOF
1251#define _GNU_SOURCE 1
1252_ACEOF
1253
1254
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001255# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1256# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1257# them.
1258
1259cat >>confdefs.h <<\_ACEOF
1260#define _NETBSD_SOURCE 1
1261_ACEOF
1262
1263
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001264define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001265
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001266# Arguments passed to configure.
1267
1268CONFIG_ARGS="$ac_configure_args"
1269
Jack Jansene578a632001-08-15 01:27:14 +00001270# Check whether --enable-framework or --disable-framework was given.
1271if test "${enable_framework+set}" = set; then
1272 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
Jack Jansene578a632001-08-15 01:27:14 +00001274 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001276 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001277 esac
1278 case $enableval in
1279 no)
1280 PYTHONFRAMEWORK=
1281 PYTHONFRAMEWORKDIR=no-framework
1282 PYTHONFRAMEWORKPREFIX=
1283 PYTHONFRAMEWORKINSTALLDIR=
1284 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001285 ;;
1286 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001287 PYTHONFRAMEWORK=Python
1288 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001289 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001290 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1291 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001292 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001293
Guido van Rossum563e7081996-09-10 18:20:48 +00001294else
Martin v. Löwis11437992002-04-12 09:54:03 +00001295
Jack Jansene578a632001-08-15 01:27:14 +00001296 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001297 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001298 PYTHONFRAMEWORKPREFIX=
1299 PYTHONFRAMEWORKINSTALLDIR=
1300 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001303
1304
1305
1306
Jack Jansene578a632001-08-15 01:27:14 +00001307
1308##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001309## AC_HELP_STRING(--with-dyld,
1310## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001311##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001312# Set name for machine-dependent library files
1313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314echo "$as_me:$LINENO: checking MACHDEP" >&5
1315echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001316if test -z "$MACHDEP"
1317then
Guido van Rossum563e7081996-09-10 18:20:48 +00001318 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001319 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1320 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001321 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001322 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001323 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001324 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001325 ac_md_system=`echo $ac_sys_system |
1326 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1327 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001328 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001329 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001330
Guido van Rossum07397971997-04-29 21:49:50 +00001331 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001333 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001334 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001335 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001336 esac
1337fi
Guido van Rossum91922671997-10-09 20:24:13 +00001338
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001339# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1340# disable features if it is defined, without any means to access these
1341# features as extensions. For these systems, we skip the definition of
1342# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1343# some feature, make sure there is no alternative way to access this
1344# feature. Also, when using wildcards, make sure you have verified the
1345# need for not defining _XOPEN_SOURCE on all systems matching the
1346# wildcard, and that the wildcard does not include future systems
1347# (which may remove their limitations).
1348case $ac_sys_system/$ac_sys_release in
1349 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1350 # even though select is a POSIX function. Reported by J. Ribbens.
1351 OpenBSD/2.* | OpenBSD/3.[012])
1352 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001353 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1354 # of union __?sigval. Reported by Stuart Bishop.
1355 SunOS/5.6)
1356 define_xopen_source=no;;
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001357 # On UnixWare 7, u_short is never defined with _XOPEN_SOURCE,
1358 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
1359 OpenUNIX/8.0| UnixWare/7.1.[13])
1360 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001361esac
1362
1363if test $define_xopen_source = yes
1364then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001365
1366cat >>confdefs.h <<\_ACEOF
1367#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001368_ACEOF
1369
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001370
1371 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1372 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1373 # several APIs are not declared. Since this is also needed in some
1374 # cases for HP-UX, we define it globally.
1375
1376
1377cat >>confdefs.h <<\_ACEOF
1378#define _XOPEN_SOURCE_EXTENDED 1
1379_ACEOF
1380
1381
1382cat >>confdefs.h <<\_ACEOF
1383#define _POSIX_C_SOURCE 200112L
1384_ACEOF
1385
1386
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001387fi
1388
Guido van Rossum91922671997-10-09 20:24:13 +00001389#
1390# SGI compilers allow the specification of the both the ABI and the
1391# ISA on the command line. Depending on the values of these switches,
1392# different and often incompatable code will be generated.
1393#
1394# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1395# thus supply support for various ABI/ISA combinations. The MACHDEP
1396# variable is also adjusted.
1397#
1398
1399if test ! -z "$SGI_ABI"
1400then
1401 CC="cc $SGI_ABI"
1402 LDFLAGS="$SGI_ABI $LDFLAGS"
1403 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001405echo "$as_me:$LINENO: result: $MACHDEP" >&5
1406echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001407
Jack Jansen83f898c2002-12-30 22:23:40 +00001408# And add extra plat-mac for darwin
1409
Jack Jansen7b59b422003-03-17 15:44:10 +00001410
Jack Jansen83f898c2002-12-30 22:23:40 +00001411echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1412echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1413if test -z "$EXTRAPLATDIR"
1414then
1415 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001416 darwin)
1417 EXTRAPLATDIR="\$(PLATMACDIRS)"
1418 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1419 ;;
1420 *)
1421 EXTRAPLATDIR=""
1422 EXTRAMACHDEPPATH=""
1423 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001424 esac
1425fi
1426echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1427echo "${ECHO_T}$EXTRAPLATDIR" >&6
1428
Guido van Rossum627b2d71993-12-24 10:39:16 +00001429# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001430
1431# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1432# for debug/optimization stuff. BASECFLAGS is for flags that are required
1433# just to get things to compile and link. Users are free to override OPT
1434# when running configure or make. The build should not break if they do.
1435# BASECFLAGS should generally not be messed with, however.
1436
1437# XXX shouldn't some/most/all of this code be merged with the stuff later
1438# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001439echo "$as_me:$LINENO: checking for --without-gcc" >&5
1440echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001442# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001443if test "${with_gcc+set}" = set; then
1444 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
Guido van Rossum7f43da71994-08-01 12:15:30 +00001446 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001447 no) CC=cc
1448 without_gcc=yes;;
1449 yes) CC=gcc
1450 without_gcc=no;;
1451 *) CC=$withval
1452 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001453 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001454else
Martin v. Löwis11437992002-04-12 09:54:03 +00001455
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001456 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001457 AIX*) CC=cc_r
1458 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001459 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001460 case $BE_HOST_CPU in
1461 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001462 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001464 BASECFLAGS="$BASECFLAGS -export pragma"
1465 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001466 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001467 ;;
1468 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001469 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001470 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001471 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001472 ;;
1473 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1475echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1476 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 ;;
1478 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001479 AR="\$(srcdir)/Modules/ar_beos"
1480 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001482 Monterey*)
1483 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001484 without_gcc=;;
1485 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001486 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001487fi;
1488echo "$as_me:$LINENO: result: $without_gcc" >&5
1489echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001490
1491
Guido van Rossum95012191999-12-16 17:50:52 +00001492
Fred Drakea1a84e72001-03-06 05:52:16 +00001493MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001494echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1495echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1496
Guido van Rossum95012191999-12-16 17:50:52 +00001497# Check whether --with-cxx or --without-cxx was given.
1498if test "${with_cxx+set}" = set; then
1499 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
Martin v. Löwis22352952000-12-13 17:37:02 +00001501 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001502 case $withval in
1503 no) CXX=
1504 with_cxx=no;;
1505 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001506 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001507 with_cxx=$withval;;
1508 esac
1509else
Martin v. Löwis11437992002-04-12 09:54:03 +00001510
Guido van Rossum95012191999-12-16 17:50:52 +00001511 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001512 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001513
Martin v. Löwis11437992002-04-12 09:54:03 +00001514fi;
1515echo "$as_me:$LINENO: result: $with_cxx" >&5
1516echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001517
1518if test "$with_cxx" = "yes"
1519then
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1521echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1522 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001523fi
1524
1525
1526
1527
Martin v. Löwis11437992002-04-12 09:54:03 +00001528if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001529then
1530 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1531do
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 # 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 +00001533set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001534echo "$as_me:$LINENO: checking for $ac_word" >&5
1535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1536if test "${ac_cv_prog_CXX+set}" = set; then
1537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001538else
1539 if test -n "$CXX"; then
1540 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1541else
Martin v. Löwis11437992002-04-12 09:54:03 +00001542as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1543for as_dir in $PATH
1544do
1545 IFS=$as_save_IFS
1546 test -z "$as_dir" && as_dir=.
1547 for ac_exec_ext in '' $ac_executable_extensions; do
1548 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1549 ac_cv_prog_CXX="$ac_prog"
1550 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1551 break 2
1552 fi
1553done
1554done
1555
Martin v. Löwis22352952000-12-13 17:37:02 +00001556fi
1557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001558CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001559if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 echo "$as_me:$LINENO: result: $CXX" >&5
1561echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001562else
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 echo "$as_me:$LINENO: result: no" >&5
1564echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001565fi
1566
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001568done
1569test -n "$CXX" || CXX="notfound"
1570
1571 if test "$CXX" = "notfound"
1572 then
1573 CXX=
1574 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001576ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1580 cat >conftest.$ac_ext <<_ACEOF
1581#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001582#include "confdefs.h"
1583
Barry Warsawfe33b792003-01-07 22:42:49 +00001584#ifdef F77_DUMMY_MAIN
1585# ifdef __cplusplus
1586 extern "C"
1587# endif
1588 int F77_DUMMY_MAIN() { return 1; }
1589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001590int
1591main ()
1592{
Michael W. Hudson54241132001-12-07 15:38:26 +00001593
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ;
1595 return 0;
1596}
1597_ACEOF
1598ac_clean_files_save=$ac_clean_files
1599ac_clean_files="$ac_clean_files a.out a.exe"
1600# Try to create an executable without -o first, disregard a.out.
1601# It will help us diagnose broken compilers, and finding out an intuition
1602# of exeext.
1603echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1604echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1605ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1606if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1607 (eval $ac_link_default) 2>&5
1608 ac_status=$?
1609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1610 (exit $ac_status); }; then
1611 # Find the output, starting from the most likely. This scheme is
1612# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1613# resort.
1614
1615# Be careful to initialize this variable, since it used to be cached.
1616# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1617ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001618for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1619 ls a.out conftest 2>/dev/null;
1620 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001622 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 a.out ) # We found the default executable, but exeext='' is most
1624 # certainly right.
1625 break;;
1626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1627 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1628 export ac_cv_exeext
1629 break;;
1630 * ) break;;
1631 esac
1632done
1633else
1634 echo "$as_me: failed program was:" >&5
1635cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001636{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1637echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001639fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001640
1641ac_exeext=$ac_cv_exeext
1642echo "$as_me:$LINENO: result: $ac_file" >&5
1643echo "${ECHO_T}$ac_file" >&6
1644
1645# Check the compiler produces executables we can run. If not, either
1646# the compiler is broken, or we cross compile.
1647echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1648echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1649# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1650# If not cross compiling, check that we can run a simple program.
1651if test "$cross_compiling" != yes; then
1652 if { ac_try='./$ac_file'
1653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1654 (eval $ac_try) 2>&5
1655 ac_status=$?
1656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1657 (exit $ac_status); }; }; then
1658 cross_compiling=no
1659 else
1660 if test "$cross_compiling" = maybe; then
1661 cross_compiling=yes
1662 else
1663 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1664If you meant to cross compile, use \`--host'." >&5
1665echo "$as_me: error: cannot run C++ compiled programs.
1666If you meant to cross compile, use \`--host'." >&2;}
1667 { (exit 1); exit 1; }; }
1668 fi
1669 fi
1670fi
1671echo "$as_me:$LINENO: result: yes" >&5
1672echo "${ECHO_T}yes" >&6
1673
1674rm -f a.out a.exe conftest$ac_cv_exeext
1675ac_clean_files=$ac_clean_files_save
1676# Check the compiler produces executables we can run. If not, either
1677# the compiler is broken, or we cross compile.
1678echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1679echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1680echo "$as_me:$LINENO: result: $cross_compiling" >&5
1681echo "${ECHO_T}$cross_compiling" >&6
1682
1683echo "$as_me:$LINENO: checking for suffix of executables" >&5
1684echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1686 (eval $ac_link) 2>&5
1687 ac_status=$?
1688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1689 (exit $ac_status); }; then
1690 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1691# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1692# work properly (i.e., refer to `conftest.exe'), while it won't with
1693# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001694for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001695 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001696 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001697 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1698 export ac_cv_exeext
1699 break;;
1700 * ) break;;
1701 esac
1702done
1703else
1704 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1705echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1706 { (exit 1); exit 1; }; }
1707fi
1708
1709rm -f conftest$ac_cv_exeext
1710echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1711echo "${ECHO_T}$ac_cv_exeext" >&6
1712
1713rm -f conftest.$ac_ext
1714EXEEXT=$ac_cv_exeext
1715ac_exeext=$EXEEXT
1716
1717 ac_ext=c
1718ac_cpp='$CPP $CPPFLAGS'
1719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1721ac_compiler_gnu=$ac_cv_c_compiler_gnu
1722
1723
Martin v. Löwis22352952000-12-13 17:37:02 +00001724
1725 fi
1726fi
1727
Guido van Rossum8b131c51995-03-09 14:10:13 +00001728# If the user switches compilers, we can't believe the cache
1729if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1730then
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1732(it is also a good idea to do 'make clean' before compiling)" >&5
1733echo "$as_me: error: cached CC is different -- throw away $cache_file
1734(it is also a good idea to do 'make clean' before compiling)" >&2;}
1735 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001736fi
1737
Martin v. Löwis11437992002-04-12 09:54:03 +00001738ac_ext=c
1739ac_cpp='$CPP $CPPFLAGS'
1740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1742ac_compiler_gnu=$ac_cv_c_compiler_gnu
1743if test -n "$ac_tool_prefix"; then
1744 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1745set dummy ${ac_tool_prefix}gcc; ac_word=$2
1746echo "$as_me:$LINENO: checking for $ac_word" >&5
1747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1748if test "${ac_cv_prog_CC+set}" = set; then
1749 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001750else
1751 if test -n "$CC"; then
1752 ac_cv_prog_CC="$CC" # Let the user override the test.
1753else
Martin v. Löwis11437992002-04-12 09:54:03 +00001754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1755for as_dir in $PATH
1756do
1757 IFS=$as_save_IFS
1758 test -z "$as_dir" && as_dir=.
1759 for ac_exec_ext in '' $ac_executable_extensions; do
1760 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1761 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1762 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1763 break 2
1764 fi
1765done
1766done
1767
Jack Jansendd19cf82001-12-06 22:36:17 +00001768fi
1769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001770CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001771if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001772 echo "$as_me:$LINENO: result: $CC" >&5
1773echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001774else
Martin v. Löwis11437992002-04-12 09:54:03 +00001775 echo "$as_me:$LINENO: result: no" >&5
1776echo "${ECHO_T}no" >&6
1777fi
1778
1779fi
1780if test -z "$ac_cv_prog_CC"; then
1781 ac_ct_CC=$CC
1782 # Extract the first word of "gcc", so it can be a program name with args.
1783set dummy gcc; ac_word=$2
1784echo "$as_me:$LINENO: checking for $ac_word" >&5
1785echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1786if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1787 echo $ECHO_N "(cached) $ECHO_C" >&6
1788else
1789 if test -n "$ac_ct_CC"; then
1790 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1791else
1792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1793for as_dir in $PATH
1794do
1795 IFS=$as_save_IFS
1796 test -z "$as_dir" && as_dir=.
1797 for ac_exec_ext in '' $ac_executable_extensions; do
1798 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1799 ac_cv_prog_ac_ct_CC="gcc"
1800 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1801 break 2
1802 fi
1803done
1804done
1805
1806fi
1807fi
1808ac_ct_CC=$ac_cv_prog_ac_ct_CC
1809if test -n "$ac_ct_CC"; then
1810 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1811echo "${ECHO_T}$ac_ct_CC" >&6
1812else
1813 echo "$as_me:$LINENO: result: no" >&5
1814echo "${ECHO_T}no" >&6
1815fi
1816
1817 CC=$ac_ct_CC
1818else
1819 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001820fi
1821
Jack Jansendd19cf82001-12-06 22:36:17 +00001822if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 if test -n "$ac_tool_prefix"; then
1824 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1825set dummy ${ac_tool_prefix}cc; ac_word=$2
1826echo "$as_me:$LINENO: checking for $ac_word" >&5
1827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1828if test "${ac_cv_prog_CC+set}" = set; then
1829 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001830else
1831 if test -n "$CC"; then
1832 ac_cv_prog_CC="$CC" # Let the user override the test.
1833else
Martin v. Löwis11437992002-04-12 09:54:03 +00001834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1835for as_dir in $PATH
1836do
1837 IFS=$as_save_IFS
1838 test -z "$as_dir" && as_dir=.
1839 for ac_exec_ext in '' $ac_executable_extensions; do
1840 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1841 ac_cv_prog_CC="${ac_tool_prefix}cc"
1842 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1843 break 2
1844 fi
1845done
1846done
1847
1848fi
1849fi
1850CC=$ac_cv_prog_CC
1851if test -n "$CC"; then
1852 echo "$as_me:$LINENO: result: $CC" >&5
1853echo "${ECHO_T}$CC" >&6
1854else
1855 echo "$as_me:$LINENO: result: no" >&5
1856echo "${ECHO_T}no" >&6
1857fi
1858
1859fi
1860if test -z "$ac_cv_prog_CC"; then
1861 ac_ct_CC=$CC
1862 # Extract the first word of "cc", so it can be a program name with args.
1863set dummy cc; ac_word=$2
1864echo "$as_me:$LINENO: checking for $ac_word" >&5
1865echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1866if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1867 echo $ECHO_N "(cached) $ECHO_C" >&6
1868else
1869 if test -n "$ac_ct_CC"; then
1870 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1871else
1872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1873for as_dir in $PATH
1874do
1875 IFS=$as_save_IFS
1876 test -z "$as_dir" && as_dir=.
1877 for ac_exec_ext in '' $ac_executable_extensions; do
1878 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1879 ac_cv_prog_ac_ct_CC="cc"
1880 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1881 break 2
1882 fi
1883done
1884done
1885
1886fi
1887fi
1888ac_ct_CC=$ac_cv_prog_ac_ct_CC
1889if test -n "$ac_ct_CC"; then
1890 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1891echo "${ECHO_T}$ac_ct_CC" >&6
1892else
1893 echo "$as_me:$LINENO: result: no" >&5
1894echo "${ECHO_T}no" >&6
1895fi
1896
1897 CC=$ac_ct_CC
1898else
1899 CC="$ac_cv_prog_CC"
1900fi
1901
1902fi
1903if test -z "$CC"; then
1904 # Extract the first word of "cc", so it can be a program name with args.
1905set dummy cc; ac_word=$2
1906echo "$as_me:$LINENO: checking for $ac_word" >&5
1907echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1908if test "${ac_cv_prog_CC+set}" = set; then
1909 echo $ECHO_N "(cached) $ECHO_C" >&6
1910else
1911 if test -n "$CC"; then
1912 ac_cv_prog_CC="$CC" # Let the user override the test.
1913else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001914 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1916for as_dir in $PATH
1917do
1918 IFS=$as_save_IFS
1919 test -z "$as_dir" && as_dir=.
1920 for ac_exec_ext in '' $ac_executable_extensions; do
1921 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1922 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1923 ac_prog_rejected=yes
1924 continue
1925 fi
1926 ac_cv_prog_CC="cc"
1927 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1928 break 2
1929 fi
1930done
1931done
1932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001933if test $ac_prog_rejected = yes; then
1934 # We found a bogon in the path, so make sure we never use it.
1935 set dummy $ac_cv_prog_CC
1936 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001937 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001938 # We chose a different compiler from the bogus one.
1939 # However, it has the same basename, so the bogon will be chosen
1940 # first if we set CC to just the basename; use the full file name.
1941 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001942 set dummy "$as_dir/$ac_word" ${1+"$@"}
1943 shift
1944 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945 fi
1946fi
1947fi
1948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001949CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001950if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001951 echo "$as_me:$LINENO: result: $CC" >&5
1952echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001953else
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 echo "$as_me:$LINENO: result: no" >&5
1955echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956fi
1957
Martin v. Löwis11437992002-04-12 09:54:03 +00001958fi
1959if test -z "$CC"; then
1960 if test -n "$ac_tool_prefix"; then
1961 for ac_prog in cl
1962 do
1963 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1964set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1965echo "$as_me:$LINENO: checking for $ac_word" >&5
1966echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1967if test "${ac_cv_prog_CC+set}" = set; then
1968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001969else
1970 if test -n "$CC"; then
1971 ac_cv_prog_CC="$CC" # Let the user override the test.
1972else
Martin v. Löwis11437992002-04-12 09:54:03 +00001973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1974for as_dir in $PATH
1975do
1976 IFS=$as_save_IFS
1977 test -z "$as_dir" && as_dir=.
1978 for ac_exec_ext in '' $ac_executable_extensions; do
1979 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1980 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1981 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1982 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001984done
1985done
1986
1987fi
1988fi
1989CC=$ac_cv_prog_CC
1990if test -n "$CC"; then
1991 echo "$as_me:$LINENO: result: $CC" >&5
1992echo "${ECHO_T}$CC" >&6
1993else
1994 echo "$as_me:$LINENO: result: no" >&5
1995echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001996fi
1997
Martin v. Löwis11437992002-04-12 09:54:03 +00001998 test -n "$CC" && break
1999 done
2000fi
2001if test -z "$CC"; then
2002 ac_ct_CC=$CC
2003 for ac_prog in cl
2004do
2005 # Extract the first word of "$ac_prog", so it can be a program name with args.
2006set dummy $ac_prog; ac_word=$2
2007echo "$as_me:$LINENO: checking for $ac_word" >&5
2008echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2009if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2010 echo $ECHO_N "(cached) $ECHO_C" >&6
2011else
2012 if test -n "$ac_ct_CC"; then
2013 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2014else
2015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2016for as_dir in $PATH
2017do
2018 IFS=$as_save_IFS
2019 test -z "$as_dir" && as_dir=.
2020 for ac_exec_ext in '' $ac_executable_extensions; do
2021 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2022 ac_cv_prog_ac_ct_CC="$ac_prog"
2023 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2024 break 2
2025 fi
2026done
2027done
Jack Jansendd19cf82001-12-06 22:36:17 +00002028
Martin v. Löwis11437992002-04-12 09:54:03 +00002029fi
2030fi
2031ac_ct_CC=$ac_cv_prog_ac_ct_CC
2032if test -n "$ac_ct_CC"; then
2033 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2034echo "${ECHO_T}$ac_ct_CC" >&6
2035else
2036 echo "$as_me:$LINENO: result: no" >&5
2037echo "${ECHO_T}no" >&6
2038fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002039
Martin v. Löwis11437992002-04-12 09:54:03 +00002040 test -n "$ac_ct_CC" && break
2041done
Michael W. Hudson54241132001-12-07 15:38:26 +00002042
Martin v. Löwis11437992002-04-12 09:54:03 +00002043 CC=$ac_ct_CC
2044fi
2045
2046fi
2047
2048
2049test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2050echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2051 { (exit 1); exit 1; }; }
2052
2053# Provide some information about the compiler.
2054echo "$as_me:$LINENO:" \
2055 "checking for C compiler version" >&5
2056ac_compiler=`set X $ac_compile; echo $2`
2057{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2058 (eval $ac_compiler --version </dev/null >&5) 2>&5
2059 ac_status=$?
2060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2061 (exit $ac_status); }
2062{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2063 (eval $ac_compiler -v </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
2073cat >conftest.$ac_ext <<_ACEOF
2074#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002075#include "confdefs.h"
2076
Barry Warsawfe33b792003-01-07 22:42:49 +00002077#ifdef F77_DUMMY_MAIN
2078# ifdef __cplusplus
2079 extern "C"
2080# endif
2081 int F77_DUMMY_MAIN() { return 1; }
2082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002083int
2084main ()
2085{
2086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091ac_clean_files_save=$ac_clean_files
2092ac_clean_files="$ac_clean_files a.out a.exe"
2093# Try to create an executable without -o first, disregard a.out.
2094# It will help us diagnose broken compilers, and finding out an intuition
2095# of exeext.
2096echo "$as_me:$LINENO: checking for C compiler default output" >&5
2097echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2098ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2099if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2100 (eval $ac_link_default) 2>&5
2101 ac_status=$?
2102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2103 (exit $ac_status); }; then
2104 # Find the output, starting from the most likely. This scheme is
2105# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2106# resort.
2107
2108# Be careful to initialize this variable, since it used to be cached.
2109# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2110ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002111for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2112 ls a.out conftest 2>/dev/null;
2113 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002114 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002115 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002116 a.out ) # We found the default executable, but exeext='' is most
2117 # certainly right.
2118 break;;
2119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2120 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2121 export ac_cv_exeext
2122 break;;
2123 * ) break;;
2124 esac
2125done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002126else
Martin v. Löwis11437992002-04-12 09:54:03 +00002127 echo "$as_me: failed program was:" >&5
2128cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002129{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2130echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002132fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002133
Martin v. Löwis11437992002-04-12 09:54:03 +00002134ac_exeext=$ac_cv_exeext
2135echo "$as_me:$LINENO: result: $ac_file" >&5
2136echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002137
Martin v. Löwis11437992002-04-12 09:54:03 +00002138# Check the compiler produces executables we can run. If not, either
2139# the compiler is broken, or we cross compile.
2140echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2141echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2142# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2143# If not cross compiling, check that we can run a simple program.
2144if test "$cross_compiling" != yes; then
2145 if { ac_try='./$ac_file'
2146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2147 (eval $ac_try) 2>&5
2148 ac_status=$?
2149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2150 (exit $ac_status); }; }; then
2151 cross_compiling=no
2152 else
2153 if test "$cross_compiling" = maybe; then
2154 cross_compiling=yes
2155 else
2156 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2157If you meant to cross compile, use \`--host'." >&5
2158echo "$as_me: error: cannot run C compiled programs.
2159If you meant to cross compile, use \`--host'." >&2;}
2160 { (exit 1); exit 1; }; }
2161 fi
2162 fi
2163fi
2164echo "$as_me:$LINENO: result: yes" >&5
2165echo "${ECHO_T}yes" >&6
2166
2167rm -f a.out a.exe conftest$ac_cv_exeext
2168ac_clean_files=$ac_clean_files_save
2169# Check the compiler produces executables we can run. If not, either
2170# the compiler is broken, or we cross compile.
2171echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2172echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2173echo "$as_me:$LINENO: result: $cross_compiling" >&5
2174echo "${ECHO_T}$cross_compiling" >&6
2175
2176echo "$as_me:$LINENO: checking for suffix of executables" >&5
2177echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2179 (eval $ac_link) 2>&5
2180 ac_status=$?
2181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182 (exit $ac_status); }; then
2183 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2184# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2185# work properly (i.e., refer to `conftest.exe'), while it won't with
2186# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002187for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002188 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002189 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002190 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2191 export ac_cv_exeext
2192 break;;
2193 * ) break;;
2194 esac
2195done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002196else
Martin v. Löwis11437992002-04-12 09:54:03 +00002197 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2198echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2199 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002200fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202rm -f conftest$ac_cv_exeext
2203echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2204echo "${ECHO_T}$ac_cv_exeext" >&6
2205
2206rm -f conftest.$ac_ext
2207EXEEXT=$ac_cv_exeext
2208ac_exeext=$EXEEXT
2209echo "$as_me:$LINENO: checking for suffix of object files" >&5
2210echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2211if test "${ac_cv_objext+set}" = set; then
2212 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002213else
Martin v. Löwis11437992002-04-12 09:54:03 +00002214 cat >conftest.$ac_ext <<_ACEOF
2215#line $LINENO "configure"
2216#include "confdefs.h"
2217
Barry Warsawfe33b792003-01-07 22:42:49 +00002218#ifdef F77_DUMMY_MAIN
2219# ifdef __cplusplus
2220 extern "C"
2221# endif
2222 int F77_DUMMY_MAIN() { return 1; }
2223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002224int
2225main ()
2226{
2227
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232rm -f conftest.o conftest.obj
2233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2234 (eval $ac_compile) 2>&5
2235 ac_status=$?
2236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2237 (exit $ac_status); }; then
2238 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2239 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002240 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2242 break;;
2243 esac
2244done
2245else
2246 echo "$as_me: failed program was:" >&5
2247cat conftest.$ac_ext >&5
2248{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2249echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2250 { (exit 1); exit 1; }; }
2251fi
2252
2253rm -f conftest.$ac_cv_objext conftest.$ac_ext
2254fi
2255echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2256echo "${ECHO_T}$ac_cv_objext" >&6
2257OBJEXT=$ac_cv_objext
2258ac_objext=$OBJEXT
2259echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2260echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2261if test "${ac_cv_c_compiler_gnu+set}" = set; then
2262 echo $ECHO_N "(cached) $ECHO_C" >&6
2263else
2264 cat >conftest.$ac_ext <<_ACEOF
2265#line $LINENO "configure"
2266#include "confdefs.h"
2267
Barry Warsawfe33b792003-01-07 22:42:49 +00002268#ifdef F77_DUMMY_MAIN
2269# ifdef __cplusplus
2270 extern "C"
2271# endif
2272 int F77_DUMMY_MAIN() { return 1; }
2273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002274int
2275main ()
2276{
2277#ifndef __GNUC__
2278 choke me
2279#endif
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285rm -f conftest.$ac_objext
2286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2287 (eval $ac_compile) 2>&5
2288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); } &&
2291 { ac_try='test -s conftest.$ac_objext'
2292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2293 (eval $ac_try) 2>&5
2294 ac_status=$?
2295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2296 (exit $ac_status); }; }; then
2297 ac_compiler_gnu=yes
2298else
2299 echo "$as_me: failed program was:" >&5
2300cat conftest.$ac_ext >&5
2301ac_compiler_gnu=no
2302fi
2303rm -f conftest.$ac_objext conftest.$ac_ext
2304ac_cv_c_compiler_gnu=$ac_compiler_gnu
2305
2306fi
2307echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2308echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2309GCC=`test $ac_compiler_gnu = yes && echo yes`
2310ac_test_CFLAGS=${CFLAGS+set}
2311ac_save_CFLAGS=$CFLAGS
2312CFLAGS="-g"
2313echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2314echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2315if test "${ac_cv_prog_cc_g+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2317else
2318 cat >conftest.$ac_ext <<_ACEOF
2319#line $LINENO "configure"
2320#include "confdefs.h"
2321
Barry Warsawfe33b792003-01-07 22:42:49 +00002322#ifdef F77_DUMMY_MAIN
2323# ifdef __cplusplus
2324 extern "C"
2325# endif
2326 int F77_DUMMY_MAIN() { return 1; }
2327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002328int
2329main ()
2330{
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336rm -f conftest.$ac_objext
2337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2338 (eval $ac_compile) 2>&5
2339 ac_status=$?
2340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2341 (exit $ac_status); } &&
2342 { ac_try='test -s conftest.$ac_objext'
2343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2344 (eval $ac_try) 2>&5
2345 ac_status=$?
2346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2347 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002348 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002349else
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 echo "$as_me: failed program was:" >&5
2351cat conftest.$ac_ext >&5
2352ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002354rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002356echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2357echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002358if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002359 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002360elif test $ac_cv_prog_cc_g = yes; then
2361 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002362 CFLAGS="-g -O2"
2363 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002364 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365 fi
2366else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002367 if test "$GCC" = yes; then
2368 CFLAGS="-O2"
2369 else
2370 CFLAGS=
2371 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002373# Some people use a C++ compiler to compile C. Since we use `exit',
2374# in C++ we need to declare it. In case someone uses the same compiler
2375# for both compiling C and C++ we need to have the C++ compiler decide
2376# the declaration of exit, since it's the most demanding environment.
2377cat >conftest.$ac_ext <<_ACEOF
2378#ifndef __cplusplus
2379 choke me
2380#endif
2381_ACEOF
2382rm -f conftest.$ac_objext
2383if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2384 (eval $ac_compile) 2>&5
2385 ac_status=$?
2386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2387 (exit $ac_status); } &&
2388 { ac_try='test -s conftest.$ac_objext'
2389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2390 (eval $ac_try) 2>&5
2391 ac_status=$?
2392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393 (exit $ac_status); }; }; then
2394 for ac_declaration in \
2395 ''\
2396 '#include <stdlib.h>' \
2397 'extern "C" void std::exit (int) throw (); using std::exit;' \
2398 'extern "C" void std::exit (int); using std::exit;' \
2399 'extern "C" void exit (int) throw ();' \
2400 'extern "C" void exit (int);' \
2401 'void exit (int);'
2402do
2403 cat >conftest.$ac_ext <<_ACEOF
2404#line $LINENO "configure"
2405#include "confdefs.h"
2406#include <stdlib.h>
2407$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002408#ifdef F77_DUMMY_MAIN
2409# ifdef __cplusplus
2410 extern "C"
2411# endif
2412 int F77_DUMMY_MAIN() { return 1; }
2413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002414int
2415main ()
2416{
2417exit (42);
2418 ;
2419 return 0;
2420}
2421_ACEOF
2422rm -f conftest.$ac_objext
2423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2424 (eval $ac_compile) 2>&5
2425 ac_status=$?
2426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2427 (exit $ac_status); } &&
2428 { ac_try='test -s conftest.$ac_objext'
2429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2430 (eval $ac_try) 2>&5
2431 ac_status=$?
2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433 (exit $ac_status); }; }; then
2434 :
2435else
2436 echo "$as_me: failed program was:" >&5
2437cat conftest.$ac_ext >&5
2438continue
2439fi
2440rm -f conftest.$ac_objext conftest.$ac_ext
2441 cat >conftest.$ac_ext <<_ACEOF
2442#line $LINENO "configure"
2443#include "confdefs.h"
2444$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002445#ifdef F77_DUMMY_MAIN
2446# ifdef __cplusplus
2447 extern "C"
2448# endif
2449 int F77_DUMMY_MAIN() { return 1; }
2450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002451int
2452main ()
2453{
2454exit (42);
2455 ;
2456 return 0;
2457}
2458_ACEOF
2459rm -f conftest.$ac_objext
2460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2461 (eval $ac_compile) 2>&5
2462 ac_status=$?
2463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464 (exit $ac_status); } &&
2465 { ac_try='test -s conftest.$ac_objext'
2466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2467 (eval $ac_try) 2>&5
2468 ac_status=$?
2469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2470 (exit $ac_status); }; }; then
2471 break
2472else
2473 echo "$as_me: failed program was:" >&5
2474cat conftest.$ac_ext >&5
2475fi
2476rm -f conftest.$ac_objext conftest.$ac_ext
2477done
2478rm -f conftest*
2479if test -n "$ac_declaration"; then
2480 echo '#ifdef __cplusplus' >>confdefs.h
2481 echo $ac_declaration >>confdefs.h
2482 echo '#endif' >>confdefs.h
2483fi
2484
2485else
2486 echo "$as_me: failed program was:" >&5
2487cat conftest.$ac_ext >&5
2488fi
2489rm -f conftest.$ac_objext conftest.$ac_ext
2490ac_ext=c
2491ac_cpp='$CPP $CPPFLAGS'
2492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002495
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002496
2497# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002498
2499ac_ext=c
2500ac_cpp='$CPP $CPPFLAGS'
2501ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2502ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2503ac_compiler_gnu=$ac_cv_c_compiler_gnu
2504echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2505echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002506# On Suns, sometimes $CPP names a directory.
2507if test -n "$CPP" && test -d "$CPP"; then
2508 CPP=
2509fi
2510if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002511 if test "${ac_cv_prog_CPP+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002513else
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 # Double quotes because CPP needs to be expanded
2515 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2516 do
2517 ac_preproc_ok=false
2518for ac_c_preproc_warn_flag in '' yes
2519do
2520 # Use a header file that comes with gcc, so configuring glibc
2521 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002522 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 # not just through cpp. "Syntax error" is here to catch this case.
2524 cat >conftest.$ac_ext <<_ACEOF
2525#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002526#include "confdefs.h"
2527#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 Syntax error
2529_ACEOF
2530if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2531 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2532 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002533 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 rm -f conftest.er1
2535 cat conftest.err >&5
2536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2537 (exit $ac_status); } >/dev/null; then
2538 if test -s conftest.err; then
2539 ac_cpp_err=$ac_c_preproc_warn_flag
2540 else
2541 ac_cpp_err=
2542 fi
2543else
2544 ac_cpp_err=yes
2545fi
2546if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002547 :
2548else
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002550 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 # Broken: fails on valid input.
2552continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002554rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 # OK, works on sane cases. Now check whether non-existent headers
2557 # can be detected and how.
2558 cat >conftest.$ac_ext <<_ACEOF
2559#line $LINENO "configure"
2560#include "confdefs.h"
2561#include <ac_nonexistent.h>
2562_ACEOF
2563if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2564 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2565 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002566 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 rm -f conftest.er1
2568 cat conftest.err >&5
2569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } >/dev/null; then
2571 if test -s conftest.err; then
2572 ac_cpp_err=$ac_c_preproc_warn_flag
2573 else
2574 ac_cpp_err=
2575 fi
2576else
2577 ac_cpp_err=yes
2578fi
2579if test -z "$ac_cpp_err"; then
2580 # Broken: success on invalid input.
2581continue
2582else
2583 echo "$as_me: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2585 # Passes both tests.
2586ac_preproc_ok=:
2587break
2588fi
2589rm -f conftest.err conftest.$ac_ext
2590
2591done
2592# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2593rm -f conftest.err conftest.$ac_ext
2594if $ac_preproc_ok; then
2595 break
2596fi
2597
2598 done
2599 ac_cv_prog_CPP=$CPP
2600
2601fi
2602 CPP=$ac_cv_prog_CPP
2603else
2604 ac_cv_prog_CPP=$CPP
2605fi
2606echo "$as_me:$LINENO: result: $CPP" >&5
2607echo "${ECHO_T}$CPP" >&6
2608ac_preproc_ok=false
2609for ac_c_preproc_warn_flag in '' yes
2610do
2611 # Use a header file that comes with gcc, so configuring glibc
2612 # with a fresh cross-compiler works.
2613 # On the NeXT, cc -E runs the code through the compiler's parser,
2614 # not just through cpp. "Syntax error" is here to catch this case.
2615 cat >conftest.$ac_ext <<_ACEOF
2616#line $LINENO "configure"
2617#include "confdefs.h"
2618#include <assert.h>
2619 Syntax error
2620_ACEOF
2621if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2622 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2623 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002624 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 rm -f conftest.er1
2626 cat conftest.err >&5
2627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2628 (exit $ac_status); } >/dev/null; then
2629 if test -s conftest.err; then
2630 ac_cpp_err=$ac_c_preproc_warn_flag
2631 else
2632 ac_cpp_err=
2633 fi
2634else
2635 ac_cpp_err=yes
2636fi
2637if test -z "$ac_cpp_err"; then
2638 :
2639else
2640 echo "$as_me: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 # Broken: fails on valid input.
2643continue
2644fi
2645rm -f conftest.err conftest.$ac_ext
2646
2647 # OK, works on sane cases. Now check whether non-existent headers
2648 # can be detected and how.
2649 cat >conftest.$ac_ext <<_ACEOF
2650#line $LINENO "configure"
2651#include "confdefs.h"
2652#include <ac_nonexistent.h>
2653_ACEOF
2654if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2655 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2656 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002657 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 rm -f conftest.er1
2659 cat conftest.err >&5
2660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2661 (exit $ac_status); } >/dev/null; then
2662 if test -s conftest.err; then
2663 ac_cpp_err=$ac_c_preproc_warn_flag
2664 else
2665 ac_cpp_err=
2666 fi
2667else
2668 ac_cpp_err=yes
2669fi
2670if test -z "$ac_cpp_err"; then
2671 # Broken: success on invalid input.
2672continue
2673else
2674 echo "$as_me: failed program was:" >&5
2675 cat conftest.$ac_ext >&5
2676 # Passes both tests.
2677ac_preproc_ok=:
2678break
2679fi
2680rm -f conftest.err conftest.$ac_ext
2681
2682done
2683# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2684rm -f conftest.err conftest.$ac_ext
2685if $ac_preproc_ok; then
2686 :
2687else
2688 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2689echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2690 { (exit 1); exit 1; }; }
2691fi
2692
2693ac_ext=c
2694ac_cpp='$CPP $CPPFLAGS'
2695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
2698
2699
2700
2701echo "$as_me:$LINENO: checking for AIX" >&5
2702echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2703cat >conftest.$ac_ext <<_ACEOF
2704#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002705#include "confdefs.h"
2706#ifdef _AIX
2707 yes
2708#endif
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002712 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002713 echo "$as_me:$LINENO: result: yes" >&5
2714echo "${ECHO_T}yes" >&6
2715cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002716#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002717_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002718
2719else
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 echo "$as_me:$LINENO: result: no" >&5
2721echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722fi
2723rm -f conftest*
2724
Michael W. Hudson54241132001-12-07 15:38:26 +00002725
Martin v. Löwis11437992002-04-12 09:54:03 +00002726echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2727echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2728if test "${ac_cv_header_stdc+set}" = set; then
2729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002730else
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 cat >conftest.$ac_ext <<_ACEOF
2732#line $LINENO "configure"
2733#include "confdefs.h"
2734#include <stdlib.h>
2735#include <stdarg.h>
2736#include <string.h>
2737#include <float.h>
2738
2739_ACEOF
2740if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2741 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2742 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002743 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 rm -f conftest.er1
2745 cat conftest.err >&5
2746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2747 (exit $ac_status); } >/dev/null; then
2748 if test -s conftest.err; then
2749 ac_cpp_err=$ac_c_preproc_warn_flag
2750 else
2751 ac_cpp_err=
2752 fi
2753else
2754 ac_cpp_err=yes
2755fi
2756if test -z "$ac_cpp_err"; then
2757 ac_cv_header_stdc=yes
2758else
2759 echo "$as_me: failed program was:" >&5
2760 cat conftest.$ac_ext >&5
2761 ac_cv_header_stdc=no
2762fi
2763rm -f conftest.err conftest.$ac_ext
2764
2765if test $ac_cv_header_stdc = yes; then
2766 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2767 cat >conftest.$ac_ext <<_ACEOF
2768#line $LINENO "configure"
2769#include "confdefs.h"
2770#include <string.h>
2771
2772_ACEOF
2773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002774 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 :
2776else
2777 ac_cv_header_stdc=no
2778fi
2779rm -f conftest*
2780
2781fi
2782
2783if test $ac_cv_header_stdc = yes; then
2784 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2785 cat >conftest.$ac_ext <<_ACEOF
2786#line $LINENO "configure"
2787#include "confdefs.h"
2788#include <stdlib.h>
2789
2790_ACEOF
2791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002792 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 :
2794else
2795 ac_cv_header_stdc=no
2796fi
2797rm -f conftest*
2798
2799fi
2800
2801if test $ac_cv_header_stdc = yes; then
2802 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2803 if test "$cross_compiling" = yes; then
2804 :
2805else
2806 cat >conftest.$ac_ext <<_ACEOF
2807#line $LINENO "configure"
2808#include "confdefs.h"
2809#include <ctype.h>
2810#if ((' ' & 0x0FF) == 0x020)
2811# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2812# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2813#else
2814# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2815 || ('j' <= (c) && (c) <= 'r') \
2816 || ('s' <= (c) && (c) <= 'z'))
2817# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2818#endif
2819
2820#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2821int
2822main ()
2823{
2824 int i;
2825 for (i = 0; i < 256; i++)
2826 if (XOR (islower (i), ISLOWER (i))
2827 || toupper (i) != TOUPPER (i))
2828 exit(2);
2829 exit (0);
2830}
2831_ACEOF
2832rm -f conftest$ac_exeext
2833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2834 (eval $ac_link) 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2839 (eval $ac_try) 2>&5
2840 ac_status=$?
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); }; }; then
2843 :
2844else
2845 echo "$as_me: program exited with status $ac_status" >&5
2846echo "$as_me: failed program was:" >&5
2847cat conftest.$ac_ext >&5
2848( exit $ac_status )
2849ac_cv_header_stdc=no
2850fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002851rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002852fi
2853fi
2854fi
2855echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2856echo "${ECHO_T}$ac_cv_header_stdc" >&6
2857if test $ac_cv_header_stdc = yes; then
2858
2859cat >>confdefs.h <<\_ACEOF
2860#define STDC_HEADERS 1
2861_ACEOF
2862
2863fi
2864
2865# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2876 inttypes.h stdint.h unistd.h
2877do
2878as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2879echo "$as_me:$LINENO: checking for $ac_header" >&5
2880echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2881if eval "test \"\${$as_ac_Header+set}\" = set"; then
2882 echo $ECHO_N "(cached) $ECHO_C" >&6
2883else
2884 cat >conftest.$ac_ext <<_ACEOF
2885#line $LINENO "configure"
2886#include "confdefs.h"
2887$ac_includes_default
2888
2889#include <$ac_header>
2890_ACEOF
2891rm -f conftest.$ac_objext
2892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2893 (eval $ac_compile) 2>&5
2894 ac_status=$?
2895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2896 (exit $ac_status); } &&
2897 { ac_try='test -s conftest.$ac_objext'
2898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2899 (eval $ac_try) 2>&5
2900 ac_status=$?
2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902 (exit $ac_status); }; }; then
2903 eval "$as_ac_Header=yes"
2904else
2905 echo "$as_me: failed program was:" >&5
2906cat conftest.$ac_ext >&5
2907eval "$as_ac_Header=no"
2908fi
2909rm -f conftest.$ac_objext conftest.$ac_ext
2910fi
2911echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2912echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2913if test `eval echo '${'$as_ac_Header'}'` = yes; then
2914 cat >>confdefs.h <<_ACEOF
2915#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2916_ACEOF
2917
2918fi
2919
2920done
2921
2922
2923if test "${ac_cv_header_minix_config_h+set}" = set; then
2924 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2925echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2926if test "${ac_cv_header_minix_config_h+set}" = set; then
2927 echo $ECHO_N "(cached) $ECHO_C" >&6
2928fi
2929echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2930echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2931else
2932 # Is the header compilable?
2933echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2934echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2935cat >conftest.$ac_ext <<_ACEOF
2936#line $LINENO "configure"
2937#include "confdefs.h"
2938$ac_includes_default
2939#include <minix/config.h>
2940_ACEOF
2941rm -f conftest.$ac_objext
2942if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2943 (eval $ac_compile) 2>&5
2944 ac_status=$?
2945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2946 (exit $ac_status); } &&
2947 { ac_try='test -s conftest.$ac_objext'
2948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2949 (eval $ac_try) 2>&5
2950 ac_status=$?
2951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2952 (exit $ac_status); }; }; then
2953 ac_header_compiler=yes
2954else
2955 echo "$as_me: failed program was:" >&5
2956cat conftest.$ac_ext >&5
2957ac_header_compiler=no
2958fi
2959rm -f conftest.$ac_objext conftest.$ac_ext
2960echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2961echo "${ECHO_T}$ac_header_compiler" >&6
2962
2963# Is the header present?
2964echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2965echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2966cat >conftest.$ac_ext <<_ACEOF
2967#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002968#include "confdefs.h"
2969#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002970_ACEOF
2971if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2972 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2973 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002974 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 rm -f conftest.er1
2976 cat conftest.err >&5
2977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2978 (exit $ac_status); } >/dev/null; then
2979 if test -s conftest.err; then
2980 ac_cpp_err=$ac_c_preproc_warn_flag
2981 else
2982 ac_cpp_err=
2983 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002984else
Martin v. Löwis11437992002-04-12 09:54:03 +00002985 ac_cpp_err=yes
2986fi
2987if test -z "$ac_cpp_err"; then
2988 ac_header_preproc=yes
2989else
2990 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002991 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002993fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002994rm -f conftest.err conftest.$ac_ext
2995echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
2996echo "${ECHO_T}$ac_header_preproc" >&6
2997
2998# So? What about this header?
2999case $ac_header_compiler:$ac_header_preproc in
3000 yes:no )
3001 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3002echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3003 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3004echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3005 no:yes )
3006 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3007echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3008 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3009echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3011echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3012esac
3013echo "$as_me:$LINENO: checking for minix/config.h" >&5
3014echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3015if test "${ac_cv_header_minix_config_h+set}" = set; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3017else
3018 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003019fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003020echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3021echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3022
3023fi
3024if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003025 MINIX=yes
3026else
Martin v. Löwis11437992002-04-12 09:54:03 +00003027 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003028fi
3029
Martin v. Löwis11437992002-04-12 09:54:03 +00003030
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003031if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
3033cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003034#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003035_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003036
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_1_SOURCE 2
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 _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003045_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003046
3047fi
3048
3049
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003050# Check for unsupported systems
3051case $ac_sys_system/$ac_sys_release in
3052SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3053 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3054 echo See README for details.
3055 exit 1;;
3056esac
3057
3058if test "$MINIX" = yes; then
3059 echo This system \(MINIX\) is no longer supported.
3060 echo Read README for details.
3061 exit 1
3062fi
3063
Michael W. Hudson54241132001-12-07 15:38:26 +00003064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065echo "$as_me:$LINENO: checking for --with-suffix" >&5
3066echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003067
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003068# Check whether --with-suffix or --without-suffix was given.
3069if test "${with_suffix+set}" = set; then
3070 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003072 case $withval in
3073 no) EXEEXT=;;
3074 yes) EXEEXT=.exe;;
3075 *) EXEEXT=$withval;;
3076 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003077fi;
3078echo "$as_me:$LINENO: result: $EXEEXT" >&5
3079echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003080
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003081# Test whether we're running on a non-case-sensitive system, in which
3082# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003083
Martin v. Löwis11437992002-04-12 09:54:03 +00003084echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3085echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003086if test ! -d CaseSensitiveTestDir; then
3087mkdir CaseSensitiveTestDir
3088fi
3089
3090if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003091then
Martin v. Löwis11437992002-04-12 09:54:03 +00003092 echo "$as_me:$LINENO: result: yes" >&5
3093echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003094 BUILDEXEEXT=.exe
3095else
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 echo "$as_me:$LINENO: result: no" >&5
3097echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003098 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003099fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003100rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003101
Guido van Rossumdd997f71998-10-07 19:58:26 +00003102case $MACHDEP in
3103bsdos*)
3104 case $CC in
3105 gcc) CC="$CC -D_HAVE_BSDI";;
3106 esac;;
3107esac
3108
Guido van Rossum24b1e751997-08-21 02:29:16 +00003109case $ac_sys_system in
3110hp*|HP*)
3111 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003112 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003113 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003114Monterey*)
3115 case $CC in
3116 cc) CC="$CC -Wl,-Bexport";;
3117 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003118SunOS*)
3119 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003120
3121cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003122#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003123_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003124
3125 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003126esac
3127
Michael W. Hudson54241132001-12-07 15:38:26 +00003128
3129
Martin v. Löwis11437992002-04-12 09:54:03 +00003130echo "$as_me:$LINENO: checking LIBRARY" >&5
3131echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003132if test -z "$LIBRARY"
3133then
3134 LIBRARY='libpython$(VERSION).a'
3135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003136echo "$as_me:$LINENO: result: $LIBRARY" >&5
3137echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003138
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003139# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003140# name of the library into which to insert object files). BLDLIBRARY is also
3141# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3142# is blank as the main program is not linked directly against LDLIBRARY.
3143# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3144# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3145# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3146# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003147#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003148# RUNSHARED is used to run shared python without installed libraries
3149#
3150# INSTSONAME is the name of the shared library that will be use to install
3151# on the system - some systems like version suffix, others don't
3152
3153
Michael W. Hudson54241132001-12-07 15:38:26 +00003154
3155
3156
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003157
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003158LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003159BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003160INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003161DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003162LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003164
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003165# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003166# If CXX is set, and if it is needed to link a main function that was
3167# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3168# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003169# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003170# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003171
Martin v. Löwis11437992002-04-12 09:54:03 +00003172echo "$as_me:$LINENO: checking LINKCC" >&5
3173echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003174if test -z "$LINKCC"
3175then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003176 if test -z "$CXX"; then
3177 LINKCC="\$(PURIFY) \$(CC)"
3178 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003179 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003180 $CXX -c conftest.$ac_ext 2>&5
3181 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3182 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3183 then
3184 LINKCC="\$(PURIFY) \$(CC)"
3185 else
3186 LINKCC="\$(PURIFY) \$(CXX)"
3187 fi
3188 rm -fr conftest*
3189 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003190 case $ac_sys_system in
3191 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003192 exp_extra="\"\""
3193 if test $ac_sys_release -ge 5 -o \
3194 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3195 exp_extra="."
3196 fi
3197 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003198 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003199 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003200 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003201 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003202 esac
3203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003204echo "$as_me:$LINENO: result: $LINKCC" >&5
3205echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003206
Martin v. Löwis11437992002-04-12 09:54:03 +00003207echo "$as_me:$LINENO: checking for --enable-shared" >&5
3208echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003209# Check whether --enable-shared or --disable-shared was given.
3210if test "${enable_shared+set}" = set; then
3211 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003212
Martin v. Löwis11437992002-04-12 09:54:03 +00003213fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003214
3215if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003216then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003217 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003218 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003219 enable_shared="yes";;
3220 *)
3221 enable_shared="no";;
3222 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003224echo "$as_me:$LINENO: result: $enable_shared" >&5
3225echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003226
3227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3229echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003230
Guido van Rossumb8552162001-09-05 14:58:11 +00003231# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3232# library that we build, but we do not want to link against it (we
3233# will find it with a -framework option). For this reason there is an
3234# extra variable BLDLIBRARY against which Python and the extension
3235# modules are linked, BLDLIBRARY. This is normally the same as
3236# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003237if test "$enable_framework"
3238then
3239 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3240 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3241 BLDLIBRARY=''
3242else
3243 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003244fi
Jack Jansene578a632001-08-15 01:27:14 +00003245
Martin v. Löwis1142de32002-03-29 16:28:31 +00003246# Other platforms follow
3247if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003248
3249cat >>confdefs.h <<\_ACEOF
3250#define Py_ENABLE_SHARED 1
3251_ACEOF
3252
Martin v. Löwis1142de32002-03-29 16:28:31 +00003253 case $ac_sys_system in
3254 BeOS*)
3255 LDLIBRARY='libpython$(VERSION).so'
3256 ;;
3257 CYGWIN*)
3258 LDLIBRARY='libpython$(VERSION).dll.a'
3259 DLLLIBRARY='libpython$(VERSION).dll'
3260 ;;
3261 SunOS*)
3262 LDLIBRARY='libpython$(VERSION).so'
3263 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3264 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3265 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003266 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003267 LDLIBRARY='libpython$(VERSION).so'
3268 BLDLIBRARY='-L. -lpython$(VERSION)'
3269 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3270 INSTSONAME="$LDLIBRARY".$SOVERSION
3271 ;;
3272 hp*|HP*)
3273 LDLIBRARY='libpython$(VERSION).sl'
3274 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3275 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3276 ;;
3277 OSF*)
3278 LDLIBRARY='libpython$(VERSION).so'
3279 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3280 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3281 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003282 atheos*)
3283 LDLIBRARY='libpython$(VERSION).so'
3284 BLDLIBRARY='-L. -lpython$(VERSION)'
3285 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3286 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003287 esac
3288 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3289 case $MACHDEP in
3290 dguxR4)
3291 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003292 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003293 ;;
3294 esac
3295fi
3296
Martin v. Löwis11437992002-04-12 09:54:03 +00003297echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3298echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003299
Martin v. Löwis11437992002-04-12 09:54:03 +00003300if test -n "$ac_tool_prefix"; then
3301 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3302set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3303echo "$as_me:$LINENO: checking for $ac_word" >&5
3304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3305if test "${ac_cv_prog_RANLIB+set}" = set; then
3306 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307else
3308 if test -n "$RANLIB"; then
3309 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3310else
Martin v. Löwis11437992002-04-12 09:54:03 +00003311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3312for as_dir in $PATH
3313do
3314 IFS=$as_save_IFS
3315 test -z "$as_dir" && as_dir=.
3316 for ac_exec_ext in '' $ac_executable_extensions; do
3317 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3318 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3319 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3320 break 2
3321 fi
3322done
3323done
3324
Guido van Rossum627b2d71993-12-24 10:39:16 +00003325fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003327RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003329 echo "$as_me:$LINENO: result: $RANLIB" >&5
3330echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 echo "$as_me:$LINENO: result: no" >&5
3333echo "${ECHO_T}no" >&6
3334fi
3335
3336fi
3337if test -z "$ac_cv_prog_RANLIB"; then
3338 ac_ct_RANLIB=$RANLIB
3339 # Extract the first word of "ranlib", so it can be a program name with args.
3340set dummy ranlib; ac_word=$2
3341echo "$as_me:$LINENO: checking for $ac_word" >&5
3342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3343if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3344 echo $ECHO_N "(cached) $ECHO_C" >&6
3345else
3346 if test -n "$ac_ct_RANLIB"; then
3347 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3348else
3349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3350for as_dir in $PATH
3351do
3352 IFS=$as_save_IFS
3353 test -z "$as_dir" && as_dir=.
3354 for ac_exec_ext in '' $ac_executable_extensions; do
3355 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3356 ac_cv_prog_ac_ct_RANLIB="ranlib"
3357 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3358 break 2
3359 fi
3360done
3361done
3362
3363 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3364fi
3365fi
3366ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3367if test -n "$ac_ct_RANLIB"; then
3368 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3369echo "${ECHO_T}$ac_ct_RANLIB" >&6
3370else
3371 echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6
3373fi
3374
3375 RANLIB=$ac_ct_RANLIB
3376else
3377 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003379
3380
Guido van Rossum7f43da71994-08-01 12:15:30 +00003381for ac_prog in ar aal
3382do
Martin v. Löwis11437992002-04-12 09:54:03 +00003383 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003384set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003385echo "$as_me:$LINENO: checking for $ac_word" >&5
3386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387if test "${ac_cv_prog_AR+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389else
3390 if test -n "$AR"; then
3391 ac_cv_prog_AR="$AR" # Let the user override the test.
3392else
Martin v. Löwis11437992002-04-12 09:54:03 +00003393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
3398 for ac_exec_ext in '' $ac_executable_extensions; do
3399 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3400 ac_cv_prog_AR="$ac_prog"
3401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3402 break 2
3403 fi
3404done
3405done
3406
Guido van Rossum7f43da71994-08-01 12:15:30 +00003407fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003409AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 echo "$as_me:$LINENO: result: $AR" >&5
3412echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003413else
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 echo "$as_me:$LINENO: result: no" >&5
3415echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003416fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003417
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003419done
3420test -n "$AR" || AR="ar"
3421
Michael W. Hudson54241132001-12-07 15:38:26 +00003422
Neil Schemenauera42c8272001-03-31 00:01:55 +00003423case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003424bsdos*|hp*|HP*)
3425 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003426 if test -z "$INSTALL"
3427 then
3428 INSTALL="${srcdir}/install-sh -c"
3429 fi
3430esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003431ac_aux_dir=
3432for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3433 if test -f $ac_dir/install-sh; then
3434 ac_aux_dir=$ac_dir
3435 ac_install_sh="$ac_aux_dir/install-sh -c"
3436 break
3437 elif test -f $ac_dir/install.sh; then
3438 ac_aux_dir=$ac_dir
3439 ac_install_sh="$ac_aux_dir/install.sh -c"
3440 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 elif test -f $ac_dir/shtool; then
3442 ac_aux_dir=$ac_dir
3443 ac_install_sh="$ac_aux_dir/shtool install -c"
3444 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003445 fi
3446done
3447if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3449echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3450 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003451fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003452ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3453ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3454ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003455
3456# Find a good install program. We prefer a C program (faster),
3457# so one script is as good as another. But avoid the broken or
3458# incompatible versions:
3459# SysV /etc/install, /usr/sbin/install
3460# SunOS /usr/etc/install
3461# IRIX /sbin/install
3462# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003463# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3465# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3466# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3467# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003468echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3469echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003470if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003471if test "${ac_cv_path_install+set}" = set; then
3472 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003473else
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3475for as_dir in $PATH
3476do
3477 IFS=$as_save_IFS
3478 test -z "$as_dir" && as_dir=.
3479 # Account for people who put trailing slashes in PATH elements.
3480case $as_dir/ in
3481 ./ | .// | /cC/* | \
3482 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3483 /usr/ucb/* ) ;;
3484 *)
3485 # OSF1 and SCO ODT 3.0 have their own names for install.
3486 # Don't use installbsd from OSF since it installs stuff as root
3487 # by default.
3488 for ac_prog in ginstall scoinst install; do
3489 for ac_exec_ext in '' $ac_executable_extensions; do
3490 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3491 if test $ac_prog = install &&
3492 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3493 # AIX install. It has an incompatible calling convention.
3494 :
3495 elif test $ac_prog = install &&
3496 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3497 # program-specific install script used by HP pwplus--don't use.
3498 :
3499 else
3500 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3501 break 3
3502 fi
3503 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003504 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 done
3506 ;;
3507esac
3508done
3509
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003510
3511fi
3512 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003514 else
3515 # As a last resort, use the slow shell script. We don't cache a
3516 # path for INSTALL within a source directory, because that will
3517 # break other packages using the cache if that directory is
3518 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003520 fi
3521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522echo "$as_me:$LINENO: result: $INSTALL" >&5
3523echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524
3525# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3526# It thinks the first close brace ends the variable substitution.
3527test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003530
3531test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3532
Michael W. Hudson54241132001-12-07 15:38:26 +00003533
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003534# Not every filesystem supports hard links
3535
3536if test -z "$LN" ; then
3537 case $ac_sys_system in
3538 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003539 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003540 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003541 *) LN=ln;;
3542 esac
3543fi
3544
Fred Drake109d9862001-07-11 06:27:56 +00003545# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003546echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3547echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3548
Fred Drake109d9862001-07-11 06:27:56 +00003549# Check whether --with-pydebug or --without-pydebug was given.
3550if test "${with_pydebug+set}" = set; then
3551 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Fred Drake109d9862001-07-11 06:27:56 +00003553if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003554then
3555
3556cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003557#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003558_ACEOF
3559
3560 echo "$as_me:$LINENO: result: yes" >&5
3561echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003562 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else echo "$as_me:$LINENO: result: no" >&5
3564echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003565fi
3566else
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 echo "$as_me:$LINENO: result: no" >&5
3568echo "${ECHO_T}no" >&6
3569fi;
Fred Drake109d9862001-07-11 06:27:56 +00003570
Skip Montanarodecc6a42003-01-01 20:07:49 +00003571# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3572# merged with this chunk of code?
3573
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003574# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575# ------------------------
3576# (The following bit of code is complicated enough - please keep things
3577# indented properly. Just pretend you're editing Python code. ;-)
3578
3579# There are two parallel sets of case statements below, one that checks to
3580# see if OPT was set and one that does BASECFLAGS setting based upon
3581# compiler and platform. BASECFLAGS tweaks need to be made even if the
3582# user set OPT.
3583
3584# tweak OPT based on compiler and platform, only if the user didn't set
3585# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003586
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003587if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003588then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589 case $GCC in
3590 yes)
3591 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003592 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003593 if test "$Py_DEBUG" = 'true' ; then
3594 # Optimization messes up debuggers, so turn it off for
3595 # debug builds.
3596 OPT="-g -Wall -Wstrict-prototypes"
3597 else
3598 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003599 fi
3600 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003601 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003602 OPT="-O3 -Wall -Wstrict-prototypes"
3603 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003604 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003605 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3607 ;;
3608 esac
Fred Drake109d9862001-07-11 06:27:56 +00003609 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003611 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003612 OPT="-O"
3613 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003614 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003615
3616 # The current (beta) Monterey compiler dies with optimizations
3617 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003618 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619 Monterey*)
3620 OPT=""
3621 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003622 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003623
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003624fi
3625
Skip Montanarodecc6a42003-01-01 20:07:49 +00003626
3627# tweak BASECFLAGS based on compiler and platform
3628case $GCC in
3629yes)
3630 case $ac_sys_system in
3631 SCO_SV*)
3632 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3633 ;;
3634 # is there any other compiler on Darwin besides gcc?
3635 Darwin*)
3636 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3637 ;;
3638 esac
3639 ;;
3640
3641*)
3642 case $ac_sys_system in
3643 OpenUNIX*|UnixWare*)
3644 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3645 ;;
3646 SCO_SV*)
3647 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3648 ;;
3649 esac
3650 ;;
3651esac
3652
Fred Drakee1ceaa02001-12-04 20:55:47 +00003653if test "$Py_DEBUG" = 'true'; then
3654 :
3655else
3656 OPT="-DNDEBUG $OPT"
3657fi
3658
Guido van Rossum563e7081996-09-10 18:20:48 +00003659if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003660then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003661 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003662fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3665echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3666if test "${ac_cv_opt_olimit_ok+set}" = set; then
3667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003668else
3669 ac_save_cc="$CC"
3670CC="$CC -OPT:Olimit=0"
3671if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003672 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003673else
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 cat >conftest.$ac_ext <<_ACEOF
3675#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003676#include "confdefs.h"
3677int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003678_ACEOF
3679rm -f conftest$ac_exeext
3680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3681 (eval $ac_link) 2>&5
3682 ac_status=$?
3683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3686 (eval $ac_try) 2>&5
3687 ac_status=$?
3688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3689 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003690 ac_cv_opt_olimit_ok=yes
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 echo "$as_me: program exited with status $ac_status" >&5
3693echo "$as_me: failed program was:" >&5
3694cat conftest.$ac_ext >&5
3695( exit $ac_status )
3696ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003697fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003698rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003699fi
Guido van Rossum91922671997-10-09 20:24:13 +00003700CC="$ac_save_cc"
3701fi
3702
Martin v. Löwis11437992002-04-12 09:54:03 +00003703echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3704echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003705if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003706 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003707 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3708 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3709 # environment?
3710 Darwin*)
3711 ;;
3712 *)
3713 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3714 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003715 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003716else
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3718echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3719 if test "${ac_cv_olimit_ok+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003721else
3722 ac_save_cc="$CC"
3723 CC="$CC -Olimit 1500"
3724 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003725 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003726else
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 cat >conftest.$ac_ext <<_ACEOF
3728#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003729#include "confdefs.h"
3730int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731_ACEOF
3732rm -f conftest$ac_exeext
3733if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3734 (eval $ac_link) 2>&5
3735 ac_status=$?
3736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3737 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3739 (eval $ac_try) 2>&5
3740 ac_status=$?
3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3742 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003743 ac_cv_olimit_ok=yes
3744else
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 echo "$as_me: program exited with status $ac_status" >&5
3746echo "$as_me: failed program was:" >&5
3747cat conftest.$ac_ext >&5
3748( exit $ac_status )
3749ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003750fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003751rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003752fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003753 CC="$ac_save_cc"
3754fi
3755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3757echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003758 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003759 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003760 fi
3761fi
3762
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003763# On some compilers, pthreads are available without further options
3764# (e.g. MacOS X). On some of these systems, the compiler will not
3765# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3766# So we have to see first whether pthreads are available without
3767# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003768echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3769echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3770if test "${ac_cv_pthread_is_default+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003772else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003773 if test "$cross_compiling" = yes; then
3774 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003775else
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 cat >conftest.$ac_ext <<_ACEOF
3777#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003778#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003779
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003781
3782void* routine(void* p){return NULL;}
3783
3784int main(){
3785 pthread_t p;
3786 if(pthread_create(&p,NULL,routine,NULL)!=0)
3787 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003788 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003789 return 0;
3790}
3791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792_ACEOF
3793rm -f conftest$ac_exeext
3794if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3795 (eval $ac_link) 2>&5
3796 ac_status=$?
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3800 (eval $ac_try) 2>&5
3801 ac_status=$?
3802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3803 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003804 ac_cv_pthread_is_default=yes
3805else
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 echo "$as_me: program exited with status $ac_status" >&5
3807echo "$as_me: failed program was:" >&5
3808cat conftest.$ac_ext >&5
3809( exit $ac_status )
3810ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003811fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003812rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003813fi
3814
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815fi
3816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3818echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003819
Michael W. Hudson54241132001-12-07 15:38:26 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003822then
3823 ac_cv_kpthread=no
3824else
3825# -Kpthread, if available, provides the right #defines
3826# and linker options to make pthread_create available
3827# Some compilers won't report that they do not support -Kpthread,
3828# so we need to run a program to see whether it really made the
3829# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003830echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3831echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3832if test "${ac_cv_kpthread+set}" = set; then
3833 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003834else
3835 ac_save_cc="$CC"
3836CC="$CC -Kpthread"
3837if test "$cross_compiling" = yes; then
3838 ac_cv_kpthread=no
3839else
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 cat >conftest.$ac_ext <<_ACEOF
3841#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842#include "confdefs.h"
3843
3844#include <pthread.h>
3845
3846void* routine(void* p){return NULL;}
3847
3848int main(){
3849 pthread_t p;
3850 if(pthread_create(&p,NULL,routine,NULL)!=0)
3851 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003852 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003853 return 0;
3854}
3855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856_ACEOF
3857rm -f conftest$ac_exeext
3858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3859 (eval $ac_link) 2>&5
3860 ac_status=$?
3861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3864 (eval $ac_try) 2>&5
3865 ac_status=$?
3866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3867 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003868 ac_cv_kpthread=yes
3869else
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 echo "$as_me: program exited with status $ac_status" >&5
3871echo "$as_me: failed program was:" >&5
3872cat conftest.$ac_ext >&5
3873( exit $ac_status )
3874ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003875fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003876rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003877fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003878CC="$ac_save_cc"
3879fi
3880
Martin v. Löwis11437992002-04-12 09:54:03 +00003881echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3882echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003883fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003884
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003885if test $ac_cv_kpthread = no
3886then
3887# -Kthread, if available, provides the right #defines
3888# and linker options to make pthread_create available
3889# Some compilers won't report that they do not support -Kthread,
3890# so we need to run a program to see whether it really made the
3891# function available.
3892echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3893echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3894if test "${ac_cv_kthread+set}" = set; then
3895 echo $ECHO_N "(cached) $ECHO_C" >&6
3896else
3897 ac_save_cc="$CC"
3898CC="$CC -Kthread"
3899if test "$cross_compiling" = yes; then
3900 ac_cv_kthread=no
3901else
3902 cat >conftest.$ac_ext <<_ACEOF
3903#line $LINENO "configure"
3904#include "confdefs.h"
3905
3906#include <pthread.h>
3907
3908void* routine(void* p){return NULL;}
3909
3910int main(){
3911 pthread_t p;
3912 if(pthread_create(&p,NULL,routine,NULL)!=0)
3913 return 1;
3914 (void)pthread_detach(p);
3915 return 0;
3916}
3917
3918_ACEOF
3919rm -f conftest$ac_exeext
3920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3921 (eval $ac_link) 2>&5
3922 ac_status=$?
3923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3924 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3926 (eval $ac_try) 2>&5
3927 ac_status=$?
3928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3929 (exit $ac_status); }; }; then
3930 ac_cv_kthread=yes
3931else
3932 echo "$as_me: program exited with status $ac_status" >&5
3933echo "$as_me: failed program was:" >&5
3934cat conftest.$ac_ext >&5
3935( exit $ac_status )
3936ac_cv_kthread=no
3937fi
3938rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3939fi
3940CC="$ac_save_cc"
3941fi
3942
3943echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3944echo "${ECHO_T}$ac_cv_kthread" >&6
3945fi
3946
Michael W. Hudson54241132001-12-07 15:38:26 +00003947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003948# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003949echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3950echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3951if test "${ac_cv_header_stdc+set}" = set; then
3952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953else
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 cat >conftest.$ac_ext <<_ACEOF
3955#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003956#include "confdefs.h"
3957#include <stdlib.h>
3958#include <stdarg.h>
3959#include <string.h>
3960#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003961
3962_ACEOF
3963if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3964 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3965 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003966 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 rm -f conftest.er1
3968 cat conftest.err >&5
3969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3970 (exit $ac_status); } >/dev/null; then
3971 if test -s conftest.err; then
3972 ac_cpp_err=$ac_c_preproc_warn_flag
3973 else
3974 ac_cpp_err=
3975 fi
3976else
3977 ac_cpp_err=yes
3978fi
3979if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980 ac_cv_header_stdc=yes
3981else
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003983 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984 ac_cv_header_stdc=no
3985fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003986rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987
3988if test $ac_cv_header_stdc = yes; then
3989 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 cat >conftest.$ac_ext <<_ACEOF
3991#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992#include "confdefs.h"
3993#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003994
3995_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00003997 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998 :
3999else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 ac_cv_header_stdc=no
4001fi
4002rm -f conftest*
4003
4004fi
4005
4006if test $ac_cv_header_stdc = yes; then
4007 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 cat >conftest.$ac_ext <<_ACEOF
4009#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010#include "confdefs.h"
4011#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004012
4013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004015 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016 :
4017else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018 ac_cv_header_stdc=no
4019fi
4020rm -f conftest*
4021
4022fi
4023
4024if test $ac_cv_header_stdc = yes; then
4025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004026 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004027 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 cat >conftest.$ac_ext <<_ACEOF
4030#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004031#include "confdefs.h"
4032#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004033#if ((' ' & 0x0FF) == 0x020)
4034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4036#else
4037# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4038 || ('j' <= (c) && (c) <= 'r') \
4039 || ('s' <= (c) && (c) <= 'z'))
4040# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4041#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004042
Martin v. Löwis11437992002-04-12 09:54:03 +00004043#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4044int
4045main ()
4046{
4047 int i;
4048 for (i = 0; i < 256; i++)
4049 if (XOR (islower (i), ISLOWER (i))
4050 || toupper (i) != TOUPPER (i))
4051 exit(2);
4052 exit (0);
4053}
4054_ACEOF
4055rm -f conftest$ac_exeext
4056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4057 (eval $ac_link) 2>&5
4058 ac_status=$?
4059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4062 (eval $ac_try) 2>&5
4063 ac_status=$?
4064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4065 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066 :
4067else
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 echo "$as_me: program exited with status $ac_status" >&5
4069echo "$as_me: failed program was:" >&5
4070cat conftest.$ac_ext >&5
4071( exit $ac_status )
4072ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004074rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004075fi
4076fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004077fi
4078echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4079echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004080if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004081
4082cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085
4086fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004125
Barry Warsawfe33b792003-01-07 22:42:49 +00004126
Martin v. Löwis11437992002-04-12 09:54:03 +00004127for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004128libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004129signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4130unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004131sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004132sys/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 +00004133sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004134sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004135do
Martin v. Löwis11437992002-04-12 09:54:03 +00004136as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4137if eval "test \"\${$as_ac_Header+set}\" = set"; then
4138 echo "$as_me:$LINENO: checking for $ac_header" >&5
4139echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4140if eval "test \"\${$as_ac_Header+set}\" = set"; then
4141 echo $ECHO_N "(cached) $ECHO_C" >&6
4142fi
4143echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4144echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145else
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 # Is the header compilable?
4147echo "$as_me:$LINENO: checking $ac_header usability" >&5
4148echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4149cat >conftest.$ac_ext <<_ACEOF
4150#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004151#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004152$ac_includes_default
4153#include <$ac_header>
4154_ACEOF
4155rm -f conftest.$ac_objext
4156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4157 (eval $ac_compile) 2>&5
4158 ac_status=$?
4159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160 (exit $ac_status); } &&
4161 { ac_try='test -s conftest.$ac_objext'
4162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4163 (eval $ac_try) 2>&5
4164 ac_status=$?
4165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4166 (exit $ac_status); }; }; then
4167 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004168else
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 echo "$as_me: failed program was:" >&5
4170cat conftest.$ac_ext >&5
4171ac_header_compiler=no
4172fi
4173rm -f conftest.$ac_objext conftest.$ac_ext
4174echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4175echo "${ECHO_T}$ac_header_compiler" >&6
4176
4177# Is the header present?
4178echo "$as_me:$LINENO: checking $ac_header presence" >&5
4179echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4180cat >conftest.$ac_ext <<_ACEOF
4181#line $LINENO "configure"
4182#include "confdefs.h"
4183#include <$ac_header>
4184_ACEOF
4185if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4186 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4187 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004188 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 rm -f conftest.er1
4190 cat conftest.err >&5
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); } >/dev/null; then
4193 if test -s conftest.err; then
4194 ac_cpp_err=$ac_c_preproc_warn_flag
4195 else
4196 ac_cpp_err=
4197 fi
4198else
4199 ac_cpp_err=yes
4200fi
4201if test -z "$ac_cpp_err"; then
4202 ac_header_preproc=yes
4203else
4204 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004205 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208rm -f conftest.err conftest.$ac_ext
4209echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4210echo "${ECHO_T}$ac_header_preproc" >&6
4211
4212# So? What about this header?
4213case $ac_header_compiler:$ac_header_preproc in
4214 yes:no )
4215 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4216echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4217 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4218echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4219 no:yes )
4220 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4221echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4222 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4223echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4224 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4225echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4226esac
4227echo "$as_me:$LINENO: checking for $ac_header" >&5
4228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4229if eval "test \"\${$as_ac_Header+set}\" = set"; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004231else
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4235echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4236
4237fi
4238if test `eval echo '${'$as_ac_Header'}'` = yes; then
4239 cat >>confdefs.h <<_ACEOF
4240#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4241_ACEOF
4242
4243fi
4244
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245done
4246
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
4248
4249
4250
4251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004253for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4254 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4255echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4256echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4257if eval "test \"\${$as_ac_Header+set}\" = set"; then
4258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259else
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 cat >conftest.$ac_ext <<_ACEOF
4261#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262#include "confdefs.h"
4263#include <sys/types.h>
4264#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004265
Barry Warsawfe33b792003-01-07 22:42:49 +00004266#ifdef F77_DUMMY_MAIN
4267# ifdef __cplusplus
4268 extern "C"
4269# endif
4270 int F77_DUMMY_MAIN() { return 1; }
4271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004272int
4273main ()
4274{
4275if ((DIR *) 0)
4276return 0;
4277 ;
4278 return 0;
4279}
4280_ACEOF
4281rm -f conftest.$ac_objext
4282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4283 (eval $ac_compile) 2>&5
4284 ac_status=$?
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4286 (exit $ac_status); } &&
4287 { ac_try='test -s conftest.$ac_objext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
4293 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004294else
Martin v. Löwis11437992002-04-12 09:54:03 +00004295 echo "$as_me: failed program was:" >&5
4296cat conftest.$ac_ext >&5
4297eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004298fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004299rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004301echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4302echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4303if test `eval echo '${'$as_ac_Header'}'` = yes; then
4304 cat >>confdefs.h <<_ACEOF
4305#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4306_ACEOF
4307
4308ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311done
4312# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4313if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4315echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4316if test "${ac_cv_search_opendir+set}" = set; then
4317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318else
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 ac_func_search_save_LIBS=$LIBS
4320ac_cv_search_opendir=no
4321cat >conftest.$ac_ext <<_ACEOF
4322#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004325/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004326#ifdef __cplusplus
4327extern "C"
4328#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004329/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004330 builtin and then its argument prototype would still apply. */
4331char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004332#ifdef F77_DUMMY_MAIN
4333# ifdef __cplusplus
4334 extern "C"
4335# endif
4336 int F77_DUMMY_MAIN() { return 1; }
4337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004338int
4339main ()
4340{
4341opendir ();
4342 ;
4343 return 0;
4344}
4345_ACEOF
4346rm -f conftest.$ac_objext conftest$ac_exeext
4347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4348 (eval $ac_link) 2>&5
4349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); } &&
4352 { ac_try='test -s conftest$ac_exeext'
4353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
4358 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359else
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 echo "$as_me: failed program was:" >&5
4361cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004363rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4364if test "$ac_cv_search_opendir" = no; then
4365 for ac_lib in dir; do
4366 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4367 cat >conftest.$ac_ext <<_ACEOF
4368#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004370
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004372#ifdef __cplusplus
4373extern "C"
4374#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004376 builtin and then its argument prototype would still apply. */
4377char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004378#ifdef F77_DUMMY_MAIN
4379# ifdef __cplusplus
4380 extern "C"
4381# endif
4382 int F77_DUMMY_MAIN() { return 1; }
4383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004384int
4385main ()
4386{
4387opendir ();
4388 ;
4389 return 0;
4390}
4391_ACEOF
4392rm -f conftest.$ac_objext conftest$ac_exeext
4393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4394 (eval $ac_link) 2>&5
4395 ac_status=$?
4396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4397 (exit $ac_status); } &&
4398 { ac_try='test -s conftest$ac_exeext'
4399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4400 (eval $ac_try) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); }; }; then
4404 ac_cv_search_opendir="-l$ac_lib"
4405break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406else
Martin v. Löwis11437992002-04-12 09:54:03 +00004407 echo "$as_me: failed program was:" >&5
4408cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004410rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4411 done
4412fi
4413LIBS=$ac_func_search_save_LIBS
4414fi
4415echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4416echo "${ECHO_T}$ac_cv_search_opendir" >&6
4417if test "$ac_cv_search_opendir" != no; then
4418 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421
Michael W. Hudson54241132001-12-07 15:38:26 +00004422else
Martin v. Löwis11437992002-04-12 09:54:03 +00004423 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4424echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4425if test "${ac_cv_search_opendir+set}" = set; then
4426 echo $ECHO_N "(cached) $ECHO_C" >&6
4427else
4428 ac_func_search_save_LIBS=$LIBS
4429ac_cv_search_opendir=no
4430cat >conftest.$ac_ext <<_ACEOF
4431#line $LINENO "configure"
4432#include "confdefs.h"
4433
4434/* Override any gcc2 internal prototype to avoid an error. */
4435#ifdef __cplusplus
4436extern "C"
4437#endif
4438/* We use char because int might match the return type of a gcc2
4439 builtin and then its argument prototype would still apply. */
4440char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004441#ifdef F77_DUMMY_MAIN
4442# ifdef __cplusplus
4443 extern "C"
4444# endif
4445 int F77_DUMMY_MAIN() { return 1; }
4446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004447int
4448main ()
4449{
4450opendir ();
4451 ;
4452 return 0;
4453}
4454_ACEOF
4455rm -f conftest.$ac_objext conftest$ac_exeext
4456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4457 (eval $ac_link) 2>&5
4458 ac_status=$?
4459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4460 (exit $ac_status); } &&
4461 { ac_try='test -s conftest$ac_exeext'
4462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4463 (eval $ac_try) 2>&5
4464 ac_status=$?
4465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4466 (exit $ac_status); }; }; then
4467 ac_cv_search_opendir="none required"
4468else
4469 echo "$as_me: failed program was:" >&5
4470cat conftest.$ac_ext >&5
4471fi
4472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473if test "$ac_cv_search_opendir" = no; then
4474 for ac_lib in x; do
4475 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4476 cat >conftest.$ac_ext <<_ACEOF
4477#line $LINENO "configure"
4478#include "confdefs.h"
4479
4480/* Override any gcc2 internal prototype to avoid an error. */
4481#ifdef __cplusplus
4482extern "C"
4483#endif
4484/* We use char because int might match the return type of a gcc2
4485 builtin and then its argument prototype would still apply. */
4486char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004487#ifdef F77_DUMMY_MAIN
4488# ifdef __cplusplus
4489 extern "C"
4490# endif
4491 int F77_DUMMY_MAIN() { return 1; }
4492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004493int
4494main ()
4495{
4496opendir ();
4497 ;
4498 return 0;
4499}
4500_ACEOF
4501rm -f conftest.$ac_objext conftest$ac_exeext
4502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4503 (eval $ac_link) 2>&5
4504 ac_status=$?
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 (exit $ac_status); } &&
4507 { ac_try='test -s conftest$ac_exeext'
4508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4509 (eval $ac_try) 2>&5
4510 ac_status=$?
4511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4512 (exit $ac_status); }; }; then
4513 ac_cv_search_opendir="-l$ac_lib"
4514break
4515else
4516 echo "$as_me: failed program was:" >&5
4517cat conftest.$ac_ext >&5
4518fi
4519rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4520 done
4521fi
4522LIBS=$ac_func_search_save_LIBS
4523fi
4524echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4525echo "${ECHO_T}$ac_cv_search_opendir" >&6
4526if test "$ac_cv_search_opendir" != no; then
4527 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529fi
4530
4531fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004532
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004533echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4534echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4535if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4536 echo $ECHO_N "(cached) $ECHO_C" >&6
4537else
4538 cat >conftest.$ac_ext <<_ACEOF
4539#line $LINENO "configure"
4540#include "confdefs.h"
4541#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004542#ifdef F77_DUMMY_MAIN
4543# ifdef __cplusplus
4544 extern "C"
4545# endif
4546 int F77_DUMMY_MAIN() { return 1; }
4547#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004548int
4549main ()
4550{
4551return makedev(0, 0);
4552 ;
4553 return 0;
4554}
4555_ACEOF
4556rm -f conftest.$ac_objext conftest$ac_exeext
4557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4558 (eval $ac_link) 2>&5
4559 ac_status=$?
4560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4561 (exit $ac_status); } &&
4562 { ac_try='test -s conftest$ac_exeext'
4563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4564 (eval $ac_try) 2>&5
4565 ac_status=$?
4566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4567 (exit $ac_status); }; }; then
4568 ac_cv_header_sys_types_h_makedev=yes
4569else
4570 echo "$as_me: failed program was:" >&5
4571cat conftest.$ac_ext >&5
4572ac_cv_header_sys_types_h_makedev=no
4573fi
4574rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4575
4576fi
4577echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4578echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4579
4580if test $ac_cv_header_sys_types_h_makedev = no; then
4581if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4582 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4583echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4584if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4585 echo $ECHO_N "(cached) $ECHO_C" >&6
4586fi
4587echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4588echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4589else
4590 # Is the header compilable?
4591echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4592echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4593cat >conftest.$ac_ext <<_ACEOF
4594#line $LINENO "configure"
4595#include "confdefs.h"
4596$ac_includes_default
4597#include <sys/mkdev.h>
4598_ACEOF
4599rm -f conftest.$ac_objext
4600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4601 (eval $ac_compile) 2>&5
4602 ac_status=$?
4603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4604 (exit $ac_status); } &&
4605 { ac_try='test -s conftest.$ac_objext'
4606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4607 (eval $ac_try) 2>&5
4608 ac_status=$?
4609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4610 (exit $ac_status); }; }; then
4611 ac_header_compiler=yes
4612else
4613 echo "$as_me: failed program was:" >&5
4614cat conftest.$ac_ext >&5
4615ac_header_compiler=no
4616fi
4617rm -f conftest.$ac_objext conftest.$ac_ext
4618echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4619echo "${ECHO_T}$ac_header_compiler" >&6
4620
4621# Is the header present?
4622echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4623echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4624cat >conftest.$ac_ext <<_ACEOF
4625#line $LINENO "configure"
4626#include "confdefs.h"
4627#include <sys/mkdev.h>
4628_ACEOF
4629if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4630 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4631 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004632 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004633 rm -f conftest.er1
4634 cat conftest.err >&5
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); } >/dev/null; then
4637 if test -s conftest.err; then
4638 ac_cpp_err=$ac_c_preproc_warn_flag
4639 else
4640 ac_cpp_err=
4641 fi
4642else
4643 ac_cpp_err=yes
4644fi
4645if test -z "$ac_cpp_err"; then
4646 ac_header_preproc=yes
4647else
4648 echo "$as_me: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 ac_header_preproc=no
4651fi
4652rm -f conftest.err conftest.$ac_ext
4653echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4654echo "${ECHO_T}$ac_header_preproc" >&6
4655
4656# So? What about this header?
4657case $ac_header_compiler:$ac_header_preproc in
4658 yes:no )
4659 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4660echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4661 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4662echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4663 no:yes )
4664 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4665echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4666 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4667echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4668 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4669echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4670esac
4671echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4672echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4673if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4674 echo $ECHO_N "(cached) $ECHO_C" >&6
4675else
4676 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4677fi
4678echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4679echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4680
4681fi
4682if test $ac_cv_header_sys_mkdev_h = yes; then
4683
4684cat >>confdefs.h <<\_ACEOF
4685#define MAJOR_IN_MKDEV 1
4686_ACEOF
4687
4688fi
4689
4690
4691
4692 if test $ac_cv_header_sys_mkdev_h = no; then
4693 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4694 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4695echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4696if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4697 echo $ECHO_N "(cached) $ECHO_C" >&6
4698fi
4699echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4700echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4701else
4702 # Is the header compilable?
4703echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4704echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4705cat >conftest.$ac_ext <<_ACEOF
4706#line $LINENO "configure"
4707#include "confdefs.h"
4708$ac_includes_default
4709#include <sys/sysmacros.h>
4710_ACEOF
4711rm -f conftest.$ac_objext
4712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4713 (eval $ac_compile) 2>&5
4714 ac_status=$?
4715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716 (exit $ac_status); } &&
4717 { ac_try='test -s conftest.$ac_objext'
4718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4722 (exit $ac_status); }; }; then
4723 ac_header_compiler=yes
4724else
4725 echo "$as_me: failed program was:" >&5
4726cat conftest.$ac_ext >&5
4727ac_header_compiler=no
4728fi
4729rm -f conftest.$ac_objext conftest.$ac_ext
4730echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4731echo "${ECHO_T}$ac_header_compiler" >&6
4732
4733# Is the header present?
4734echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4735echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4736cat >conftest.$ac_ext <<_ACEOF
4737#line $LINENO "configure"
4738#include "confdefs.h"
4739#include <sys/sysmacros.h>
4740_ACEOF
4741if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4742 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4743 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004744 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004745 rm -f conftest.er1
4746 cat conftest.err >&5
4747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4748 (exit $ac_status); } >/dev/null; then
4749 if test -s conftest.err; then
4750 ac_cpp_err=$ac_c_preproc_warn_flag
4751 else
4752 ac_cpp_err=
4753 fi
4754else
4755 ac_cpp_err=yes
4756fi
4757if test -z "$ac_cpp_err"; then
4758 ac_header_preproc=yes
4759else
4760 echo "$as_me: failed program was:" >&5
4761 cat conftest.$ac_ext >&5
4762 ac_header_preproc=no
4763fi
4764rm -f conftest.err conftest.$ac_ext
4765echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4766echo "${ECHO_T}$ac_header_preproc" >&6
4767
4768# So? What about this header?
4769case $ac_header_compiler:$ac_header_preproc in
4770 yes:no )
4771 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4772echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4773 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4774echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4775 no:yes )
4776 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4777echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4778 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4779echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4780 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4781echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4782esac
4783echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4784echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4785if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4786 echo $ECHO_N "(cached) $ECHO_C" >&6
4787else
4788 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4789fi
4790echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4791echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4792
4793fi
4794if test $ac_cv_header_sys_sysmacros_h = yes; then
4795
4796cat >>confdefs.h <<\_ACEOF
4797#define MAJOR_IN_SYSMACROS 1
4798_ACEOF
4799
4800fi
4801
4802
4803 fi
4804fi
4805
Michael W. Hudson54241132001-12-07 15:38:26 +00004806
Guido van Rossum627b2d71993-12-24 10:39:16 +00004807# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004808was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004809echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4810echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4811cat >conftest.$ac_ext <<_ACEOF
4812#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813#include "confdefs.h"
4814#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004815
4816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004818 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004819 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004820else
Martin v. Löwis11437992002-04-12 09:54:03 +00004821
4822
4823cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004826
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004827
Guido van Rossum627b2d71993-12-24 10:39:16 +00004828fi
4829rm -f conftest*
4830
Martin v. Löwis11437992002-04-12 09:54:03 +00004831echo "$as_me:$LINENO: result: $was_it_defined" >&5
4832echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004833
Neal Norwitz11690112002-07-30 01:08:28 +00004834# Check whether using makedev requires defining _OSF_SOURCE
4835echo "$as_me:$LINENO: checking for makedev" >&5
4836echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4837cat >conftest.$ac_ext <<_ACEOF
4838#line $LINENO "configure"
4839#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004840#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004841#ifdef F77_DUMMY_MAIN
4842# ifdef __cplusplus
4843 extern "C"
4844# endif
4845 int F77_DUMMY_MAIN() { return 1; }
4846#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004847int
4848main ()
4849{
4850 makedev(0, 0)
4851 ;
4852 return 0;
4853}
4854_ACEOF
4855rm -f conftest.$ac_objext conftest$ac_exeext
4856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4857 (eval $ac_link) 2>&5
4858 ac_status=$?
4859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4860 (exit $ac_status); } &&
4861 { ac_try='test -s conftest$ac_exeext'
4862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4863 (eval $ac_try) 2>&5
4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); }; }; then
4867 ac_cv_has_makedev=yes
4868else
4869 echo "$as_me: failed program was:" >&5
4870cat conftest.$ac_ext >&5
4871ac_cv_has_makedev=no
4872fi
4873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4874if test "$ac_cv_has_makedev" = "no"; then
4875 # we didn't link, try if _OSF_SOURCE will allow us to link
4876 cat >conftest.$ac_ext <<_ACEOF
4877#line $LINENO "configure"
4878#include "confdefs.h"
4879
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004880#define _OSF_SOURCE 1
4881#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004882
Barry Warsawfe33b792003-01-07 22:42:49 +00004883#ifdef F77_DUMMY_MAIN
4884# ifdef __cplusplus
4885 extern "C"
4886# endif
4887 int F77_DUMMY_MAIN() { return 1; }
4888#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004889int
4890main ()
4891{
4892 makedev(0, 0)
4893 ;
4894 return 0;
4895}
4896_ACEOF
4897rm -f conftest.$ac_objext conftest$ac_exeext
4898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4899 (eval $ac_link) 2>&5
4900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); } &&
4903 { ac_try='test -s conftest$ac_exeext'
4904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4905 (eval $ac_try) 2>&5
4906 ac_status=$?
4907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4908 (exit $ac_status); }; }; then
4909 ac_cv_has_makedev=yes
4910else
4911 echo "$as_me: failed program was:" >&5
4912cat conftest.$ac_ext >&5
4913ac_cv_has_makedev=no
4914fi
4915rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4916 if test "$ac_cv_has_makedev" = "yes"; then
4917
4918cat >>confdefs.h <<\_ACEOF
4919#define _OSF_SOURCE 1
4920_ACEOF
4921
4922 fi
4923fi
4924echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4925echo "${ECHO_T}$ac_cv_has_makedev" >&6
4926if test "$ac_cv_has_makedev" = "yes"; then
4927
4928cat >>confdefs.h <<\_ACEOF
4929#define HAVE_MAKEDEV 1
4930_ACEOF
4931
4932fi
4933
Martin v. Löwis399a6892002-10-04 10:22:02 +00004934# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4935# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4936# defined, but the compiler does not support pragma redefine_extname,
4937# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4938# structures (such as rlimit64) without declaring them. As a
4939# work-around, disable LFS on such configurations
4940
4941use_lfs=yes
4942echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4943echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4944cat >conftest.$ac_ext <<_ACEOF
4945#line $LINENO "configure"
4946#include "confdefs.h"
4947
4948#define _LARGEFILE_SOURCE 1
4949#define _FILE_OFFSET_BITS 64
4950#include <sys/resource.h>
4951
Barry Warsawfe33b792003-01-07 22:42:49 +00004952#ifdef F77_DUMMY_MAIN
4953# ifdef __cplusplus
4954 extern "C"
4955# endif
4956 int F77_DUMMY_MAIN() { return 1; }
4957#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004958int
4959main ()
4960{
4961struct rlimit foo;
4962 ;
4963 return 0;
4964}
4965_ACEOF
4966rm -f conftest.$ac_objext
4967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4968 (eval $ac_compile) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); } &&
4972 { ac_try='test -s conftest.$ac_objext'
4973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4974 (eval $ac_try) 2>&5
4975 ac_status=$?
4976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4977 (exit $ac_status); }; }; then
4978 sol_lfs_bug=no
4979else
4980 echo "$as_me: failed program was:" >&5
4981cat conftest.$ac_ext >&5
4982sol_lfs_bug=yes
4983fi
4984rm -f conftest.$ac_objext conftest.$ac_ext
4985echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4986echo "${ECHO_T}$sol_lfs_bug" >&6
4987if test "$sol_lfs_bug" = "yes"; then
4988 use_lfs=no
4989fi
4990
4991if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004992# Two defines needed to enable largefile support on various platforms
4993# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004994
Martin v. Löwis11437992002-04-12 09:54:03 +00004995cat >>confdefs.h <<\_ACEOF
4996#define _LARGEFILE_SOURCE 1
4997_ACEOF
4998
4999
5000cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005001#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005002_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005003
Martin v. Löwis399a6892002-10-04 10:22:02 +00005004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005005
Guido van Rossum84e7b241996-08-19 21:59:00 +00005006# Add some code to confdefs.h so that the test for off_t works on SCO
5007cat >> confdefs.h <<\EOF
5008#if defined(SCO_DS)
5009#undef _OFF_T
5010#endif
5011EOF
5012
Guido van Rossumef2255b2000-03-10 22:30:29 +00005013# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005014echo "$as_me:$LINENO: checking for mode_t" >&5
5015echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5016if test "${ac_cv_type_mode_t+set}" = set; then
5017 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 cat >conftest.$ac_ext <<_ACEOF
5020#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005022$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005023#ifdef F77_DUMMY_MAIN
5024# ifdef __cplusplus
5025 extern "C"
5026# endif
5027 int F77_DUMMY_MAIN() { return 1; }
5028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005029int
5030main ()
5031{
5032if ((mode_t *) 0)
5033 return 0;
5034if (sizeof (mode_t))
5035 return 0;
5036 ;
5037 return 0;
5038}
5039_ACEOF
5040rm -f conftest.$ac_objext
5041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5042 (eval $ac_compile) 2>&5
5043 ac_status=$?
5044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045 (exit $ac_status); } &&
5046 { ac_try='test -s conftest.$ac_objext'
5047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5048 (eval $ac_try) 2>&5
5049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005052 ac_cv_type_mode_t=yes
5053else
Martin v. Löwis11437992002-04-12 09:54:03 +00005054 echo "$as_me: failed program was:" >&5
5055cat conftest.$ac_ext >&5
5056ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005058rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005060echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5061echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5062if test $ac_cv_type_mode_t = yes; then
5063 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064else
Martin v. Löwis11437992002-04-12 09:54:03 +00005065
5066cat >>confdefs.h <<_ACEOF
5067#define mode_t int
5068_ACEOF
5069
5070fi
5071
5072echo "$as_me:$LINENO: checking for off_t" >&5
5073echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5074if test "${ac_cv_type_off_t+set}" = set; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5076else
5077 cat >conftest.$ac_ext <<_ACEOF
5078#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005080$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005081#ifdef F77_DUMMY_MAIN
5082# ifdef __cplusplus
5083 extern "C"
5084# endif
5085 int F77_DUMMY_MAIN() { return 1; }
5086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005087int
5088main ()
5089{
5090if ((off_t *) 0)
5091 return 0;
5092if (sizeof (off_t))
5093 return 0;
5094 ;
5095 return 0;
5096}
5097_ACEOF
5098rm -f conftest.$ac_objext
5099if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5100 (eval $ac_compile) 2>&5
5101 ac_status=$?
5102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5103 (exit $ac_status); } &&
5104 { ac_try='test -s conftest.$ac_objext'
5105 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5106 (eval $ac_try) 2>&5
5107 ac_status=$?
5108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5109 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005110 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111else
Martin v. Löwis11437992002-04-12 09:54:03 +00005112 echo "$as_me: failed program was:" >&5
5113cat conftest.$ac_ext >&5
5114ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005115fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005116rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005117fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005118echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5119echo "${ECHO_T}$ac_cv_type_off_t" >&6
5120if test $ac_cv_type_off_t = yes; then
5121 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122else
Martin v. Löwis11437992002-04-12 09:54:03 +00005123
5124cat >>confdefs.h <<_ACEOF
5125#define off_t long
5126_ACEOF
5127
5128fi
5129
5130echo "$as_me:$LINENO: checking for pid_t" >&5
5131echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5132if test "${ac_cv_type_pid_t+set}" = set; then
5133 echo $ECHO_N "(cached) $ECHO_C" >&6
5134else
5135 cat >conftest.$ac_ext <<_ACEOF
5136#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005138$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005139#ifdef F77_DUMMY_MAIN
5140# ifdef __cplusplus
5141 extern "C"
5142# endif
5143 int F77_DUMMY_MAIN() { return 1; }
5144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005145int
5146main ()
5147{
5148if ((pid_t *) 0)
5149 return 0;
5150if (sizeof (pid_t))
5151 return 0;
5152 ;
5153 return 0;
5154}
5155_ACEOF
5156rm -f conftest.$ac_objext
5157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5158 (eval $ac_compile) 2>&5
5159 ac_status=$?
5160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5161 (exit $ac_status); } &&
5162 { ac_try='test -s conftest.$ac_objext'
5163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5164 (eval $ac_try) 2>&5
5165 ac_status=$?
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005168 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005169else
Martin v. Löwis11437992002-04-12 09:54:03 +00005170 echo "$as_me: failed program was:" >&5
5171cat conftest.$ac_ext >&5
5172ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005174rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005176echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5177echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5178if test $ac_cv_type_pid_t = yes; then
5179 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180else
Martin v. Löwis11437992002-04-12 09:54:03 +00005181
5182cat >>confdefs.h <<_ACEOF
5183#define pid_t int
5184_ACEOF
5185
5186fi
5187
5188echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5189echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5190if test "${ac_cv_type_signal+set}" = set; then
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
5193 cat >conftest.$ac_ext <<_ACEOF
5194#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005195#include "confdefs.h"
5196#include <sys/types.h>
5197#include <signal.h>
5198#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005199# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005200#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005202extern "C" void (*signal (int, void (*)(int)))(int);
5203#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005204void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005205#endif
5206
Barry Warsawfe33b792003-01-07 22:42:49 +00005207#ifdef F77_DUMMY_MAIN
5208# ifdef __cplusplus
5209 extern "C"
5210# endif
5211 int F77_DUMMY_MAIN() { return 1; }
5212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005213int
5214main ()
5215{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005217 ;
5218 return 0;
5219}
5220_ACEOF
5221rm -f conftest.$ac_objext
5222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5223 (eval $ac_compile) 2>&5
5224 ac_status=$?
5225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226 (exit $ac_status); } &&
5227 { ac_try='test -s conftest.$ac_objext'
5228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5229 (eval $ac_try) 2>&5
5230 ac_status=$?
5231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005234else
Martin v. Löwis11437992002-04-12 09:54:03 +00005235 echo "$as_me: failed program was:" >&5
5236cat conftest.$ac_ext >&5
5237ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005239rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005241echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5242echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005243
Martin v. Löwis11437992002-04-12 09:54:03 +00005244cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005246_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005247
Michael W. Hudson54241132001-12-07 15:38:26 +00005248
Martin v. Löwis11437992002-04-12 09:54:03 +00005249echo "$as_me:$LINENO: checking for size_t" >&5
5250echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5251if test "${ac_cv_type_size_t+set}" = set; then
5252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253else
Martin v. Löwis11437992002-04-12 09:54:03 +00005254 cat >conftest.$ac_ext <<_ACEOF
5255#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005256#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005257$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005258#ifdef F77_DUMMY_MAIN
5259# ifdef __cplusplus
5260 extern "C"
5261# endif
5262 int F77_DUMMY_MAIN() { return 1; }
5263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005264int
5265main ()
5266{
5267if ((size_t *) 0)
5268 return 0;
5269if (sizeof (size_t))
5270 return 0;
5271 ;
5272 return 0;
5273}
5274_ACEOF
5275rm -f conftest.$ac_objext
5276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5277 (eval $ac_compile) 2>&5
5278 ac_status=$?
5279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5280 (exit $ac_status); } &&
5281 { ac_try='test -s conftest.$ac_objext'
5282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5283 (eval $ac_try) 2>&5
5284 ac_status=$?
5285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005287 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288else
Martin v. Löwis11437992002-04-12 09:54:03 +00005289 echo "$as_me: failed program was:" >&5
5290cat conftest.$ac_ext >&5
5291ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005293rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005294fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005295echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5296echo "${ECHO_T}$ac_cv_type_size_t" >&6
5297if test $ac_cv_type_size_t = yes; then
5298 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299else
Martin v. Löwis11437992002-04-12 09:54:03 +00005300
5301cat >>confdefs.h <<_ACEOF
5302#define size_t unsigned
5303_ACEOF
5304
5305fi
5306
5307echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5308echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5309if test "${ac_cv_type_uid_t+set}" = set; then
5310 echo $ECHO_N "(cached) $ECHO_C" >&6
5311else
5312 cat >conftest.$ac_ext <<_ACEOF
5313#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314#include "confdefs.h"
5315#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
5317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005319 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320 ac_cv_type_uid_t=yes
5321else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322 ac_cv_type_uid_t=no
5323fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324rm -f conftest*
5325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005327echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5328echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005329if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330
Martin v. Löwis11437992002-04-12 09:54:03 +00005331cat >>confdefs.h <<\_ACEOF
5332#define uid_t int
5333_ACEOF
5334
5335
5336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005339
5340fi
5341
Jack Jansendd19cf82001-12-06 22:36:17 +00005342
Michael W. Hudson54241132001-12-07 15:38:26 +00005343# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005344echo "$as_me:$LINENO: checking for int" >&5
5345echo $ECHO_N "checking for int... $ECHO_C" >&6
5346if test "${ac_cv_type_int+set}" = set; then
5347 echo $ECHO_N "(cached) $ECHO_C" >&6
5348else
5349 cat >conftest.$ac_ext <<_ACEOF
5350#line $LINENO "configure"
5351#include "confdefs.h"
5352$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005353#ifdef F77_DUMMY_MAIN
5354# ifdef __cplusplus
5355 extern "C"
5356# endif
5357 int F77_DUMMY_MAIN() { return 1; }
5358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005359int
5360main ()
5361{
5362if ((int *) 0)
5363 return 0;
5364if (sizeof (int))
5365 return 0;
5366 ;
5367 return 0;
5368}
5369_ACEOF
5370rm -f conftest.$ac_objext
5371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5372 (eval $ac_compile) 2>&5
5373 ac_status=$?
5374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375 (exit $ac_status); } &&
5376 { ac_try='test -s conftest.$ac_objext'
5377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5378 (eval $ac_try) 2>&5
5379 ac_status=$?
5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381 (exit $ac_status); }; }; then
5382 ac_cv_type_int=yes
5383else
5384 echo "$as_me: failed program was:" >&5
5385cat conftest.$ac_ext >&5
5386ac_cv_type_int=no
5387fi
5388rm -f conftest.$ac_objext conftest.$ac_ext
5389fi
5390echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5391echo "${ECHO_T}$ac_cv_type_int" >&6
5392
5393echo "$as_me:$LINENO: checking size of int" >&5
5394echo $ECHO_N "checking size of int... $ECHO_C" >&6
5395if test "${ac_cv_sizeof_int+set}" = set; then
5396 echo $ECHO_N "(cached) $ECHO_C" >&6
5397else
5398 if test "$ac_cv_type_int" = yes; then
5399 # The cast to unsigned long works around a bug in the HP C Compiler
5400 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5401 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5402 # This bug is HP SR number 8606223364.
5403 if test "$cross_compiling" = yes; then
5404 # Depending upon the size, compute the lo and hi bounds.
5405cat >conftest.$ac_ext <<_ACEOF
5406#line $LINENO "configure"
5407#include "confdefs.h"
5408$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005409#ifdef F77_DUMMY_MAIN
5410# ifdef __cplusplus
5411 extern "C"
5412# endif
5413 int F77_DUMMY_MAIN() { return 1; }
5414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005415int
5416main ()
5417{
5418static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5419test_array [0] = 0
5420
5421 ;
5422 return 0;
5423}
5424_ACEOF
5425rm -f conftest.$ac_objext
5426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5427 (eval $ac_compile) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); } &&
5431 { ac_try='test -s conftest.$ac_objext'
5432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; }; then
5437 ac_lo=0 ac_mid=0
5438 while :; do
5439 cat >conftest.$ac_ext <<_ACEOF
5440#line $LINENO "configure"
5441#include "confdefs.h"
5442$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005443#ifdef F77_DUMMY_MAIN
5444# ifdef __cplusplus
5445 extern "C"
5446# endif
5447 int F77_DUMMY_MAIN() { return 1; }
5448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005449int
5450main ()
5451{
5452static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5453test_array [0] = 0
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5461 (eval $ac_compile) 2>&5
5462 ac_status=$?
5463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } &&
5465 { ac_try='test -s conftest.$ac_objext'
5466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5467 (eval $ac_try) 2>&5
5468 ac_status=$?
5469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5470 (exit $ac_status); }; }; then
5471 ac_hi=$ac_mid; break
5472else
5473 echo "$as_me: failed program was:" >&5
5474cat conftest.$ac_ext >&5
5475ac_lo=`expr $ac_mid + 1`
5476 if test $ac_lo -le $ac_mid; then
5477 ac_lo= ac_hi=
5478 break
5479 fi
5480 ac_mid=`expr 2 '*' $ac_mid + 1`
5481fi
5482rm -f conftest.$ac_objext conftest.$ac_ext
5483 done
5484else
5485 echo "$as_me: failed program was:" >&5
5486cat conftest.$ac_ext >&5
5487cat >conftest.$ac_ext <<_ACEOF
5488#line $LINENO "configure"
5489#include "confdefs.h"
5490$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005491#ifdef F77_DUMMY_MAIN
5492# ifdef __cplusplus
5493 extern "C"
5494# endif
5495 int F77_DUMMY_MAIN() { return 1; }
5496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005497int
5498main ()
5499{
5500static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5501test_array [0] = 0
5502
5503 ;
5504 return 0;
5505}
5506_ACEOF
5507rm -f conftest.$ac_objext
5508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5509 (eval $ac_compile) 2>&5
5510 ac_status=$?
5511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5512 (exit $ac_status); } &&
5513 { ac_try='test -s conftest.$ac_objext'
5514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5515 (eval $ac_try) 2>&5
5516 ac_status=$?
5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5519 ac_hi=-1 ac_mid=-1
5520 while :; do
5521 cat >conftest.$ac_ext <<_ACEOF
5522#line $LINENO "configure"
5523#include "confdefs.h"
5524$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005525#ifdef F77_DUMMY_MAIN
5526# ifdef __cplusplus
5527 extern "C"
5528# endif
5529 int F77_DUMMY_MAIN() { return 1; }
5530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005531int
5532main ()
5533{
5534static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5535test_array [0] = 0
5536
5537 ;
5538 return 0;
5539}
5540_ACEOF
5541rm -f conftest.$ac_objext
5542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5543 (eval $ac_compile) 2>&5
5544 ac_status=$?
5545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest.$ac_objext'
5548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5549 (eval $ac_try) 2>&5
5550 ac_status=$?
5551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5552 (exit $ac_status); }; }; then
5553 ac_lo=$ac_mid; break
5554else
5555 echo "$as_me: failed program was:" >&5
5556cat conftest.$ac_ext >&5
5557ac_hi=`expr '(' $ac_mid ')' - 1`
5558 if test $ac_mid -le $ac_hi; then
5559 ac_lo= ac_hi=
5560 break
5561 fi
5562 ac_mid=`expr 2 '*' $ac_mid`
5563fi
5564rm -f conftest.$ac_objext conftest.$ac_ext
5565 done
5566else
5567 echo "$as_me: failed program was:" >&5
5568cat conftest.$ac_ext >&5
5569ac_lo= ac_hi=
5570fi
5571rm -f conftest.$ac_objext conftest.$ac_ext
5572fi
5573rm -f conftest.$ac_objext conftest.$ac_ext
5574# Binary search between lo and hi bounds.
5575while test "x$ac_lo" != "x$ac_hi"; do
5576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5577 cat >conftest.$ac_ext <<_ACEOF
5578#line $LINENO "configure"
5579#include "confdefs.h"
5580$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005581#ifdef F77_DUMMY_MAIN
5582# ifdef __cplusplus
5583 extern "C"
5584# endif
5585 int F77_DUMMY_MAIN() { return 1; }
5586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005587int
5588main ()
5589{
5590static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5591test_array [0] = 0
5592
5593 ;
5594 return 0;
5595}
5596_ACEOF
5597rm -f conftest.$ac_objext
5598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5599 (eval $ac_compile) 2>&5
5600 ac_status=$?
5601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5602 (exit $ac_status); } &&
5603 { ac_try='test -s conftest.$ac_objext'
5604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5605 (eval $ac_try) 2>&5
5606 ac_status=$?
5607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5608 (exit $ac_status); }; }; then
5609 ac_hi=$ac_mid
5610else
5611 echo "$as_me: failed program was:" >&5
5612cat conftest.$ac_ext >&5
5613ac_lo=`expr '(' $ac_mid ')' + 1`
5614fi
5615rm -f conftest.$ac_objext conftest.$ac_ext
5616done
5617case $ac_lo in
5618?*) ac_cv_sizeof_int=$ac_lo;;
5619'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5620echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5621 { (exit 1); exit 1; }; } ;;
5622esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005623else
5624 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005625 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5626echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5627 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005628else
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 cat >conftest.$ac_ext <<_ACEOF
5630#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005631#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005632$ac_includes_default
5633long longval () { return (long) (sizeof (int)); }
5634unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005635#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005636#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005637#ifdef F77_DUMMY_MAIN
5638# ifdef __cplusplus
5639 extern "C"
5640# endif
5641 int F77_DUMMY_MAIN() { return 1; }
5642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005643int
5644main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005645{
Martin v. Löwis11437992002-04-12 09:54:03 +00005646
5647 FILE *f = fopen ("conftest.val", "w");
5648 if (! f)
5649 exit (1);
5650 if (((long) (sizeof (int))) < 0)
5651 {
5652 long i = longval ();
5653 if (i != ((long) (sizeof (int))))
5654 exit (1);
5655 fprintf (f, "%ld\n", i);
5656 }
5657 else
5658 {
5659 unsigned long i = ulongval ();
5660 if (i != ((long) (sizeof (int))))
5661 exit (1);
5662 fprintf (f, "%lu\n", i);
5663 }
5664 exit (ferror (f) || fclose (f) != 0);
5665
5666 ;
5667 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005668}
Martin v. Löwis11437992002-04-12 09:54:03 +00005669_ACEOF
5670rm -f conftest$ac_exeext
5671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5672 (eval $ac_link) 2>&5
5673 ac_status=$?
5674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5677 (eval $ac_try) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); }; }; then
5681 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005682else
Martin v. Löwis11437992002-04-12 09:54:03 +00005683 echo "$as_me: program exited with status $ac_status" >&5
5684echo "$as_me: failed program was:" >&5
5685cat conftest.$ac_ext >&5
5686( exit $ac_status )
5687{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5688echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5689 { (exit 1); exit 1; }; }
5690fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005691rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005692fi
5693fi
5694rm -f conftest.val
5695else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005696 ac_cv_sizeof_int=0
5697fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005699echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5700echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5701cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005702#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005703_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005704
5705
Martin v. Löwis11437992002-04-12 09:54:03 +00005706echo "$as_me:$LINENO: checking for long" >&5
5707echo $ECHO_N "checking for long... $ECHO_C" >&6
5708if test "${ac_cv_type_long+set}" = set; then
5709 echo $ECHO_N "(cached) $ECHO_C" >&6
5710else
5711 cat >conftest.$ac_ext <<_ACEOF
5712#line $LINENO "configure"
5713#include "confdefs.h"
5714$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005715#ifdef F77_DUMMY_MAIN
5716# ifdef __cplusplus
5717 extern "C"
5718# endif
5719 int F77_DUMMY_MAIN() { return 1; }
5720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005721int
5722main ()
5723{
5724if ((long *) 0)
5725 return 0;
5726if (sizeof (long))
5727 return 0;
5728 ;
5729 return 0;
5730}
5731_ACEOF
5732rm -f conftest.$ac_objext
5733if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5734 (eval $ac_compile) 2>&5
5735 ac_status=$?
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); } &&
5738 { ac_try='test -s conftest.$ac_objext'
5739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5740 (eval $ac_try) 2>&5
5741 ac_status=$?
5742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5743 (exit $ac_status); }; }; then
5744 ac_cv_type_long=yes
5745else
5746 echo "$as_me: failed program was:" >&5
5747cat conftest.$ac_ext >&5
5748ac_cv_type_long=no
5749fi
5750rm -f conftest.$ac_objext conftest.$ac_ext
5751fi
5752echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5753echo "${ECHO_T}$ac_cv_type_long" >&6
5754
5755echo "$as_me:$LINENO: checking size of long" >&5
5756echo $ECHO_N "checking size of long... $ECHO_C" >&6
5757if test "${ac_cv_sizeof_long+set}" = set; then
5758 echo $ECHO_N "(cached) $ECHO_C" >&6
5759else
5760 if test "$ac_cv_type_long" = yes; then
5761 # The cast to unsigned long works around a bug in the HP C Compiler
5762 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5763 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5764 # This bug is HP SR number 8606223364.
5765 if test "$cross_compiling" = yes; then
5766 # Depending upon the size, compute the lo and hi bounds.
5767cat >conftest.$ac_ext <<_ACEOF
5768#line $LINENO "configure"
5769#include "confdefs.h"
5770$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005771#ifdef F77_DUMMY_MAIN
5772# ifdef __cplusplus
5773 extern "C"
5774# endif
5775 int F77_DUMMY_MAIN() { return 1; }
5776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005777int
5778main ()
5779{
5780static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5781test_array [0] = 0
5782
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5789 (eval $ac_compile) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } &&
5793 { ac_try='test -s conftest.$ac_objext'
5794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
5799 ac_lo=0 ac_mid=0
5800 while :; do
5801 cat >conftest.$ac_ext <<_ACEOF
5802#line $LINENO "configure"
5803#include "confdefs.h"
5804$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005805#ifdef F77_DUMMY_MAIN
5806# ifdef __cplusplus
5807 extern "C"
5808# endif
5809 int F77_DUMMY_MAIN() { return 1; }
5810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005811int
5812main ()
5813{
5814static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5815test_array [0] = 0
5816
5817 ;
5818 return 0;
5819}
5820_ACEOF
5821rm -f conftest.$ac_objext
5822if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5823 (eval $ac_compile) 2>&5
5824 ac_status=$?
5825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826 (exit $ac_status); } &&
5827 { ac_try='test -s conftest.$ac_objext'
5828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5829 (eval $ac_try) 2>&5
5830 ac_status=$?
5831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5832 (exit $ac_status); }; }; then
5833 ac_hi=$ac_mid; break
5834else
5835 echo "$as_me: failed program was:" >&5
5836cat conftest.$ac_ext >&5
5837ac_lo=`expr $ac_mid + 1`
5838 if test $ac_lo -le $ac_mid; then
5839 ac_lo= ac_hi=
5840 break
5841 fi
5842 ac_mid=`expr 2 '*' $ac_mid + 1`
5843fi
5844rm -f conftest.$ac_objext conftest.$ac_ext
5845 done
5846else
5847 echo "$as_me: failed program was:" >&5
5848cat conftest.$ac_ext >&5
5849cat >conftest.$ac_ext <<_ACEOF
5850#line $LINENO "configure"
5851#include "confdefs.h"
5852$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005853#ifdef F77_DUMMY_MAIN
5854# ifdef __cplusplus
5855 extern "C"
5856# endif
5857 int F77_DUMMY_MAIN() { return 1; }
5858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005859int
5860main ()
5861{
5862static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5863test_array [0] = 0
5864
5865 ;
5866 return 0;
5867}
5868_ACEOF
5869rm -f conftest.$ac_objext
5870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5871 (eval $ac_compile) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); } &&
5875 { ac_try='test -s conftest.$ac_objext'
5876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
5881 ac_hi=-1 ac_mid=-1
5882 while :; do
5883 cat >conftest.$ac_ext <<_ACEOF
5884#line $LINENO "configure"
5885#include "confdefs.h"
5886$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005887#ifdef F77_DUMMY_MAIN
5888# ifdef __cplusplus
5889 extern "C"
5890# endif
5891 int F77_DUMMY_MAIN() { return 1; }
5892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005893int
5894main ()
5895{
5896static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5897test_array [0] = 0
5898
5899 ;
5900 return 0;
5901}
5902_ACEOF
5903rm -f conftest.$ac_objext
5904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5905 (eval $ac_compile) 2>&5
5906 ac_status=$?
5907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908 (exit $ac_status); } &&
5909 { ac_try='test -s conftest.$ac_objext'
5910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5911 (eval $ac_try) 2>&5
5912 ac_status=$?
5913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5914 (exit $ac_status); }; }; then
5915 ac_lo=$ac_mid; break
5916else
5917 echo "$as_me: failed program was:" >&5
5918cat conftest.$ac_ext >&5
5919ac_hi=`expr '(' $ac_mid ')' - 1`
5920 if test $ac_mid -le $ac_hi; then
5921 ac_lo= ac_hi=
5922 break
5923 fi
5924 ac_mid=`expr 2 '*' $ac_mid`
5925fi
5926rm -f conftest.$ac_objext conftest.$ac_ext
5927 done
5928else
5929 echo "$as_me: failed program was:" >&5
5930cat conftest.$ac_ext >&5
5931ac_lo= ac_hi=
5932fi
5933rm -f conftest.$ac_objext conftest.$ac_ext
5934fi
5935rm -f conftest.$ac_objext conftest.$ac_ext
5936# Binary search between lo and hi bounds.
5937while test "x$ac_lo" != "x$ac_hi"; do
5938 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5939 cat >conftest.$ac_ext <<_ACEOF
5940#line $LINENO "configure"
5941#include "confdefs.h"
5942$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005943#ifdef F77_DUMMY_MAIN
5944# ifdef __cplusplus
5945 extern "C"
5946# endif
5947 int F77_DUMMY_MAIN() { return 1; }
5948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005949int
5950main ()
5951{
5952static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5953test_array [0] = 0
5954
5955 ;
5956 return 0;
5957}
5958_ACEOF
5959rm -f conftest.$ac_objext
5960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5961 (eval $ac_compile) 2>&5
5962 ac_status=$?
5963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5964 (exit $ac_status); } &&
5965 { ac_try='test -s conftest.$ac_objext'
5966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5967 (eval $ac_try) 2>&5
5968 ac_status=$?
5969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5970 (exit $ac_status); }; }; then
5971 ac_hi=$ac_mid
5972else
5973 echo "$as_me: failed program was:" >&5
5974cat conftest.$ac_ext >&5
5975ac_lo=`expr '(' $ac_mid ')' + 1`
5976fi
5977rm -f conftest.$ac_objext conftest.$ac_ext
5978done
5979case $ac_lo in
5980?*) ac_cv_sizeof_long=$ac_lo;;
5981'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5982echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5983 { (exit 1); exit 1; }; } ;;
5984esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005985else
5986 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5988echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5989 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005990else
Martin v. Löwis11437992002-04-12 09:54:03 +00005991 cat >conftest.$ac_ext <<_ACEOF
5992#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005993#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005994$ac_includes_default
5995long longval () { return (long) (sizeof (long)); }
5996unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005997#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005998#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005999#ifdef F77_DUMMY_MAIN
6000# ifdef __cplusplus
6001 extern "C"
6002# endif
6003 int F77_DUMMY_MAIN() { return 1; }
6004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006005int
6006main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006007{
Martin v. Löwis11437992002-04-12 09:54:03 +00006008
6009 FILE *f = fopen ("conftest.val", "w");
6010 if (! f)
6011 exit (1);
6012 if (((long) (sizeof (long))) < 0)
6013 {
6014 long i = longval ();
6015 if (i != ((long) (sizeof (long))))
6016 exit (1);
6017 fprintf (f, "%ld\n", i);
6018 }
6019 else
6020 {
6021 unsigned long i = ulongval ();
6022 if (i != ((long) (sizeof (long))))
6023 exit (1);
6024 fprintf (f, "%lu\n", i);
6025 }
6026 exit (ferror (f) || fclose (f) != 0);
6027
6028 ;
6029 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006030}
Martin v. Löwis11437992002-04-12 09:54:03 +00006031_ACEOF
6032rm -f conftest$ac_exeext
6033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6034 (eval $ac_link) 2>&5
6035 ac_status=$?
6036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6037 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6039 (eval $ac_try) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); }; }; then
6043 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006044else
Martin v. Löwis11437992002-04-12 09:54:03 +00006045 echo "$as_me: program exited with status $ac_status" >&5
6046echo "$as_me: failed program was:" >&5
6047cat conftest.$ac_ext >&5
6048( exit $ac_status )
6049{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6050echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6051 { (exit 1); exit 1; }; }
6052fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006053rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006054fi
6055fi
6056rm -f conftest.val
6057else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006058 ac_cv_sizeof_long=0
6059fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006060fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006061echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6062echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6063cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006064#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006065_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006066
6067
Martin v. Löwis11437992002-04-12 09:54:03 +00006068echo "$as_me:$LINENO: checking for void *" >&5
6069echo $ECHO_N "checking for void *... $ECHO_C" >&6
6070if test "${ac_cv_type_void_p+set}" = set; then
6071 echo $ECHO_N "(cached) $ECHO_C" >&6
6072else
6073 cat >conftest.$ac_ext <<_ACEOF
6074#line $LINENO "configure"
6075#include "confdefs.h"
6076$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006077#ifdef F77_DUMMY_MAIN
6078# ifdef __cplusplus
6079 extern "C"
6080# endif
6081 int F77_DUMMY_MAIN() { return 1; }
6082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006083int
6084main ()
6085{
6086if ((void * *) 0)
6087 return 0;
6088if (sizeof (void *))
6089 return 0;
6090 ;
6091 return 0;
6092}
6093_ACEOF
6094rm -f conftest.$ac_objext
6095if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6096 (eval $ac_compile) 2>&5
6097 ac_status=$?
6098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099 (exit $ac_status); } &&
6100 { ac_try='test -s conftest.$ac_objext'
6101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6102 (eval $ac_try) 2>&5
6103 ac_status=$?
6104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); }; }; then
6106 ac_cv_type_void_p=yes
6107else
6108 echo "$as_me: failed program was:" >&5
6109cat conftest.$ac_ext >&5
6110ac_cv_type_void_p=no
6111fi
6112rm -f conftest.$ac_objext conftest.$ac_ext
6113fi
6114echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6115echo "${ECHO_T}$ac_cv_type_void_p" >&6
6116
6117echo "$as_me:$LINENO: checking size of void *" >&5
6118echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6119if test "${ac_cv_sizeof_void_p+set}" = set; then
6120 echo $ECHO_N "(cached) $ECHO_C" >&6
6121else
6122 if test "$ac_cv_type_void_p" = yes; then
6123 # The cast to unsigned long works around a bug in the HP C Compiler
6124 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6125 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6126 # This bug is HP SR number 8606223364.
6127 if test "$cross_compiling" = yes; then
6128 # Depending upon the size, compute the lo and hi bounds.
6129cat >conftest.$ac_ext <<_ACEOF
6130#line $LINENO "configure"
6131#include "confdefs.h"
6132$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006133#ifdef F77_DUMMY_MAIN
6134# ifdef __cplusplus
6135 extern "C"
6136# endif
6137 int F77_DUMMY_MAIN() { return 1; }
6138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006139int
6140main ()
6141{
6142static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6143test_array [0] = 0
6144
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext
6150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6151 (eval $ac_compile) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); } &&
6155 { ac_try='test -s conftest.$ac_objext'
6156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160 (exit $ac_status); }; }; then
6161 ac_lo=0 ac_mid=0
6162 while :; do
6163 cat >conftest.$ac_ext <<_ACEOF
6164#line $LINENO "configure"
6165#include "confdefs.h"
6166$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006167#ifdef F77_DUMMY_MAIN
6168# ifdef __cplusplus
6169 extern "C"
6170# endif
6171 int F77_DUMMY_MAIN() { return 1; }
6172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006173int
6174main ()
6175{
6176static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6177test_array [0] = 0
6178
6179 ;
6180 return 0;
6181}
6182_ACEOF
6183rm -f conftest.$ac_objext
6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6185 (eval $ac_compile) 2>&5
6186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); } &&
6189 { ac_try='test -s conftest.$ac_objext'
6190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; }; then
6195 ac_hi=$ac_mid; break
6196else
6197 echo "$as_me: failed program was:" >&5
6198cat conftest.$ac_ext >&5
6199ac_lo=`expr $ac_mid + 1`
6200 if test $ac_lo -le $ac_mid; then
6201 ac_lo= ac_hi=
6202 break
6203 fi
6204 ac_mid=`expr 2 '*' $ac_mid + 1`
6205fi
6206rm -f conftest.$ac_objext conftest.$ac_ext
6207 done
6208else
6209 echo "$as_me: failed program was:" >&5
6210cat conftest.$ac_ext >&5
6211cat >conftest.$ac_ext <<_ACEOF
6212#line $LINENO "configure"
6213#include "confdefs.h"
6214$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006215#ifdef F77_DUMMY_MAIN
6216# ifdef __cplusplus
6217 extern "C"
6218# endif
6219 int F77_DUMMY_MAIN() { return 1; }
6220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006221int
6222main ()
6223{
6224static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6225test_array [0] = 0
6226
6227 ;
6228 return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext
6232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6233 (eval $ac_compile) 2>&5
6234 ac_status=$?
6235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236 (exit $ac_status); } &&
6237 { ac_try='test -s conftest.$ac_objext'
6238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
6243 ac_hi=-1 ac_mid=-1
6244 while :; do
6245 cat >conftest.$ac_ext <<_ACEOF
6246#line $LINENO "configure"
6247#include "confdefs.h"
6248$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006249#ifdef F77_DUMMY_MAIN
6250# ifdef __cplusplus
6251 extern "C"
6252# endif
6253 int F77_DUMMY_MAIN() { return 1; }
6254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006255int
6256main ()
6257{
6258static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6259test_array [0] = 0
6260
6261 ;
6262 return 0;
6263}
6264_ACEOF
6265rm -f conftest.$ac_objext
6266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6267 (eval $ac_compile) 2>&5
6268 ac_status=$?
6269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6270 (exit $ac_status); } &&
6271 { ac_try='test -s conftest.$ac_objext'
6272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6273 (eval $ac_try) 2>&5
6274 ac_status=$?
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276 (exit $ac_status); }; }; then
6277 ac_lo=$ac_mid; break
6278else
6279 echo "$as_me: failed program was:" >&5
6280cat conftest.$ac_ext >&5
6281ac_hi=`expr '(' $ac_mid ')' - 1`
6282 if test $ac_mid -le $ac_hi; then
6283 ac_lo= ac_hi=
6284 break
6285 fi
6286 ac_mid=`expr 2 '*' $ac_mid`
6287fi
6288rm -f conftest.$ac_objext conftest.$ac_ext
6289 done
6290else
6291 echo "$as_me: failed program was:" >&5
6292cat conftest.$ac_ext >&5
6293ac_lo= ac_hi=
6294fi
6295rm -f conftest.$ac_objext conftest.$ac_ext
6296fi
6297rm -f conftest.$ac_objext conftest.$ac_ext
6298# Binary search between lo and hi bounds.
6299while test "x$ac_lo" != "x$ac_hi"; do
6300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6301 cat >conftest.$ac_ext <<_ACEOF
6302#line $LINENO "configure"
6303#include "confdefs.h"
6304$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006305#ifdef F77_DUMMY_MAIN
6306# ifdef __cplusplus
6307 extern "C"
6308# endif
6309 int F77_DUMMY_MAIN() { return 1; }
6310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006311int
6312main ()
6313{
6314static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6315test_array [0] = 0
6316
6317 ;
6318 return 0;
6319}
6320_ACEOF
6321rm -f conftest.$ac_objext
6322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6323 (eval $ac_compile) 2>&5
6324 ac_status=$?
6325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6326 (exit $ac_status); } &&
6327 { ac_try='test -s conftest.$ac_objext'
6328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6329 (eval $ac_try) 2>&5
6330 ac_status=$?
6331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6332 (exit $ac_status); }; }; then
6333 ac_hi=$ac_mid
6334else
6335 echo "$as_me: failed program was:" >&5
6336cat conftest.$ac_ext >&5
6337ac_lo=`expr '(' $ac_mid ')' + 1`
6338fi
6339rm -f conftest.$ac_objext conftest.$ac_ext
6340done
6341case $ac_lo in
6342?*) ac_cv_sizeof_void_p=$ac_lo;;
6343'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6344echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6345 { (exit 1); exit 1; }; } ;;
6346esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006347else
6348 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006349 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6350echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6351 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006352else
Martin v. Löwis11437992002-04-12 09:54:03 +00006353 cat >conftest.$ac_ext <<_ACEOF
6354#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006355#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006356$ac_includes_default
6357long longval () { return (long) (sizeof (void *)); }
6358unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006359#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006360#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006361#ifdef F77_DUMMY_MAIN
6362# ifdef __cplusplus
6363 extern "C"
6364# endif
6365 int F77_DUMMY_MAIN() { return 1; }
6366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006367int
6368main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006369{
Martin v. Löwis11437992002-04-12 09:54:03 +00006370
6371 FILE *f = fopen ("conftest.val", "w");
6372 if (! f)
6373 exit (1);
6374 if (((long) (sizeof (void *))) < 0)
6375 {
6376 long i = longval ();
6377 if (i != ((long) (sizeof (void *))))
6378 exit (1);
6379 fprintf (f, "%ld\n", i);
6380 }
6381 else
6382 {
6383 unsigned long i = ulongval ();
6384 if (i != ((long) (sizeof (void *))))
6385 exit (1);
6386 fprintf (f, "%lu\n", i);
6387 }
6388 exit (ferror (f) || fclose (f) != 0);
6389
6390 ;
6391 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006392}
Martin v. Löwis11437992002-04-12 09:54:03 +00006393_ACEOF
6394rm -f conftest$ac_exeext
6395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6396 (eval $ac_link) 2>&5
6397 ac_status=$?
6398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6401 (eval $ac_try) 2>&5
6402 ac_status=$?
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6404 (exit $ac_status); }; }; then
6405 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006406else
Martin v. Löwis11437992002-04-12 09:54:03 +00006407 echo "$as_me: program exited with status $ac_status" >&5
6408echo "$as_me: failed program was:" >&5
6409cat conftest.$ac_ext >&5
6410( exit $ac_status )
6411{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6412echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6413 { (exit 1); exit 1; }; }
6414fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006415rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006416fi
6417fi
6418rm -f conftest.val
6419else
Guido van Rossumad678af1998-10-02 14:42:15 +00006420 ac_cv_sizeof_void_p=0
6421fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006422fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006423echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6424echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6425cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006426#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006427_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006428
6429
Martin v. Löwis11437992002-04-12 09:54:03 +00006430echo "$as_me:$LINENO: checking for char" >&5
6431echo $ECHO_N "checking for char... $ECHO_C" >&6
6432if test "${ac_cv_type_char+set}" = set; then
6433 echo $ECHO_N "(cached) $ECHO_C" >&6
6434else
6435 cat >conftest.$ac_ext <<_ACEOF
6436#line $LINENO "configure"
6437#include "confdefs.h"
6438$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006439#ifdef F77_DUMMY_MAIN
6440# ifdef __cplusplus
6441 extern "C"
6442# endif
6443 int F77_DUMMY_MAIN() { return 1; }
6444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006445int
6446main ()
6447{
6448if ((char *) 0)
6449 return 0;
6450if (sizeof (char))
6451 return 0;
6452 ;
6453 return 0;
6454}
6455_ACEOF
6456rm -f conftest.$ac_objext
6457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6458 (eval $ac_compile) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); } &&
6462 { ac_try='test -s conftest.$ac_objext'
6463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6464 (eval $ac_try) 2>&5
6465 ac_status=$?
6466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6467 (exit $ac_status); }; }; then
6468 ac_cv_type_char=yes
6469else
6470 echo "$as_me: failed program was:" >&5
6471cat conftest.$ac_ext >&5
6472ac_cv_type_char=no
6473fi
6474rm -f conftest.$ac_objext conftest.$ac_ext
6475fi
6476echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6477echo "${ECHO_T}$ac_cv_type_char" >&6
6478
6479echo "$as_me:$LINENO: checking size of char" >&5
6480echo $ECHO_N "checking size of char... $ECHO_C" >&6
6481if test "${ac_cv_sizeof_char+set}" = set; then
6482 echo $ECHO_N "(cached) $ECHO_C" >&6
6483else
6484 if test "$ac_cv_type_char" = yes; then
6485 # The cast to unsigned long works around a bug in the HP C Compiler
6486 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6487 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6488 # This bug is HP SR number 8606223364.
6489 if test "$cross_compiling" = yes; then
6490 # Depending upon the size, compute the lo and hi bounds.
6491cat >conftest.$ac_ext <<_ACEOF
6492#line $LINENO "configure"
6493#include "confdefs.h"
6494$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006495#ifdef F77_DUMMY_MAIN
6496# ifdef __cplusplus
6497 extern "C"
6498# endif
6499 int F77_DUMMY_MAIN() { return 1; }
6500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006501int
6502main ()
6503{
6504static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6505test_array [0] = 0
6506
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext
6512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6513 (eval $ac_compile) 2>&5
6514 ac_status=$?
6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516 (exit $ac_status); } &&
6517 { ac_try='test -s conftest.$ac_objext'
6518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6519 (eval $ac_try) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); }; }; then
6523 ac_lo=0 ac_mid=0
6524 while :; do
6525 cat >conftest.$ac_ext <<_ACEOF
6526#line $LINENO "configure"
6527#include "confdefs.h"
6528$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006529#ifdef F77_DUMMY_MAIN
6530# ifdef __cplusplus
6531 extern "C"
6532# endif
6533 int F77_DUMMY_MAIN() { return 1; }
6534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006535int
6536main ()
6537{
6538static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6539test_array [0] = 0
6540
6541 ;
6542 return 0;
6543}
6544_ACEOF
6545rm -f conftest.$ac_objext
6546if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6547 (eval $ac_compile) 2>&5
6548 ac_status=$?
6549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6550 (exit $ac_status); } &&
6551 { ac_try='test -s conftest.$ac_objext'
6552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6553 (eval $ac_try) 2>&5
6554 ac_status=$?
6555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6556 (exit $ac_status); }; }; then
6557 ac_hi=$ac_mid; break
6558else
6559 echo "$as_me: failed program was:" >&5
6560cat conftest.$ac_ext >&5
6561ac_lo=`expr $ac_mid + 1`
6562 if test $ac_lo -le $ac_mid; then
6563 ac_lo= ac_hi=
6564 break
6565 fi
6566 ac_mid=`expr 2 '*' $ac_mid + 1`
6567fi
6568rm -f conftest.$ac_objext conftest.$ac_ext
6569 done
6570else
6571 echo "$as_me: failed program was:" >&5
6572cat conftest.$ac_ext >&5
6573cat >conftest.$ac_ext <<_ACEOF
6574#line $LINENO "configure"
6575#include "confdefs.h"
6576$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006577#ifdef F77_DUMMY_MAIN
6578# ifdef __cplusplus
6579 extern "C"
6580# endif
6581 int F77_DUMMY_MAIN() { return 1; }
6582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006583int
6584main ()
6585{
6586static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6587test_array [0] = 0
6588
6589 ;
6590 return 0;
6591}
6592_ACEOF
6593rm -f conftest.$ac_objext
6594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6595 (eval $ac_compile) 2>&5
6596 ac_status=$?
6597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6598 (exit $ac_status); } &&
6599 { ac_try='test -s conftest.$ac_objext'
6600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6601 (eval $ac_try) 2>&5
6602 ac_status=$?
6603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6604 (exit $ac_status); }; }; then
6605 ac_hi=-1 ac_mid=-1
6606 while :; do
6607 cat >conftest.$ac_ext <<_ACEOF
6608#line $LINENO "configure"
6609#include "confdefs.h"
6610$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006611#ifdef F77_DUMMY_MAIN
6612# ifdef __cplusplus
6613 extern "C"
6614# endif
6615 int F77_DUMMY_MAIN() { return 1; }
6616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006617int
6618main ()
6619{
6620static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6621test_array [0] = 0
6622
6623 ;
6624 return 0;
6625}
6626_ACEOF
6627rm -f conftest.$ac_objext
6628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6629 (eval $ac_compile) 2>&5
6630 ac_status=$?
6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6632 (exit $ac_status); } &&
6633 { ac_try='test -s conftest.$ac_objext'
6634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6635 (eval $ac_try) 2>&5
6636 ac_status=$?
6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6638 (exit $ac_status); }; }; then
6639 ac_lo=$ac_mid; break
6640else
6641 echo "$as_me: failed program was:" >&5
6642cat conftest.$ac_ext >&5
6643ac_hi=`expr '(' $ac_mid ')' - 1`
6644 if test $ac_mid -le $ac_hi; then
6645 ac_lo= ac_hi=
6646 break
6647 fi
6648 ac_mid=`expr 2 '*' $ac_mid`
6649fi
6650rm -f conftest.$ac_objext conftest.$ac_ext
6651 done
6652else
6653 echo "$as_me: failed program was:" >&5
6654cat conftest.$ac_ext >&5
6655ac_lo= ac_hi=
6656fi
6657rm -f conftest.$ac_objext conftest.$ac_ext
6658fi
6659rm -f conftest.$ac_objext conftest.$ac_ext
6660# Binary search between lo and hi bounds.
6661while test "x$ac_lo" != "x$ac_hi"; do
6662 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6663 cat >conftest.$ac_ext <<_ACEOF
6664#line $LINENO "configure"
6665#include "confdefs.h"
6666$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006667#ifdef F77_DUMMY_MAIN
6668# ifdef __cplusplus
6669 extern "C"
6670# endif
6671 int F77_DUMMY_MAIN() { return 1; }
6672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006673int
6674main ()
6675{
6676static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6677test_array [0] = 0
6678
6679 ;
6680 return 0;
6681}
6682_ACEOF
6683rm -f conftest.$ac_objext
6684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6685 (eval $ac_compile) 2>&5
6686 ac_status=$?
6687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688 (exit $ac_status); } &&
6689 { ac_try='test -s conftest.$ac_objext'
6690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691 (eval $ac_try) 2>&5
6692 ac_status=$?
6693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694 (exit $ac_status); }; }; then
6695 ac_hi=$ac_mid
6696else
6697 echo "$as_me: failed program was:" >&5
6698cat conftest.$ac_ext >&5
6699ac_lo=`expr '(' $ac_mid ')' + 1`
6700fi
6701rm -f conftest.$ac_objext conftest.$ac_ext
6702done
6703case $ac_lo in
6704?*) ac_cv_sizeof_char=$ac_lo;;
6705'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6706echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6707 { (exit 1); exit 1; }; } ;;
6708esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709else
6710 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006711 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6712echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6713 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006714else
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 cat >conftest.$ac_ext <<_ACEOF
6716#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006717#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006718$ac_includes_default
6719long longval () { return (long) (sizeof (char)); }
6720unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006721#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006722#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006723#ifdef F77_DUMMY_MAIN
6724# ifdef __cplusplus
6725 extern "C"
6726# endif
6727 int F77_DUMMY_MAIN() { return 1; }
6728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006729int
6730main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006731{
Martin v. Löwis11437992002-04-12 09:54:03 +00006732
6733 FILE *f = fopen ("conftest.val", "w");
6734 if (! f)
6735 exit (1);
6736 if (((long) (sizeof (char))) < 0)
6737 {
6738 long i = longval ();
6739 if (i != ((long) (sizeof (char))))
6740 exit (1);
6741 fprintf (f, "%ld\n", i);
6742 }
6743 else
6744 {
6745 unsigned long i = ulongval ();
6746 if (i != ((long) (sizeof (char))))
6747 exit (1);
6748 fprintf (f, "%lu\n", i);
6749 }
6750 exit (ferror (f) || fclose (f) != 0);
6751
6752 ;
6753 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006754}
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
6756rm -f conftest$ac_exeext
6757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6758 (eval $ac_link) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763 (eval $ac_try) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6767 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006768else
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 echo "$as_me: program exited with status $ac_status" >&5
6770echo "$as_me: failed program was:" >&5
6771cat conftest.$ac_ext >&5
6772( exit $ac_status )
6773{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6774echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6775 { (exit 1); exit 1; }; }
6776fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006777rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
6779fi
6780rm -f conftest.val
6781else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782 ac_cv_sizeof_char=0
6783fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006785echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6786echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6787cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006788#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006789_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006790
6791
Martin v. Löwis11437992002-04-12 09:54:03 +00006792echo "$as_me:$LINENO: checking for short" >&5
6793echo $ECHO_N "checking for short... $ECHO_C" >&6
6794if test "${ac_cv_type_short+set}" = set; then
6795 echo $ECHO_N "(cached) $ECHO_C" >&6
6796else
6797 cat >conftest.$ac_ext <<_ACEOF
6798#line $LINENO "configure"
6799#include "confdefs.h"
6800$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006801#ifdef F77_DUMMY_MAIN
6802# ifdef __cplusplus
6803 extern "C"
6804# endif
6805 int F77_DUMMY_MAIN() { return 1; }
6806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006807int
6808main ()
6809{
6810if ((short *) 0)
6811 return 0;
6812if (sizeof (short))
6813 return 0;
6814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6820 (eval $ac_compile) 2>&5
6821 ac_status=$?
6822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); } &&
6824 { ac_try='test -s conftest.$ac_objext'
6825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6826 (eval $ac_try) 2>&5
6827 ac_status=$?
6828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6829 (exit $ac_status); }; }; then
6830 ac_cv_type_short=yes
6831else
6832 echo "$as_me: failed program was:" >&5
6833cat conftest.$ac_ext >&5
6834ac_cv_type_short=no
6835fi
6836rm -f conftest.$ac_objext conftest.$ac_ext
6837fi
6838echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6839echo "${ECHO_T}$ac_cv_type_short" >&6
6840
6841echo "$as_me:$LINENO: checking size of short" >&5
6842echo $ECHO_N "checking size of short... $ECHO_C" >&6
6843if test "${ac_cv_sizeof_short+set}" = set; then
6844 echo $ECHO_N "(cached) $ECHO_C" >&6
6845else
6846 if test "$ac_cv_type_short" = yes; then
6847 # The cast to unsigned long works around a bug in the HP C Compiler
6848 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6849 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6850 # This bug is HP SR number 8606223364.
6851 if test "$cross_compiling" = yes; then
6852 # Depending upon the size, compute the lo and hi bounds.
6853cat >conftest.$ac_ext <<_ACEOF
6854#line $LINENO "configure"
6855#include "confdefs.h"
6856$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006857#ifdef F77_DUMMY_MAIN
6858# ifdef __cplusplus
6859 extern "C"
6860# endif
6861 int F77_DUMMY_MAIN() { return 1; }
6862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006863int
6864main ()
6865{
6866static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6867test_array [0] = 0
6868
6869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
6874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6875 (eval $ac_compile) 2>&5
6876 ac_status=$?
6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
6879 { ac_try='test -s conftest.$ac_objext'
6880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6885 ac_lo=0 ac_mid=0
6886 while :; do
6887 cat >conftest.$ac_ext <<_ACEOF
6888#line $LINENO "configure"
6889#include "confdefs.h"
6890$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006891#ifdef F77_DUMMY_MAIN
6892# ifdef __cplusplus
6893 extern "C"
6894# endif
6895 int F77_DUMMY_MAIN() { return 1; }
6896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006897int
6898main ()
6899{
6900static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6901test_array [0] = 0
6902
6903 ;
6904 return 0;
6905}
6906_ACEOF
6907rm -f conftest.$ac_objext
6908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6909 (eval $ac_compile) 2>&5
6910 ac_status=$?
6911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912 (exit $ac_status); } &&
6913 { ac_try='test -s conftest.$ac_objext'
6914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6915 (eval $ac_try) 2>&5
6916 ac_status=$?
6917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918 (exit $ac_status); }; }; then
6919 ac_hi=$ac_mid; break
6920else
6921 echo "$as_me: failed program was:" >&5
6922cat conftest.$ac_ext >&5
6923ac_lo=`expr $ac_mid + 1`
6924 if test $ac_lo -le $ac_mid; then
6925 ac_lo= ac_hi=
6926 break
6927 fi
6928 ac_mid=`expr 2 '*' $ac_mid + 1`
6929fi
6930rm -f conftest.$ac_objext conftest.$ac_ext
6931 done
6932else
6933 echo "$as_me: failed program was:" >&5
6934cat conftest.$ac_ext >&5
6935cat >conftest.$ac_ext <<_ACEOF
6936#line $LINENO "configure"
6937#include "confdefs.h"
6938$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006939#ifdef F77_DUMMY_MAIN
6940# ifdef __cplusplus
6941 extern "C"
6942# endif
6943 int F77_DUMMY_MAIN() { return 1; }
6944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006945int
6946main ()
6947{
6948static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6949test_array [0] = 0
6950
6951 ;
6952 return 0;
6953}
6954_ACEOF
6955rm -f conftest.$ac_objext
6956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6957 (eval $ac_compile) 2>&5
6958 ac_status=$?
6959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6960 (exit $ac_status); } &&
6961 { ac_try='test -s conftest.$ac_objext'
6962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6963 (eval $ac_try) 2>&5
6964 ac_status=$?
6965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966 (exit $ac_status); }; }; then
6967 ac_hi=-1 ac_mid=-1
6968 while :; do
6969 cat >conftest.$ac_ext <<_ACEOF
6970#line $LINENO "configure"
6971#include "confdefs.h"
6972$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006973#ifdef F77_DUMMY_MAIN
6974# ifdef __cplusplus
6975 extern "C"
6976# endif
6977 int F77_DUMMY_MAIN() { return 1; }
6978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006979int
6980main ()
6981{
6982static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6983test_array [0] = 0
6984
6985 ;
6986 return 0;
6987}
6988_ACEOF
6989rm -f conftest.$ac_objext
6990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6991 (eval $ac_compile) 2>&5
6992 ac_status=$?
6993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); } &&
6995 { ac_try='test -s conftest.$ac_objext'
6996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6997 (eval $ac_try) 2>&5
6998 ac_status=$?
6999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7000 (exit $ac_status); }; }; then
7001 ac_lo=$ac_mid; break
7002else
7003 echo "$as_me: failed program was:" >&5
7004cat conftest.$ac_ext >&5
7005ac_hi=`expr '(' $ac_mid ')' - 1`
7006 if test $ac_mid -le $ac_hi; then
7007 ac_lo= ac_hi=
7008 break
7009 fi
7010 ac_mid=`expr 2 '*' $ac_mid`
7011fi
7012rm -f conftest.$ac_objext conftest.$ac_ext
7013 done
7014else
7015 echo "$as_me: failed program was:" >&5
7016cat conftest.$ac_ext >&5
7017ac_lo= ac_hi=
7018fi
7019rm -f conftest.$ac_objext conftest.$ac_ext
7020fi
7021rm -f conftest.$ac_objext conftest.$ac_ext
7022# Binary search between lo and hi bounds.
7023while test "x$ac_lo" != "x$ac_hi"; do
7024 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7025 cat >conftest.$ac_ext <<_ACEOF
7026#line $LINENO "configure"
7027#include "confdefs.h"
7028$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007029#ifdef F77_DUMMY_MAIN
7030# ifdef __cplusplus
7031 extern "C"
7032# endif
7033 int F77_DUMMY_MAIN() { return 1; }
7034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007035int
7036main ()
7037{
7038static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7039test_array [0] = 0
7040
7041 ;
7042 return 0;
7043}
7044_ACEOF
7045rm -f conftest.$ac_objext
7046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7047 (eval $ac_compile) 2>&5
7048 ac_status=$?
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); } &&
7051 { ac_try='test -s conftest.$ac_objext'
7052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7053 (eval $ac_try) 2>&5
7054 ac_status=$?
7055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7056 (exit $ac_status); }; }; then
7057 ac_hi=$ac_mid
7058else
7059 echo "$as_me: failed program was:" >&5
7060cat conftest.$ac_ext >&5
7061ac_lo=`expr '(' $ac_mid ')' + 1`
7062fi
7063rm -f conftest.$ac_objext conftest.$ac_ext
7064done
7065case $ac_lo in
7066?*) ac_cv_sizeof_short=$ac_lo;;
7067'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7068echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7069 { (exit 1); exit 1; }; } ;;
7070esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007071else
7072 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7074echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7075 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007076else
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 cat >conftest.$ac_ext <<_ACEOF
7078#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007079#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007080$ac_includes_default
7081long longval () { return (long) (sizeof (short)); }
7082unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007083#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007084#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007085#ifdef F77_DUMMY_MAIN
7086# ifdef __cplusplus
7087 extern "C"
7088# endif
7089 int F77_DUMMY_MAIN() { return 1; }
7090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007091int
7092main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093{
Martin v. Löwis11437992002-04-12 09:54:03 +00007094
7095 FILE *f = fopen ("conftest.val", "w");
7096 if (! f)
7097 exit (1);
7098 if (((long) (sizeof (short))) < 0)
7099 {
7100 long i = longval ();
7101 if (i != ((long) (sizeof (short))))
7102 exit (1);
7103 fprintf (f, "%ld\n", i);
7104 }
7105 else
7106 {
7107 unsigned long i = ulongval ();
7108 if (i != ((long) (sizeof (short))))
7109 exit (1);
7110 fprintf (f, "%lu\n", i);
7111 }
7112 exit (ferror (f) || fclose (f) != 0);
7113
7114 ;
7115 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007116}
Martin v. Löwis11437992002-04-12 09:54:03 +00007117_ACEOF
7118rm -f conftest$ac_exeext
7119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7120 (eval $ac_link) 2>&5
7121 ac_status=$?
7122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7125 (eval $ac_try) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); }; }; then
7129 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007130else
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 echo "$as_me: program exited with status $ac_status" >&5
7132echo "$as_me: failed program was:" >&5
7133cat conftest.$ac_ext >&5
7134( exit $ac_status )
7135{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7136echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7137 { (exit 1); exit 1; }; }
7138fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007139rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007140fi
7141fi
7142rm -f conftest.val
7143else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007144 ac_cv_sizeof_short=0
7145fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007147echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7148echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7149cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007150#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007151_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152
7153
Martin v. Löwis11437992002-04-12 09:54:03 +00007154echo "$as_me:$LINENO: checking for float" >&5
7155echo $ECHO_N "checking for float... $ECHO_C" >&6
7156if test "${ac_cv_type_float+set}" = set; then
7157 echo $ECHO_N "(cached) $ECHO_C" >&6
7158else
7159 cat >conftest.$ac_ext <<_ACEOF
7160#line $LINENO "configure"
7161#include "confdefs.h"
7162$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007163#ifdef F77_DUMMY_MAIN
7164# ifdef __cplusplus
7165 extern "C"
7166# endif
7167 int F77_DUMMY_MAIN() { return 1; }
7168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
7172if ((float *) 0)
7173 return 0;
7174if (sizeof (float))
7175 return 0;
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7182 (eval $ac_compile) 2>&5
7183 ac_status=$?
7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185 (exit $ac_status); } &&
7186 { ac_try='test -s conftest.$ac_objext'
7187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188 (eval $ac_try) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); }; }; then
7192 ac_cv_type_float=yes
7193else
7194 echo "$as_me: failed program was:" >&5
7195cat conftest.$ac_ext >&5
7196ac_cv_type_float=no
7197fi
7198rm -f conftest.$ac_objext conftest.$ac_ext
7199fi
7200echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7201echo "${ECHO_T}$ac_cv_type_float" >&6
7202
7203echo "$as_me:$LINENO: checking size of float" >&5
7204echo $ECHO_N "checking size of float... $ECHO_C" >&6
7205if test "${ac_cv_sizeof_float+set}" = set; then
7206 echo $ECHO_N "(cached) $ECHO_C" >&6
7207else
7208 if test "$ac_cv_type_float" = yes; then
7209 # The cast to unsigned long works around a bug in the HP C Compiler
7210 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7211 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7212 # This bug is HP SR number 8606223364.
7213 if test "$cross_compiling" = yes; then
7214 # Depending upon the size, compute the lo and hi bounds.
7215cat >conftest.$ac_ext <<_ACEOF
7216#line $LINENO "configure"
7217#include "confdefs.h"
7218$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007219#ifdef F77_DUMMY_MAIN
7220# ifdef __cplusplus
7221 extern "C"
7222# endif
7223 int F77_DUMMY_MAIN() { return 1; }
7224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007225int
7226main ()
7227{
7228static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7229test_array [0] = 0
7230
7231 ;
7232 return 0;
7233}
7234_ACEOF
7235rm -f conftest.$ac_objext
7236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7237 (eval $ac_compile) 2>&5
7238 ac_status=$?
7239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240 (exit $ac_status); } &&
7241 { ac_try='test -s conftest.$ac_objext'
7242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243 (eval $ac_try) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); }; }; then
7247 ac_lo=0 ac_mid=0
7248 while :; do
7249 cat >conftest.$ac_ext <<_ACEOF
7250#line $LINENO "configure"
7251#include "confdefs.h"
7252$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007253#ifdef F77_DUMMY_MAIN
7254# ifdef __cplusplus
7255 extern "C"
7256# endif
7257 int F77_DUMMY_MAIN() { return 1; }
7258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007259int
7260main ()
7261{
7262static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7263test_array [0] = 0
7264
7265 ;
7266 return 0;
7267}
7268_ACEOF
7269rm -f conftest.$ac_objext
7270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7271 (eval $ac_compile) 2>&5
7272 ac_status=$?
7273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7274 (exit $ac_status); } &&
7275 { ac_try='test -s conftest.$ac_objext'
7276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7277 (eval $ac_try) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); }; }; then
7281 ac_hi=$ac_mid; break
7282else
7283 echo "$as_me: failed program was:" >&5
7284cat conftest.$ac_ext >&5
7285ac_lo=`expr $ac_mid + 1`
7286 if test $ac_lo -le $ac_mid; then
7287 ac_lo= ac_hi=
7288 break
7289 fi
7290 ac_mid=`expr 2 '*' $ac_mid + 1`
7291fi
7292rm -f conftest.$ac_objext conftest.$ac_ext
7293 done
7294else
7295 echo "$as_me: failed program was:" >&5
7296cat conftest.$ac_ext >&5
7297cat >conftest.$ac_ext <<_ACEOF
7298#line $LINENO "configure"
7299#include "confdefs.h"
7300$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007301#ifdef F77_DUMMY_MAIN
7302# ifdef __cplusplus
7303 extern "C"
7304# endif
7305 int F77_DUMMY_MAIN() { return 1; }
7306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
7310static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7311test_array [0] = 0
7312
7313 ;
7314 return 0;
7315}
7316_ACEOF
7317rm -f conftest.$ac_objext
7318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7319 (eval $ac_compile) 2>&5
7320 ac_status=$?
7321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7322 (exit $ac_status); } &&
7323 { ac_try='test -s conftest.$ac_objext'
7324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7325 (eval $ac_try) 2>&5
7326 ac_status=$?
7327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328 (exit $ac_status); }; }; then
7329 ac_hi=-1 ac_mid=-1
7330 while :; do
7331 cat >conftest.$ac_ext <<_ACEOF
7332#line $LINENO "configure"
7333#include "confdefs.h"
7334$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007335#ifdef F77_DUMMY_MAIN
7336# ifdef __cplusplus
7337 extern "C"
7338# endif
7339 int F77_DUMMY_MAIN() { return 1; }
7340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007341int
7342main ()
7343{
7344static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7345test_array [0] = 0
7346
7347 ;
7348 return 0;
7349}
7350_ACEOF
7351rm -f conftest.$ac_objext
7352if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7353 (eval $ac_compile) 2>&5
7354 ac_status=$?
7355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356 (exit $ac_status); } &&
7357 { ac_try='test -s conftest.$ac_objext'
7358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7359 (eval $ac_try) 2>&5
7360 ac_status=$?
7361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362 (exit $ac_status); }; }; then
7363 ac_lo=$ac_mid; break
7364else
7365 echo "$as_me: failed program was:" >&5
7366cat conftest.$ac_ext >&5
7367ac_hi=`expr '(' $ac_mid ')' - 1`
7368 if test $ac_mid -le $ac_hi; then
7369 ac_lo= ac_hi=
7370 break
7371 fi
7372 ac_mid=`expr 2 '*' $ac_mid`
7373fi
7374rm -f conftest.$ac_objext conftest.$ac_ext
7375 done
7376else
7377 echo "$as_me: failed program was:" >&5
7378cat conftest.$ac_ext >&5
7379ac_lo= ac_hi=
7380fi
7381rm -f conftest.$ac_objext conftest.$ac_ext
7382fi
7383rm -f conftest.$ac_objext conftest.$ac_ext
7384# Binary search between lo and hi bounds.
7385while test "x$ac_lo" != "x$ac_hi"; do
7386 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7387 cat >conftest.$ac_ext <<_ACEOF
7388#line $LINENO "configure"
7389#include "confdefs.h"
7390$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007391#ifdef F77_DUMMY_MAIN
7392# ifdef __cplusplus
7393 extern "C"
7394# endif
7395 int F77_DUMMY_MAIN() { return 1; }
7396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007397int
7398main ()
7399{
7400static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7401test_array [0] = 0
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407rm -f conftest.$ac_objext
7408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7409 (eval $ac_compile) 2>&5
7410 ac_status=$?
7411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7412 (exit $ac_status); } &&
7413 { ac_try='test -s conftest.$ac_objext'
7414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415 (eval $ac_try) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); }; }; then
7419 ac_hi=$ac_mid
7420else
7421 echo "$as_me: failed program was:" >&5
7422cat conftest.$ac_ext >&5
7423ac_lo=`expr '(' $ac_mid ')' + 1`
7424fi
7425rm -f conftest.$ac_objext conftest.$ac_ext
7426done
7427case $ac_lo in
7428?*) ac_cv_sizeof_float=$ac_lo;;
7429'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7430echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7431 { (exit 1); exit 1; }; } ;;
7432esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007433else
7434 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007435 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7436echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7437 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438else
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 cat >conftest.$ac_ext <<_ACEOF
7440#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007441#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007442$ac_includes_default
7443long longval () { return (long) (sizeof (float)); }
7444unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007445#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007446#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007447#ifdef F77_DUMMY_MAIN
7448# ifdef __cplusplus
7449 extern "C"
7450# endif
7451 int F77_DUMMY_MAIN() { return 1; }
7452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007453int
7454main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007455{
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457 FILE *f = fopen ("conftest.val", "w");
7458 if (! f)
7459 exit (1);
7460 if (((long) (sizeof (float))) < 0)
7461 {
7462 long i = longval ();
7463 if (i != ((long) (sizeof (float))))
7464 exit (1);
7465 fprintf (f, "%ld\n", i);
7466 }
7467 else
7468 {
7469 unsigned long i = ulongval ();
7470 if (i != ((long) (sizeof (float))))
7471 exit (1);
7472 fprintf (f, "%lu\n", i);
7473 }
7474 exit (ferror (f) || fclose (f) != 0);
7475
7476 ;
7477 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007478}
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
7480rm -f conftest$ac_exeext
7481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7482 (eval $ac_link) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007492else
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 echo "$as_me: program exited with status $ac_status" >&5
7494echo "$as_me: failed program was:" >&5
7495cat conftest.$ac_ext >&5
7496( exit $ac_status )
7497{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7498echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7499 { (exit 1); exit 1; }; }
7500fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007501rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007502fi
7503fi
7504rm -f conftest.val
7505else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007506 ac_cv_sizeof_float=0
7507fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007509echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7510echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7511cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007514
7515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516echo "$as_me:$LINENO: checking for double" >&5
7517echo $ECHO_N "checking for double... $ECHO_C" >&6
7518if test "${ac_cv_type_double+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521 cat >conftest.$ac_ext <<_ACEOF
7522#line $LINENO "configure"
7523#include "confdefs.h"
7524$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007525#ifdef F77_DUMMY_MAIN
7526# ifdef __cplusplus
7527 extern "C"
7528# endif
7529 int F77_DUMMY_MAIN() { return 1; }
7530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007531int
7532main ()
7533{
7534if ((double *) 0)
7535 return 0;
7536if (sizeof (double))
7537 return 0;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7545 ac_status=$?
7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7550 (eval $ac_try) 2>&5
7551 ac_status=$?
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 ac_cv_type_double=yes
7555else
7556 echo "$as_me: failed program was:" >&5
7557cat conftest.$ac_ext >&5
7558ac_cv_type_double=no
7559fi
7560rm -f conftest.$ac_objext conftest.$ac_ext
7561fi
7562echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7563echo "${ECHO_T}$ac_cv_type_double" >&6
7564
7565echo "$as_me:$LINENO: checking size of double" >&5
7566echo $ECHO_N "checking size of double... $ECHO_C" >&6
7567if test "${ac_cv_sizeof_double+set}" = set; then
7568 echo $ECHO_N "(cached) $ECHO_C" >&6
7569else
7570 if test "$ac_cv_type_double" = yes; then
7571 # The cast to unsigned long works around a bug in the HP C Compiler
7572 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7573 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7574 # This bug is HP SR number 8606223364.
7575 if test "$cross_compiling" = yes; then
7576 # Depending upon the size, compute the lo and hi bounds.
7577cat >conftest.$ac_ext <<_ACEOF
7578#line $LINENO "configure"
7579#include "confdefs.h"
7580$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007581#ifdef F77_DUMMY_MAIN
7582# ifdef __cplusplus
7583 extern "C"
7584# endif
7585 int F77_DUMMY_MAIN() { return 1; }
7586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007587int
7588main ()
7589{
7590static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7591test_array [0] = 0
7592
7593 ;
7594 return 0;
7595}
7596_ACEOF
7597rm -f conftest.$ac_objext
7598if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7599 (eval $ac_compile) 2>&5
7600 ac_status=$?
7601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602 (exit $ac_status); } &&
7603 { ac_try='test -s conftest.$ac_objext'
7604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7605 (eval $ac_try) 2>&5
7606 ac_status=$?
7607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7608 (exit $ac_status); }; }; then
7609 ac_lo=0 ac_mid=0
7610 while :; do
7611 cat >conftest.$ac_ext <<_ACEOF
7612#line $LINENO "configure"
7613#include "confdefs.h"
7614$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007615#ifdef F77_DUMMY_MAIN
7616# ifdef __cplusplus
7617 extern "C"
7618# endif
7619 int F77_DUMMY_MAIN() { return 1; }
7620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007621int
7622main ()
7623{
7624static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7625test_array [0] = 0
7626
7627 ;
7628 return 0;
7629}
7630_ACEOF
7631rm -f conftest.$ac_objext
7632if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7633 (eval $ac_compile) 2>&5
7634 ac_status=$?
7635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7636 (exit $ac_status); } &&
7637 { ac_try='test -s conftest.$ac_objext'
7638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7639 (eval $ac_try) 2>&5
7640 ac_status=$?
7641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7642 (exit $ac_status); }; }; then
7643 ac_hi=$ac_mid; break
7644else
7645 echo "$as_me: failed program was:" >&5
7646cat conftest.$ac_ext >&5
7647ac_lo=`expr $ac_mid + 1`
7648 if test $ac_lo -le $ac_mid; then
7649 ac_lo= ac_hi=
7650 break
7651 fi
7652 ac_mid=`expr 2 '*' $ac_mid + 1`
7653fi
7654rm -f conftest.$ac_objext conftest.$ac_ext
7655 done
7656else
7657 echo "$as_me: failed program was:" >&5
7658cat conftest.$ac_ext >&5
7659cat >conftest.$ac_ext <<_ACEOF
7660#line $LINENO "configure"
7661#include "confdefs.h"
7662$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007663#ifdef F77_DUMMY_MAIN
7664# ifdef __cplusplus
7665 extern "C"
7666# endif
7667 int F77_DUMMY_MAIN() { return 1; }
7668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007669int
7670main ()
7671{
7672static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7673test_array [0] = 0
7674
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
7680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7681 (eval $ac_compile) 2>&5
7682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest.$ac_objext'
7686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7687 (eval $ac_try) 2>&5
7688 ac_status=$?
7689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7691 ac_hi=-1 ac_mid=-1
7692 while :; do
7693 cat >conftest.$ac_ext <<_ACEOF
7694#line $LINENO "configure"
7695#include "confdefs.h"
7696$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007697#ifdef F77_DUMMY_MAIN
7698# ifdef __cplusplus
7699 extern "C"
7700# endif
7701 int F77_DUMMY_MAIN() { return 1; }
7702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007703int
7704main ()
7705{
7706static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7707test_array [0] = 0
7708
7709 ;
7710 return 0;
7711}
7712_ACEOF
7713rm -f conftest.$ac_objext
7714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); } &&
7719 { ac_try='test -s conftest.$ac_objext'
7720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_lo=$ac_mid; break
7726else
7727 echo "$as_me: failed program was:" >&5
7728cat conftest.$ac_ext >&5
7729ac_hi=`expr '(' $ac_mid ')' - 1`
7730 if test $ac_mid -le $ac_hi; then
7731 ac_lo= ac_hi=
7732 break
7733 fi
7734 ac_mid=`expr 2 '*' $ac_mid`
7735fi
7736rm -f conftest.$ac_objext conftest.$ac_ext
7737 done
7738else
7739 echo "$as_me: failed program was:" >&5
7740cat conftest.$ac_ext >&5
7741ac_lo= ac_hi=
7742fi
7743rm -f conftest.$ac_objext conftest.$ac_ext
7744fi
7745rm -f conftest.$ac_objext conftest.$ac_ext
7746# Binary search between lo and hi bounds.
7747while test "x$ac_lo" != "x$ac_hi"; do
7748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7749 cat >conftest.$ac_ext <<_ACEOF
7750#line $LINENO "configure"
7751#include "confdefs.h"
7752$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007753#ifdef F77_DUMMY_MAIN
7754# ifdef __cplusplus
7755 extern "C"
7756# endif
7757 int F77_DUMMY_MAIN() { return 1; }
7758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007759int
7760main ()
7761{
7762static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7763test_array [0] = 0
7764
7765 ;
7766 return 0;
7767}
7768_ACEOF
7769rm -f conftest.$ac_objext
7770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7771 (eval $ac_compile) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); } &&
7775 { ac_try='test -s conftest.$ac_objext'
7776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7777 (eval $ac_try) 2>&5
7778 ac_status=$?
7779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7780 (exit $ac_status); }; }; then
7781 ac_hi=$ac_mid
7782else
7783 echo "$as_me: failed program was:" >&5
7784cat conftest.$ac_ext >&5
7785ac_lo=`expr '(' $ac_mid ')' + 1`
7786fi
7787rm -f conftest.$ac_objext conftest.$ac_ext
7788done
7789case $ac_lo in
7790?*) ac_cv_sizeof_double=$ac_lo;;
7791'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7792echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7793 { (exit 1); exit 1; }; } ;;
7794esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007795else
7796 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7798echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7799 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 cat >conftest.$ac_ext <<_ACEOF
7802#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007803#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007804$ac_includes_default
7805long longval () { return (long) (sizeof (double)); }
7806unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007807#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007808#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007809#ifdef F77_DUMMY_MAIN
7810# ifdef __cplusplus
7811 extern "C"
7812# endif
7813 int F77_DUMMY_MAIN() { return 1; }
7814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007815int
7816main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817{
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
7819 FILE *f = fopen ("conftest.val", "w");
7820 if (! f)
7821 exit (1);
7822 if (((long) (sizeof (double))) < 0)
7823 {
7824 long i = longval ();
7825 if (i != ((long) (sizeof (double))))
7826 exit (1);
7827 fprintf (f, "%ld\n", i);
7828 }
7829 else
7830 {
7831 unsigned long i = ulongval ();
7832 if (i != ((long) (sizeof (double))))
7833 exit (1);
7834 fprintf (f, "%lu\n", i);
7835 }
7836 exit (ferror (f) || fclose (f) != 0);
7837
7838 ;
7839 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007840}
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
7842rm -f conftest$ac_exeext
7843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7844 (eval $ac_link) 2>&5
7845 ac_status=$?
7846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7849 (eval $ac_try) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); }; }; then
7853 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007854else
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 echo "$as_me: program exited with status $ac_status" >&5
7856echo "$as_me: failed program was:" >&5
7857cat conftest.$ac_ext >&5
7858( exit $ac_status )
7859{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7860echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7861 { (exit 1); exit 1; }; }
7862fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007863rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
7865fi
7866rm -f conftest.val
7867else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868 ac_cv_sizeof_double=0
7869fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007871echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7872echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7873cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878echo "$as_me:$LINENO: checking for fpos_t" >&5
7879echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7880if test "${ac_cv_type_fpos_t+set}" = set; then
7881 echo $ECHO_N "(cached) $ECHO_C" >&6
7882else
7883 cat >conftest.$ac_ext <<_ACEOF
7884#line $LINENO "configure"
7885#include "confdefs.h"
7886$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007887#ifdef F77_DUMMY_MAIN
7888# ifdef __cplusplus
7889 extern "C"
7890# endif
7891 int F77_DUMMY_MAIN() { return 1; }
7892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
7896if ((fpos_t *) 0)
7897 return 0;
7898if (sizeof (fpos_t))
7899 return 0;
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904rm -f conftest.$ac_objext
7905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7906 (eval $ac_compile) 2>&5
7907 ac_status=$?
7908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7909 (exit $ac_status); } &&
7910 { ac_try='test -s conftest.$ac_objext'
7911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7912 (eval $ac_try) 2>&5
7913 ac_status=$?
7914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7915 (exit $ac_status); }; }; then
7916 ac_cv_type_fpos_t=yes
7917else
7918 echo "$as_me: failed program was:" >&5
7919cat conftest.$ac_ext >&5
7920ac_cv_type_fpos_t=no
7921fi
7922rm -f conftest.$ac_objext conftest.$ac_ext
7923fi
7924echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7925echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7926
7927echo "$as_me:$LINENO: checking size of fpos_t" >&5
7928echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7929if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 if test "$ac_cv_type_fpos_t" = yes; then
7933 # The cast to unsigned long works around a bug in the HP C Compiler
7934 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7935 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7936 # This bug is HP SR number 8606223364.
7937 if test "$cross_compiling" = yes; then
7938 # Depending upon the size, compute the lo and hi bounds.
7939cat >conftest.$ac_ext <<_ACEOF
7940#line $LINENO "configure"
7941#include "confdefs.h"
7942$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007943#ifdef F77_DUMMY_MAIN
7944# ifdef __cplusplus
7945 extern "C"
7946# endif
7947 int F77_DUMMY_MAIN() { return 1; }
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949int
7950main ()
7951{
7952static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7953test_array [0] = 0
7954
7955 ;
7956 return 0;
7957}
7958_ACEOF
7959rm -f conftest.$ac_objext
7960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961 (eval $ac_compile) 2>&5
7962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
7965 { ac_try='test -s conftest.$ac_objext'
7966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7967 (eval $ac_try) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); }; }; then
7971 ac_lo=0 ac_mid=0
7972 while :; do
7973 cat >conftest.$ac_ext <<_ACEOF
7974#line $LINENO "configure"
7975#include "confdefs.h"
7976$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007977#ifdef F77_DUMMY_MAIN
7978# ifdef __cplusplus
7979 extern "C"
7980# endif
7981 int F77_DUMMY_MAIN() { return 1; }
7982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007983int
7984main ()
7985{
7986static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7987test_array [0] = 0
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993rm -f conftest.$ac_objext
7994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7995 (eval $ac_compile) 2>&5
7996 ac_status=$?
7997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7998 (exit $ac_status); } &&
7999 { ac_try='test -s conftest.$ac_objext'
8000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8001 (eval $ac_try) 2>&5
8002 ac_status=$?
8003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8004 (exit $ac_status); }; }; then
8005 ac_hi=$ac_mid; break
8006else
8007 echo "$as_me: failed program was:" >&5
8008cat conftest.$ac_ext >&5
8009ac_lo=`expr $ac_mid + 1`
8010 if test $ac_lo -le $ac_mid; then
8011 ac_lo= ac_hi=
8012 break
8013 fi
8014 ac_mid=`expr 2 '*' $ac_mid + 1`
8015fi
8016rm -f conftest.$ac_objext conftest.$ac_ext
8017 done
8018else
8019 echo "$as_me: failed program was:" >&5
8020cat conftest.$ac_ext >&5
8021cat >conftest.$ac_ext <<_ACEOF
8022#line $LINENO "configure"
8023#include "confdefs.h"
8024$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008025#ifdef F77_DUMMY_MAIN
8026# ifdef __cplusplus
8027 extern "C"
8028# endif
8029 int F77_DUMMY_MAIN() { return 1; }
8030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008031int
8032main ()
8033{
8034static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8035test_array [0] = 0
8036
8037 ;
8038 return 0;
8039}
8040_ACEOF
8041rm -f conftest.$ac_objext
8042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8043 (eval $ac_compile) 2>&5
8044 ac_status=$?
8045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8046 (exit $ac_status); } &&
8047 { ac_try='test -s conftest.$ac_objext'
8048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8049 (eval $ac_try) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); }; }; then
8053 ac_hi=-1 ac_mid=-1
8054 while :; do
8055 cat >conftest.$ac_ext <<_ACEOF
8056#line $LINENO "configure"
8057#include "confdefs.h"
8058$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008059#ifdef F77_DUMMY_MAIN
8060# ifdef __cplusplus
8061 extern "C"
8062# endif
8063 int F77_DUMMY_MAIN() { return 1; }
8064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008065int
8066main ()
8067{
8068static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8069test_array [0] = 0
8070
8071 ;
8072 return 0;
8073}
8074_ACEOF
8075rm -f conftest.$ac_objext
8076if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8077 (eval $ac_compile) 2>&5
8078 ac_status=$?
8079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 (exit $ac_status); } &&
8081 { ac_try='test -s conftest.$ac_objext'
8082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8083 (eval $ac_try) 2>&5
8084 ac_status=$?
8085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086 (exit $ac_status); }; }; then
8087 ac_lo=$ac_mid; break
8088else
8089 echo "$as_me: failed program was:" >&5
8090cat conftest.$ac_ext >&5
8091ac_hi=`expr '(' $ac_mid ')' - 1`
8092 if test $ac_mid -le $ac_hi; then
8093 ac_lo= ac_hi=
8094 break
8095 fi
8096 ac_mid=`expr 2 '*' $ac_mid`
8097fi
8098rm -f conftest.$ac_objext conftest.$ac_ext
8099 done
8100else
8101 echo "$as_me: failed program was:" >&5
8102cat conftest.$ac_ext >&5
8103ac_lo= ac_hi=
8104fi
8105rm -f conftest.$ac_objext conftest.$ac_ext
8106fi
8107rm -f conftest.$ac_objext conftest.$ac_ext
8108# Binary search between lo and hi bounds.
8109while test "x$ac_lo" != "x$ac_hi"; do
8110 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8111 cat >conftest.$ac_ext <<_ACEOF
8112#line $LINENO "configure"
8113#include "confdefs.h"
8114$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008115#ifdef F77_DUMMY_MAIN
8116# ifdef __cplusplus
8117 extern "C"
8118# endif
8119 int F77_DUMMY_MAIN() { return 1; }
8120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
8124static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
8132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8133 (eval $ac_compile) 2>&5
8134 ac_status=$?
8135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8136 (exit $ac_status); } &&
8137 { ac_try='test -s conftest.$ac_objext'
8138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8139 (eval $ac_try) 2>&5
8140 ac_status=$?
8141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8142 (exit $ac_status); }; }; then
8143 ac_hi=$ac_mid
8144else
8145 echo "$as_me: failed program was:" >&5
8146cat conftest.$ac_ext >&5
8147ac_lo=`expr '(' $ac_mid ')' + 1`
8148fi
8149rm -f conftest.$ac_objext conftest.$ac_ext
8150done
8151case $ac_lo in
8152?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8153'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8154echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8155 { (exit 1); exit 1; }; } ;;
8156esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008157else
8158 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8160echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8161 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008162else
Martin v. Löwis11437992002-04-12 09:54:03 +00008163 cat >conftest.$ac_ext <<_ACEOF
8164#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008165#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008166$ac_includes_default
8167long longval () { return (long) (sizeof (fpos_t)); }
8168unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008169#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008170#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008171#ifdef F77_DUMMY_MAIN
8172# ifdef __cplusplus
8173 extern "C"
8174# endif
8175 int F77_DUMMY_MAIN() { return 1; }
8176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008177int
8178main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008179{
Martin v. Löwis11437992002-04-12 09:54:03 +00008180
8181 FILE *f = fopen ("conftest.val", "w");
8182 if (! f)
8183 exit (1);
8184 if (((long) (sizeof (fpos_t))) < 0)
8185 {
8186 long i = longval ();
8187 if (i != ((long) (sizeof (fpos_t))))
8188 exit (1);
8189 fprintf (f, "%ld\n", i);
8190 }
8191 else
8192 {
8193 unsigned long i = ulongval ();
8194 if (i != ((long) (sizeof (fpos_t))))
8195 exit (1);
8196 fprintf (f, "%lu\n", i);
8197 }
8198 exit (ferror (f) || fclose (f) != 0);
8199
8200 ;
8201 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008202}
Martin v. Löwis11437992002-04-12 09:54:03 +00008203_ACEOF
8204rm -f conftest$ac_exeext
8205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8206 (eval $ac_link) 2>&5
8207 ac_status=$?
8208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8211 (eval $ac_try) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); }; }; then
8215 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008216else
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me: program exited with status $ac_status" >&5
8218echo "$as_me: failed program was:" >&5
8219cat conftest.$ac_ext >&5
8220( exit $ac_status )
8221{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8222echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8223 { (exit 1); exit 1; }; }
8224fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008225rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008226fi
8227fi
8228rm -f conftest.val
8229else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008230 ac_cv_sizeof_fpos_t=0
8231fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008233echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8234echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8235cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008236#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008237_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008238
Michael W. Hudson54241132001-12-07 15:38:26 +00008239
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241echo "$as_me:$LINENO: checking for long long support" >&5
8242echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008243have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008244cat >conftest.$ac_ext <<_ACEOF
8245#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008246#include "confdefs.h"
8247
Barry Warsawfe33b792003-01-07 22:42:49 +00008248#ifdef F77_DUMMY_MAIN
8249# ifdef __cplusplus
8250 extern "C"
8251# endif
8252 int F77_DUMMY_MAIN() { return 1; }
8253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
8256{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008257long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 ;
8259 return 0;
8260}
8261_ACEOF
8262rm -f conftest.$ac_objext
8263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8264 (eval $ac_compile) 2>&5
8265 ac_status=$?
8266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); } &&
8268 { ac_try='test -s conftest.$ac_objext'
8269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270 (eval $ac_try) 2>&5
8271 ac_status=$?
8272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273 (exit $ac_status); }; }; then
8274
8275
8276cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008277#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
8279
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008280 have_long_long=yes
8281
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282else
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 echo "$as_me: failed program was:" >&5
8284cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008285fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008286rm -f conftest.$ac_objext conftest.$ac_ext
8287echo "$as_me:$LINENO: result: $have_long_long" >&5
8288echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008289if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008290echo "$as_me:$LINENO: checking for long long" >&5
8291echo $ECHO_N "checking for long long... $ECHO_C" >&6
8292if test "${ac_cv_type_long_long+set}" = set; then
8293 echo $ECHO_N "(cached) $ECHO_C" >&6
8294else
8295 cat >conftest.$ac_ext <<_ACEOF
8296#line $LINENO "configure"
8297#include "confdefs.h"
8298$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008299#ifdef F77_DUMMY_MAIN
8300# ifdef __cplusplus
8301 extern "C"
8302# endif
8303 int F77_DUMMY_MAIN() { return 1; }
8304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
8308if ((long long *) 0)
8309 return 0;
8310if (sizeof (long long))
8311 return 0;
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext
8317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8318 (eval $ac_compile) 2>&5
8319 ac_status=$?
8320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8321 (exit $ac_status); } &&
8322 { ac_try='test -s conftest.$ac_objext'
8323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8324 (eval $ac_try) 2>&5
8325 ac_status=$?
8326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8327 (exit $ac_status); }; }; then
8328 ac_cv_type_long_long=yes
8329else
8330 echo "$as_me: failed program was:" >&5
8331cat conftest.$ac_ext >&5
8332ac_cv_type_long_long=no
8333fi
8334rm -f conftest.$ac_objext conftest.$ac_ext
8335fi
8336echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8337echo "${ECHO_T}$ac_cv_type_long_long" >&6
8338
8339echo "$as_me:$LINENO: checking size of long long" >&5
8340echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8341if test "${ac_cv_sizeof_long_long+set}" = set; then
8342 echo $ECHO_N "(cached) $ECHO_C" >&6
8343else
8344 if test "$ac_cv_type_long_long" = yes; then
8345 # The cast to unsigned long works around a bug in the HP C Compiler
8346 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8347 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8348 # This bug is HP SR number 8606223364.
8349 if test "$cross_compiling" = yes; then
8350 # Depending upon the size, compute the lo and hi bounds.
8351cat >conftest.$ac_ext <<_ACEOF
8352#line $LINENO "configure"
8353#include "confdefs.h"
8354$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008355#ifdef F77_DUMMY_MAIN
8356# ifdef __cplusplus
8357 extern "C"
8358# endif
8359 int F77_DUMMY_MAIN() { return 1; }
8360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008361int
8362main ()
8363{
8364static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8365test_array [0] = 0
8366
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
8372if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8373 (eval $ac_compile) 2>&5
8374 ac_status=$?
8375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8376 (exit $ac_status); } &&
8377 { ac_try='test -s conftest.$ac_objext'
8378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; }; then
8383 ac_lo=0 ac_mid=0
8384 while :; do
8385 cat >conftest.$ac_ext <<_ACEOF
8386#line $LINENO "configure"
8387#include "confdefs.h"
8388$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008389#ifdef F77_DUMMY_MAIN
8390# ifdef __cplusplus
8391 extern "C"
8392# endif
8393 int F77_DUMMY_MAIN() { return 1; }
8394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008395int
8396main ()
8397{
8398static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8399test_array [0] = 0
8400
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
8406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8407 (eval $ac_compile) 2>&5
8408 ac_status=$?
8409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8410 (exit $ac_status); } &&
8411 { ac_try='test -s conftest.$ac_objext'
8412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8413 (eval $ac_try) 2>&5
8414 ac_status=$?
8415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8416 (exit $ac_status); }; }; then
8417 ac_hi=$ac_mid; break
8418else
8419 echo "$as_me: failed program was:" >&5
8420cat conftest.$ac_ext >&5
8421ac_lo=`expr $ac_mid + 1`
8422 if test $ac_lo -le $ac_mid; then
8423 ac_lo= ac_hi=
8424 break
8425 fi
8426 ac_mid=`expr 2 '*' $ac_mid + 1`
8427fi
8428rm -f conftest.$ac_objext conftest.$ac_ext
8429 done
8430else
8431 echo "$as_me: failed program was:" >&5
8432cat conftest.$ac_ext >&5
8433cat >conftest.$ac_ext <<_ACEOF
8434#line $LINENO "configure"
8435#include "confdefs.h"
8436$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008437#ifdef F77_DUMMY_MAIN
8438# ifdef __cplusplus
8439 extern "C"
8440# endif
8441 int F77_DUMMY_MAIN() { return 1; }
8442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008443int
8444main ()
8445{
8446static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8447test_array [0] = 0
8448
8449 ;
8450 return 0;
8451}
8452_ACEOF
8453rm -f conftest.$ac_objext
8454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8455 (eval $ac_compile) 2>&5
8456 ac_status=$?
8457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8458 (exit $ac_status); } &&
8459 { ac_try='test -s conftest.$ac_objext'
8460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8461 (eval $ac_try) 2>&5
8462 ac_status=$?
8463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8464 (exit $ac_status); }; }; then
8465 ac_hi=-1 ac_mid=-1
8466 while :; do
8467 cat >conftest.$ac_ext <<_ACEOF
8468#line $LINENO "configure"
8469#include "confdefs.h"
8470$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008471#ifdef F77_DUMMY_MAIN
8472# ifdef __cplusplus
8473 extern "C"
8474# endif
8475 int F77_DUMMY_MAIN() { return 1; }
8476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008477int
8478main ()
8479{
8480static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8481test_array [0] = 0
8482
8483 ;
8484 return 0;
8485}
8486_ACEOF
8487rm -f conftest.$ac_objext
8488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8489 (eval $ac_compile) 2>&5
8490 ac_status=$?
8491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492 (exit $ac_status); } &&
8493 { ac_try='test -s conftest.$ac_objext'
8494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8495 (eval $ac_try) 2>&5
8496 ac_status=$?
8497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8498 (exit $ac_status); }; }; then
8499 ac_lo=$ac_mid; break
8500else
8501 echo "$as_me: failed program was:" >&5
8502cat conftest.$ac_ext >&5
8503ac_hi=`expr '(' $ac_mid ')' - 1`
8504 if test $ac_mid -le $ac_hi; then
8505 ac_lo= ac_hi=
8506 break
8507 fi
8508 ac_mid=`expr 2 '*' $ac_mid`
8509fi
8510rm -f conftest.$ac_objext conftest.$ac_ext
8511 done
8512else
8513 echo "$as_me: failed program was:" >&5
8514cat conftest.$ac_ext >&5
8515ac_lo= ac_hi=
8516fi
8517rm -f conftest.$ac_objext conftest.$ac_ext
8518fi
8519rm -f conftest.$ac_objext conftest.$ac_ext
8520# Binary search between lo and hi bounds.
8521while test "x$ac_lo" != "x$ac_hi"; do
8522 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8523 cat >conftest.$ac_ext <<_ACEOF
8524#line $LINENO "configure"
8525#include "confdefs.h"
8526$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008527#ifdef F77_DUMMY_MAIN
8528# ifdef __cplusplus
8529 extern "C"
8530# endif
8531 int F77_DUMMY_MAIN() { return 1; }
8532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
8536static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
8544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8545 (eval $ac_compile) 2>&5
8546 ac_status=$?
8547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8548 (exit $ac_status); } &&
8549 { ac_try='test -s conftest.$ac_objext'
8550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); }; }; then
8555 ac_hi=$ac_mid
8556else
8557 echo "$as_me: failed program was:" >&5
8558cat conftest.$ac_ext >&5
8559ac_lo=`expr '(' $ac_mid ')' + 1`
8560fi
8561rm -f conftest.$ac_objext conftest.$ac_ext
8562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_long_long=$ac_lo;;
8565'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8566echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8567 { (exit 1); exit 1; }; } ;;
8568esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008569else
8570 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8572echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8573 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008574else
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 cat >conftest.$ac_ext <<_ACEOF
8576#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008578$ac_includes_default
8579long longval () { return (long) (sizeof (long long)); }
8580unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008581#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008582#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008583#ifdef F77_DUMMY_MAIN
8584# ifdef __cplusplus
8585 extern "C"
8586# endif
8587 int F77_DUMMY_MAIN() { return 1; }
8588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008591{
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
8593 FILE *f = fopen ("conftest.val", "w");
8594 if (! f)
8595 exit (1);
8596 if (((long) (sizeof (long long))) < 0)
8597 {
8598 long i = longval ();
8599 if (i != ((long) (sizeof (long long))))
8600 exit (1);
8601 fprintf (f, "%ld\n", i);
8602 }
8603 else
8604 {
8605 unsigned long i = ulongval ();
8606 if (i != ((long) (sizeof (long long))))
8607 exit (1);
8608 fprintf (f, "%lu\n", i);
8609 }
8610 exit (ferror (f) || fclose (f) != 0);
8611
8612 ;
8613 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008614}
Martin v. Löwis11437992002-04-12 09:54:03 +00008615_ACEOF
8616rm -f conftest$ac_exeext
8617if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8618 (eval $ac_link) 2>&5
8619 ac_status=$?
8620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8623 (eval $ac_try) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); }; }; then
8627 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008628else
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 echo "$as_me: program exited with status $ac_status" >&5
8630echo "$as_me: failed program was:" >&5
8631cat conftest.$ac_ext >&5
8632( exit $ac_status )
8633{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8634echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8635 { (exit 1); exit 1; }; }
8636fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008637rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638fi
8639fi
8640rm -f conftest.val
8641else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008642 ac_cv_sizeof_long_long=0
8643fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008644fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008645echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8646echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8647cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008648#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008649_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008650
Michael W. Hudson54241132001-12-07 15:38:26 +00008651
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008652fi
8653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8655echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008656have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008657cat >conftest.$ac_ext <<_ACEOF
8658#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008659#include "confdefs.h"
8660
Barry Warsawfe33b792003-01-07 22:42:49 +00008661#ifdef F77_DUMMY_MAIN
8662# ifdef __cplusplus
8663 extern "C"
8664# endif
8665 int F77_DUMMY_MAIN() { return 1; }
8666#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008667int
8668main ()
8669{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008670uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 ;
8672 return 0;
8673}
8674_ACEOF
8675rm -f conftest.$ac_objext
8676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8677 (eval $ac_compile) 2>&5
8678 ac_status=$?
8679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8680 (exit $ac_status); } &&
8681 { ac_try='test -s conftest.$ac_objext'
8682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8683 (eval $ac_try) 2>&5
8684 ac_status=$?
8685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8686 (exit $ac_status); }; }; then
8687
8688
8689cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008691_ACEOF
8692
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008693 have_uintptr_t=yes
8694
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008695else
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 echo "$as_me: failed program was:" >&5
8697cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008699rm -f conftest.$ac_objext conftest.$ac_ext
8700echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8701echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008702if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008703echo "$as_me:$LINENO: checking for uintptr_t" >&5
8704echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8705if test "${ac_cv_type_uintptr_t+set}" = set; then
8706 echo $ECHO_N "(cached) $ECHO_C" >&6
8707else
8708 cat >conftest.$ac_ext <<_ACEOF
8709#line $LINENO "configure"
8710#include "confdefs.h"
8711$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008712#ifdef F77_DUMMY_MAIN
8713# ifdef __cplusplus
8714 extern "C"
8715# endif
8716 int F77_DUMMY_MAIN() { return 1; }
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718int
8719main ()
8720{
8721if ((uintptr_t *) 0)
8722 return 0;
8723if (sizeof (uintptr_t))
8724 return 0;
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
8730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8731 (eval $ac_compile) 2>&5
8732 ac_status=$?
8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8734 (exit $ac_status); } &&
8735 { ac_try='test -s conftest.$ac_objext'
8736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8737 (eval $ac_try) 2>&5
8738 ac_status=$?
8739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8740 (exit $ac_status); }; }; then
8741 ac_cv_type_uintptr_t=yes
8742else
8743 echo "$as_me: failed program was:" >&5
8744cat conftest.$ac_ext >&5
8745ac_cv_type_uintptr_t=no
8746fi
8747rm -f conftest.$ac_objext conftest.$ac_ext
8748fi
8749echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8750echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8751
8752echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8753echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8754if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8755 echo $ECHO_N "(cached) $ECHO_C" >&6
8756else
8757 if test "$ac_cv_type_uintptr_t" = yes; then
8758 # The cast to unsigned long works around a bug in the HP C Compiler
8759 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8760 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8761 # This bug is HP SR number 8606223364.
8762 if test "$cross_compiling" = yes; then
8763 # Depending upon the size, compute the lo and hi bounds.
8764cat >conftest.$ac_ext <<_ACEOF
8765#line $LINENO "configure"
8766#include "confdefs.h"
8767$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008768#ifdef F77_DUMMY_MAIN
8769# ifdef __cplusplus
8770 extern "C"
8771# endif
8772 int F77_DUMMY_MAIN() { return 1; }
8773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008774int
8775main ()
8776{
8777static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8778test_array [0] = 0
8779
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
8785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8786 (eval $ac_compile) 2>&5
8787 ac_status=$?
8788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } &&
8790 { ac_try='test -s conftest.$ac_objext'
8791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8792 (eval $ac_try) 2>&5
8793 ac_status=$?
8794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795 (exit $ac_status); }; }; then
8796 ac_lo=0 ac_mid=0
8797 while :; do
8798 cat >conftest.$ac_ext <<_ACEOF
8799#line $LINENO "configure"
8800#include "confdefs.h"
8801$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008802#ifdef F77_DUMMY_MAIN
8803# ifdef __cplusplus
8804 extern "C"
8805# endif
8806 int F77_DUMMY_MAIN() { return 1; }
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
8811static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8812test_array [0] = 0
8813
8814 ;
8815 return 0;
8816}
8817_ACEOF
8818rm -f conftest.$ac_objext
8819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8820 (eval $ac_compile) 2>&5
8821 ac_status=$?
8822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8823 (exit $ac_status); } &&
8824 { ac_try='test -s conftest.$ac_objext'
8825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8826 (eval $ac_try) 2>&5
8827 ac_status=$?
8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8829 (exit $ac_status); }; }; then
8830 ac_hi=$ac_mid; break
8831else
8832 echo "$as_me: failed program was:" >&5
8833cat conftest.$ac_ext >&5
8834ac_lo=`expr $ac_mid + 1`
8835 if test $ac_lo -le $ac_mid; then
8836 ac_lo= ac_hi=
8837 break
8838 fi
8839 ac_mid=`expr 2 '*' $ac_mid + 1`
8840fi
8841rm -f conftest.$ac_objext conftest.$ac_ext
8842 done
8843else
8844 echo "$as_me: failed program was:" >&5
8845cat conftest.$ac_ext >&5
8846cat >conftest.$ac_ext <<_ACEOF
8847#line $LINENO "configure"
8848#include "confdefs.h"
8849$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008850#ifdef F77_DUMMY_MAIN
8851# ifdef __cplusplus
8852 extern "C"
8853# endif
8854 int F77_DUMMY_MAIN() { return 1; }
8855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008856int
8857main ()
8858{
8859static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8860test_array [0] = 0
8861
8862 ;
8863 return 0;
8864}
8865_ACEOF
8866rm -f conftest.$ac_objext
8867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8868 (eval $ac_compile) 2>&5
8869 ac_status=$?
8870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8871 (exit $ac_status); } &&
8872 { ac_try='test -s conftest.$ac_objext'
8873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8874 (eval $ac_try) 2>&5
8875 ac_status=$?
8876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8877 (exit $ac_status); }; }; then
8878 ac_hi=-1 ac_mid=-1
8879 while :; do
8880 cat >conftest.$ac_ext <<_ACEOF
8881#line $LINENO "configure"
8882#include "confdefs.h"
8883$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008884#ifdef F77_DUMMY_MAIN
8885# ifdef __cplusplus
8886 extern "C"
8887# endif
8888 int F77_DUMMY_MAIN() { return 1; }
8889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008890int
8891main ()
8892{
8893static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8894test_array [0] = 0
8895
8896 ;
8897 return 0;
8898}
8899_ACEOF
8900rm -f conftest.$ac_objext
8901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8902 (eval $ac_compile) 2>&5
8903 ac_status=$?
8904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8905 (exit $ac_status); } &&
8906 { ac_try='test -s conftest.$ac_objext'
8907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8908 (eval $ac_try) 2>&5
8909 ac_status=$?
8910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911 (exit $ac_status); }; }; then
8912 ac_lo=$ac_mid; break
8913else
8914 echo "$as_me: failed program was:" >&5
8915cat conftest.$ac_ext >&5
8916ac_hi=`expr '(' $ac_mid ')' - 1`
8917 if test $ac_mid -le $ac_hi; then
8918 ac_lo= ac_hi=
8919 break
8920 fi
8921 ac_mid=`expr 2 '*' $ac_mid`
8922fi
8923rm -f conftest.$ac_objext conftest.$ac_ext
8924 done
8925else
8926 echo "$as_me: failed program was:" >&5
8927cat conftest.$ac_ext >&5
8928ac_lo= ac_hi=
8929fi
8930rm -f conftest.$ac_objext conftest.$ac_ext
8931fi
8932rm -f conftest.$ac_objext conftest.$ac_ext
8933# Binary search between lo and hi bounds.
8934while test "x$ac_lo" != "x$ac_hi"; do
8935 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8936 cat >conftest.$ac_ext <<_ACEOF
8937#line $LINENO "configure"
8938#include "confdefs.h"
8939$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008940#ifdef F77_DUMMY_MAIN
8941# ifdef __cplusplus
8942 extern "C"
8943# endif
8944 int F77_DUMMY_MAIN() { return 1; }
8945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
8949static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8950test_array [0] = 0
8951
8952 ;
8953 return 0;
8954}
8955_ACEOF
8956rm -f conftest.$ac_objext
8957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8958 (eval $ac_compile) 2>&5
8959 ac_status=$?
8960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8961 (exit $ac_status); } &&
8962 { ac_try='test -s conftest.$ac_objext'
8963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8964 (eval $ac_try) 2>&5
8965 ac_status=$?
8966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8967 (exit $ac_status); }; }; then
8968 ac_hi=$ac_mid
8969else
8970 echo "$as_me: failed program was:" >&5
8971cat conftest.$ac_ext >&5
8972ac_lo=`expr '(' $ac_mid ')' + 1`
8973fi
8974rm -f conftest.$ac_objext conftest.$ac_ext
8975done
8976case $ac_lo in
8977?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8978'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8979echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8980 { (exit 1); exit 1; }; } ;;
8981esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008982else
8983 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8985echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8986 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987else
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 cat >conftest.$ac_ext <<_ACEOF
8989#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008990#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008991$ac_includes_default
8992long longval () { return (long) (sizeof (uintptr_t)); }
8993unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008994#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008995#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008996#ifdef F77_DUMMY_MAIN
8997# ifdef __cplusplus
8998 extern "C"
8999# endif
9000 int F77_DUMMY_MAIN() { return 1; }
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009004{
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
9006 FILE *f = fopen ("conftest.val", "w");
9007 if (! f)
9008 exit (1);
9009 if (((long) (sizeof (uintptr_t))) < 0)
9010 {
9011 long i = longval ();
9012 if (i != ((long) (sizeof (uintptr_t))))
9013 exit (1);
9014 fprintf (f, "%ld\n", i);
9015 }
9016 else
9017 {
9018 unsigned long i = ulongval ();
9019 if (i != ((long) (sizeof (uintptr_t))))
9020 exit (1);
9021 fprintf (f, "%lu\n", i);
9022 }
9023 exit (ferror (f) || fclose (f) != 0);
9024
9025 ;
9026 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009027}
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
9029rm -f conftest$ac_exeext
9030if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9031 (eval $ac_link) 2>&5
9032 ac_status=$?
9033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9036 (eval $ac_try) 2>&5
9037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009041else
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
9044cat conftest.$ac_ext >&5
9045( exit $ac_status )
9046{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9047echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9048 { (exit 1); exit 1; }; }
9049fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009050rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009051fi
9052fi
9053rm -f conftest.val
9054else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009055 ac_cv_sizeof_uintptr_t=0
9056fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009058echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9059echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9060cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009061#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009063
Michael W. Hudson54241132001-12-07 15:38:26 +00009064
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009065fi
9066
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009068echo "$as_me:$LINENO: checking size of off_t" >&5
9069echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9070if test "${ac_cv_sizeof_off_t+set}" = set; then
9071 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072else
9073 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009074 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009075else
Martin v. Löwis11437992002-04-12 09:54:03 +00009076 cat >conftest.$ac_ext <<_ACEOF
9077#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009078#include "confdefs.h"
9079#include <stdio.h>
9080#include <sys/types.h>
9081main()
9082{
9083 FILE *f=fopen("conftestval", "w");
9084 if (!f) exit(1);
9085 fprintf(f, "%d\n", sizeof(off_t));
9086 exit(0);
9087}
Martin v. Löwis11437992002-04-12 09:54:03 +00009088_ACEOF
9089rm -f conftest$ac_exeext
9090if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9091 (eval $ac_link) 2>&5
9092 ac_status=$?
9093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9096 (eval $ac_try) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009100 ac_cv_sizeof_off_t=`cat conftestval`
9101else
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 echo "$as_me: program exited with status $ac_status" >&5
9103echo "$as_me: failed program was:" >&5
9104cat conftest.$ac_ext >&5
9105( exit $ac_status )
9106ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009107fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009108rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009109fi
9110
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111fi
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9114echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9115
9116cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009117#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009119
Michael W. Hudson54241132001-12-07 15:38:26 +00009120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9122echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009123if test "$have_long_long" = yes -a \
9124 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9125 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127cat >>confdefs.h <<\_ACEOF
9128#define HAVE_LARGEFILE_SUPPORT 1
9129_ACEOF
9130
9131 echo "$as_me:$LINENO: result: yes" >&5
9132echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: result: no" >&5
9135echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009136fi
9137
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009138# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking size of time_t" >&5
9140echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9141if test "${ac_cv_sizeof_time_t+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009143else
9144 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009145 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 cat >conftest.$ac_ext <<_ACEOF
9148#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009149#include "confdefs.h"
9150#include <stdio.h>
9151#include <time.h>
9152main()
9153{
9154 FILE *f=fopen("conftestval", "w");
9155 if (!f) exit(1);
9156 fprintf(f, "%d\n", sizeof(time_t));
9157 exit(0);
9158}
Martin v. Löwis11437992002-04-12 09:54:03 +00009159_ACEOF
9160rm -f conftest$ac_exeext
9161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9162 (eval $ac_link) 2>&5
9163 ac_status=$?
9164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009171 ac_cv_sizeof_time_t=`cat conftestval`
9172else
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 echo "$as_me: program exited with status $ac_status" >&5
9174echo "$as_me: failed program was:" >&5
9175cat conftest.$ac_ext >&5
9176( exit $ac_status )
9177ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009178fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009179rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009180fi
9181
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009182fi
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9185echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9186
9187cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009188#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009189_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009190
Michael W. Hudson54241132001-12-07 15:38:26 +00009191
9192
Trent Mick635f6fb2000-08-23 21:33:05 +00009193# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009194ac_save_cc="$CC"
9195if test "$ac_cv_kpthread" = "yes"
9196then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009197elif test "$ac_cv_kthread" = "yes"
9198then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009199fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009200echo "$as_me:$LINENO: checking for pthread_t" >&5
9201echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009202have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009203cat >conftest.$ac_ext <<_ACEOF
9204#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009205#include "confdefs.h"
9206#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009207#ifdef F77_DUMMY_MAIN
9208# ifdef __cplusplus
9209 extern "C"
9210# endif
9211 int F77_DUMMY_MAIN() { return 1; }
9212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009213int
9214main ()
9215{
Guido van Rossum12580492000-09-24 16:47:19 +00009216pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ;
9218 return 0;
9219}
9220_ACEOF
9221rm -f conftest.$ac_objext
9222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9223 (eval $ac_compile) 2>&5
9224 ac_status=$?
9225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9226 (exit $ac_status); } &&
9227 { ac_try='test -s conftest.$ac_objext'
9228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9229 (eval $ac_try) 2>&5
9230 ac_status=$?
9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9232 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009233 have_pthread_t=yes
9234else
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 echo "$as_me: failed program was:" >&5
9236cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009238rm -f conftest.$ac_objext conftest.$ac_ext
9239echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9240echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009241if test "$have_pthread_t" = yes ; then
9242 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9244echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9245 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009247else
9248 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009249 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009250else
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 cat >conftest.$ac_ext <<_ACEOF
9252#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009253#include "confdefs.h"
9254#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009255#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009256 main()
9257 {
9258 FILE *f=fopen("conftestval", "w");
9259 if (!f) exit(1);
9260 fprintf(f, "%d\n", sizeof(pthread_t));
9261 exit(0);
9262 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009263_ACEOF
9264rm -f conftest$ac_exeext
9265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9266 (eval $ac_link) 2>&5
9267 ac_status=$?
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9269 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009275 ac_cv_sizeof_pthread_t=`cat conftestval`
9276else
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 echo "$as_me: program exited with status $ac_status" >&5
9278echo "$as_me: failed program was:" >&5
9279cat conftest.$ac_ext >&5
9280( exit $ac_status )
9281ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009282fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009283rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009284fi
9285
Trent Mick635f6fb2000-08-23 21:33:05 +00009286fi
9287
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9289echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9290
9291cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009292#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009293_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009294
9295fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009296CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009297
Martin v. Löwis11437992002-04-12 09:54:03 +00009298echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9299echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009300# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9301if test "${enable_toolbox_glue+set}" = set; then
9302 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009303
Martin v. Löwis11437992002-04-12 09:54:03 +00009304fi;
Jack Jansene578a632001-08-15 01:27:14 +00009305
9306if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009307then
Jack Jansene578a632001-08-15 01:27:14 +00009308 case $ac_sys_system/$ac_sys_release in
9309 Darwin/*)
9310 enable_toolbox_glue="yes";;
9311 *)
9312 enable_toolbox_glue="no";;
9313 esac
9314fi
9315case "$enable_toolbox_glue" in
9316yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009317 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009318 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009319 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009320
9321cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009322#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009324
9325 ;;
9326*)
9327 extra_frameworks=""
9328 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009329 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009330 ;;
9331esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009332echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9333echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009334
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009335
9336case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009337 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009338 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009339 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00009340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9341 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009342 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009343 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009344 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009347esac
9348
Martin v. Löwis11437992002-04-12 09:54:03 +00009349echo "$as_me:$LINENO: checking for --enable-framework" >&5
9350echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009351if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009353 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009355 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009356 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357
Martin v. Löwis11437992002-04-12 09:54:03 +00009358cat >>confdefs.h <<\_ACEOF
9359#define WITH_NEXT_FRAMEWORK 1
9360_ACEOF
9361
9362 echo "$as_me:$LINENO: result: yes" >&5
9363echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364else
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 echo "$as_me:$LINENO: result: no" >&5
9366echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367fi
9368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369echo "$as_me:$LINENO: checking for dyld" >&5
9370echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009371case $ac_sys_system/$ac_sys_release in
9372 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009373
Martin v. Löwis11437992002-04-12 09:54:03 +00009374cat >>confdefs.h <<\_ACEOF
9375#define WITH_DYLD 1
9376_ACEOF
9377
9378 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9379echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009380 ;;
9381 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 echo "$as_me:$LINENO: result: no" >&5
9383echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009384 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009385esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009386
Guido van Rossum0a516c91994-09-12 10:58:40 +00009387# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009388
Michael W. Hudson54241132001-12-07 15:38:26 +00009389
9390
9391
9392
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009394# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009395echo "$as_me:$LINENO: checking SO" >&5
9396echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397if test -z "$SO"
9398then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009399 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009400 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009401 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009402 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: result: $SO" >&5
9406echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009408# -- "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 +00009409# (Shared libraries in this instance are shared modules to be loaded into
9410# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009411echo "$as_me:$LINENO: checking LDSHARED" >&5
9412echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413if test -z "$LDSHARED"
9414then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009416 AIX*)
9417 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009418 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009419 ;;
9420 BeOS*)
9421 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009422 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009423 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009424 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009425 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009426 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009428 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009429 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009430 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009431 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009432 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009433 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9434 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009435 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009436 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9437 if test "$enable_framework" ; then
9438 # Link against the framework. All externals should be defined.
9439 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9440 else
9441 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009442 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009443 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009444 Darwin/*)
9445 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9446 if test "$enable_framework" ; then
9447 # Link against the framework. All externals should be defined.
9448 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9449 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009450 # No framework, use the Python app as bundle-loader
9451 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009452 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009453 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009454 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009455 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009456 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009457 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009458 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009459 then
9460 LDSHARED="cc -shared ${LDFLAGS}"
9461 else
9462 LDSHARED="ld -Bshareable ${LDFLAGS}"
9463 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009464 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009465 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009466 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009467 then LDSHARED='$(CC) -shared'
9468 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009469 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009470 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009471 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009472 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009473 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009474 *) LDSHARED="ld";;
9475 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009477echo "$as_me:$LINENO: result: $LDSHARED" >&5
9478echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009479BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009480# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009481# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009482echo "$as_me:$LINENO: checking CCSHARED" >&5
9483echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484if test -z "$CCSHARED"
9485then
Guido van Rossum07397971997-04-29 21:49:50 +00009486 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009487 SunOS*) if test "$GCC" = yes;
9488 then CCSHARED="-fPIC";
9489 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009490 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009491 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009492 else CCSHARED="+z";
9493 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009494 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009495 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009496 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009497 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009498 if test "$GCC" = "yes"
9499 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009500 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009501 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009502 SCO_SV*)
9503 if test "$GCC" = "yes"
9504 then CCSHARED="-fPIC"
9505 else CCSHARED="-Kpic -belf"
9506 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009507 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009508 IRIX*/6*) case $CC in
9509 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009510 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009511 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009512 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009514fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009515echo "$as_me:$LINENO: result: $CCSHARED" >&5
9516echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009519echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9520echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521if test -z "$LINKFORSHARED"
9522then
Guido van Rossum07397971997-04-29 21:49:50 +00009523 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009524 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009525 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009526 LINKFORSHARED="-Wl,-E -Wl,+s";;
9527# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009528 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009529 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009530 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009532 # -u __dummy makes the linker aware of the objc runtime
9533 # in System.framework; otherwise, __objcInit (referenced in
9534 # crt1.o) gets erroneously defined as common, which breaks dynamic
9535 # loading of any modules which reference it in System.framework.
9536 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9537 # not used by the core itself but which needs to be in the core so
9538 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009539 # -prebind is no longer used, because it actually seems to give a
9540 # slowdown in stead of a speedup, maybe due to the large number of
9541 # dynamic loads Python does.
9542 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009543 if test "$enable_framework"
9544 then
9545 LINKFORSHARED="$LINKFORSHARED -framework Python"
9546 fi
9547 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009548 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009549 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009550 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009552 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9553 then
9554 LINKFORSHARED="-Wl,--export-dynamic"
9555 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009556 SunOS/5*) case $CC in
9557 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009558 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009559 then
9560 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009561 fi;;
9562 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009565echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9566echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009567
Michael W. Hudson54241132001-12-07 15:38:26 +00009568
Martin v. Löwis11437992002-04-12 09:54:03 +00009569echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9570echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009571if test ! "$LIBRARY" = "$LDLIBRARY"
9572then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009573 case $ac_sys_system in
9574 CYGWIN*)
9575 # Cygwin needs CCSHARED when building extension DLLs
9576 # but not when building the interpreter DLL.
9577 CFLAGSFORSHARED='';;
9578 *)
9579 CFLAGSFORSHARED='$(CCSHARED)'
9580 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009581fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009582echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9583echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009584
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009585# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9586# library (with --enable-shared).
9587# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009588# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9589# if it is not required, since it creates a dependency of the shared library
9590# to LIBS. This, in turn, means that applications linking the shared libpython
9591# don't need to link LIBS explicitly. The default should be only changed
9592# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593
9594echo "$as_me:$LINENO: checking SHLIBS" >&5
9595echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9596case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009597 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009598 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599esac
9600echo "$as_me:$LINENO: result: $SHLIBS" >&5
9601echo "${ECHO_T}$SHLIBS" >&6
9602
9603
Guido van Rossum627b2d71993-12-24 10:39:16 +00009604# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
9606echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9607echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9608if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009610else
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009612LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009613cat >conftest.$ac_ext <<_ACEOF
9614#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009615#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009616
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009617/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618#ifdef __cplusplus
9619extern "C"
9620#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009621/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 builtin and then its argument prototype would still apply. */
9623char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009624#ifdef F77_DUMMY_MAIN
9625# ifdef __cplusplus
9626 extern "C"
9627# endif
9628 int F77_DUMMY_MAIN() { return 1; }
9629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009630int
9631main ()
9632{
9633dlopen ();
9634 ;
9635 return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext conftest$ac_exeext
9639if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
9645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9646 (eval $ac_try) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 echo "$as_me: failed program was:" >&5
9653cat conftest.$ac_ext >&5
9654ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009658fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009659echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9660echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9661if test $ac_cv_lib_dl_dlopen = yes; then
9662 cat >>confdefs.h <<_ACEOF
9663#define HAVE_LIBDL 1
9664_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009666 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009667
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009668fi
9669 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009670
9671echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9672echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9673if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009677LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009678cat >conftest.$ac_ext <<_ACEOF
9679#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009682/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 builtin and then its argument prototype would still apply. */
9688char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009689#ifdef F77_DUMMY_MAIN
9690# ifdef __cplusplus
9691 extern "C"
9692# endif
9693 int F77_DUMMY_MAIN() { return 1; }
9694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009695int
9696main ()
9697{
9698shl_load ();
9699 ;
9700 return 0;
9701}
9702_ACEOF
9703rm -f conftest.$ac_objext conftest$ac_exeext
9704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9705 (eval $ac_link) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); } &&
9709 { ac_try='test -s conftest$ac_exeext'
9710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9711 (eval $ac_try) 2>&5
9712 ac_status=$?
9713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); }; }; then
9715 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 echo "$as_me: failed program was:" >&5
9718cat conftest.$ac_ext >&5
9719ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9722LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009724echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9725echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9726if test $ac_cv_lib_dld_shl_load = yes; then
9727 cat >>confdefs.h <<_ACEOF
9728#define HAVE_LIBDLD 1
9729_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009731 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733fi
9734 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009735echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9736echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9737if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009739else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740 ac_func_search_save_LIBS=$LIBS
9741ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009742cat >conftest.$ac_ext <<_ACEOF
9743#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009744#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009746/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009750/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 builtin and then its argument prototype would still apply. */
9752char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009753#ifdef F77_DUMMY_MAIN
9754# ifdef __cplusplus
9755 extern "C"
9756# endif
9757 int F77_DUMMY_MAIN() { return 1; }
9758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
9762sem_init ();
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext conftest$ac_exeext
9768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9769 (eval $ac_link) 2>&5
9770 ac_status=$?
9771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9772 (exit $ac_status); } &&
9773 { ac_try='test -s conftest$ac_exeext'
9774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9775 (eval $ac_try) 2>&5
9776 ac_status=$?
9777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9778 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009779 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009780else
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me: failed program was:" >&5
9782cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009785if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009786 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009787 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9788 cat >conftest.$ac_ext <<_ACEOF
9789#line $LINENO "configure"
9790#include "confdefs.h"
9791
9792/* Override any gcc2 internal prototype to avoid an error. */
9793#ifdef __cplusplus
9794extern "C"
9795#endif
9796/* We use char because int might match the return type of a gcc2
9797 builtin and then its argument prototype would still apply. */
9798char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009799#ifdef F77_DUMMY_MAIN
9800# ifdef __cplusplus
9801 extern "C"
9802# endif
9803 int F77_DUMMY_MAIN() { return 1; }
9804#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009805int
9806main ()
9807{
9808sem_init ();
9809 ;
9810 return 0;
9811}
Martin v. Löwis11437992002-04-12 09:54:03 +00009812_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009813rm -f conftest.$ac_objext conftest$ac_exeext
9814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9815 (eval $ac_link) 2>&5
9816 ac_status=$?
9817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9818 (exit $ac_status); } &&
9819 { ac_try='test -s conftest$ac_exeext'
9820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9821 (eval $ac_try) 2>&5
9822 ac_status=$?
9823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824 (exit $ac_status); }; }; then
9825 ac_cv_search_sem_init="-l$ac_lib"
9826break
9827else
9828 echo "$as_me: failed program was:" >&5
9829cat conftest.$ac_ext >&5
9830fi
9831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9832 done
9833fi
9834LIBS=$ac_func_search_save_LIBS
9835fi
9836echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9837echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9838if test "$ac_cv_search_sem_init" != no; then
9839 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009840
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009841fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009842 # 'Real Time' functions on Solaris
9843 # posix4 on Solaris 2.6
9844 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009845
9846# checks for system dependent C++ extensions support
9847case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9849echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9850 cat >conftest.$ac_ext <<_ACEOF
9851#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009852#include "confdefs.h"
9853#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009854#ifdef F77_DUMMY_MAIN
9855# ifdef __cplusplus
9856 extern "C"
9857# endif
9858 int F77_DUMMY_MAIN() { return 1; }
9859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009863loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
9868rm -f conftest.$ac_objext conftest$ac_exeext
9869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9870 (eval $ac_link) 2>&5
9871 ac_status=$?
9872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
9874 { ac_try='test -s conftest$ac_exeext'
9875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9876 (eval $ac_try) 2>&5
9877 ac_status=$?
9878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9879 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009880
Martin v. Löwis11437992002-04-12 09:54:03 +00009881cat >>confdefs.h <<\_ACEOF
9882#define AIX_GENUINE_CPLUSPLUS 1
9883_ACEOF
9884
9885 echo "$as_me:$LINENO: result: yes" >&5
9886echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009887else
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 echo "$as_me: failed program was:" >&5
9889cat conftest.$ac_ext >&5
9890echo "$as_me:$LINENO: result: no" >&5
9891echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009894 *) ;;
9895esac
9896
Guido van Rossum70c7f481998-03-26 18:44:10 +00009897# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009898# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899# BeOS' sockets are stashed in libnet.
9900case "$ac_sys_system" in
9901IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009902*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009903echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9904echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9905if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009907else
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009909LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009910cat >conftest.$ac_ext <<_ACEOF
9911#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009912#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915#ifdef __cplusplus
9916extern "C"
9917#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 builtin and then its argument prototype would still apply. */
9920char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009921#ifdef F77_DUMMY_MAIN
9922# ifdef __cplusplus
9923 extern "C"
9924# endif
9925 int F77_DUMMY_MAIN() { return 1; }
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
9930t_open ();
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935rm -f conftest.$ac_objext conftest$ac_exeext
9936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9937 (eval $ac_link) 2>&5
9938 ac_status=$?
9939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9940 (exit $ac_status); } &&
9941 { ac_try='test -s conftest$ac_exeext'
9942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9943 (eval $ac_try) 2>&5
9944 ac_status=$?
9945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9946 (exit $ac_status); }; }; then
9947 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009948else
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 echo "$as_me: failed program was:" >&5
9950cat conftest.$ac_ext >&5
9951ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009953rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009956echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9957echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9958if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009959 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009960fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009961 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009962echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9963echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9964if test "${ac_cv_lib_socket_socket+set}" = set; then
9965 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009966else
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009968LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009969cat >conftest.$ac_ext <<_ACEOF
9970#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009971#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009974#ifdef __cplusplus
9975extern "C"
9976#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009977/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 builtin and then its argument prototype would still apply. */
9979char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009980#ifdef F77_DUMMY_MAIN
9981# ifdef __cplusplus
9982 extern "C"
9983# endif
9984 int F77_DUMMY_MAIN() { return 1; }
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986int
9987main ()
9988{
9989socket ();
9990 ;
9991 return 0;
9992}
9993_ACEOF
9994rm -f conftest.$ac_objext conftest$ac_exeext
9995if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9996 (eval $ac_link) 2>&5
9997 ac_status=$?
9998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9999 (exit $ac_status); } &&
10000 { ac_try='test -s conftest$ac_exeext'
10001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10002 (eval $ac_try) 2>&5
10003 ac_status=$?
10004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005 (exit $ac_status); }; }; then
10006 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010007else
Martin v. Löwis11437992002-04-12 09:54:03 +000010008 echo "$as_me: failed program was:" >&5
10009cat conftest.$ac_ext >&5
10010ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010012rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010015echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10016echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10017if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010018 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010019fi
10020 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010021;;
10022esac
10023case "$ac_sys_system" in
10024BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010025echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10026echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10027if test "${ac_cv_lib_net_socket+set}" = set; then
10028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010029else
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010031LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010032cat >conftest.$ac_ext <<_ACEOF
10033#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010034#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010035
Guido van Rossumad678af1998-10-02 14:42:15 +000010036/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037#ifdef __cplusplus
10038extern "C"
10039#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010040/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 builtin and then its argument prototype would still apply. */
10042char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010043#ifdef F77_DUMMY_MAIN
10044# ifdef __cplusplus
10045 extern "C"
10046# endif
10047 int F77_DUMMY_MAIN() { return 1; }
10048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010049int
10050main ()
10051{
10052socket ();
10053 ;
10054 return 0;
10055}
10056_ACEOF
10057rm -f conftest.$ac_objext conftest$ac_exeext
10058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10059 (eval $ac_link) 2>&5
10060 ac_status=$?
10061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10062 (exit $ac_status); } &&
10063 { ac_try='test -s conftest$ac_exeext'
10064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10065 (eval $ac_try) 2>&5
10066 ac_status=$?
10067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10068 (exit $ac_status); }; }; then
10069 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010070else
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 echo "$as_me: failed program was:" >&5
10072cat conftest.$ac_ext >&5
10073ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010075rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10076LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010078echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10079echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10080if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010082fi
10083 # BeOS
10084;;
10085esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010086
Martin v. Löwis11437992002-04-12 09:54:03 +000010087echo "$as_me:$LINENO: checking for --with-libs" >&5
10088echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10089
Guido van Rossuma68acba1996-07-31 17:36:39 +000010090# Check whether --with-libs or --without-libs was given.
10091if test "${with_libs+set}" = set; then
10092 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010093
10094echo "$as_me:$LINENO: result: $withval" >&5
10095echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010096LIBS="$withval $LIBS"
10097
10098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 echo "$as_me:$LINENO: result: no" >&5
10100echo "${ECHO_T}no" >&6
10101fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010102
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010103# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010104
10105
Martin v. Löwis11437992002-04-12 09:54:03 +000010106echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10107echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10108
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010109# Check whether --with-signal-module or --without-signal-module was given.
10110if test "${with_signal_module+set}" = set; then
10111 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010114
10115if test -z "$with_signal_module"
10116then with_signal_module="yes"
10117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010118echo "$as_me:$LINENO: result: $with_signal_module" >&5
10119echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010120
10121if test "${with_signal_module}" = "yes"; then
10122 USE_SIGNAL_MODULE=""
10123 SIGNAL_OBJS=""
10124else
10125 USE_SIGNAL_MODULE="#"
10126 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10127fi
10128
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010129# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010130
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010131USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010132
Martin v. Löwis11437992002-04-12 09:54:03 +000010133echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10134echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10135
Guido van Rossumec2f0731997-01-22 20:54:01 +000010136
10137# Check whether --with-dec-threads or --without-dec-threads was given.
10138if test "${with_dec_threads+set}" = set; then
10139 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
10141echo "$as_me:$LINENO: result: $withval" >&5
10142echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010143LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010144if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010145 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010146fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 echo "$as_me:$LINENO: result: no" >&5
10149echo "${ECHO_T}no" >&6
10150fi;
10151
10152# Templates for things AC_DEFINEd more than once.
10153# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010154
10155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
10157
10158
10159
10160
10161echo "$as_me:$LINENO: checking for --with-threads" >&5
10162echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10163
Guido van Rossumec2f0731997-01-22 20:54:01 +000010164# Check whether --with-threads or --without-threads was given.
10165if test "${with_threads+set}" = set; then
10166 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010169
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010170# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010172# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010173if test "${with_thread+set}" = set; then
10174 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010175 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010177
10178if test -z "$with_threads"
10179then with_threads="yes"
10180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010181echo "$as_me:$LINENO: result: $with_threads" >&5
10182echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010183
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185if test "$with_threads" = "no"
10186then
10187 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010188elif test "$ac_cv_pthread_is_default" = yes
10189then
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010191#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010192_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010194 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010197_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198
10199 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010201elif test "$ac_cv_kpthread" = "yes"
10202then
10203 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010205#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010208 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010209 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010210elif test "$ac_cv_kthread" = "yes"
10211then
10212 CC="$CC -Kthread"
10213 cat >>confdefs.h <<\_ACEOF
10214#define WITH_THREAD 1
10215_ACEOF
10216
10217 posix_threads=yes
10218 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010219else
10220 if test ! -z "$with_threads" -a -d "$with_threads"
10221 then LDFLAGS="$LDFLAGS -L$with_threads"
10222 fi
10223 if test ! -z "$withval" -a -d "$withval"
10224 then LDFLAGS="$LDFLAGS -L$withval"
10225 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010226
10227 # According to the POSIX spec, a pthreads implementation must
10228 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10230echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10231 cat >conftest.$ac_ext <<_ACEOF
10232#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010234
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010235#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010236#ifdef _POSIX_THREADS
10237yes
10238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
10240_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010242 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243 unistd_defines_pthreads=yes
10244else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245 unistd_defines_pthreads=no
10246fi
10247rm -f conftest*
10248
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10250echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010253#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010254_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010255
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 if test "${ac_cv_header_cthreads_h+set}" = set; then
10257 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10258echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10259if test "${ac_cv_header_cthreads_h+set}" = set; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10261fi
10262echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10263echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010264else
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 # Is the header compilable?
10266echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10267echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10268cat >conftest.$ac_ext <<_ACEOF
10269#line $LINENO "configure"
10270#include "confdefs.h"
10271$ac_includes_default
10272#include <cthreads.h>
10273_ACEOF
10274rm -f conftest.$ac_objext
10275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10276 (eval $ac_compile) 2>&5
10277 ac_status=$?
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10279 (exit $ac_status); } &&
10280 { ac_try='test -s conftest.$ac_objext'
10281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10282 (eval $ac_try) 2>&5
10283 ac_status=$?
10284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285 (exit $ac_status); }; }; then
10286 ac_header_compiler=yes
10287else
10288 echo "$as_me: failed program was:" >&5
10289cat conftest.$ac_ext >&5
10290ac_header_compiler=no
10291fi
10292rm -f conftest.$ac_objext conftest.$ac_ext
10293echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10294echo "${ECHO_T}$ac_header_compiler" >&6
10295
10296# Is the header present?
10297echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10298echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10299cat >conftest.$ac_ext <<_ACEOF
10300#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010301#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010302#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
10304if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10305 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10306 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010307 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 rm -f conftest.er1
10309 cat conftest.err >&5
10310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311 (exit $ac_status); } >/dev/null; then
10312 if test -s conftest.err; then
10313 ac_cpp_err=$ac_c_preproc_warn_flag
10314 else
10315 ac_cpp_err=
10316 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010317else
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ac_cpp_err=yes
10319fi
10320if test -z "$ac_cpp_err"; then
10321 ac_header_preproc=yes
10322else
10323 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010324 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010327rm -f conftest.err conftest.$ac_ext
10328echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10329echo "${ECHO_T}$ac_header_preproc" >&6
10330
10331# So? What about this header?
10332case $ac_header_compiler:$ac_header_preproc in
10333 yes:no )
10334 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10335echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10336 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10337echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10338 no:yes )
10339 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10340echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10341 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10342echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10343 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10344echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10345esac
10346echo "$as_me:$LINENO: checking for cthreads.h" >&5
10347echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10348if test "${ac_cv_header_cthreads_h+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010353echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10354echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10355
10356fi
10357if test $ac_cv_header_cthreads_h = yes; then
10358 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010359#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010361
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010363#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366
10367cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010368#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010370
10371 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010372 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010373else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10376 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10377echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10378if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10379 echo $ECHO_N "(cached) $ECHO_C" >&6
10380fi
10381echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10382echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010383else
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 # Is the header compilable?
10385echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10386echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10387cat >conftest.$ac_ext <<_ACEOF
10388#line $LINENO "configure"
10389#include "confdefs.h"
10390$ac_includes_default
10391#include <mach/cthreads.h>
10392_ACEOF
10393rm -f conftest.$ac_objext
10394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10395 (eval $ac_compile) 2>&5
10396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
10399 { ac_try='test -s conftest.$ac_objext'
10400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_header_compiler=yes
10406else
10407 echo "$as_me: failed program was:" >&5
10408cat conftest.$ac_ext >&5
10409ac_header_compiler=no
10410fi
10411rm -f conftest.$ac_objext conftest.$ac_ext
10412echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10413echo "${ECHO_T}$ac_header_compiler" >&6
10414
10415# Is the header present?
10416echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10417echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10418cat >conftest.$ac_ext <<_ACEOF
10419#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010420#include "confdefs.h"
10421#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010422_ACEOF
10423if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10424 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10425 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010426 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 rm -f conftest.er1
10428 cat conftest.err >&5
10429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10430 (exit $ac_status); } >/dev/null; then
10431 if test -s conftest.err; then
10432 ac_cpp_err=$ac_c_preproc_warn_flag
10433 else
10434 ac_cpp_err=
10435 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010436else
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_cpp_err=yes
10438fi
10439if test -z "$ac_cpp_err"; then
10440 ac_header_preproc=yes
10441else
10442 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010443 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010446rm -f conftest.err conftest.$ac_ext
10447echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10448echo "${ECHO_T}$ac_header_preproc" >&6
10449
10450# So? What about this header?
10451case $ac_header_compiler:$ac_header_preproc in
10452 yes:no )
10453 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10454echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10455 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10456echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10457 no:yes )
10458 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10459echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10460 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10461echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10462 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10463echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10464esac
10465echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10466echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10467if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10468 echo $ECHO_N "(cached) $ECHO_C" >&6
10469else
10470 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010471fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010472echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10473echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10474
10475fi
10476if test $ac_cv_header_mach_cthreads_h = yes; then
10477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010478#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010479_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010480
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010482#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010483_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010484
Martin v. Löwis11437992002-04-12 09:54:03 +000010485
10486cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010487#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010488_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010489
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010490 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010491else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010492
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 echo "$as_me:$LINENO: checking for --with-pth" >&5
10494echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10495
10496# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010497if test "${with_pth+set}" = set; then
10498 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010499 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010500echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010501 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010502#define WITH_THREAD 1
10503_ACEOF
10504
10505
10506cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010507#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010508_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010509
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010510 LIBS="-lpth $LIBS"
10511 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010512else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010513 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010514echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010515
10516 # Just looking for pthread_create in libpthread is not enough:
10517 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10518 # So we really have to include pthread.h, and then link.
10519 _libs=$LIBS
10520 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10522echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10523 cat >conftest.$ac_ext <<_ACEOF
10524#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010525#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010526#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010527
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010528void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010529#ifdef F77_DUMMY_MAIN
10530# ifdef __cplusplus
10531 extern "C"
10532# endif
10533 int F77_DUMMY_MAIN() { return 1; }
10534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010535int
10536main ()
10537{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010538
10539pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ;
10541 return 0;
10542}
10543_ACEOF
10544rm -f conftest.$ac_objext conftest$ac_exeext
10545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10546 (eval $ac_link) 2>&5
10547 ac_status=$?
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); } &&
10550 { ac_try='test -s conftest$ac_exeext'
10551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10552 (eval $ac_try) 2>&5
10553 ac_status=$?
10554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10555 (exit $ac_status); }; }; then
10556
10557 echo "$as_me:$LINENO: result: yes" >&5
10558echo "${ECHO_T}yes" >&6
10559 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010560#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010561_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010562
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010564 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010565else
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 echo "$as_me: failed program was:" >&5
10567cat conftest.$ac_ext >&5
10568
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010569 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010570 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10571echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10572if test "${ac_cv_func_pthread_detach+set}" = set; then
10573 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010574else
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 cat >conftest.$ac_ext <<_ACEOF
10576#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010577#include "confdefs.h"
10578/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010580#include <assert.h>
10581/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010582#ifdef __cplusplus
10583extern "C"
10584#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010585/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 builtin and then its argument prototype would still apply. */
10587char pthread_detach ();
10588char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010589
Barry Warsawfe33b792003-01-07 22:42:49 +000010590#ifdef F77_DUMMY_MAIN
10591# ifdef __cplusplus
10592 extern "C"
10593# endif
10594 int F77_DUMMY_MAIN() { return 1; }
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596int
10597main ()
10598{
Guido van Rossumad678af1998-10-02 14:42:15 +000010599/* The GNU C library defines this for functions which it implements
10600 to always fail with ENOSYS. Some functions are actually named
10601 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010602#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010603choke me
10604#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010606#endif
10607
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 ;
10609 return 0;
10610}
10611_ACEOF
10612rm -f conftest.$ac_objext conftest$ac_exeext
10613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10614 (eval $ac_link) 2>&5
10615 ac_status=$?
10616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617 (exit $ac_status); } &&
10618 { ac_try='test -s conftest$ac_exeext'
10619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10620 (eval $ac_try) 2>&5
10621 ac_status=$?
10622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); }; }; then
10624 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 echo "$as_me: failed program was:" >&5
10627cat conftest.$ac_ext >&5
10628ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010632echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10633echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10634if test $ac_cv_func_pthread_detach = yes; then
10635 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010636#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010637_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010638
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010639 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010640 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010641else
Guido van Rossumad678af1998-10-02 14:42:15 +000010642
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010643 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10644 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10645echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10646if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10647 echo $ECHO_N "(cached) $ECHO_C" >&6
10648fi
10649echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10650echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10651else
10652 # Is the header compilable?
10653echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10654echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10655cat >conftest.$ac_ext <<_ACEOF
10656#line $LINENO "configure"
10657#include "confdefs.h"
10658$ac_includes_default
10659#include <atheos/threads.h>
10660_ACEOF
10661rm -f conftest.$ac_objext
10662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10663 (eval $ac_compile) 2>&5
10664 ac_status=$?
10665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10666 (exit $ac_status); } &&
10667 { ac_try='test -s conftest.$ac_objext'
10668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10669 (eval $ac_try) 2>&5
10670 ac_status=$?
10671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10672 (exit $ac_status); }; }; then
10673 ac_header_compiler=yes
10674else
10675 echo "$as_me: failed program was:" >&5
10676cat conftest.$ac_ext >&5
10677ac_header_compiler=no
10678fi
10679rm -f conftest.$ac_objext conftest.$ac_ext
10680echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10681echo "${ECHO_T}$ac_header_compiler" >&6
10682
10683# Is the header present?
10684echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10685echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10686cat >conftest.$ac_ext <<_ACEOF
10687#line $LINENO "configure"
10688#include "confdefs.h"
10689#include <atheos/threads.h>
10690_ACEOF
10691if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10692 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10693 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010694 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010695 rm -f conftest.er1
10696 cat conftest.err >&5
10697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698 (exit $ac_status); } >/dev/null; then
10699 if test -s conftest.err; then
10700 ac_cpp_err=$ac_c_preproc_warn_flag
10701 else
10702 ac_cpp_err=
10703 fi
10704else
10705 ac_cpp_err=yes
10706fi
10707if test -z "$ac_cpp_err"; then
10708 ac_header_preproc=yes
10709else
10710 echo "$as_me: failed program was:" >&5
10711 cat conftest.$ac_ext >&5
10712 ac_header_preproc=no
10713fi
10714rm -f conftest.err conftest.$ac_ext
10715echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10716echo "${ECHO_T}$ac_header_preproc" >&6
10717
10718# So? What about this header?
10719case $ac_header_compiler:$ac_header_preproc in
10720 yes:no )
10721 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10722echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10723 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10724echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10725 no:yes )
10726 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10727echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10728 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10729echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10730 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10731echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10732esac
10733echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10734echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10735if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10736 echo $ECHO_N "(cached) $ECHO_C" >&6
10737else
10738 ac_cv_header_atheos_threads_h=$ac_header_preproc
10739fi
10740echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10741echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10742
10743fi
10744if test $ac_cv_header_atheos_threads_h = yes; then
10745 cat >>confdefs.h <<\_ACEOF
10746#define WITH_THREAD 1
10747_ACEOF
10748
10749
10750cat >>confdefs.h <<\_ACEOF
10751#define ATHEOS_THREADS 1
10752_ACEOF
10753
10754 THREADOBJ="Python/thread.o"
10755else
10756
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10758 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10759echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10760if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
10762fi
10763echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10764echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010765else
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 # Is the header compilable?
10767echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10768echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10769cat >conftest.$ac_ext <<_ACEOF
10770#line $LINENO "configure"
10771#include "confdefs.h"
10772$ac_includes_default
10773#include <kernel/OS.h>
10774_ACEOF
10775rm -f conftest.$ac_objext
10776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10777 (eval $ac_compile) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); } &&
10781 { ac_try='test -s conftest.$ac_objext'
10782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10783 (eval $ac_try) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); }; }; then
10787 ac_header_compiler=yes
10788else
10789 echo "$as_me: failed program was:" >&5
10790cat conftest.$ac_ext >&5
10791ac_header_compiler=no
10792fi
10793rm -f conftest.$ac_objext conftest.$ac_ext
10794echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10795echo "${ECHO_T}$ac_header_compiler" >&6
10796
10797# Is the header present?
10798echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10799echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10800cat >conftest.$ac_ext <<_ACEOF
10801#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010802#include "confdefs.h"
10803#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
10805if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10806 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10807 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010808 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 rm -f conftest.er1
10810 cat conftest.err >&5
10811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812 (exit $ac_status); } >/dev/null; then
10813 if test -s conftest.err; then
10814 ac_cpp_err=$ac_c_preproc_warn_flag
10815 else
10816 ac_cpp_err=
10817 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010818else
Martin v. Löwis11437992002-04-12 09:54:03 +000010819 ac_cpp_err=yes
10820fi
10821if test -z "$ac_cpp_err"; then
10822 ac_header_preproc=yes
10823else
10824 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010825 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010826 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010827fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010828rm -f conftest.err conftest.$ac_ext
10829echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10830echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010831
Martin v. Löwis11437992002-04-12 09:54:03 +000010832# So? What about this header?
10833case $ac_header_compiler:$ac_header_preproc in
10834 yes:no )
10835 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10836echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10837 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10838echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10839 no:yes )
10840 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10841echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10842 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10843echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10844 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10845echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10846esac
10847echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10848echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10849if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10850 echo $ECHO_N "(cached) $ECHO_C" >&6
10851else
10852 ac_cv_header_kernel_OS_h=$ac_header_preproc
10853fi
10854echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10855echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10856
10857fi
10858if test $ac_cv_header_kernel_OS_h = yes; then
10859 cat >>confdefs.h <<\_ACEOF
10860#define WITH_THREAD 1
10861_ACEOF
10862
10863
10864cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010865#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010866_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010867
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010868 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010869else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010870
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10872echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10873if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875else
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010877LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010878cat >conftest.$ac_ext <<_ACEOF
10879#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010880#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
Greg Steinadf63d62000-07-05 10:38:09 +000010882/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010883#ifdef __cplusplus
10884extern "C"
10885#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010886/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010887 builtin and then its argument prototype would still apply. */
10888char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010889#ifdef F77_DUMMY_MAIN
10890# ifdef __cplusplus
10891 extern "C"
10892# endif
10893 int F77_DUMMY_MAIN() { return 1; }
10894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010895int
10896main ()
10897{
10898pthread_create ();
10899 ;
10900 return 0;
10901}
10902_ACEOF
10903rm -f conftest.$ac_objext conftest$ac_exeext
10904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10905 (eval $ac_link) 2>&5
10906 ac_status=$?
10907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); } &&
10909 { ac_try='test -s conftest$ac_exeext'
10910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10911 (eval $ac_try) 2>&5
10912 ac_status=$?
10913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10914 (exit $ac_status); }; }; then
10915 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010916else
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 echo "$as_me: failed program was:" >&5
10918cat conftest.$ac_ext >&5
10919ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10922LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010924echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10925echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10926if test $ac_cv_lib_pthreads_pthread_create = yes; then
10927 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010928#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010929_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010930
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010931 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010932 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010933 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010934else
Greg Steinadf63d62000-07-05 10:38:09 +000010935
Martin v. Löwis11437992002-04-12 09:54:03 +000010936 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10937echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10938if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10939 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010942LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010943cat >conftest.$ac_ext <<_ACEOF
10944#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010945#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Guido van Rossum49545951997-12-02 19:28:29 +000010947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010948#ifdef __cplusplus
10949extern "C"
10950#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010951/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 builtin and then its argument prototype would still apply. */
10953char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010954#ifdef F77_DUMMY_MAIN
10955# ifdef __cplusplus
10956 extern "C"
10957# endif
10958 int F77_DUMMY_MAIN() { return 1; }
10959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010960int
10961main ()
10962{
10963pthread_create ();
10964 ;
10965 return 0;
10966}
10967_ACEOF
10968rm -f conftest.$ac_objext conftest$ac_exeext
10969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10970 (eval $ac_link) 2>&5
10971 ac_status=$?
10972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10973 (exit $ac_status); } &&
10974 { ac_try='test -s conftest$ac_exeext'
10975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10976 (eval $ac_try) 2>&5
10977 ac_status=$?
10978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10979 (exit $ac_status); }; }; then
10980 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 echo "$as_me: failed program was:" >&5
10983cat conftest.$ac_ext >&5
10984ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010985fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10987LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010988fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010989echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10990echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10991if test $ac_cv_lib_c_r_pthread_create = yes; then
10992 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010993#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010994_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010996 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010997 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010998 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010999else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011000
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11002echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11003if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011005else
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011007LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011008cat >conftest.$ac_ext <<_ACEOF
11009#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011010#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011011
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011012/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011013#ifdef __cplusplus
11014extern "C"
11015#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011016/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 builtin and then its argument prototype would still apply. */
11018char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011019#ifdef F77_DUMMY_MAIN
11020# ifdef __cplusplus
11021 extern "C"
11022# endif
11023 int F77_DUMMY_MAIN() { return 1; }
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025int
11026main ()
11027{
11028__d6_pthread_create ();
11029 ;
11030 return 0;
11031}
11032_ACEOF
11033rm -f conftest.$ac_objext conftest$ac_exeext
11034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11035 (eval $ac_link) 2>&5
11036 ac_status=$?
11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11038 (exit $ac_status); } &&
11039 { ac_try='test -s conftest$ac_exeext'
11040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11042 ac_status=$?
11043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11044 (exit $ac_status); }; }; then
11045 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011046else
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 echo "$as_me: failed program was:" >&5
11048cat conftest.$ac_ext >&5
11049ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011051rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11052LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011054echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11055echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11056if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11057 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011058#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011059_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011060
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011061 echo Systems with __d6_pthread_create are not supported anymore.
11062 echo See README
11063 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011064 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011065 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011066 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011067else
Guido van Rossum49545951997-12-02 19:28:29 +000011068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11070echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11071if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11072 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011073else
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011075LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011076cat >conftest.$ac_ext <<_ACEOF
11077#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011078#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011079
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011080/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011081#ifdef __cplusplus
11082extern "C"
11083#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011084/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 builtin and then its argument prototype would still apply. */
11086char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011087#ifdef F77_DUMMY_MAIN
11088# ifdef __cplusplus
11089 extern "C"
11090# endif
11091 int F77_DUMMY_MAIN() { return 1; }
11092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011093int
11094main ()
11095{
11096__pthread_create_system ();
11097 ;
11098 return 0;
11099}
11100_ACEOF
11101rm -f conftest.$ac_objext conftest$ac_exeext
11102if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11103 (eval $ac_link) 2>&5
11104 ac_status=$?
11105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11106 (exit $ac_status); } &&
11107 { ac_try='test -s conftest$ac_exeext'
11108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11109 (eval $ac_try) 2>&5
11110 ac_status=$?
11111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11112 (exit $ac_status); }; }; then
11113 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 echo "$as_me: failed program was:" >&5
11116cat conftest.$ac_ext >&5
11117ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011118fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11120LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011121fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011122echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11123echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11124if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11125 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011126#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011130 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011131 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011132else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11135echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11136if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11137 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011138else
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011140LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011141cat >conftest.$ac_ext <<_ACEOF
11142#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011143#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
Guido van Rossumb93a8621998-05-07 13:27:32 +000011145/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011146#ifdef __cplusplus
11147extern "C"
11148#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011149/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 builtin and then its argument prototype would still apply. */
11151char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011152#ifdef F77_DUMMY_MAIN
11153# ifdef __cplusplus
11154 extern "C"
11155# endif
11156 int F77_DUMMY_MAIN() { return 1; }
11157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011158int
11159main ()
11160{
11161pthread_create ();
11162 ;
11163 return 0;
11164}
11165_ACEOF
11166rm -f conftest.$ac_objext conftest$ac_exeext
11167if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11168 (eval $ac_link) 2>&5
11169 ac_status=$?
11170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11171 (exit $ac_status); } &&
11172 { ac_try='test -s conftest$ac_exeext'
11173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11174 (eval $ac_try) 2>&5
11175 ac_status=$?
11176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11177 (exit $ac_status); }; }; then
11178 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011179else
Martin v. Löwis11437992002-04-12 09:54:03 +000011180 echo "$as_me: failed program was:" >&5
11181cat conftest.$ac_ext >&5
11182ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011184rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11185LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011187echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11188echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11189if test $ac_cv_lib_cma_pthread_create = yes; then
11190 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011191#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011192_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011193
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011194 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011195 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011196 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011197else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011198
Martin v. Löwis130fb172001-07-19 11:00:41 +000011199 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011200fi
11201
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011203fi
11204
Guido van Rossum0be3e491997-05-22 20:33:33 +000011205fi
11206
Guido van Rossum49545951997-12-02 19:28:29 +000011207fi
11208
Guido van Rossumb93a8621998-05-07 13:27:32 +000011209fi
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211fi
11212
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011213
Michael W. Hudson54241132001-12-07 15:38:26 +000011214fi
11215
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011216
11217fi
11218
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11221fi;
11222fi
11223
11224
11225fi
11226
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011227
Michael W. Hudson54241132001-12-07 15:38:26 +000011228
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011229 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011230 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011231
11232cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011233#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011234_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011235
11236 fi
11237
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011238 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11239 case $ac_sys_system/$ac_sys_release in
11240 SunOS/5.8)
11241cat >>confdefs.h <<\_ACEOF
11242#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11243_ACEOF
11244;;
11245 esac
11246
Martin v. Löwis11437992002-04-12 09:54:03 +000011247 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11248echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11249 if test "${ac_cv_pthread_system_supported+set}" = set; then
11250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011251else
11252 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011253 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011254else
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 cat >conftest.$ac_ext <<_ACEOF
11256#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011257#include "confdefs.h"
11258#include <pthread.h>
11259 void *foo(void *parm) {
11260 return NULL;
11261 }
11262 main() {
11263 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011264 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011265 if (pthread_attr_init(&attr)) exit(-1);
11266 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011267 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011268 exit(0);
11269 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011270_ACEOF
11271rm -f conftest$ac_exeext
11272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11273 (eval $ac_link) 2>&5
11274 ac_status=$?
11275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011282 ac_cv_pthread_system_supported=yes
11283else
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 echo "$as_me: program exited with status $ac_status" >&5
11285echo "$as_me: failed program was:" >&5
11286cat conftest.$ac_ext >&5
11287( exit $ac_status )
11288ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011289fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011290rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011291fi
11292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293fi
11294
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11296echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011297 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011298
11299cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011300#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011302
11303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
11305for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011306do
Martin v. Löwis11437992002-04-12 09:54:03 +000011307as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11308echo "$as_me:$LINENO: checking for $ac_func" >&5
11309echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11310if eval "test \"\${$as_ac_var+set}\" = set"; then
11311 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 cat >conftest.$ac_ext <<_ACEOF
11314#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011315#include "confdefs.h"
11316/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011318#include <assert.h>
11319/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011320#ifdef __cplusplus
11321extern "C"
11322#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011323/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 builtin and then its argument prototype would still apply. */
11325char $ac_func ();
11326char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011327
Barry Warsawfe33b792003-01-07 22:42:49 +000011328#ifdef F77_DUMMY_MAIN
11329# ifdef __cplusplus
11330 extern "C"
11331# endif
11332 int F77_DUMMY_MAIN() { return 1; }
11333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011337/* The GNU C library defines this for functions which it implements
11338 to always fail with ENOSYS. Some functions are actually named
11339 something starting with __ and the normal name is an alias. */
11340#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11341choke me
11342#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011344#endif
11345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ;
11347 return 0;
11348}
11349_ACEOF
11350rm -f conftest.$ac_objext conftest$ac_exeext
11351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11352 (eval $ac_link) 2>&5
11353 ac_status=$?
11354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11355 (exit $ac_status); } &&
11356 { ac_try='test -s conftest$ac_exeext'
11357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11358 (eval $ac_try) 2>&5
11359 ac_status=$?
11360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11361 (exit $ac_status); }; }; then
11362 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011363else
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 echo "$as_me: failed program was:" >&5
11365cat conftest.$ac_ext >&5
11366eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011370echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11371echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11372if test `eval echo '${'$as_ac_var'}'` = yes; then
11373 cat >>confdefs.h <<_ACEOF
11374#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11375_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011376
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011377fi
11378done
11379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011380 fi
11381
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11383echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11384if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386else
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011388LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011389cat >conftest.$ac_ext <<_ACEOF
11390#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011391#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011393/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011394#ifdef __cplusplus
11395extern "C"
11396#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 builtin and then its argument prototype would still apply. */
11399char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011400#ifdef F77_DUMMY_MAIN
11401# ifdef __cplusplus
11402 extern "C"
11403# endif
11404 int F77_DUMMY_MAIN() { return 1; }
11405#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011406int
11407main ()
11408{
11409usconfig ();
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext conftest$ac_exeext
11415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11416 (eval $ac_link) 2>&5
11417 ac_status=$?
11418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11419 (exit $ac_status); } &&
11420 { ac_try='test -s conftest$ac_exeext'
11421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11422 (eval $ac_try) 2>&5
11423 ac_status=$?
11424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11425 (exit $ac_status); }; }; then
11426 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427else
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 echo "$as_me: failed program was:" >&5
11429cat conftest.$ac_ext >&5
11430ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011435echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11436echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11437if test $ac_cv_lib_mpc_usconfig = yes; then
11438 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441
Martin v. Löwis130fb172001-07-19 11:00:41 +000011442 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011443 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011444 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445fi
11446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011447
Neal Norwitza978ab02002-11-02 16:58:05 +000011448 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11450echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11451if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453else
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011455LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011456cat >conftest.$ac_ext <<_ACEOF
11457#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011459
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011460/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011461#ifdef __cplusplus
11462extern "C"
11463#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011464/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 builtin and then its argument prototype would still apply. */
11466char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011467#ifdef F77_DUMMY_MAIN
11468# ifdef __cplusplus
11469 extern "C"
11470# endif
11471 int F77_DUMMY_MAIN() { return 1; }
11472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011473int
11474main ()
11475{
11476thr_create ();
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest.$ac_objext conftest$ac_exeext
11482if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11483 (eval $ac_link) 2>&5
11484 ac_status=$?
11485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11486 (exit $ac_status); } &&
11487 { ac_try='test -s conftest$ac_exeext'
11488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11489 (eval $ac_try) 2>&5
11490 ac_status=$?
11491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11492 (exit $ac_status); }; }; then
11493 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494else
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 echo "$as_me: failed program was:" >&5
11496cat conftest.$ac_ext >&5
11497ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011499rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11500LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011502echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11503echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11504if test $ac_cv_lib_thread_thr_create = yes; then
11505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011507_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011509 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011510 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011511 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011512fi
11513
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011514 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011515
Martin v. Löwis130fb172001-07-19 11:00:41 +000011516 if test "$USE_THREAD_MODULE" != "#"
11517 then
11518 # If the above checks didn't disable threads, (at least) OSF1
11519 # needs this '-threads' argument during linking.
11520 case $ac_sys_system in
11521 OSF1) LDLAST=-threads;;
11522 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011523 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011524
11525 if test "$posix_threads" = yes -a \
11526 "$ac_sys_system" = "SunOS" -a \
11527 "$ac_sys_release" = "5.6"; then
11528
11529cat >>confdefs.h <<\_ACEOF
11530#define HAVE_PTHREAD_DESTRUCTOR 1
11531_ACEOF
11532
11533 fi
11534
Guido van Rossum627b2d71993-12-24 10:39:16 +000011535fi
11536
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011537# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011538
11539
11540echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11541echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011542# Check whether --enable-ipv6 or --disable-ipv6 was given.
11543if test "${enable_ipv6+set}" = set; then
11544 enableval="$enable_ipv6"
11545 case "$enableval" in
11546 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 echo "$as_me:$LINENO: result: no" >&5
11548echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011549 ipv6=no
11550 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 *) echo "$as_me:$LINENO: result: yes" >&5
11552echo "${ECHO_T}yes" >&6
11553 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011554#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011555_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011556
11557 ipv6=yes
11558 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011560else
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011562 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 echo "$as_me:$LINENO: result: no" >&5
11564echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565 ipv6=no
11566
11567else
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 cat >conftest.$ac_ext <<_ACEOF
11569#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570#include "confdefs.h"
11571 /* AF_INET6 available check */
11572#include <sys/types.h>
11573#include <sys/socket.h>
11574main()
11575{
11576 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11577 exit(1);
11578 else
11579 exit(0);
11580}
11581
Martin v. Löwis11437992002-04-12 09:54:03 +000011582_ACEOF
11583rm -f conftest$ac_exeext
11584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585 (eval $ac_link) 2>&5
11586 ac_status=$?
11587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 echo "$as_me:$LINENO: result: yes" >&5
11595echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011596 ipv6=yes
11597else
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
11600cat conftest.$ac_ext >&5
11601( exit $ac_status )
11602echo "$as_me:$LINENO: result: no" >&5
11603echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011604 ipv6=no
11605fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011606rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011607fi
11608
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011609if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11611echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11612 cat >conftest.$ac_ext <<_ACEOF
11613#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011614#include "confdefs.h"
11615#include <sys/types.h>
11616#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011617#ifdef F77_DUMMY_MAIN
11618# ifdef __cplusplus
11619 extern "C"
11620# endif
11621 int F77_DUMMY_MAIN() { return 1; }
11622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011623int
11624main ()
11625{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011626struct sockaddr_in6 x;
11627x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ;
11629 return 0;
11630}
11631_ACEOF
11632rm -f conftest.$ac_objext
11633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11634 (eval $ac_compile) 2>&5
11635 ac_status=$?
11636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11637 (exit $ac_status); } &&
11638 { ac_try='test -s conftest.$ac_objext'
11639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11640 (eval $ac_try) 2>&5
11641 ac_status=$?
11642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11643 (exit $ac_status); }; }; then
11644 echo "$as_me:$LINENO: result: yes" >&5
11645echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011646 ipv6=yes
11647else
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 echo "$as_me: failed program was:" >&5
11649cat conftest.$ac_ext >&5
11650echo "$as_me:$LINENO: result: no" >&5
11651echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011652 ipv6=no
11653fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011654rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011655fi
11656
11657if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011659#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011660_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011661
11662fi
11663
Martin v. Löwis11437992002-04-12 09:54:03 +000011664fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011665
11666ipv6type=unknown
11667ipv6lib=none
11668ipv6trylibc=no
11669
11670if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11672echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011673 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11674 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011675 case $i in
11676 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 cat >conftest.$ac_ext <<_ACEOF
11678#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011679#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011680
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011681#include <netinet/in.h>
11682#ifdef IPV6_INRIA_VERSION
11683yes
11684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011685_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011687 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011688 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011689fi
11690rm -f conftest*
11691
11692 ;;
11693 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 cat >conftest.$ac_ext <<_ACEOF
11695#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011696#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011697
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011698#include <netinet/in.h>
11699#ifdef __KAME__
11700yes
11701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011704 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011705 ipv6type=$i;
11706 ipv6lib=inet6
11707 ipv6libdir=/usr/local/v6/lib
11708 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011709fi
11710rm -f conftest*
11711
11712 ;;
11713 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011714 cat >conftest.$ac_ext <<_ACEOF
11715#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011716#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011718#include <features.h>
11719#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11720yes
11721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011724 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011725 ipv6type=$i;
11726 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011727fi
11728rm -f conftest*
11729
11730 ;;
11731 linux-inet6)
11732 if test -d /usr/inet6; then
11733 ipv6type=$i
11734 ipv6lib=inet6
11735 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011736 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011737 fi
11738 ;;
11739 solaris)
11740 if test -f /etc/netconfig; then
11741 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11742 ipv6type=$i
11743 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011744 fi
11745 fi
11746 ;;
11747 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 cat >conftest.$ac_ext <<_ACEOF
11749#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011750#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011752#include <sys/param.h>
11753#ifdef _TOSHIBA_INET6
11754yes
11755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011758 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011759 ipv6type=$i;
11760 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011761 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762fi
11763rm -f conftest*
11764
11765 ;;
11766 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 cat >conftest.$ac_ext <<_ACEOF
11768#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011769#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011771#include </usr/local/v6/include/sys/v6config.h>
11772#ifdef __V6D__
11773yes
11774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011775_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011777 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011778 ipv6type=$i;
11779 ipv6lib=v6;
11780 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011781 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011782fi
11783rm -f conftest*
11784
11785 ;;
11786 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >conftest.$ac_ext <<_ACEOF
11788#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011789#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011791#include <sys/param.h>
11792#ifdef _ZETA_MINAMI_INET6
11793yes
11794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011797 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011798 ipv6type=$i;
11799 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011800 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801fi
11802rm -f conftest*
11803
11804 ;;
11805 esac
11806 if test "$ipv6type" != "unknown"; then
11807 break
11808 fi
11809 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 echo "$as_me:$LINENO: result: $ipv6type" >&5
11811echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011812fi
11813
11814if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11815 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11816 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11817 echo "using lib$ipv6lib"
11818 else
11819 if test $ipv6trylibc = "yes"; then
11820 echo "using libc"
11821 else
11822 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11823 echo "You need to fetch lib$ipv6lib.a from appropriate"
11824 echo 'ipv6 kit and compile beforehand.'
11825 exit 1
11826 fi
11827 fi
11828fi
11829
Jack Jansen7b8c7542002-04-14 20:12:41 +000011830# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011831echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11832echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011833
11834# Check whether --with-universal-newlines or --without-universal-newlines was given.
11835if test "${with_universal_newlines+set}" = set; then
11836 withval="$with_universal_newlines"
11837
11838fi;
11839
11840if test -z "$with_universal_newlines"
11841then with_universal_newlines="yes"
11842fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011843if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011844then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011845 echo --without-universal-newlines is unsupported, see README
11846 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011847else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011848
11849cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011850#define WITH_UNIVERSAL_NEWLINES 1
11851_ACEOF
11852
11853fi
11854echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11855echo "${ECHO_T}$with_universal_newlines" >&6
11856
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011857# Check for --with-doc-strings
11858echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11859echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11860
11861# Check whether --with-doc-strings or --without-doc-strings was given.
11862if test "${with_doc_strings+set}" = set; then
11863 withval="$with_doc_strings"
11864
11865fi;
11866
11867if test -z "$with_doc_strings"
11868then with_doc_strings="yes"
11869fi
11870if test "$with_doc_strings" != "no"
11871then
11872
11873cat >>confdefs.h <<\_ACEOF
11874#define WITH_DOC_STRINGS 1
11875_ACEOF
11876
11877fi
11878echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11879echo "${ECHO_T}$with_doc_strings" >&6
11880
Neil Schemenauera35c6882001-02-27 04:45:05 +000011881# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011882echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11883echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11884
Neil Schemenauera35c6882001-02-27 04:45:05 +000011885# Check whether --with-pymalloc or --without-pymalloc was given.
11886if test "${with_pymalloc+set}" = set; then
11887 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011888
Martin v. Löwis11437992002-04-12 09:54:03 +000011889fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011890
Neil Schemenauer16c22972002-03-22 15:34:49 +000011891if test -z "$with_pymalloc"
11892then with_pymalloc="yes"
11893fi
11894if test "$with_pymalloc" != "no"
11895then
Martin v. Löwis11437992002-04-12 09:54:03 +000011896
11897cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011898#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011899_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011900
11901fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011902echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11903echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011904
Barry Warsawef82cd72000-06-30 16:21:01 +000011905# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011906echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11907echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11908
Barry Warsawef82cd72000-06-30 16:21:01 +000011909# Check whether --with-wctype-functions or --without-wctype-functions was given.
11910if test "${with_wctype_functions+set}" = set; then
11911 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011912
Barry Warsawef82cd72000-06-30 16:21:01 +000011913if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011914then
11915
11916cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011917#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011918_ACEOF
11919
11920 echo "$as_me:$LINENO: result: yes" >&5
11921echo "${ECHO_T}yes" >&6
11922else echo "$as_me:$LINENO: result: no" >&5
11923echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011924fi
11925else
Martin v. Löwis11437992002-04-12 09:54:03 +000011926 echo "$as_me:$LINENO: result: no" >&5
11927echo "${ECHO_T}no" >&6
11928fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011930# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011931
Guido van Rossum98935bf2001-09-05 19:13:16 +000011932DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011933
Martin v. Löwis11437992002-04-12 09:54:03 +000011934echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11935echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11936
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011937# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011938if test "${with_sgi_dl+set}" = set; then
11939 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011940
11941echo "$as_me:$LINENO: result: $withval" >&5
11942echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011943echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011944exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011945
11946cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011947#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011948_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011949
Guido van Rossume97ee181999-12-20 21:27:22 +000011950DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011951dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011952if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011953then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011954else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11955echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11956 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011957fi
11958DLINCLDIR=${dldir}
11959LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011960else
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 echo "$as_me:$LINENO: result: no" >&5
11962echo "${ECHO_T}no" >&6
11963fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011964
Martin v. Löwis11437992002-04-12 09:54:03 +000011965echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11966echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011969if test "${with_dl_dld+set}" = set; then
11970 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011971
11972echo "$as_me:$LINENO: result: $withval" >&5
11973echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011974echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011975exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
11977cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011978#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011979_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011980
Guido van Rossume97ee181999-12-20 21:27:22 +000011981DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011982dldir=`echo "$withval" | sed 's/,.*//'`
11983dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011984if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011985then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011986else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11987echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11988 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011989fi
11990DLINCLDIR=${dldir}
11991LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011992else
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 echo "$as_me:$LINENO: result: no" >&5
11994echo "${ECHO_T}no" >&6
11995fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011996
Guido van Rossume97ee181999-12-20 21:27:22 +000011997# the dlopen() function means we might want to use dynload_shlib.o. some
11998# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Thomas Wouters3a584202000-08-05 23:28:51 +000012000for ac_func in dlopen
12001do
Martin v. Löwis11437992002-04-12 09:54:03 +000012002as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12003echo "$as_me:$LINENO: checking for $ac_func" >&5
12004echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12005if eval "test \"\${$as_ac_var+set}\" = set"; then
12006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012007else
Martin v. Löwis11437992002-04-12 09:54:03 +000012008 cat >conftest.$ac_ext <<_ACEOF
12009#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012010#include "confdefs.h"
12011/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012013#include <assert.h>
12014/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012015#ifdef __cplusplus
12016extern "C"
12017#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012018/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 builtin and then its argument prototype would still apply. */
12020char $ac_func ();
12021char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012022
Barry Warsawfe33b792003-01-07 22:42:49 +000012023#ifdef F77_DUMMY_MAIN
12024# ifdef __cplusplus
12025 extern "C"
12026# endif
12027 int F77_DUMMY_MAIN() { return 1; }
12028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Guido van Rossume97ee181999-12-20 21:27:22 +000012032/* The GNU C library defines this for functions which it implements
12033 to always fail with ENOSYS. Some functions are actually named
12034 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012035#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012036choke me
12037#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012038f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012039#endif
12040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
12045rm -f conftest.$ac_objext conftest$ac_exeext
12046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12047 (eval $ac_link) 2>&5
12048 ac_status=$?
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } &&
12051 { ac_try='test -s conftest$ac_exeext'
12052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12053 (eval $ac_try) 2>&5
12054 ac_status=$?
12055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12056 (exit $ac_status); }; }; then
12057 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012058else
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 echo "$as_me: failed program was:" >&5
12060cat conftest.$ac_ext >&5
12061eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012063rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012065echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12066echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12067if test `eval echo '${'$as_ac_var'}'` = yes; then
12068 cat >>confdefs.h <<_ACEOF
12069#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12070_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012071
Guido van Rossume97ee181999-12-20 21:27:22 +000012072fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012073done
Guido van Rossume97ee181999-12-20 21:27:22 +000012074
Michael W. Hudson54241132001-12-07 15:38:26 +000012075
Guido van Rossume97ee181999-12-20 21:27:22 +000012076# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12077# loading of modules.
12078
Martin v. Löwis11437992002-04-12 09:54:03 +000012079echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12080echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012081if test -z "$DYNLOADFILE"
12082then
12083 case $ac_sys_system/$ac_sys_release in
12084 AIX*) DYNLOADFILE="dynload_aix.o";;
12085 BeOS*) DYNLOADFILE="dynload_beos.o";;
12086 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012087 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012088 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012089 *)
12090 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12091 # out any dynamic loading
12092 if test "$ac_cv_func_dlopen" = yes
12093 then DYNLOADFILE="dynload_shlib.o"
12094 else DYNLOADFILE="dynload_stub.o"
12095 fi
12096 ;;
12097 esac
12098fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012099echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12100echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012101if test "$DYNLOADFILE" != "dynload_stub.o"
12102then
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
12104cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012105#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012106_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012107
12108fi
12109
Neil Schemenauer4e425612001-06-19 15:44:15 +000012110# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12111
Michael W. Hudson54241132001-12-07 15:38:26 +000012112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12114echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012115if test -z "$MACHDEP_OBJS"
12116then
Jack Jansene578a632001-08-15 01:27:14 +000012117 MACHDEP_OBJS=$extra_machdep_objs
12118else
12119 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012121echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12122echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012123
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012198
Martin v. Löwisd5843682002-11-21 20:41:28 +000012199for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012200 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012201 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12202 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012203 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012204 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012205 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012206 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012207 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012208 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012209 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012210 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012211do
Martin v. Löwis11437992002-04-12 09:54:03 +000012212as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12213echo "$as_me:$LINENO: checking for $ac_func" >&5
12214echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12215if eval "test \"\${$as_ac_var+set}\" = set"; then
12216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217else
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 cat >conftest.$ac_ext <<_ACEOF
12219#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012221/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012223#include <assert.h>
12224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012225#ifdef __cplusplus
12226extern "C"
12227#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012228/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 builtin and then its argument prototype would still apply. */
12230char $ac_func ();
12231char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012232
Barry Warsawfe33b792003-01-07 22:42:49 +000012233#ifdef F77_DUMMY_MAIN
12234# ifdef __cplusplus
12235 extern "C"
12236# endif
12237 int F77_DUMMY_MAIN() { return 1; }
12238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242/* The GNU C library defines this for functions which it implements
12243 to always fail with ENOSYS. Some functions are actually named
12244 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246choke me
12247#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012248f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012249#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 ;
12252 return 0;
12253}
12254_ACEOF
12255rm -f conftest.$ac_objext conftest$ac_exeext
12256if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12257 (eval $ac_link) 2>&5
12258 ac_status=$?
12259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12260 (exit $ac_status); } &&
12261 { ac_try='test -s conftest$ac_exeext'
12262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12263 (eval $ac_try) 2>&5
12264 ac_status=$?
12265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12266 (exit $ac_status); }; }; then
12267 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012268else
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 echo "$as_me: failed program was:" >&5
12270cat conftest.$ac_ext >&5
12271eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012273rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12277if test `eval echo '${'$as_ac_var'}'` = yes; then
12278 cat >>confdefs.h <<_ACEOF
12279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12280_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012281
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012282fi
12283done
12284
Michael W. Hudson54241132001-12-07 15:38:26 +000012285
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012286# For some functions, having a definition is not sufficient, since
12287# we want to take their address.
12288echo "$as_me:$LINENO: checking for chroot" >&5
12289echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12290cat >conftest.$ac_ext <<_ACEOF
12291#line $LINENO "configure"
12292#include "confdefs.h"
12293#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012294#ifdef F77_DUMMY_MAIN
12295# ifdef __cplusplus
12296 extern "C"
12297# endif
12298 int F77_DUMMY_MAIN() { return 1; }
12299#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012300int
12301main ()
12302{
12303void *x=chroot
12304 ;
12305 return 0;
12306}
12307_ACEOF
12308rm -f conftest.$ac_objext
12309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12310 (eval $ac_compile) 2>&5
12311 ac_status=$?
12312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12313 (exit $ac_status); } &&
12314 { ac_try='test -s conftest.$ac_objext'
12315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12316 (eval $ac_try) 2>&5
12317 ac_status=$?
12318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319 (exit $ac_status); }; }; then
12320
12321cat >>confdefs.h <<\_ACEOF
12322#define HAVE_CHROOT 1
12323_ACEOF
12324
12325 echo "$as_me:$LINENO: result: yes" >&5
12326echo "${ECHO_T}yes" >&6
12327else
12328 echo "$as_me: failed program was:" >&5
12329cat conftest.$ac_ext >&5
12330echo "$as_me:$LINENO: result: no" >&5
12331echo "${ECHO_T}no" >&6
12332
12333fi
12334rm -f conftest.$ac_objext conftest.$ac_ext
12335echo "$as_me:$LINENO: checking for link" >&5
12336echo $ECHO_N "checking for link... $ECHO_C" >&6
12337cat >conftest.$ac_ext <<_ACEOF
12338#line $LINENO "configure"
12339#include "confdefs.h"
12340#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012341#ifdef F77_DUMMY_MAIN
12342# ifdef __cplusplus
12343 extern "C"
12344# endif
12345 int F77_DUMMY_MAIN() { return 1; }
12346#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012347int
12348main ()
12349{
12350void *x=link
12351 ;
12352 return 0;
12353}
12354_ACEOF
12355rm -f conftest.$ac_objext
12356if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12357 (eval $ac_compile) 2>&5
12358 ac_status=$?
12359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12360 (exit $ac_status); } &&
12361 { ac_try='test -s conftest.$ac_objext'
12362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12363 (eval $ac_try) 2>&5
12364 ac_status=$?
12365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12366 (exit $ac_status); }; }; then
12367
12368cat >>confdefs.h <<\_ACEOF
12369#define HAVE_LINK 1
12370_ACEOF
12371
12372 echo "$as_me:$LINENO: result: yes" >&5
12373echo "${ECHO_T}yes" >&6
12374else
12375 echo "$as_me: failed program was:" >&5
12376cat conftest.$ac_ext >&5
12377echo "$as_me:$LINENO: result: no" >&5
12378echo "${ECHO_T}no" >&6
12379
12380fi
12381rm -f conftest.$ac_objext conftest.$ac_ext
12382echo "$as_me:$LINENO: checking for symlink" >&5
12383echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12384cat >conftest.$ac_ext <<_ACEOF
12385#line $LINENO "configure"
12386#include "confdefs.h"
12387#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012388#ifdef F77_DUMMY_MAIN
12389# ifdef __cplusplus
12390 extern "C"
12391# endif
12392 int F77_DUMMY_MAIN() { return 1; }
12393#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012394int
12395main ()
12396{
12397void *x=symlink
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext
12403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12404 (eval $ac_compile) 2>&5
12405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); } &&
12408 { ac_try='test -s conftest.$ac_objext'
12409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12410 (eval $ac_try) 2>&5
12411 ac_status=$?
12412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); }; }; then
12414
12415cat >>confdefs.h <<\_ACEOF
12416#define HAVE_SYMLINK 1
12417_ACEOF
12418
12419 echo "$as_me:$LINENO: result: yes" >&5
12420echo "${ECHO_T}yes" >&6
12421else
12422 echo "$as_me: failed program was:" >&5
12423cat conftest.$ac_ext >&5
12424echo "$as_me:$LINENO: result: no" >&5
12425echo "${ECHO_T}no" >&6
12426
12427fi
12428rm -f conftest.$ac_objext conftest.$ac_ext
12429
Martin v. Löwisd5843682002-11-21 20:41:28 +000012430# On some systems (eg. FreeBSD 5), we would find a definition of the
12431# functions ctermid_r, setgroups in the library, but no prototype
12432# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12433# address to avoid compiler warnings and potential miscompilations
12434# because of the missing prototypes.
12435
12436echo "$as_me:$LINENO: checking for ctermid_r" >&5
12437echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12438cat >conftest.$ac_ext <<_ACEOF
12439#line $LINENO "configure"
12440#include "confdefs.h"
12441
12442#include "confdefs.h"
12443#include <stdio.h>
12444
Barry Warsawfe33b792003-01-07 22:42:49 +000012445#ifdef F77_DUMMY_MAIN
12446# ifdef __cplusplus
12447 extern "C"
12448# endif
12449 int F77_DUMMY_MAIN() { return 1; }
12450#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012451int
12452main ()
12453{
12454void* p = ctermid_r
12455 ;
12456 return 0;
12457}
12458_ACEOF
12459rm -f conftest.$ac_objext
12460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12461 (eval $ac_compile) 2>&5
12462 ac_status=$?
12463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12464 (exit $ac_status); } &&
12465 { ac_try='test -s conftest.$ac_objext'
12466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12467 (eval $ac_try) 2>&5
12468 ac_status=$?
12469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); }; }; then
12471
12472cat >>confdefs.h <<\_ACEOF
12473#define HAVE_CTERMID_R 1
12474_ACEOF
12475
12476 echo "$as_me:$LINENO: result: yes" >&5
12477echo "${ECHO_T}yes" >&6
12478else
12479 echo "$as_me: failed program was:" >&5
12480cat conftest.$ac_ext >&5
12481echo "$as_me:$LINENO: result: no" >&5
12482echo "${ECHO_T}no" >&6
12483
12484fi
12485rm -f conftest.$ac_objext conftest.$ac_ext
12486
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012487echo "$as_me:$LINENO: checking for flock" >&5
12488echo $ECHO_N "checking for flock... $ECHO_C" >&6
12489cat >conftest.$ac_ext <<_ACEOF
12490#line $LINENO "configure"
12491#include "confdefs.h"
12492
12493#include "confdefs.h"
12494#include <sys/file.h>
12495
12496#ifdef F77_DUMMY_MAIN
12497# ifdef __cplusplus
12498 extern "C"
12499# endif
12500 int F77_DUMMY_MAIN() { return 1; }
12501#endif
12502int
12503main ()
12504{
12505void* p = flock
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510rm -f conftest.$ac_objext
12511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12513 ac_status=$?
12514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12515 (exit $ac_status); } &&
12516 { ac_try='test -s conftest.$ac_objext'
12517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12519 ac_status=$?
12520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12521 (exit $ac_status); }; }; then
12522
12523cat >>confdefs.h <<\_ACEOF
12524#define HAVE_FLOCK 1
12525_ACEOF
12526
12527 echo "$as_me:$LINENO: result: yes" >&5
12528echo "${ECHO_T}yes" >&6
12529else
12530 echo "$as_me: failed program was:" >&5
12531cat conftest.$ac_ext >&5
12532echo "$as_me:$LINENO: result: no" >&5
12533echo "${ECHO_T}no" >&6
12534
12535fi
12536rm -f conftest.$ac_objext conftest.$ac_ext
12537
12538echo "$as_me:$LINENO: checking for getpagesize" >&5
12539echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12540cat >conftest.$ac_ext <<_ACEOF
12541#line $LINENO "configure"
12542#include "confdefs.h"
12543
12544#include "confdefs.h"
12545#include <unistd.h>
12546
12547#ifdef F77_DUMMY_MAIN
12548# ifdef __cplusplus
12549 extern "C"
12550# endif
12551 int F77_DUMMY_MAIN() { return 1; }
12552#endif
12553int
12554main ()
12555{
12556void* p = getpagesize
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
12562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12563 (eval $ac_compile) 2>&5
12564 ac_status=$?
12565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566 (exit $ac_status); } &&
12567 { ac_try='test -s conftest.$ac_objext'
12568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569 (eval $ac_try) 2>&5
12570 ac_status=$?
12571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572 (exit $ac_status); }; }; then
12573
12574cat >>confdefs.h <<\_ACEOF
12575#define HAVE_GETPAGESIZE 1
12576_ACEOF
12577
12578 echo "$as_me:$LINENO: result: yes" >&5
12579echo "${ECHO_T}yes" >&6
12580else
12581 echo "$as_me: failed program was:" >&5
12582cat conftest.$ac_ext >&5
12583echo "$as_me:$LINENO: result: no" >&5
12584echo "${ECHO_T}no" >&6
12585
12586fi
12587rm -f conftest.$ac_objext conftest.$ac_ext
12588
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012589echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12590echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12591if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12592 echo $ECHO_N "(cached) $ECHO_C" >&6
12593else
12594 ac_check_lib_save_LIBS=$LIBS
12595LIBS="-lc $LIBS"
12596cat >conftest.$ac_ext <<_ACEOF
12597#line $LINENO "configure"
12598#include "confdefs.h"
12599
12600/* Override any gcc2 internal prototype to avoid an error. */
12601#ifdef __cplusplus
12602extern "C"
12603#endif
12604/* We use char because int might match the return type of a gcc2
12605 builtin and then its argument prototype would still apply. */
12606char inet_aton ();
12607#ifdef F77_DUMMY_MAIN
12608# ifdef __cplusplus
12609 extern "C"
12610# endif
12611 int F77_DUMMY_MAIN() { return 1; }
12612#endif
12613int
12614main ()
12615{
12616inet_aton ();
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621rm -f conftest.$ac_objext conftest$ac_exeext
12622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12623 (eval $ac_link) 2>&5
12624 ac_status=$?
12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12626 (exit $ac_status); } &&
12627 { ac_try='test -s conftest$ac_exeext'
12628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12629 (eval $ac_try) 2>&5
12630 ac_status=$?
12631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12632 (exit $ac_status); }; }; then
12633 ac_cv_lib_c_inet_aton=yes
12634else
12635 echo "$as_me: failed program was:" >&5
12636cat conftest.$ac_ext >&5
12637ac_cv_lib_c_inet_aton=no
12638fi
12639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12640LIBS=$ac_check_lib_save_LIBS
12641fi
12642echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12643echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12644if test $ac_cv_lib_c_inet_aton = yes; then
12645 /bin/true
12646else
12647
12648echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12649echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12650if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12651 echo $ECHO_N "(cached) $ECHO_C" >&6
12652else
12653 ac_check_lib_save_LIBS=$LIBS
12654LIBS="-lresolv $LIBS"
12655cat >conftest.$ac_ext <<_ACEOF
12656#line $LINENO "configure"
12657#include "confdefs.h"
12658
12659/* Override any gcc2 internal prototype to avoid an error. */
12660#ifdef __cplusplus
12661extern "C"
12662#endif
12663/* We use char because int might match the return type of a gcc2
12664 builtin and then its argument prototype would still apply. */
12665char inet_aton ();
12666#ifdef F77_DUMMY_MAIN
12667# ifdef __cplusplus
12668 extern "C"
12669# endif
12670 int F77_DUMMY_MAIN() { return 1; }
12671#endif
12672int
12673main ()
12674{
12675inet_aton ();
12676 ;
12677 return 0;
12678}
12679_ACEOF
12680rm -f conftest.$ac_objext conftest$ac_exeext
12681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12682 (eval $ac_link) 2>&5
12683 ac_status=$?
12684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12685 (exit $ac_status); } &&
12686 { ac_try='test -s conftest$ac_exeext'
12687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12688 (eval $ac_try) 2>&5
12689 ac_status=$?
12690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12691 (exit $ac_status); }; }; then
12692 ac_cv_lib_resolv_inet_aton=yes
12693else
12694 echo "$as_me: failed program was:" >&5
12695cat conftest.$ac_ext >&5
12696ac_cv_lib_resolv_inet_aton=no
12697fi
12698rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12699LIBS=$ac_check_lib_save_LIBS
12700fi
12701echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12702echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12703if test $ac_cv_lib_resolv_inet_aton = yes; then
12704 cat >>confdefs.h <<_ACEOF
12705#define HAVE_LIBRESOLV 1
12706_ACEOF
12707
12708 LIBS="-lresolv $LIBS"
12709
12710fi
12711
12712
12713fi
12714
12715
Martin v. Löwise9416172003-05-03 10:12:45 +000012716echo "$as_me:$LINENO: checking for hstrerror" >&5
12717echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12718cat >conftest.$ac_ext <<_ACEOF
12719#line $LINENO "configure"
12720#include "confdefs.h"
12721
12722#include "confdefs.h"
12723#include <netdb.h>
12724
12725#ifdef F77_DUMMY_MAIN
12726# ifdef __cplusplus
12727 extern "C"
12728# endif
12729 int F77_DUMMY_MAIN() { return 1; }
12730#endif
12731int
12732main ()
12733{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012734void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012739rm -f conftest.$ac_objext conftest$ac_exeext
12740if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012745 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747 (eval $ac_try) 2>&5
12748 ac_status=$?
12749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750 (exit $ac_status); }; }; then
12751
12752cat >>confdefs.h <<\_ACEOF
12753#define HAVE_HSTRERROR 1
12754_ACEOF
12755
12756 echo "$as_me:$LINENO: result: yes" >&5
12757echo "${ECHO_T}yes" >&6
12758else
12759 echo "$as_me: failed program was:" >&5
12760cat conftest.$ac_ext >&5
12761echo "$as_me:$LINENO: result: no" >&5
12762echo "${ECHO_T}no" >&6
12763
12764fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012766
12767echo "$as_me:$LINENO: checking for inet_aton" >&5
12768echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12769cat >conftest.$ac_ext <<_ACEOF
12770#line $LINENO "configure"
12771#include "confdefs.h"
12772
12773#include "confdefs.h"
12774#include <sys/socket.h>
12775#include <netinet/in.h>
12776#include <arpa/inet.h>
12777
12778#ifdef F77_DUMMY_MAIN
12779# ifdef __cplusplus
12780 extern "C"
12781# endif
12782 int F77_DUMMY_MAIN() { return 1; }
12783#endif
12784int
12785main ()
12786{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012787void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012792rm -f conftest.$ac_objext conftest$ac_exeext
12793if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12794 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012795 ac_status=$?
12796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12797 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012798 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12800 (eval $ac_try) 2>&5
12801 ac_status=$?
12802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12803 (exit $ac_status); }; }; then
12804
12805cat >>confdefs.h <<\_ACEOF
12806#define HAVE_INET_ATON 1
12807_ACEOF
12808
12809 echo "$as_me:$LINENO: result: yes" >&5
12810echo "${ECHO_T}yes" >&6
12811else
12812 echo "$as_me: failed program was:" >&5
12813cat conftest.$ac_ext >&5
12814echo "$as_me:$LINENO: result: no" >&5
12815echo "${ECHO_T}no" >&6
12816
12817fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012819
12820echo "$as_me:$LINENO: checking for inet_pton" >&5
12821echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12822cat >conftest.$ac_ext <<_ACEOF
12823#line $LINENO "configure"
12824#include "confdefs.h"
12825
12826#include "confdefs.h"
12827#include <sys/socket.h>
12828#include <netinet/in.h>
12829#include <arpa/inet.h>
12830
12831#ifdef F77_DUMMY_MAIN
12832# ifdef __cplusplus
12833 extern "C"
12834# endif
12835 int F77_DUMMY_MAIN() { return 1; }
12836#endif
12837int
12838main ()
12839{
12840void* p = inet_pton
12841 ;
12842 return 0;
12843}
12844_ACEOF
12845rm -f conftest.$ac_objext
12846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12847 (eval $ac_compile) 2>&5
12848 ac_status=$?
12849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12850 (exit $ac_status); } &&
12851 { ac_try='test -s conftest.$ac_objext'
12852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12853 (eval $ac_try) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); }; }; then
12857
12858cat >>confdefs.h <<\_ACEOF
12859#define HAVE_INET_PTON 1
12860_ACEOF
12861
12862 echo "$as_me:$LINENO: result: yes" >&5
12863echo "${ECHO_T}yes" >&6
12864else
12865 echo "$as_me: failed program was:" >&5
12866cat conftest.$ac_ext >&5
12867echo "$as_me:$LINENO: result: no" >&5
12868echo "${ECHO_T}no" >&6
12869
12870fi
12871rm -f conftest.$ac_objext conftest.$ac_ext
12872
Martin v. Löwisd5843682002-11-21 20:41:28 +000012873echo "$as_me:$LINENO: checking for setgroups" >&5
12874echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12875cat >conftest.$ac_ext <<_ACEOF
12876#line $LINENO "configure"
12877#include "confdefs.h"
12878
12879#include "confdefs.h"
12880#include <unistd.h.h>
12881
Barry Warsawfe33b792003-01-07 22:42:49 +000012882#ifdef F77_DUMMY_MAIN
12883# ifdef __cplusplus
12884 extern "C"
12885# endif
12886 int F77_DUMMY_MAIN() { return 1; }
12887#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012888int
12889main ()
12890{
12891void* p = setgroups
12892 ;
12893 return 0;
12894}
12895_ACEOF
12896rm -f conftest.$ac_objext
12897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12898 (eval $ac_compile) 2>&5
12899 ac_status=$?
12900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12901 (exit $ac_status); } &&
12902 { ac_try='test -s conftest.$ac_objext'
12903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12904 (eval $ac_try) 2>&5
12905 ac_status=$?
12906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12907 (exit $ac_status); }; }; then
12908
12909cat >>confdefs.h <<\_ACEOF
12910#define HAVE_SETGROUPS 1
12911_ACEOF
12912
12913 echo "$as_me:$LINENO: result: yes" >&5
12914echo "${ECHO_T}yes" >&6
12915else
12916 echo "$as_me: failed program was:" >&5
12917cat conftest.$ac_ext >&5
12918echo "$as_me:$LINENO: result: no" >&5
12919echo "${ECHO_T}no" >&6
12920
12921fi
12922rm -f conftest.$ac_objext conftest.$ac_ext
12923
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012924# check for openpty and forkpty
12925
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012927for ac_func in openpty
12928do
Martin v. Löwis11437992002-04-12 09:54:03 +000012929as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12930echo "$as_me:$LINENO: checking for $ac_func" >&5
12931echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12932if eval "test \"\${$as_ac_var+set}\" = set"; then
12933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012934else
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 cat >conftest.$ac_ext <<_ACEOF
12936#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012937#include "confdefs.h"
12938/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012940#include <assert.h>
12941/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012942#ifdef __cplusplus
12943extern "C"
12944#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012945/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 builtin and then its argument prototype would still apply. */
12947char $ac_func ();
12948char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012949
Barry Warsawfe33b792003-01-07 22:42:49 +000012950#ifdef F77_DUMMY_MAIN
12951# ifdef __cplusplus
12952 extern "C"
12953# endif
12954 int F77_DUMMY_MAIN() { return 1; }
12955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012956int
12957main ()
12958{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012959/* The GNU C library defines this for functions which it implements
12960 to always fail with ENOSYS. Some functions are actually named
12961 something starting with __ and the normal name is an alias. */
12962#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12963choke me
12964#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012966#endif
12967
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 ;
12969 return 0;
12970}
12971_ACEOF
12972rm -f conftest.$ac_objext conftest$ac_exeext
12973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12974 (eval $ac_link) 2>&5
12975 ac_status=$?
12976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12977 (exit $ac_status); } &&
12978 { ac_try='test -s conftest$ac_exeext'
12979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12980 (eval $ac_try) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); }; }; then
12984 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012985else
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 echo "$as_me: failed program was:" >&5
12987cat conftest.$ac_ext >&5
12988eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012989fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012990rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012992echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12993echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12994if test `eval echo '${'$as_ac_var'}'` = yes; then
12995 cat >>confdefs.h <<_ACEOF
12996#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12997_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012999else
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13001echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13002if test "${ac_cv_lib_util_openpty+set}" = set; then
13003 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013004else
Martin v. Löwis11437992002-04-12 09:54:03 +000013005 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013006LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013007cat >conftest.$ac_ext <<_ACEOF
13008#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013009#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Fred Drake8cef4cf2000-06-28 16:40:38 +000013011/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013012#ifdef __cplusplus
13013extern "C"
13014#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013015/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 builtin and then its argument prototype would still apply. */
13017char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013018#ifdef F77_DUMMY_MAIN
13019# ifdef __cplusplus
13020 extern "C"
13021# endif
13022 int F77_DUMMY_MAIN() { return 1; }
13023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013024int
13025main ()
13026{
13027openpty ();
13028 ;
13029 return 0;
13030}
13031_ACEOF
13032rm -f conftest.$ac_objext conftest$ac_exeext
13033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13034 (eval $ac_link) 2>&5
13035 ac_status=$?
13036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13037 (exit $ac_status); } &&
13038 { ac_try='test -s conftest$ac_exeext'
13039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13040 (eval $ac_try) 2>&5
13041 ac_status=$?
13042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043 (exit $ac_status); }; }; then
13044 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 echo "$as_me: failed program was:" >&5
13047cat conftest.$ac_ext >&5
13048ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013050rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13051LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013053echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13054echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13055if test $ac_cv_lib_util_openpty = yes; then
13056 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013057#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013058_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013059 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013060fi
13061
13062fi
13063done
13064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065
Fred Drake8cef4cf2000-06-28 16:40:38 +000013066for ac_func in forkpty
13067do
Martin v. Löwis11437992002-04-12 09:54:03 +000013068as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13069echo "$as_me:$LINENO: checking for $ac_func" >&5
13070echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13071if eval "test \"\${$as_ac_var+set}\" = set"; then
13072 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013073else
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 cat >conftest.$ac_ext <<_ACEOF
13075#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013076#include "confdefs.h"
13077/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013079#include <assert.h>
13080/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013081#ifdef __cplusplus
13082extern "C"
13083#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013084/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 builtin and then its argument prototype would still apply. */
13086char $ac_func ();
13087char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013088
Barry Warsawfe33b792003-01-07 22:42:49 +000013089#ifdef F77_DUMMY_MAIN
13090# ifdef __cplusplus
13091 extern "C"
13092# endif
13093 int F77_DUMMY_MAIN() { return 1; }
13094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013095int
13096main ()
13097{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013098/* The GNU C library defines this for functions which it implements
13099 to always fail with ENOSYS. Some functions are actually named
13100 something starting with __ and the normal name is an alias. */
13101#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13102choke me
13103#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013104f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013105#endif
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107 ;
13108 return 0;
13109}
13110_ACEOF
13111rm -f conftest.$ac_objext conftest$ac_exeext
13112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13113 (eval $ac_link) 2>&5
13114 ac_status=$?
13115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13116 (exit $ac_status); } &&
13117 { ac_try='test -s conftest$ac_exeext'
13118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13119 (eval $ac_try) 2>&5
13120 ac_status=$?
13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13122 (exit $ac_status); }; }; then
13123 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 echo "$as_me: failed program was:" >&5
13126cat conftest.$ac_ext >&5
13127eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013128fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013129rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013130fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013131echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13132echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13133if test `eval echo '${'$as_ac_var'}'` = yes; then
13134 cat >>confdefs.h <<_ACEOF
13135#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13136_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013137
Fred Drake8cef4cf2000-06-28 16:40:38 +000013138else
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13140echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13141if test "${ac_cv_lib_util_forkpty+set}" = set; then
13142 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013143else
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013145LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013146cat >conftest.$ac_ext <<_ACEOF
13147#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013148#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
Fred Drake8cef4cf2000-06-28 16:40:38 +000013150/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013151#ifdef __cplusplus
13152extern "C"
13153#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013154/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 builtin and then its argument prototype would still apply. */
13156char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013157#ifdef F77_DUMMY_MAIN
13158# ifdef __cplusplus
13159 extern "C"
13160# endif
13161 int F77_DUMMY_MAIN() { return 1; }
13162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013163int
13164main ()
13165{
13166forkpty ();
13167 ;
13168 return 0;
13169}
13170_ACEOF
13171rm -f conftest.$ac_objext conftest$ac_exeext
13172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13173 (eval $ac_link) 2>&5
13174 ac_status=$?
13175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13176 (exit $ac_status); } &&
13177 { ac_try='test -s conftest$ac_exeext'
13178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13179 (eval $ac_try) 2>&5
13180 ac_status=$?
13181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13182 (exit $ac_status); }; }; then
13183 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013184else
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 echo "$as_me: failed program was:" >&5
13186cat conftest.$ac_ext >&5
13187ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13190LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013192echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13193echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13194if test $ac_cv_lib_util_forkpty = yes; then
13195 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013196#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013197_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013198 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013199fi
13200
13201fi
13202done
13203
Jack Jansendd19cf82001-12-06 22:36:17 +000013204
Michael W. Hudson54241132001-12-07 15:38:26 +000013205# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013206
13207
13208
13209
13210
13211
Fred Drake8cef4cf2000-06-28 16:40:38 +000013212for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13213do
Martin v. Löwis11437992002-04-12 09:54:03 +000013214as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13215echo "$as_me:$LINENO: checking for $ac_func" >&5
13216echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13217if eval "test \"\${$as_ac_var+set}\" = set"; then
13218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013219else
Martin v. Löwis11437992002-04-12 09:54:03 +000013220 cat >conftest.$ac_ext <<_ACEOF
13221#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013222#include "confdefs.h"
13223/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013225#include <assert.h>
13226/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013227#ifdef __cplusplus
13228extern "C"
13229#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013230/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 builtin and then its argument prototype would still apply. */
13232char $ac_func ();
13233char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013234
Barry Warsawfe33b792003-01-07 22:42:49 +000013235#ifdef F77_DUMMY_MAIN
13236# ifdef __cplusplus
13237 extern "C"
13238# endif
13239 int F77_DUMMY_MAIN() { return 1; }
13240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013241int
13242main ()
13243{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013244/* The GNU C library defines this for functions which it implements
13245 to always fail with ENOSYS. Some functions are actually named
13246 something starting with __ and the normal name is an alias. */
13247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13248choke me
13249#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013250f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013251#endif
13252
Martin v. Löwis11437992002-04-12 09:54:03 +000013253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext conftest$ac_exeext
13258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13259 (eval $ac_link) 2>&5
13260 ac_status=$?
13261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13262 (exit $ac_status); } &&
13263 { ac_try='test -s conftest$ac_exeext'
13264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13265 (eval $ac_try) 2>&5
13266 ac_status=$?
13267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268 (exit $ac_status); }; }; then
13269 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270else
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 echo "$as_me: failed program was:" >&5
13272cat conftest.$ac_ext >&5
13273eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013274fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013275rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013276fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013277echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13278echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13279if test `eval echo '${'$as_ac_var'}'` = yes; then
13280 cat >>confdefs.h <<_ACEOF
13281#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13282_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013283
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013285done
13286
Michael W. Hudson54241132001-12-07 15:38:26 +000013287
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
13289
13290
13291
13292
Martin v. Löwis1142de32002-03-29 16:28:31 +000013293for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013294do
Martin v. Löwis11437992002-04-12 09:54:03 +000013295as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13296echo "$as_me:$LINENO: checking for $ac_func" >&5
13297echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13298if eval "test \"\${$as_ac_var+set}\" = set"; then
13299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300else
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 cat >conftest.$ac_ext <<_ACEOF
13302#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013303#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013304/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013306#include <assert.h>
13307/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013308#ifdef __cplusplus
13309extern "C"
13310#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013311/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 builtin and then its argument prototype would still apply. */
13313char $ac_func ();
13314char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013315
Barry Warsawfe33b792003-01-07 22:42:49 +000013316#ifdef F77_DUMMY_MAIN
13317# ifdef __cplusplus
13318 extern "C"
13319# endif
13320 int F77_DUMMY_MAIN() { return 1; }
13321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013322int
13323main ()
13324{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013325/* The GNU C library defines this for functions which it implements
13326 to always fail with ENOSYS. Some functions are actually named
13327 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013328#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329choke me
13330#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013331f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 ;
13335 return 0;
13336}
13337_ACEOF
13338rm -f conftest.$ac_objext conftest$ac_exeext
13339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13340 (eval $ac_link) 2>&5
13341 ac_status=$?
13342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13343 (exit $ac_status); } &&
13344 { ac_try='test -s conftest$ac_exeext'
13345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13346 (eval $ac_try) 2>&5
13347 ac_status=$?
13348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349 (exit $ac_status); }; }; then
13350 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013351else
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 echo "$as_me: failed program was:" >&5
13353cat conftest.$ac_ext >&5
13354eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013358echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13359echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13360if test `eval echo '${'$as_ac_var'}'` = yes; then
13361 cat >>confdefs.h <<_ACEOF
13362#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13363_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013364
Martin v. Löwis1142de32002-03-29 16:28:31 +000013365else
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013367fi
13368done
13369
13370
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Martin v. Löwis1142de32002-03-29 16:28:31 +000013372for ac_func in getpgrp
13373do
Martin v. Löwis11437992002-04-12 09:54:03 +000013374as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13375echo "$as_me:$LINENO: checking for $ac_func" >&5
13376echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13377if eval "test \"\${$as_ac_var+set}\" = set"; then
13378 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013379else
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 cat >conftest.$ac_ext <<_ACEOF
13381#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013382#include "confdefs.h"
13383/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013385#include <assert.h>
13386/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013387#ifdef __cplusplus
13388extern "C"
13389#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013390/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 builtin and then its argument prototype would still apply. */
13392char $ac_func ();
13393char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013394
Barry Warsawfe33b792003-01-07 22:42:49 +000013395#ifdef F77_DUMMY_MAIN
13396# ifdef __cplusplus
13397 extern "C"
13398# endif
13399 int F77_DUMMY_MAIN() { return 1; }
13400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013401int
13402main ()
13403{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013404/* The GNU C library defines this for functions which it implements
13405 to always fail with ENOSYS. Some functions are actually named
13406 something starting with __ and the normal name is an alias. */
13407#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13408choke me
13409#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013410f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013411#endif
13412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 ;
13414 return 0;
13415}
13416_ACEOF
13417rm -f conftest.$ac_objext conftest$ac_exeext
13418if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13419 (eval $ac_link) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); } &&
13423 { ac_try='test -s conftest$ac_exeext'
13424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13425 (eval $ac_try) 2>&5
13426 ac_status=$?
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428 (exit $ac_status); }; }; then
13429 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013430else
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 echo "$as_me: failed program was:" >&5
13432cat conftest.$ac_ext >&5
13433eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013435rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013437echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13438echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13439if test `eval echo '${'$as_ac_var'}'` = yes; then
13440 cat >>confdefs.h <<_ACEOF
13441#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13442_ACEOF
13443 cat >conftest.$ac_ext <<_ACEOF
13444#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013445#include "confdefs.h"
13446#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013447#ifdef F77_DUMMY_MAIN
13448# ifdef __cplusplus
13449 extern "C"
13450# endif
13451 int F77_DUMMY_MAIN() { return 1; }
13452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013453int
13454main ()
13455{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013456getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013457 ;
13458 return 0;
13459}
13460_ACEOF
13461rm -f conftest.$ac_objext
13462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13463 (eval $ac_compile) 2>&5
13464 ac_status=$?
13465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13466 (exit $ac_status); } &&
13467 { ac_try='test -s conftest.$ac_objext'
13468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13469 (eval $ac_try) 2>&5
13470 ac_status=$?
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); }; }; then
13473
13474cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013476_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478
Guido van Rossumf78abae1997-01-21 22:02:36 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 echo "$as_me: failed program was:" >&5
13481cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013483rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013484
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013486done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013487
Jack Jansen150753c2003-03-29 22:07:47 +000013488
13489for ac_func in setpgrp
13490do
13491as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13492echo "$as_me:$LINENO: checking for $ac_func" >&5
13493echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13494if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013496else
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 cat >conftest.$ac_ext <<_ACEOF
13498#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013499#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013500/* System header to define __stub macros and hopefully few prototypes,
13501 which can conflict with char $ac_func (); below. */
13502#include <assert.h>
13503/* Override any gcc2 internal prototype to avoid an error. */
13504#ifdef __cplusplus
13505extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013506#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013507/* We use char because int might match the return type of a gcc2
13508 builtin and then its argument prototype would still apply. */
13509char $ac_func ();
13510char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013511
Barry Warsawfe33b792003-01-07 22:42:49 +000013512#ifdef F77_DUMMY_MAIN
13513# ifdef __cplusplus
13514 extern "C"
13515# endif
13516 int F77_DUMMY_MAIN() { return 1; }
13517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
Jack Jansen150753c2003-03-29 22:07:47 +000013521/* The GNU C library defines this for functions which it implements
13522 to always fail with ENOSYS. Some functions are actually named
13523 something starting with __ and the normal name is an alias. */
13524#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13525choke me
13526#else
13527f = $ac_func;
13528#endif
13529
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 ;
13531 return 0;
13532}
13533_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013534rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13536 (eval $ac_link) 2>&5
13537 ac_status=$?
13538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013539 (exit $ac_status); } &&
13540 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13542 (eval $ac_try) 2>&5
13543 ac_status=$?
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013546 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013547else
Jack Jansen150753c2003-03-29 22:07:47 +000013548 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013549cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013550eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013551fi
Jack Jansen150753c2003-03-29 22:07:47 +000013552rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013553fi
Jack Jansen150753c2003-03-29 22:07:47 +000013554echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13555echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13556if test `eval echo '${'$as_ac_var'}'` = yes; then
13557 cat >>confdefs.h <<_ACEOF
13558#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13559_ACEOF
13560 cat >conftest.$ac_ext <<_ACEOF
13561#line $LINENO "configure"
13562#include "confdefs.h"
13563#include <unistd.h>
13564#ifdef F77_DUMMY_MAIN
13565# ifdef __cplusplus
13566 extern "C"
13567# endif
13568 int F77_DUMMY_MAIN() { return 1; }
13569#endif
13570int
13571main ()
13572{
13573setpgrp(0,0);
13574 ;
13575 return 0;
13576}
13577_ACEOF
13578rm -f conftest.$ac_objext
13579if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13580 (eval $ac_compile) 2>&5
13581 ac_status=$?
13582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13583 (exit $ac_status); } &&
13584 { ac_try='test -s conftest.$ac_objext'
13585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13586 (eval $ac_try) 2>&5
13587 ac_status=$?
13588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
13591cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013592#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013593_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013594
Jack Jansen150753c2003-03-29 22:07:47 +000013595
13596else
13597 echo "$as_me: failed program was:" >&5
13598cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013599fi
Jack Jansen150753c2003-03-29 22:07:47 +000013600rm -f conftest.$ac_objext conftest.$ac_ext
13601
13602fi
13603done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013604
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Thomas Wouters3a584202000-08-05 23:28:51 +000013606for ac_func in gettimeofday
13607do
Martin v. Löwis11437992002-04-12 09:54:03 +000013608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13609echo "$as_me:$LINENO: checking for $ac_func" >&5
13610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13611if eval "test \"\${$as_ac_var+set}\" = set"; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013613else
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 cat >conftest.$ac_ext <<_ACEOF
13615#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013616#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013617/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013619#include <assert.h>
13620/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013621#ifdef __cplusplus
13622extern "C"
13623#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013624/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 builtin and then its argument prototype would still apply. */
13626char $ac_func ();
13627char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013628
Barry Warsawfe33b792003-01-07 22:42:49 +000013629#ifdef F77_DUMMY_MAIN
13630# ifdef __cplusplus
13631 extern "C"
13632# endif
13633 int F77_DUMMY_MAIN() { return 1; }
13634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013635int
13636main ()
13637{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013638/* The GNU C library defines this for functions which it implements
13639 to always fail with ENOSYS. Some functions are actually named
13640 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013642choke me
13643#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013644f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645#endif
13646
Martin v. Löwis11437992002-04-12 09:54:03 +000013647 ;
13648 return 0;
13649}
13650_ACEOF
13651rm -f conftest.$ac_objext conftest$ac_exeext
13652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13653 (eval $ac_link) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); } &&
13657 { ac_try='test -s conftest$ac_exeext'
13658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13659 (eval $ac_try) 2>&5
13660 ac_status=$?
13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662 (exit $ac_status); }; }; then
13663 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013664else
Martin v. Löwis11437992002-04-12 09:54:03 +000013665 echo "$as_me: failed program was:" >&5
13666cat conftest.$ac_ext >&5
13667eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013668fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013669rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013671echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13672echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13673if test `eval echo '${'$as_ac_var'}'` = yes; then
13674 cat >>confdefs.h <<_ACEOF
13675#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13676_ACEOF
13677 cat >conftest.$ac_ext <<_ACEOF
13678#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013679#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013680#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013681#ifdef F77_DUMMY_MAIN
13682# ifdef __cplusplus
13683 extern "C"
13684# endif
13685 int F77_DUMMY_MAIN() { return 1; }
13686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013687int
13688main ()
13689{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013690gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ;
13692 return 0;
13693}
13694_ACEOF
13695rm -f conftest.$ac_objext
13696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13697 (eval $ac_compile) 2>&5
13698 ac_status=$?
13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13700 (exit $ac_status); } &&
13701 { ac_try='test -s conftest.$ac_objext'
13702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13703 (eval $ac_try) 2>&5
13704 ac_status=$?
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013707 :
13708else
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 echo "$as_me: failed program was:" >&5
13710cat conftest.$ac_ext >&5
13711
13712cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013714_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013715
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Guido van Rossum627b2d71993-12-24 10:39:16 +000013717fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013718rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013719
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013720fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013721done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013722
Michael W. Hudson54241132001-12-07 15:38:26 +000013723
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013724echo "$as_me:$LINENO: checking for major" >&5
13725echo $ECHO_N "checking for major... $ECHO_C" >&6
13726cat >conftest.$ac_ext <<_ACEOF
13727#line $LINENO "configure"
13728#include "confdefs.h"
13729
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013730#if defined(MAJOR_IN_MKDEV)
13731#include <sys/mkdev.h>
13732#elif defined(MAJOR_IN_SYSMACROS)
13733#include <sys/sysmacros.h>
13734#else
13735#include <sys/types.h>
13736#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013737
Barry Warsawfe33b792003-01-07 22:42:49 +000013738#ifdef F77_DUMMY_MAIN
13739# ifdef __cplusplus
13740 extern "C"
13741# endif
13742 int F77_DUMMY_MAIN() { return 1; }
13743#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013744int
13745main ()
13746{
13747
13748 makedev(major(0),minor(0));
13749
13750 ;
13751 return 0;
13752}
13753_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013754rm -f conftest.$ac_objext conftest$ac_exeext
13755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13756 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013757 ac_status=$?
13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013760 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13762 (eval $ac_try) 2>&5
13763 ac_status=$?
13764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13765 (exit $ac_status); }; }; then
13766
13767
13768cat >>confdefs.h <<\_ACEOF
13769#define HAVE_DEVICE_MACROS 1
13770_ACEOF
13771
13772 echo "$as_me:$LINENO: result: yes" >&5
13773echo "${ECHO_T}yes" >&6
13774
13775else
13776 echo "$as_me: failed program was:" >&5
13777cat conftest.$ac_ext >&5
13778
13779 echo "$as_me:$LINENO: result: no" >&5
13780echo "${ECHO_T}no" >&6
13781
13782fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013783rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013784
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013785# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013786# for [no]getaddrinfo in netdb.h.
13787echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13788echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13789cat >conftest.$ac_ext <<_ACEOF
13790#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013791#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013792
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013793#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013794#include <sys/socket.h>
13795#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013796#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013797
Barry Warsawfe33b792003-01-07 22:42:49 +000013798#ifdef F77_DUMMY_MAIN
13799# ifdef __cplusplus
13800 extern "C"
13801# endif
13802 int F77_DUMMY_MAIN() { return 1; }
13803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013804int
13805main ()
13806{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013807
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013808getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013809
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ;
13811 return 0;
13812}
13813_ACEOF
13814rm -f conftest.$ac_objext conftest$ac_exeext
13815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13816 (eval $ac_link) 2>&5
13817 ac_status=$?
13818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819 (exit $ac_status); } &&
13820 { ac_try='test -s conftest$ac_exeext'
13821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13822 (eval $ac_try) 2>&5
13823 ac_status=$?
13824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825 (exit $ac_status); }; }; then
13826
13827echo "$as_me:$LINENO: result: yes" >&5
13828echo "${ECHO_T}yes" >&6
13829echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13830echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013831if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 echo "$as_me:$LINENO: result: buggy" >&5
13833echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013834buggygetaddrinfo=yes
13835else
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 cat >conftest.$ac_ext <<_ACEOF
13837#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013838#include "confdefs.h"
13839
13840#include <sys/types.h>
13841#include <netdb.h>
13842#include <string.h>
13843#include <sys/socket.h>
13844#include <netinet/in.h>
13845
13846main()
13847{
13848 int passive, gaierr, inet4 = 0, inet6 = 0;
13849 struct addrinfo hints, *ai, *aitop;
13850 char straddr[INET6_ADDRSTRLEN], strport[16];
13851
13852 for (passive = 0; passive <= 1; passive++) {
13853 memset(&hints, 0, sizeof(hints));
13854 hints.ai_family = AF_UNSPEC;
13855 hints.ai_flags = passive ? AI_PASSIVE : 0;
13856 hints.ai_socktype = SOCK_STREAM;
13857 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13858 (void)gai_strerror(gaierr);
13859 goto bad;
13860 }
13861 for (ai = aitop; ai; ai = ai->ai_next) {
13862 if (ai->ai_addr == NULL ||
13863 ai->ai_addrlen == 0 ||
13864 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13865 straddr, sizeof(straddr), strport, sizeof(strport),
13866 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13867 goto bad;
13868 }
13869 switch (ai->ai_family) {
13870 case AF_INET:
13871 if (strcmp(strport, "54321") != 0) {
13872 goto bad;
13873 }
13874 if (passive) {
13875 if (strcmp(straddr, "0.0.0.0") != 0) {
13876 goto bad;
13877 }
13878 } else {
13879 if (strcmp(straddr, "127.0.0.1") != 0) {
13880 goto bad;
13881 }
13882 }
13883 inet4++;
13884 break;
13885 case AF_INET6:
13886 if (strcmp(strport, "54321") != 0) {
13887 goto bad;
13888 }
13889 if (passive) {
13890 if (strcmp(straddr, "::") != 0) {
13891 goto bad;
13892 }
13893 } else {
13894 if (strcmp(straddr, "::1") != 0) {
13895 goto bad;
13896 }
13897 }
13898 inet6++;
13899 break;
13900 case AF_UNSPEC:
13901 goto bad;
13902 break;
13903 default:
13904 /* another family support? */
13905 break;
13906 }
13907 }
13908 }
13909
13910 if (!(inet4 == 0 || inet4 == 2))
13911 goto bad;
13912 if (!(inet6 == 0 || inet6 == 2))
13913 goto bad;
13914
13915 if (aitop)
13916 freeaddrinfo(aitop);
13917 exit(0);
13918
13919 bad:
13920 if (aitop)
13921 freeaddrinfo(aitop);
13922 exit(1);
13923}
13924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925_ACEOF
13926rm -f conftest$ac_exeext
13927if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13928 (eval $ac_link) 2>&5
13929 ac_status=$?
13930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13933 (eval $ac_try) 2>&5
13934 ac_status=$?
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); }; }; then
13937 echo "$as_me:$LINENO: result: good" >&5
13938echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013939buggygetaddrinfo=no
13940else
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 echo "$as_me: program exited with status $ac_status" >&5
13942echo "$as_me: failed program was:" >&5
13943cat conftest.$ac_ext >&5
13944( exit $ac_status )
13945echo "$as_me:$LINENO: result: buggy" >&5
13946echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013947buggygetaddrinfo=yes
13948fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013949rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013950fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013951else
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 echo "$as_me: failed program was:" >&5
13953cat conftest.$ac_ext >&5
13954
13955echo "$as_me:$LINENO: result: no" >&5
13956echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013958
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013961
13962if test "$buggygetaddrinfo" = "yes"; then
13963 if test "$ipv6" = "yes"; then
13964 echo 'Fatal: You must get working getaddrinfo() function.'
13965 echo ' or you can specify "--disable-ipv6"'.
13966 exit 1
13967 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013968else
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
13970cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013971#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013972_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013973
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013974fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013976for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013977do
Martin v. Löwis11437992002-04-12 09:54:03 +000013978as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13979echo "$as_me:$LINENO: checking for $ac_func" >&5
13980echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13981if eval "test \"\${$as_ac_var+set}\" = set"; then
13982 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013983else
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 cat >conftest.$ac_ext <<_ACEOF
13985#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013986#include "confdefs.h"
13987/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013989#include <assert.h>
13990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013991#ifdef __cplusplus
13992extern "C"
13993#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013994/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 builtin and then its argument prototype would still apply. */
13996char $ac_func ();
13997char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013998
Barry Warsawfe33b792003-01-07 22:42:49 +000013999#ifdef F77_DUMMY_MAIN
14000# ifdef __cplusplus
14001 extern "C"
14002# endif
14003 int F77_DUMMY_MAIN() { return 1; }
14004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014005int
14006main ()
14007{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014008/* The GNU C library defines this for functions which it implements
14009 to always fail with ENOSYS. Some functions are actually named
14010 something starting with __ and the normal name is an alias. */
14011#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14012choke me
14013#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014014f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014015#endif
14016
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 ;
14018 return 0;
14019}
14020_ACEOF
14021rm -f conftest.$ac_objext conftest$ac_exeext
14022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14023 (eval $ac_link) 2>&5
14024 ac_status=$?
14025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14026 (exit $ac_status); } &&
14027 { ac_try='test -s conftest$ac_exeext'
14028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14029 (eval $ac_try) 2>&5
14030 ac_status=$?
14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032 (exit $ac_status); }; }; then
14033 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014034else
Martin v. Löwis11437992002-04-12 09:54:03 +000014035 echo "$as_me: failed program was:" >&5
14036cat conftest.$ac_ext >&5
14037eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14042echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14043if test `eval echo '${'$as_ac_var'}'` = yes; then
14044 cat >>confdefs.h <<_ACEOF
14045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14046_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014047
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014048fi
14049done
14050
Michael W. Hudson54241132001-12-07 15:38:26 +000014051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014052# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014053echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14054echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14055if test "${ac_cv_header_time+set}" = set; then
14056 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014057else
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 cat >conftest.$ac_ext <<_ACEOF
14059#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014060#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014061#include <sys/types.h>
14062#include <sys/time.h>
14063#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014064
Barry Warsawfe33b792003-01-07 22:42:49 +000014065#ifdef F77_DUMMY_MAIN
14066# ifdef __cplusplus
14067 extern "C"
14068# endif
14069 int F77_DUMMY_MAIN() { return 1; }
14070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014071int
14072main ()
14073{
14074if ((struct tm *) 0)
14075return 0;
14076 ;
14077 return 0;
14078}
14079_ACEOF
14080rm -f conftest.$ac_objext
14081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14082 (eval $ac_compile) 2>&5
14083 ac_status=$?
14084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14085 (exit $ac_status); } &&
14086 { ac_try='test -s conftest.$ac_objext'
14087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14088 (eval $ac_try) 2>&5
14089 ac_status=$?
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014093else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 echo "$as_me: failed program was:" >&5
14095cat conftest.$ac_ext >&5
14096ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014097fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014098rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014099fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014100echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14101echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014102if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
14104cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014106_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014107
14108fi
14109
Martin v. Löwis11437992002-04-12 09:54:03 +000014110echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14111echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14112if test "${ac_cv_struct_tm+set}" = set; then
14113 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114else
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 cat >conftest.$ac_ext <<_ACEOF
14116#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014117#include "confdefs.h"
14118#include <sys/types.h>
14119#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014120
Barry Warsawfe33b792003-01-07 22:42:49 +000014121#ifdef F77_DUMMY_MAIN
14122# ifdef __cplusplus
14123 extern "C"
14124# endif
14125 int F77_DUMMY_MAIN() { return 1; }
14126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014127int
14128main ()
14129{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014130struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext
14136if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14137 (eval $ac_compile) 2>&5
14138 ac_status=$?
14139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14140 (exit $ac_status); } &&
14141 { ac_try='test -s conftest.$ac_objext'
14142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014147 ac_cv_struct_tm=time.h
14148else
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 echo "$as_me: failed program was:" >&5
14150cat conftest.$ac_ext >&5
14151ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014155echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14156echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014157if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014158
14159cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014160#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014161_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014162
14163fi
14164
Martin v. Löwis11437992002-04-12 09:54:03 +000014165echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14166echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14167if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 cat >conftest.$ac_ext <<_ACEOF
14171#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014172#include "confdefs.h"
14173#include <sys/types.h>
14174#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
14176
Barry Warsawfe33b792003-01-07 22:42:49 +000014177#ifdef F77_DUMMY_MAIN
14178# ifdef __cplusplus
14179 extern "C"
14180# endif
14181 int F77_DUMMY_MAIN() { return 1; }
14182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014183int
14184main ()
14185{
14186static struct tm ac_aggr;
14187if (ac_aggr.tm_zone)
14188return 0;
14189 ;
14190 return 0;
14191}
14192_ACEOF
14193rm -f conftest.$ac_objext
14194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14195 (eval $ac_compile) 2>&5
14196 ac_status=$?
14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14198 (exit $ac_status); } &&
14199 { ac_try='test -s conftest.$ac_objext'
14200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14201 (eval $ac_try) 2>&5
14202 ac_status=$?
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); }; }; then
14205 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014206else
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 echo "$as_me: failed program was:" >&5
14208cat conftest.$ac_ext >&5
14209ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014211rm -f conftest.$ac_objext conftest.$ac_ext
14212fi
14213echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14214echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14215if test $ac_cv_member_struct_tm_tm_zone = yes; then
14216
14217cat >>confdefs.h <<_ACEOF
14218#define HAVE_STRUCT_TM_TM_ZONE 1
14219_ACEOF
14220
14221
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014222fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014223
Martin v. Löwis11437992002-04-12 09:54:03 +000014224if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14225
14226cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014227#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014228_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014229
14230else
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 echo "$as_me:$LINENO: checking for tzname" >&5
14232echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14233if test "${ac_cv_var_tzname+set}" = set; then
14234 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014235else
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 cat >conftest.$ac_ext <<_ACEOF
14237#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014238#include "confdefs.h"
14239#include <time.h>
14240#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014241extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Barry Warsawfe33b792003-01-07 22:42:49 +000014244#ifdef F77_DUMMY_MAIN
14245# ifdef __cplusplus
14246 extern "C"
14247# endif
14248 int F77_DUMMY_MAIN() { return 1; }
14249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014250int
14251main ()
14252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014253atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 ;
14255 return 0;
14256}
14257_ACEOF
14258rm -f conftest.$ac_objext conftest$ac_exeext
14259if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14260 (eval $ac_link) 2>&5
14261 ac_status=$?
14262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14263 (exit $ac_status); } &&
14264 { ac_try='test -s conftest$ac_exeext'
14265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266 (eval $ac_try) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014270 ac_cv_var_tzname=yes
14271else
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 echo "$as_me: failed program was:" >&5
14273cat conftest.$ac_ext >&5
14274ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014278echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14279echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014280 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
14282cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014283#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014284_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014286 fi
14287fi
14288
Martin v. Löwis11437992002-04-12 09:54:03 +000014289echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14290echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14291if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14292 echo $ECHO_N "(cached) $ECHO_C" >&6
14293else
14294 cat >conftest.$ac_ext <<_ACEOF
14295#line $LINENO "configure"
14296#include "confdefs.h"
14297$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014298#ifdef F77_DUMMY_MAIN
14299# ifdef __cplusplus
14300 extern "C"
14301# endif
14302 int F77_DUMMY_MAIN() { return 1; }
14303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014304int
14305main ()
14306{
14307static struct stat ac_aggr;
14308if (ac_aggr.st_rdev)
14309return 0;
14310 ;
14311 return 0;
14312}
14313_ACEOF
14314rm -f conftest.$ac_objext
14315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14316 (eval $ac_compile) 2>&5
14317 ac_status=$?
14318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14319 (exit $ac_status); } &&
14320 { ac_try='test -s conftest.$ac_objext'
14321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14322 (eval $ac_try) 2>&5
14323 ac_status=$?
14324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325 (exit $ac_status); }; }; then
14326 ac_cv_member_struct_stat_st_rdev=yes
14327else
14328 echo "$as_me: failed program was:" >&5
14329cat conftest.$ac_ext >&5
14330ac_cv_member_struct_stat_st_rdev=no
14331fi
14332rm -f conftest.$ac_objext conftest.$ac_ext
14333fi
14334echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14335echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14336if test $ac_cv_member_struct_stat_st_rdev = yes; then
14337
14338cat >>confdefs.h <<_ACEOF
14339#define HAVE_STRUCT_STAT_ST_RDEV 1
14340_ACEOF
14341
14342
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014343fi
14344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14346echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14347if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14348 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014349else
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 cat >conftest.$ac_ext <<_ACEOF
14351#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014352#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014353$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014354#ifdef F77_DUMMY_MAIN
14355# ifdef __cplusplus
14356 extern "C"
14357# endif
14358 int F77_DUMMY_MAIN() { return 1; }
14359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014360int
14361main ()
14362{
14363static struct stat ac_aggr;
14364if (ac_aggr.st_blksize)
14365return 0;
14366 ;
14367 return 0;
14368}
14369_ACEOF
14370rm -f conftest.$ac_objext
14371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14372 (eval $ac_compile) 2>&5
14373 ac_status=$?
14374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); } &&
14376 { ac_try='test -s conftest.$ac_objext'
14377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
14382 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014383else
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 echo "$as_me: failed program was:" >&5
14385cat conftest.$ac_ext >&5
14386ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14391echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14392if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394cat >>confdefs.h <<_ACEOF
14395#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14396_ACEOF
14397
14398
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014399fi
14400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14402echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14403if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14404 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014405else
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 cat >conftest.$ac_ext <<_ACEOF
14407#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014408#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014409$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014410#ifdef F77_DUMMY_MAIN
14411# ifdef __cplusplus
14412 extern "C"
14413# endif
14414 int F77_DUMMY_MAIN() { return 1; }
14415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014416int
14417main ()
14418{
14419static struct stat ac_aggr;
14420if (ac_aggr.st_blocks)
14421return 0;
14422 ;
14423 return 0;
14424}
14425_ACEOF
14426rm -f conftest.$ac_objext
14427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14428 (eval $ac_compile) 2>&5
14429 ac_status=$?
14430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); } &&
14432 { ac_try='test -s conftest.$ac_objext'
14433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14434 (eval $ac_try) 2>&5
14435 ac_status=$?
14436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437 (exit $ac_status); }; }; then
14438 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014439else
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 echo "$as_me: failed program was:" >&5
14441cat conftest.$ac_ext >&5
14442ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014443fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014444rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014446echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14447echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14448if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014449
Martin v. Löwis11437992002-04-12 09:54:03 +000014450cat >>confdefs.h <<_ACEOF
14451#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14452_ACEOF
14453
14454
14455cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014456#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014457_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014458
14459else
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014461fi
14462
Michael W. Hudson54241132001-12-07 15:38:26 +000014463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
14465echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14466echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14467if test "${ac_cv_header_time_altzone+set}" = set; then
14468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014469else
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 cat >conftest.$ac_ext <<_ACEOF
14471#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014472#include "confdefs.h"
14473#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014474#ifdef F77_DUMMY_MAIN
14475# ifdef __cplusplus
14476 extern "C"
14477# endif
14478 int F77_DUMMY_MAIN() { return 1; }
14479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014480int
14481main ()
14482{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014483return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 ;
14485 return 0;
14486}
14487_ACEOF
14488rm -f conftest.$ac_objext
14489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14490 (eval $ac_compile) 2>&5
14491 ac_status=$?
14492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14493 (exit $ac_status); } &&
14494 { ac_try='test -s conftest.$ac_objext'
14495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14496 (eval $ac_try) 2>&5
14497 ac_status=$?
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014500 ac_cv_header_time_altzone=yes
14501else
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 echo "$as_me: failed program was:" >&5
14503cat conftest.$ac_ext >&5
14504ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014505fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014506rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507fi
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14510echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014511if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
14513cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014514#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014516
14517fi
14518
Guido van Rossumda88dad1995-01-26 00:46:29 +000014519was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014520echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14521echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14522cat >conftest.$ac_ext <<_ACEOF
14523#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014524#include "confdefs.h"
14525
14526#include <sys/types.h>
14527#include <sys/select.h>
14528#include <sys/time.h>
14529
Barry Warsawfe33b792003-01-07 22:42:49 +000014530#ifdef F77_DUMMY_MAIN
14531# ifdef __cplusplus
14532 extern "C"
14533# endif
14534 int F77_DUMMY_MAIN() { return 1; }
14535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014536int
14537main ()
14538{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014539;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext
14545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14546 (eval $ac_compile) 2>&5
14547 ac_status=$?
14548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14549 (exit $ac_status); } &&
14550 { ac_try='test -s conftest.$ac_objext'
14551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14552 (eval $ac_try) 2>&5
14553 ac_status=$?
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); }; }; then
14556
14557
14558cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014559#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014560_ACEOF
14561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014562 was_it_defined=yes
14563
Guido van Rossumf78abae1997-01-21 22:02:36 +000014564else
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 echo "$as_me: failed program was:" >&5
14566cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014567fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014568rm -f conftest.$ac_objext conftest.$ac_ext
14569echo "$as_me:$LINENO: result: $was_it_defined" >&5
14570echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572echo "$as_me:$LINENO: checking for addrinfo" >&5
14573echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14574if test "${ac_cv_struct_addrinfo+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014576else
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 cat >conftest.$ac_ext <<_ACEOF
14578#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014579#include "confdefs.h"
14580
14581# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014582#ifdef F77_DUMMY_MAIN
14583# ifdef __cplusplus
14584 extern "C"
14585# endif
14586 int F77_DUMMY_MAIN() { return 1; }
14587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014588int
14589main ()
14590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014591struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 ;
14593 return 0;
14594}
14595_ACEOF
14596rm -f conftest.$ac_objext
14597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14598 (eval $ac_compile) 2>&5
14599 ac_status=$?
14600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14601 (exit $ac_status); } &&
14602 { ac_try='test -s conftest.$ac_objext'
14603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14604 (eval $ac_try) 2>&5
14605 ac_status=$?
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014608 ac_cv_struct_addrinfo=yes
14609else
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 echo "$as_me: failed program was:" >&5
14611cat conftest.$ac_ext >&5
14612ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014614rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014615fi
14616
Martin v. Löwis11437992002-04-12 09:54:03 +000014617echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14618echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014619if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014620
14621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014622#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014623_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014624
14625fi
14626
Martin v. Löwis11437992002-04-12 09:54:03 +000014627echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14628echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14629if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014631else
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 cat >conftest.$ac_ext <<_ACEOF
14633#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014634#include "confdefs.h"
14635
14636# include <sys/types.h>
14637# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014638#ifdef F77_DUMMY_MAIN
14639# ifdef __cplusplus
14640 extern "C"
14641# endif
14642 int F77_DUMMY_MAIN() { return 1; }
14643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014644int
14645main ()
14646{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014647struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 ;
14649 return 0;
14650}
14651_ACEOF
14652rm -f conftest.$ac_objext
14653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14654 (eval $ac_compile) 2>&5
14655 ac_status=$?
14656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); } &&
14658 { ac_try='test -s conftest.$ac_objext'
14659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14660 (eval $ac_try) 2>&5
14661 ac_status=$?
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014664 ac_cv_struct_sockaddr_storage=yes
14665else
Martin v. Löwis11437992002-04-12 09:54:03 +000014666 echo "$as_me: failed program was:" >&5
14667cat conftest.$ac_ext >&5
14668ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014669fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014670rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014671fi
14672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14674echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014675if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014676
14677cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014678#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014679_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014680
14681fi
14682
Guido van Rossum627b2d71993-12-24 10:39:16 +000014683# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014684
Michael W. Hudson54241132001-12-07 15:38:26 +000014685
Martin v. Löwis11437992002-04-12 09:54:03 +000014686echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14687echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14688if test "${ac_cv_c_char_unsigned+set}" = set; then
14689 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014690else
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 cat >conftest.$ac_ext <<_ACEOF
14692#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014693#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014694$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014695#ifdef F77_DUMMY_MAIN
14696# ifdef __cplusplus
14697 extern "C"
14698# endif
14699 int F77_DUMMY_MAIN() { return 1; }
14700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014701int
14702main ()
14703{
14704static int test_array [1 - 2 * !(((char) -1) < 0)];
14705test_array [0] = 0
14706
14707 ;
14708 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014709}
Martin v. Löwis11437992002-04-12 09:54:03 +000014710_ACEOF
14711rm -f conftest.$ac_objext
14712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14713 (eval $ac_compile) 2>&5
14714 ac_status=$?
14715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14716 (exit $ac_status); } &&
14717 { ac_try='test -s conftest.$ac_objext'
14718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14719 (eval $ac_try) 2>&5
14720 ac_status=$?
14721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14722 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014723 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014724else
14725 echo "$as_me: failed program was:" >&5
14726cat conftest.$ac_ext >&5
14727ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014728fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014729rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014731echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14732echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014733if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014734 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014735#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014736_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014737
14738fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014739
Barry Warsawfe33b792003-01-07 22:42:49 +000014740echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14741echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14742if test "${ac_cv_prog_cc_stdc+set}" = set; then
14743 echo $ECHO_N "(cached) $ECHO_C" >&6
14744else
14745 ac_cv_prog_cc_stdc=no
14746ac_save_CC=$CC
14747cat >conftest.$ac_ext <<_ACEOF
14748#line $LINENO "configure"
14749#include "confdefs.h"
14750#include <stdarg.h>
14751#include <stdio.h>
14752#include <sys/types.h>
14753#include <sys/stat.h>
14754/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14755struct buf { int x; };
14756FILE * (*rcsopen) (struct buf *, struct stat *, int);
14757static char *e (p, i)
14758 char **p;
14759 int i;
14760{
14761 return p[i];
14762}
14763static char *f (char * (*g) (char **, int), char **p, ...)
14764{
14765 char *s;
14766 va_list v;
14767 va_start (v,p);
14768 s = g (p, va_arg (v,int));
14769 va_end (v);
14770 return s;
14771}
14772int test (int i, double x);
14773struct s1 {int (*f) (int a);};
14774struct s2 {int (*f) (double a);};
14775int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14776int argc;
14777char **argv;
14778#ifdef F77_DUMMY_MAIN
14779# ifdef __cplusplus
14780 extern "C"
14781# endif
14782 int F77_DUMMY_MAIN() { return 1; }
14783#endif
14784int
14785main ()
14786{
14787return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14788 ;
14789 return 0;
14790}
14791_ACEOF
14792# Don't try gcc -ansi; that turns off useful extensions and
14793# breaks some systems' header files.
14794# AIX -qlanglvl=ansi
14795# Ultrix and OSF/1 -std1
14796# HP-UX 10.20 and later -Ae
14797# HP-UX older versions -Aa -D_HPUX_SOURCE
14798# SVR4 -Xc -D__EXTENSIONS__
14799for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14800do
14801 CC="$ac_save_CC $ac_arg"
14802 rm -f conftest.$ac_objext
14803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14804 (eval $ac_compile) 2>&5
14805 ac_status=$?
14806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14807 (exit $ac_status); } &&
14808 { ac_try='test -s conftest.$ac_objext'
14809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14810 (eval $ac_try) 2>&5
14811 ac_status=$?
14812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813 (exit $ac_status); }; }; then
14814 ac_cv_prog_cc_stdc=$ac_arg
14815break
14816else
14817 echo "$as_me: failed program was:" >&5
14818cat conftest.$ac_ext >&5
14819fi
14820rm -f conftest.$ac_objext
14821done
14822rm -f conftest.$ac_ext conftest.$ac_objext
14823CC=$ac_save_CC
14824
14825fi
14826
14827case "x$ac_cv_prog_cc_stdc" in
14828 x|xno)
14829 echo "$as_me:$LINENO: result: none needed" >&5
14830echo "${ECHO_T}none needed" >&6 ;;
14831 *)
14832 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14833echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14834 CC="$CC $ac_cv_prog_cc_stdc" ;;
14835esac
14836
Martin v. Löwis11437992002-04-12 09:54:03 +000014837echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14838echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14839if test "${ac_cv_c_const+set}" = set; then
14840 echo $ECHO_N "(cached) $ECHO_C" >&6
14841else
14842 cat >conftest.$ac_ext <<_ACEOF
14843#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014844#include "confdefs.h"
14845
Barry Warsawfe33b792003-01-07 22:42:49 +000014846#ifdef F77_DUMMY_MAIN
14847# ifdef __cplusplus
14848 extern "C"
14849# endif
14850 int F77_DUMMY_MAIN() { return 1; }
14851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014852int
14853main ()
14854{
14855/* FIXME: Include the comments suggested by Paul. */
14856#ifndef __cplusplus
14857 /* Ultrix mips cc rejects this. */
14858 typedef int charset[2];
14859 const charset x;
14860 /* SunOS 4.1.1 cc rejects this. */
14861 char const *const *ccp;
14862 char **p;
14863 /* NEC SVR4.0.2 mips cc rejects this. */
14864 struct point {int x, y;};
14865 static struct point const zero = {0,0};
14866 /* AIX XL C 1.02.0.0 rejects this.
14867 It does not let you subtract one const X* pointer from another in
14868 an arm of an if-expression whose if-part is not a constant
14869 expression */
14870 const char *g = "string";
14871 ccp = &g + (g ? g-g : 0);
14872 /* HPUX 7.0 cc rejects these. */
14873 ++ccp;
14874 p = (char**) ccp;
14875 ccp = (char const *const *) p;
14876 { /* SCO 3.2v4 cc rejects this. */
14877 char *t;
14878 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014879
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 *t++ = 0;
14881 }
14882 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14883 int x[] = {25, 17};
14884 const int *foo = &x[0];
14885 ++foo;
14886 }
14887 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14888 typedef const int *iptr;
14889 iptr p = 0;
14890 ++p;
14891 }
14892 { /* AIX XL C 1.02.0.0 rejects this saying
14893 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14894 struct s { int j; const int *ap[3]; };
14895 struct s *b; b->j = 5;
14896 }
14897 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14898 const int foo = 10;
14899 }
14900#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014901
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ;
14903 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014904}
Martin v. Löwis11437992002-04-12 09:54:03 +000014905_ACEOF
14906rm -f conftest.$ac_objext
14907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14908 (eval $ac_compile) 2>&5
14909 ac_status=$?
14910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14911 (exit $ac_status); } &&
14912 { ac_try='test -s conftest.$ac_objext'
14913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14914 (eval $ac_try) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014918 ac_cv_c_const=yes
14919else
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 echo "$as_me: failed program was:" >&5
14921cat conftest.$ac_ext >&5
14922ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014924rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014926echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14927echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014929
14930cat >>confdefs.h <<\_ACEOF
14931#define const
14932_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014933
14934fi
14935
Michael W. Hudson54241132001-12-07 15:38:26 +000014936
Guido van Rossumda88dad1995-01-26 00:46:29 +000014937works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014938echo "$as_me:$LINENO: checking for working volatile" >&5
14939echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14940cat >conftest.$ac_ext <<_ACEOF
14941#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014942#include "confdefs.h"
14943
Barry Warsawfe33b792003-01-07 22:42:49 +000014944#ifdef F77_DUMMY_MAIN
14945# ifdef __cplusplus
14946 extern "C"
14947# endif
14948 int F77_DUMMY_MAIN() { return 1; }
14949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014953volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ;
14955 return 0;
14956}
14957_ACEOF
14958rm -f conftest.$ac_objext
14959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14960 (eval $ac_compile) 2>&5
14961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); } &&
14964 { ac_try='test -s conftest.$ac_objext'
14965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014970 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014971else
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 echo "$as_me: failed program was:" >&5
14973cat conftest.$ac_ext >&5
14974
14975cat >>confdefs.h <<\_ACEOF
14976#define volatile
14977_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014978
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014979
Guido van Rossum627b2d71993-12-24 10:39:16 +000014980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014981rm -f conftest.$ac_objext conftest.$ac_ext
14982echo "$as_me:$LINENO: result: $works" >&5
14983echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014984
Guido van Rossumda88dad1995-01-26 00:46:29 +000014985works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014986echo "$as_me:$LINENO: checking for working signed char" >&5
14987echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14988cat >conftest.$ac_ext <<_ACEOF
14989#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014990#include "confdefs.h"
14991
Barry Warsawfe33b792003-01-07 22:42:49 +000014992#ifdef F77_DUMMY_MAIN
14993# ifdef __cplusplus
14994 extern "C"
14995# endif
14996 int F77_DUMMY_MAIN() { return 1; }
14997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014998int
14999main ()
15000{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015001signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ;
15003 return 0;
15004}
15005_ACEOF
15006rm -f conftest.$ac_objext
15007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15008 (eval $ac_compile) 2>&5
15009 ac_status=$?
15010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15011 (exit $ac_status); } &&
15012 { ac_try='test -s conftest.$ac_objext'
15013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15014 (eval $ac_try) 2>&5
15015 ac_status=$?
15016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015018 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015019else
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 echo "$as_me: failed program was:" >&5
15021cat conftest.$ac_ext >&5
15022
15023cat >>confdefs.h <<\_ACEOF
15024#define signed
15025_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015026
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015027
Guido van Rossum7f43da71994-08-01 12:15:30 +000015028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015029rm -f conftest.$ac_objext conftest.$ac_ext
15030echo "$as_me:$LINENO: result: $works" >&5
15031echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015032
Guido van Rossumda88dad1995-01-26 00:46:29 +000015033have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015034echo "$as_me:$LINENO: checking for prototypes" >&5
15035echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15036cat >conftest.$ac_ext <<_ACEOF
15037#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015038#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015039int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015040#ifdef F77_DUMMY_MAIN
15041# ifdef __cplusplus
15042 extern "C"
15043# endif
15044 int F77_DUMMY_MAIN() { return 1; }
15045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015046int
15047main ()
15048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015049return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ;
15051 return 0;
15052}
15053_ACEOF
15054rm -f conftest.$ac_objext
15055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15056 (eval $ac_compile) 2>&5
15057 ac_status=$?
15058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15059 (exit $ac_status); } &&
15060 { ac_try='test -s conftest.$ac_objext'
15061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15062 (eval $ac_try) 2>&5
15063 ac_status=$?
15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15065 (exit $ac_status); }; }; then
15066
15067
15068cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015070_ACEOF
15071
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015072 have_prototypes=yes
15073
Guido van Rossumf78abae1997-01-21 22:02:36 +000015074else
Martin v. Löwis11437992002-04-12 09:54:03 +000015075 echo "$as_me: failed program was:" >&5
15076cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015078rm -f conftest.$ac_objext conftest.$ac_ext
15079echo "$as_me:$LINENO: result: $have_prototypes" >&5
15080echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015081
Guido van Rossumda88dad1995-01-26 00:46:29 +000015082works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015083echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15084echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15085cat >conftest.$ac_ext <<_ACEOF
15086#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015087#include "confdefs.h"
15088
15089#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015090int foo(int x, ...) {
15091 va_list va;
15092 va_start(va, x);
15093 va_arg(va, int);
15094 va_arg(va, char *);
15095 va_arg(va, double);
15096 return 0;
15097}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015098
Barry Warsawfe33b792003-01-07 22:42:49 +000015099#ifdef F77_DUMMY_MAIN
15100# ifdef __cplusplus
15101 extern "C"
15102# endif
15103 int F77_DUMMY_MAIN() { return 1; }
15104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Guido van Rossum90eea071996-08-30 20:58:57 +000015108return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
15113rm -f conftest.$ac_objext
15114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15115 (eval $ac_compile) 2>&5
15116 ac_status=$?
15117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15118 (exit $ac_status); } &&
15119 { ac_try='test -s conftest.$ac_objext'
15120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15121 (eval $ac_try) 2>&5
15122 ac_status=$?
15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124 (exit $ac_status); }; }; then
15125
15126
15127cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015128#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129_ACEOF
15130
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015131 works=yes
15132
Guido van Rossumf78abae1997-01-21 22:02:36 +000015133else
Martin v. Löwis11437992002-04-12 09:54:03 +000015134 echo "$as_me: failed program was:" >&5
15135cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015137rm -f conftest.$ac_objext conftest.$ac_ext
15138echo "$as_me:$LINENO: result: $works" >&5
15139echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140
Guido van Rossumda88dad1995-01-26 00:46:29 +000015141if test "$have_prototypes" = yes; then
15142bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015143echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15144echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15145cat >conftest.$ac_ext <<_ACEOF
15146#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015147#include "confdefs.h"
15148#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015149#ifdef F77_DUMMY_MAIN
15150# ifdef __cplusplus
15151 extern "C"
15152# endif
15153 int F77_DUMMY_MAIN() { return 1; }
15154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015155int
15156main ()
15157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015158char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 ;
15160 return 0;
15161}
15162_ACEOF
15163rm -f conftest.$ac_objext
15164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15165 (eval $ac_compile) 2>&5
15166 ac_status=$?
15167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15168 (exit $ac_status); } &&
15169 { ac_try='test -s conftest.$ac_objext'
15170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15171 (eval $ac_try) 2>&5
15172 ac_status=$?
15173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15174 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015175 :
15176else
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 echo "$as_me: failed program was:" >&5
15178cat conftest.$ac_ext >&5
15179
15180cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015182_ACEOF
15183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015184 bad_prototypes=yes
15185
Guido van Rossum627b2d71993-12-24 10:39:16 +000015186fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015187rm -f conftest.$ac_objext conftest.$ac_ext
15188echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15189echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015190fi
15191
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015192# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015193echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15194echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15195cat >conftest.$ac_ext <<_ACEOF
15196#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015197#include "confdefs.h"
15198#include <sys/types.h>
15199#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015200#ifdef F77_DUMMY_MAIN
15201# ifdef __cplusplus
15202 extern "C"
15203# endif
15204 int F77_DUMMY_MAIN() { return 1; }
15205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015206int
15207main ()
15208{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015209struct sockaddr x;
15210x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ;
15212 return 0;
15213}
15214_ACEOF
15215rm -f conftest.$ac_objext
15216if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15217 (eval $ac_compile) 2>&5
15218 ac_status=$?
15219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15220 (exit $ac_status); } &&
15221 { ac_try='test -s conftest.$ac_objext'
15222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15223 (eval $ac_try) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); }; }; then
15227 echo "$as_me:$LINENO: result: yes" >&5
15228echo "${ECHO_T}yes" >&6
15229
15230cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015231#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015232_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015233
15234else
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 echo "$as_me: failed program was:" >&5
15236cat conftest.$ac_ext >&5
15237echo "$as_me:$LINENO: result: no" >&5
15238echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015240rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015241
Guido van Rossumda88dad1995-01-26 00:46:29 +000015242va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015243echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15244echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15245cat >conftest.$ac_ext <<_ACEOF
15246#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247#include "confdefs.h"
15248
15249#ifdef HAVE_STDARG_PROTOTYPES
15250#include <stdarg.h>
15251#else
15252#include <varargs.h>
15253#endif
15254
Barry Warsawfe33b792003-01-07 22:42:49 +000015255#ifdef F77_DUMMY_MAIN
15256# ifdef __cplusplus
15257 extern "C"
15258# endif
15259 int F77_DUMMY_MAIN() { return 1; }
15260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015261int
15262main ()
15263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015264va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ;
15266 return 0;
15267}
15268_ACEOF
15269rm -f conftest.$ac_objext
15270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15271 (eval $ac_compile) 2>&5
15272 ac_status=$?
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); } &&
15275 { ac_try='test -s conftest.$ac_objext'
15276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15277 (eval $ac_try) 2>&5
15278 ac_status=$?
15279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015281 :
15282else
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 echo "$as_me: failed program was:" >&5
15284cat conftest.$ac_ext >&5
15285
15286
15287cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015288#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015289_ACEOF
15290
Guido van Rossumda88dad1995-01-26 00:46:29 +000015291 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015294rm -f conftest.$ac_objext conftest.$ac_ext
15295echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15296echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015297
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015298# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015299
15300
15301
15302echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15303echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15304if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 cat >conftest.$ac_ext <<_ACEOF
15308#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015309#include "confdefs.h"
15310/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015312#include <assert.h>
15313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015314#ifdef __cplusplus
15315extern "C"
15316#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 builtin and then its argument prototype would still apply. */
15319char gethostbyname_r ();
15320char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015321
Barry Warsawfe33b792003-01-07 22:42:49 +000015322#ifdef F77_DUMMY_MAIN
15323# ifdef __cplusplus
15324 extern "C"
15325# endif
15326 int F77_DUMMY_MAIN() { return 1; }
15327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015328int
15329main ()
15330{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015331/* The GNU C library defines this for functions which it implements
15332 to always fail with ENOSYS. Some functions are actually named
15333 something starting with __ and the normal name is an alias. */
15334#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15335choke me
15336#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015337f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015338#endif
15339
Martin v. Löwis11437992002-04-12 09:54:03 +000015340 ;
15341 return 0;
15342}
15343_ACEOF
15344rm -f conftest.$ac_objext conftest$ac_exeext
15345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15346 (eval $ac_link) 2>&5
15347 ac_status=$?
15348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15349 (exit $ac_status); } &&
15350 { ac_try='test -s conftest$ac_exeext'
15351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15352 (eval $ac_try) 2>&5
15353 ac_status=$?
15354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355 (exit $ac_status); }; }; then
15356 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015357else
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 echo "$as_me: failed program was:" >&5
15359cat conftest.$ac_ext >&5
15360ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015364echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15365echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15366if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015369#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015370_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015371
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15373echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015374 OLD_CFLAGS=$CFLAGS
15375 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 cat >conftest.$ac_ext <<_ACEOF
15377#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015378#include "confdefs.h"
15379
15380# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Barry Warsawfe33b792003-01-07 22:42:49 +000015382#ifdef F77_DUMMY_MAIN
15383# ifdef __cplusplus
15384 extern "C"
15385# endif
15386 int F77_DUMMY_MAIN() { return 1; }
15387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015391
15392 char *name;
15393 struct hostent *he, *res;
15394 char buffer[2048];
15395 int buflen = 2048;
15396 int h_errnop;
15397
15398 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015399
15400 ;
15401 return 0;
15402}
15403_ACEOF
15404rm -f conftest.$ac_objext
15405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15406 (eval $ac_compile) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); } &&
15410 { ac_try='test -s conftest.$ac_objext'
15411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15413 ac_status=$?
15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); }; }; then
15416
15417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015418#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015419_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421
15422cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015423#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015424_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 echo "$as_me:$LINENO: result: yes" >&5
15427echo "${ECHO_T}yes" >&6
15428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015429else
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 echo "$as_me: failed program was:" >&5
15431cat conftest.$ac_ext >&5
15432
15433 echo "$as_me:$LINENO: result: no" >&5
15434echo "${ECHO_T}no" >&6
15435 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15436echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15437 cat >conftest.$ac_ext <<_ACEOF
15438#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015439#include "confdefs.h"
15440
15441# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015442
Barry Warsawfe33b792003-01-07 22:42:49 +000015443#ifdef F77_DUMMY_MAIN
15444# ifdef __cplusplus
15445 extern "C"
15446# endif
15447 int F77_DUMMY_MAIN() { return 1; }
15448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015449int
15450main ()
15451{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015452
15453 char *name;
15454 struct hostent *he;
15455 char buffer[2048];
15456 int buflen = 2048;
15457 int h_errnop;
15458
15459 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015460
15461 ;
15462 return 0;
15463}
15464_ACEOF
15465rm -f conftest.$ac_objext
15466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15467 (eval $ac_compile) 2>&5
15468 ac_status=$?
15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15470 (exit $ac_status); } &&
15471 { ac_try='test -s conftest.$ac_objext'
15472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15473 (eval $ac_try) 2>&5
15474 ac_status=$?
15475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); }; }; then
15477
15478 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015479#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015480_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015481
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
15483cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015484#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015485_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 echo "$as_me:$LINENO: result: yes" >&5
15488echo "${ECHO_T}yes" >&6
15489
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015490else
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 echo "$as_me: failed program was:" >&5
15492cat conftest.$ac_ext >&5
15493
15494 echo "$as_me:$LINENO: result: no" >&5
15495echo "${ECHO_T}no" >&6
15496 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15497echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15498 cat >conftest.$ac_ext <<_ACEOF
15499#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015500#include "confdefs.h"
15501
15502# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015503
Barry Warsawfe33b792003-01-07 22:42:49 +000015504#ifdef F77_DUMMY_MAIN
15505# ifdef __cplusplus
15506 extern "C"
15507# endif
15508 int F77_DUMMY_MAIN() { return 1; }
15509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015510int
15511main ()
15512{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015513
15514 char *name;
15515 struct hostent *he;
15516 struct hostent_data data;
15517
15518 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015519
15520 ;
15521 return 0;
15522}
15523_ACEOF
15524rm -f conftest.$ac_objext
15525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15526 (eval $ac_compile) 2>&5
15527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); } &&
15530 { ac_try='test -s conftest.$ac_objext'
15531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15532 (eval $ac_try) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); }; }; then
15536
15537 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015538#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015539_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
15542cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015543#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015544_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 echo "$as_me:$LINENO: result: yes" >&5
15547echo "${ECHO_T}yes" >&6
15548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015549else
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 echo "$as_me: failed program was:" >&5
15551cat conftest.$ac_ext >&5
15552
15553 echo "$as_me:$LINENO: result: no" >&5
15554echo "${ECHO_T}no" >&6
15555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015557rm -f conftest.$ac_objext conftest.$ac_ext
15558
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015560rm -f conftest.$ac_objext conftest.$ac_ext
15561
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015562fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015563rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015564 CFLAGS=$OLD_CFLAGS
15565
15566else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015567
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
15569for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015570do
Martin v. Löwis11437992002-04-12 09:54:03 +000015571as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15572echo "$as_me:$LINENO: checking for $ac_func" >&5
15573echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15574if eval "test \"\${$as_ac_var+set}\" = set"; then
15575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015576else
Martin v. Löwis11437992002-04-12 09:54:03 +000015577 cat >conftest.$ac_ext <<_ACEOF
15578#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015579#include "confdefs.h"
15580/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015581 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015582#include <assert.h>
15583/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015584#ifdef __cplusplus
15585extern "C"
15586#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015587/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015588 builtin and then its argument prototype would still apply. */
15589char $ac_func ();
15590char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015591
Barry Warsawfe33b792003-01-07 22:42:49 +000015592#ifdef F77_DUMMY_MAIN
15593# ifdef __cplusplus
15594 extern "C"
15595# endif
15596 int F77_DUMMY_MAIN() { return 1; }
15597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015598int
15599main ()
15600{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015601/* The GNU C library defines this for functions which it implements
15602 to always fail with ENOSYS. Some functions are actually named
15603 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015605choke me
15606#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015607f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015608#endif
15609
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 ;
15611 return 0;
15612}
15613_ACEOF
15614rm -f conftest.$ac_objext conftest$ac_exeext
15615if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15616 (eval $ac_link) 2>&5
15617 ac_status=$?
15618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15619 (exit $ac_status); } &&
15620 { ac_try='test -s conftest$ac_exeext'
15621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15622 (eval $ac_try) 2>&5
15623 ac_status=$?
15624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15625 (exit $ac_status); }; }; then
15626 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015627else
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 echo "$as_me: failed program was:" >&5
15629cat conftest.$ac_ext >&5
15630eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015632rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015633fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15635echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15636if test `eval echo '${'$as_ac_var'}'` = yes; then
15637 cat >>confdefs.h <<_ACEOF
15638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15639_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015640
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015641fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015642done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015643
Michael W. Hudson54241132001-12-07 15:38:26 +000015644
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015645fi
15646
Michael W. Hudson54241132001-12-07 15:38:26 +000015647
15648
15649
15650
15651
15652
Guido van Rossum627b2d71993-12-24 10:39:16 +000015653# checks for system services
15654# (none yet)
15655
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015656# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015657echo "$as_me:$LINENO: checking for __fpu_control" >&5
15658echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15659if test "${ac_cv_func___fpu_control+set}" = set; then
15660 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015661else
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 cat >conftest.$ac_ext <<_ACEOF
15663#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015664#include "confdefs.h"
15665/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015667#include <assert.h>
15668/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015669#ifdef __cplusplus
15670extern "C"
15671#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015673 builtin and then its argument prototype would still apply. */
15674char __fpu_control ();
15675char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015676
Barry Warsawfe33b792003-01-07 22:42:49 +000015677#ifdef F77_DUMMY_MAIN
15678# ifdef __cplusplus
15679 extern "C"
15680# endif
15681 int F77_DUMMY_MAIN() { return 1; }
15682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015683int
15684main ()
15685{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015686/* The GNU C library defines this for functions which it implements
15687 to always fail with ENOSYS. Some functions are actually named
15688 something starting with __ and the normal name is an alias. */
15689#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15690choke me
15691#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015692f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015693#endif
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 ;
15696 return 0;
15697}
15698_ACEOF
15699rm -f conftest.$ac_objext conftest$ac_exeext
15700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15701 (eval $ac_link) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); } &&
15705 { ac_try='test -s conftest$ac_exeext'
15706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15707 (eval $ac_try) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); }; }; then
15711 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015712else
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 echo "$as_me: failed program was:" >&5
15714cat conftest.$ac_ext >&5
15715ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015716fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015717rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015718fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015719echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15720echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15721if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015722 :
15723else
Martin v. Löwis11437992002-04-12 09:54:03 +000015724
15725echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15726echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15727if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15728 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015729else
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015731LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015732cat >conftest.$ac_ext <<_ACEOF
15733#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015734#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015736/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015737#ifdef __cplusplus
15738extern "C"
15739#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015740/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 builtin and then its argument prototype would still apply. */
15742char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015743#ifdef F77_DUMMY_MAIN
15744# ifdef __cplusplus
15745 extern "C"
15746# endif
15747 int F77_DUMMY_MAIN() { return 1; }
15748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015749int
15750main ()
15751{
15752__fpu_control ();
15753 ;
15754 return 0;
15755}
15756_ACEOF
15757rm -f conftest.$ac_objext conftest$ac_exeext
15758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15759 (eval $ac_link) 2>&5
15760 ac_status=$?
15761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762 (exit $ac_status); } &&
15763 { ac_try='test -s conftest$ac_exeext'
15764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15765 (eval $ac_try) 2>&5
15766 ac_status=$?
15767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768 (exit $ac_status); }; }; then
15769 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015770else
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 echo "$as_me: failed program was:" >&5
15772cat conftest.$ac_ext >&5
15773ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015775rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15776LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015778echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15779echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15780if test $ac_cv_lib_ieee___fpu_control = yes; then
15781 cat >>confdefs.h <<_ACEOF
15782#define HAVE_LIBIEEE 1
15783_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015785 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015786
Guido van Rossum627b2d71993-12-24 10:39:16 +000015787fi
15788
Michael W. Hudson54241132001-12-07 15:38:26 +000015789
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015790fi
15791
Michael W. Hudson54241132001-12-07 15:38:26 +000015792
Guido van Rossum7f253911997-05-09 02:42:48 +000015793# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015794echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15795echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15796
Guido van Rossum7f253911997-05-09 02:42:48 +000015797# Check whether --with-fpectl or --without-fpectl was given.
15798if test "${with_fpectl+set}" = set; then
15799 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015800
Guido van Rossum7f253911997-05-09 02:42:48 +000015801if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015802then
15803
15804cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015805#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015806_ACEOF
15807
15808 echo "$as_me:$LINENO: result: yes" >&5
15809echo "${ECHO_T}yes" >&6
15810else echo "$as_me:$LINENO: result: no" >&5
15811echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015812fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015813else
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 echo "$as_me:$LINENO: result: no" >&5
15815echo "${ECHO_T}no" >&6
15816fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015817
Guido van Rossum7f43da71994-08-01 12:15:30 +000015818# check for --with-libm=...
15819
Guido van Rossum563e7081996-09-10 18:20:48 +000015820case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015821Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015822BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015823*) LIBM=-lm
15824esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015825echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15826echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15827
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015828# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015829if test "${with_libm+set}" = set; then
15830 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015831
Guido van Rossum7f253911997-05-09 02:42:48 +000015832if test "$withval" = no
15833then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15835echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015836elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015837then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15839echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15840else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15841echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15842 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015843fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015844else
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15846echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15847fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015848
15849# check for --with-libc=...
15850
Martin v. Löwis11437992002-04-12 09:54:03 +000015851echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15852echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015854# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015855if test "${with_libc+set}" = set; then
15856 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
Guido van Rossum7f253911997-05-09 02:42:48 +000015858if test "$withval" = no
15859then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15861echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015862elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015863then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15865echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15866else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15867echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15868 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015869fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015870else
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15872echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15873fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015874
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015875# check for hypot() in math library
15876LIBS_SAVE=$LIBS
15877LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015879for ac_func in hypot
15880do
Martin v. Löwis11437992002-04-12 09:54:03 +000015881as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15882echo "$as_me:$LINENO: checking for $ac_func" >&5
15883echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15884if eval "test \"\${$as_ac_var+set}\" = set"; then
15885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015886else
Martin v. Löwis11437992002-04-12 09:54:03 +000015887 cat >conftest.$ac_ext <<_ACEOF
15888#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015889#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015890/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015892#include <assert.h>
15893/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015894#ifdef __cplusplus
15895extern "C"
15896#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015897/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 builtin and then its argument prototype would still apply. */
15899char $ac_func ();
15900char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015901
Barry Warsawfe33b792003-01-07 22:42:49 +000015902#ifdef F77_DUMMY_MAIN
15903# ifdef __cplusplus
15904 extern "C"
15905# endif
15906 int F77_DUMMY_MAIN() { return 1; }
15907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015908int
15909main ()
15910{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015911/* The GNU C library defines this for functions which it implements
15912 to always fail with ENOSYS. Some functions are actually named
15913 something starting with __ and the normal name is an alias. */
15914#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15915choke me
15916#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015917f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015918#endif
15919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ;
15921 return 0;
15922}
15923_ACEOF
15924rm -f conftest.$ac_objext conftest$ac_exeext
15925if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15926 (eval $ac_link) 2>&5
15927 ac_status=$?
15928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15929 (exit $ac_status); } &&
15930 { ac_try='test -s conftest$ac_exeext'
15931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15932 (eval $ac_try) 2>&5
15933 ac_status=$?
15934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935 (exit $ac_status); }; }; then
15936 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015937else
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 echo "$as_me: failed program was:" >&5
15939cat conftest.$ac_ext >&5
15940eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015941fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015943fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015944echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15945echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15946if test `eval echo '${'$as_ac_var'}'` = yes; then
15947 cat >>confdefs.h <<_ACEOF
15948#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15949_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015950
Michael W. Hudson54241132001-12-07 15:38:26 +000015951else
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015953fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015954done
15955
Michael W. Hudson54241132001-12-07 15:38:26 +000015956
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015957LIBS=$LIBS_SAVE
15958
Guido van Rossumef2255b2000-03-10 22:30:29 +000015959# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015960if test "${ac_cv_header_wchar_h+set}" = set; then
15961 echo "$as_me:$LINENO: checking for wchar.h" >&5
15962echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15963if test "${ac_cv_header_wchar_h+set}" = set; then
15964 echo $ECHO_N "(cached) $ECHO_C" >&6
15965fi
15966echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15967echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015968else
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 # Is the header compilable?
15970echo "$as_me:$LINENO: checking wchar.h usability" >&5
15971echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15972cat >conftest.$ac_ext <<_ACEOF
15973#line $LINENO "configure"
15974#include "confdefs.h"
15975$ac_includes_default
15976#include <wchar.h>
15977_ACEOF
15978rm -f conftest.$ac_objext
15979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15980 (eval $ac_compile) 2>&5
15981 ac_status=$?
15982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15983 (exit $ac_status); } &&
15984 { ac_try='test -s conftest.$ac_objext'
15985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15986 (eval $ac_try) 2>&5
15987 ac_status=$?
15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15989 (exit $ac_status); }; }; then
15990 ac_header_compiler=yes
15991else
15992 echo "$as_me: failed program was:" >&5
15993cat conftest.$ac_ext >&5
15994ac_header_compiler=no
15995fi
15996rm -f conftest.$ac_objext conftest.$ac_ext
15997echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15998echo "${ECHO_T}$ac_header_compiler" >&6
15999
16000# Is the header present?
16001echo "$as_me:$LINENO: checking wchar.h presence" >&5
16002echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16003cat >conftest.$ac_ext <<_ACEOF
16004#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016005#include "confdefs.h"
16006#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016007_ACEOF
16008if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16010 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016011 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 rm -f conftest.er1
16013 cat conftest.err >&5
16014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16015 (exit $ac_status); } >/dev/null; then
16016 if test -s conftest.err; then
16017 ac_cpp_err=$ac_c_preproc_warn_flag
16018 else
16019 ac_cpp_err=
16020 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016021else
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 ac_cpp_err=yes
16023fi
16024if test -z "$ac_cpp_err"; then
16025 ac_header_preproc=yes
16026else
16027 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016028 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016031rm -f conftest.err conftest.$ac_ext
16032echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16033echo "${ECHO_T}$ac_header_preproc" >&6
16034
16035# So? What about this header?
16036case $ac_header_compiler:$ac_header_preproc in
16037 yes:no )
16038 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16039echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16040 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16041echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16042 no:yes )
16043 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16044echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16045 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16046echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&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;};;
16049esac
16050echo "$as_me:$LINENO: checking for wchar.h" >&5
16051echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16052if test "${ac_cv_header_wchar_h+set}" = set; then
16053 echo $ECHO_N "(cached) $ECHO_C" >&6
16054else
16055 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016057echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16058echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16059
16060fi
16061if test $ac_cv_header_wchar_h = yes; then
16062
16063
16064cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016065#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016066_ACEOF
16067
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016068 wchar_h="yes"
16069
Guido van Rossumef2255b2000-03-10 22:30:29 +000016070else
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016072
16073fi
16074
Michael W. Hudson54241132001-12-07 15:38:26 +000016075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016077# determine wchar_t size
16078if test "$wchar_h" = yes
16079then
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 echo "$as_me:$LINENO: checking for wchar_t" >&5
16081echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16082if test "${ac_cv_type_wchar_t+set}" = set; then
16083 echo $ECHO_N "(cached) $ECHO_C" >&6
16084else
16085 cat >conftest.$ac_ext <<_ACEOF
16086#line $LINENO "configure"
16087#include "confdefs.h"
16088#include <wchar.h>
16089
Barry Warsawfe33b792003-01-07 22:42:49 +000016090#ifdef F77_DUMMY_MAIN
16091# ifdef __cplusplus
16092 extern "C"
16093# endif
16094 int F77_DUMMY_MAIN() { return 1; }
16095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016096int
16097main ()
16098{
16099if ((wchar_t *) 0)
16100 return 0;
16101if (sizeof (wchar_t))
16102 return 0;
16103 ;
16104 return 0;
16105}
16106_ACEOF
16107rm -f conftest.$ac_objext
16108if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16109 (eval $ac_compile) 2>&5
16110 ac_status=$?
16111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16112 (exit $ac_status); } &&
16113 { ac_try='test -s conftest.$ac_objext'
16114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16115 (eval $ac_try) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); }; }; then
16119 ac_cv_type_wchar_t=yes
16120else
16121 echo "$as_me: failed program was:" >&5
16122cat conftest.$ac_ext >&5
16123ac_cv_type_wchar_t=no
16124fi
16125rm -f conftest.$ac_objext conftest.$ac_ext
16126fi
16127echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16128echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16129
16130echo "$as_me:$LINENO: checking size of wchar_t" >&5
16131echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16132if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16133 echo $ECHO_N "(cached) $ECHO_C" >&6
16134else
16135 if test "$ac_cv_type_wchar_t" = yes; then
16136 # The cast to unsigned long works around a bug in the HP C Compiler
16137 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16138 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16139 # This bug is HP SR number 8606223364.
16140 if test "$cross_compiling" = yes; then
16141 # Depending upon the size, compute the lo and hi bounds.
16142cat >conftest.$ac_ext <<_ACEOF
16143#line $LINENO "configure"
16144#include "confdefs.h"
16145#include <wchar.h>
16146
Barry Warsawfe33b792003-01-07 22:42:49 +000016147#ifdef F77_DUMMY_MAIN
16148# ifdef __cplusplus
16149 extern "C"
16150# endif
16151 int F77_DUMMY_MAIN() { return 1; }
16152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016153int
16154main ()
16155{
16156static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16157test_array [0] = 0
16158
16159 ;
16160 return 0;
16161}
16162_ACEOF
16163rm -f conftest.$ac_objext
16164if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16165 (eval $ac_compile) 2>&5
16166 ac_status=$?
16167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16168 (exit $ac_status); } &&
16169 { ac_try='test -s conftest.$ac_objext'
16170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16171 (eval $ac_try) 2>&5
16172 ac_status=$?
16173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16174 (exit $ac_status); }; }; then
16175 ac_lo=0 ac_mid=0
16176 while :; do
16177 cat >conftest.$ac_ext <<_ACEOF
16178#line $LINENO "configure"
16179#include "confdefs.h"
16180#include <wchar.h>
16181
Barry Warsawfe33b792003-01-07 22:42:49 +000016182#ifdef F77_DUMMY_MAIN
16183# ifdef __cplusplus
16184 extern "C"
16185# endif
16186 int F77_DUMMY_MAIN() { return 1; }
16187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016188int
16189main ()
16190{
16191static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16192test_array [0] = 0
16193
16194 ;
16195 return 0;
16196}
16197_ACEOF
16198rm -f conftest.$ac_objext
16199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16200 (eval $ac_compile) 2>&5
16201 ac_status=$?
16202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16203 (exit $ac_status); } &&
16204 { ac_try='test -s conftest.$ac_objext'
16205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16206 (eval $ac_try) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); }; }; then
16210 ac_hi=$ac_mid; break
16211else
16212 echo "$as_me: failed program was:" >&5
16213cat conftest.$ac_ext >&5
16214ac_lo=`expr $ac_mid + 1`
16215 if test $ac_lo -le $ac_mid; then
16216 ac_lo= ac_hi=
16217 break
16218 fi
16219 ac_mid=`expr 2 '*' $ac_mid + 1`
16220fi
16221rm -f conftest.$ac_objext conftest.$ac_ext
16222 done
16223else
16224 echo "$as_me: failed program was:" >&5
16225cat conftest.$ac_ext >&5
16226cat >conftest.$ac_ext <<_ACEOF
16227#line $LINENO "configure"
16228#include "confdefs.h"
16229#include <wchar.h>
16230
Barry Warsawfe33b792003-01-07 22:42:49 +000016231#ifdef F77_DUMMY_MAIN
16232# ifdef __cplusplus
16233 extern "C"
16234# endif
16235 int F77_DUMMY_MAIN() { return 1; }
16236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016237int
16238main ()
16239{
16240static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16241test_array [0] = 0
16242
16243 ;
16244 return 0;
16245}
16246_ACEOF
16247rm -f conftest.$ac_objext
16248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16249 (eval $ac_compile) 2>&5
16250 ac_status=$?
16251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16252 (exit $ac_status); } &&
16253 { ac_try='test -s conftest.$ac_objext'
16254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16255 (eval $ac_try) 2>&5
16256 ac_status=$?
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); }; }; then
16259 ac_hi=-1 ac_mid=-1
16260 while :; do
16261 cat >conftest.$ac_ext <<_ACEOF
16262#line $LINENO "configure"
16263#include "confdefs.h"
16264#include <wchar.h>
16265
Barry Warsawfe33b792003-01-07 22:42:49 +000016266#ifdef F77_DUMMY_MAIN
16267# ifdef __cplusplus
16268 extern "C"
16269# endif
16270 int F77_DUMMY_MAIN() { return 1; }
16271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016272int
16273main ()
16274{
16275static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16276test_array [0] = 0
16277
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext
16283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16284 (eval $ac_compile) 2>&5
16285 ac_status=$?
16286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16287 (exit $ac_status); } &&
16288 { ac_try='test -s conftest.$ac_objext'
16289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16290 (eval $ac_try) 2>&5
16291 ac_status=$?
16292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293 (exit $ac_status); }; }; then
16294 ac_lo=$ac_mid; break
16295else
16296 echo "$as_me: failed program was:" >&5
16297cat conftest.$ac_ext >&5
16298ac_hi=`expr '(' $ac_mid ')' - 1`
16299 if test $ac_mid -le $ac_hi; then
16300 ac_lo= ac_hi=
16301 break
16302 fi
16303 ac_mid=`expr 2 '*' $ac_mid`
16304fi
16305rm -f conftest.$ac_objext conftest.$ac_ext
16306 done
16307else
16308 echo "$as_me: failed program was:" >&5
16309cat conftest.$ac_ext >&5
16310ac_lo= ac_hi=
16311fi
16312rm -f conftest.$ac_objext conftest.$ac_ext
16313fi
16314rm -f conftest.$ac_objext conftest.$ac_ext
16315# Binary search between lo and hi bounds.
16316while test "x$ac_lo" != "x$ac_hi"; do
16317 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16318 cat >conftest.$ac_ext <<_ACEOF
16319#line $LINENO "configure"
16320#include "confdefs.h"
16321#include <wchar.h>
16322
Barry Warsawfe33b792003-01-07 22:42:49 +000016323#ifdef F77_DUMMY_MAIN
16324# ifdef __cplusplus
16325 extern "C"
16326# endif
16327 int F77_DUMMY_MAIN() { return 1; }
16328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016329int
16330main ()
16331{
16332static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16333test_array [0] = 0
16334
16335 ;
16336 return 0;
16337}
16338_ACEOF
16339rm -f conftest.$ac_objext
16340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16341 (eval $ac_compile) 2>&5
16342 ac_status=$?
16343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344 (exit $ac_status); } &&
16345 { ac_try='test -s conftest.$ac_objext'
16346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16347 (eval $ac_try) 2>&5
16348 ac_status=$?
16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350 (exit $ac_status); }; }; then
16351 ac_hi=$ac_mid
16352else
16353 echo "$as_me: failed program was:" >&5
16354cat conftest.$ac_ext >&5
16355ac_lo=`expr '(' $ac_mid ')' + 1`
16356fi
16357rm -f conftest.$ac_objext conftest.$ac_ext
16358done
16359case $ac_lo in
16360?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16361'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16362echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16363 { (exit 1); exit 1; }; } ;;
16364esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016365else
16366 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16368echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16369 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016370else
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 cat >conftest.$ac_ext <<_ACEOF
16372#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016373#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016374#include <wchar.h>
16375
16376long longval () { return (long) (sizeof (wchar_t)); }
16377unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016378#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016379#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016380#ifdef F77_DUMMY_MAIN
16381# ifdef __cplusplus
16382 extern "C"
16383# endif
16384 int F77_DUMMY_MAIN() { return 1; }
16385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016386int
16387main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016388{
Martin v. Löwis11437992002-04-12 09:54:03 +000016389
16390 FILE *f = fopen ("conftest.val", "w");
16391 if (! f)
16392 exit (1);
16393 if (((long) (sizeof (wchar_t))) < 0)
16394 {
16395 long i = longval ();
16396 if (i != ((long) (sizeof (wchar_t))))
16397 exit (1);
16398 fprintf (f, "%ld\n", i);
16399 }
16400 else
16401 {
16402 unsigned long i = ulongval ();
16403 if (i != ((long) (sizeof (wchar_t))))
16404 exit (1);
16405 fprintf (f, "%lu\n", i);
16406 }
16407 exit (ferror (f) || fclose (f) != 0);
16408
16409 ;
16410 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016411}
Martin v. Löwis11437992002-04-12 09:54:03 +000016412_ACEOF
16413rm -f conftest$ac_exeext
16414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16415 (eval $ac_link) 2>&5
16416 ac_status=$?
16417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16420 (eval $ac_try) 2>&5
16421 ac_status=$?
16422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16423 (exit $ac_status); }; }; then
16424 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016425else
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 echo "$as_me: program exited with status $ac_status" >&5
16427echo "$as_me: failed program was:" >&5
16428cat conftest.$ac_ext >&5
16429( exit $ac_status )
16430{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16431echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16432 { (exit 1); exit 1; }; }
16433fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016434rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016435fi
16436fi
16437rm -f conftest.val
16438else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016439 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016440fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016441fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016442echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16443echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16444cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016445#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016446_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016447
Michael W. Hudson54241132001-12-07 15:38:26 +000016448
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016449fi
16450
Martin v. Löwis11437992002-04-12 09:54:03 +000016451echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16452echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016453# Check whether --enable-unicode or --disable-unicode was given.
16454if test "${enable_unicode+set}" = set; then
16455 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016456
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016457else
16458 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016459fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016460
16461if test $enable_unicode = yes
16462then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016463 # Without any arguments, Py_UNICODE defaults to two-byte mode
16464 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016465fi
16466
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016467
16468
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016469case "$enable_unicode" in
16470ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016472#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016473_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016474
16475 ;;
16476ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016477 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016478#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016479_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016480
16481 ;;
16482esac
16483
Michael W. Hudson54241132001-12-07 15:38:26 +000016484
Martin v. Löwis11437992002-04-12 09:54:03 +000016485
16486
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016487
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016488if test "$enable_unicode" = "no"
16489then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016490 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 echo "$as_me:$LINENO: result: not used" >&5
16492echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016493else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016494 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
16496cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016497#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016498_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016499
16500 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16501 then
16502 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016503
Martin v. Löwis11437992002-04-12 09:54:03 +000016504cat >>confdefs.h <<\_ACEOF
16505#define HAVE_USABLE_WCHAR_T 1
16506_ACEOF
16507
16508 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016509#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016510_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016511
16512 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16513 then
16514 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016515 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016516#define PY_UNICODE_TYPE unsigned short
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_long" = "$unicode_size"
16520 then
16521 PY_UNICODE_TYPE="unsigned long"
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 long
Martin v. Löwis11437992002-04-12 09:54:03 +000016524_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016525
16526 else
16527 PY_UNICODE_TYPE="no type found"
16528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16530echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016531fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016532
16533# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016534echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16535echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16536if test "${ac_cv_c_bigendian+set}" = set; then
16537 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016538else
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 # See if sys/param.h defines the BYTE_ORDER macro.
16540cat >conftest.$ac_ext <<_ACEOF
16541#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016542#include "confdefs.h"
16543#include <sys/types.h>
16544#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016545
Barry Warsawfe33b792003-01-07 22:42:49 +000016546#ifdef F77_DUMMY_MAIN
16547# ifdef __cplusplus
16548 extern "C"
16549# endif
16550 int F77_DUMMY_MAIN() { return 1; }
16551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016552int
16553main ()
16554{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016555#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16556 bogus endian macros
16557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016558
16559 ;
16560 return 0;
16561}
16562_ACEOF
16563rm -f conftest.$ac_objext
16564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16565 (eval $ac_compile) 2>&5
16566 ac_status=$?
16567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16568 (exit $ac_status); } &&
16569 { ac_try='test -s conftest.$ac_objext'
16570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16571 (eval $ac_try) 2>&5
16572 ac_status=$?
16573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016575 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016576cat >conftest.$ac_ext <<_ACEOF
16577#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016578#include "confdefs.h"
16579#include <sys/types.h>
16580#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016581
Barry Warsawfe33b792003-01-07 22:42:49 +000016582#ifdef F77_DUMMY_MAIN
16583# ifdef __cplusplus
16584 extern "C"
16585# endif
16586 int F77_DUMMY_MAIN() { return 1; }
16587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016588int
16589main ()
16590{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016591#if BYTE_ORDER != BIG_ENDIAN
16592 not big endian
16593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016594
16595 ;
16596 return 0;
16597}
16598_ACEOF
16599rm -f conftest.$ac_objext
16600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16601 (eval $ac_compile) 2>&5
16602 ac_status=$?
16603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604 (exit $ac_status); } &&
16605 { ac_try='test -s conftest.$ac_objext'
16606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016611 ac_cv_c_bigendian=yes
16612else
Martin v. Löwis11437992002-04-12 09:54:03 +000016613 echo "$as_me: failed program was:" >&5
16614cat conftest.$ac_ext >&5
16615ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016617rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016618else
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 echo "$as_me: failed program was:" >&5
16620cat conftest.$ac_ext >&5
16621# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016622if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016623 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016624 ac_cv_c_bigendian=unknown
16625 cat >conftest.$ac_ext <<_ACEOF
16626#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016627#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016628short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16629short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16630void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16631short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16632short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16633void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016634#ifdef F77_DUMMY_MAIN
16635# ifdef __cplusplus
16636 extern "C"
16637# endif
16638 int F77_DUMMY_MAIN() { return 1; }
16639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016640int
16641main ()
16642{
16643 _ascii (); _ebcdic ();
16644 ;
16645 return 0;
16646}
16647_ACEOF
16648rm -f conftest.$ac_objext
16649if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16650 (eval $ac_compile) 2>&5
16651 ac_status=$?
16652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16653 (exit $ac_status); } &&
16654 { ac_try='test -s conftest.$ac_objext'
16655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16656 (eval $ac_try) 2>&5
16657 ac_status=$?
16658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16659 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016660 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 ac_cv_c_bigendian=yes
16662fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016663if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 if test "$ac_cv_c_bigendian" = unknown; then
16665 ac_cv_c_bigendian=no
16666 else
16667 # finding both strings is unlikely to happen, but who knows?
16668 ac_cv_c_bigendian=unknown
16669 fi
16670fi
16671else
16672 echo "$as_me: failed program was:" >&5
16673cat conftest.$ac_ext >&5
16674fi
16675rm -f conftest.$ac_objext conftest.$ac_ext
16676else
16677 cat >conftest.$ac_ext <<_ACEOF
16678#line $LINENO "configure"
16679#include "confdefs.h"
16680int
16681main ()
16682{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016683 /* Are we little or big endian? From Harbison&Steele. */
16684 union
16685 {
16686 long l;
16687 char c[sizeof (long)];
16688 } u;
16689 u.l = 1;
16690 exit (u.c[sizeof (long) - 1] == 1);
16691}
Martin v. Löwis11437992002-04-12 09:54:03 +000016692_ACEOF
16693rm -f conftest$ac_exeext
16694if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16695 (eval $ac_link) 2>&5
16696 ac_status=$?
16697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16700 (eval $ac_try) 2>&5
16701 ac_status=$?
16702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16703 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016704 ac_cv_c_bigendian=no
16705else
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 echo "$as_me: program exited with status $ac_status" >&5
16707echo "$as_me: failed program was:" >&5
16708cat conftest.$ac_ext >&5
16709( exit $ac_status )
16710ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016711fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016712rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016714fi
16715rm -f conftest.$ac_objext conftest.$ac_ext
16716fi
16717echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16718echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16719case $ac_cv_c_bigendian in
16720 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016721
Martin v. Löwis11437992002-04-12 09:54:03 +000016722cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016723#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016724_ACEOF
16725 ;;
16726 no)
16727 ;;
16728 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016729 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016730presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016731echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016732presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16733 { (exit 1); exit 1; }; } ;;
16734esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016735
Michael W. Hudson54241132001-12-07 15:38:26 +000016736
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016737# Check whether right shifting a negative integer extends the sign bit
16738# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016739echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16740echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16741if test "${ac_cv_rshift_extends_sign+set}" = set; then
16742 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016745if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016746 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016747else
Martin v. Löwis11437992002-04-12 09:54:03 +000016748 cat >conftest.$ac_ext <<_ACEOF
16749#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016750#include "confdefs.h"
16751
16752int main()
16753{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016754 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016755}
16756
Martin v. Löwis11437992002-04-12 09:54:03 +000016757_ACEOF
16758rm -f conftest$ac_exeext
16759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16760 (eval $ac_link) 2>&5
16761 ac_status=$?
16762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16765 (eval $ac_try) 2>&5
16766 ac_status=$?
16767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016769 ac_cv_rshift_extends_sign=yes
16770else
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 echo "$as_me: program exited with status $ac_status" >&5
16772echo "$as_me: failed program was:" >&5
16773cat conftest.$ac_ext >&5
16774( exit $ac_status )
16775ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016776fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016777rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016778fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016779fi
16780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16782echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016783if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016784then
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016787#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016788_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016789
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016790fi
16791
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016792# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016793echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16794echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16795if test "${ac_cv_have_getc_unlocked+set}" = set; then
16796 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016797else
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
16799cat >conftest.$ac_ext <<_ACEOF
16800#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016801#include "confdefs.h"
16802#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016803#ifdef F77_DUMMY_MAIN
16804# ifdef __cplusplus
16805 extern "C"
16806# endif
16807 int F77_DUMMY_MAIN() { return 1; }
16808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016809int
16810main ()
16811{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016812
16813 FILE *f = fopen("/dev/null", "r");
16814 flockfile(f);
16815 getc_unlocked(f);
16816 funlockfile(f);
16817
Martin v. Löwis11437992002-04-12 09:54:03 +000016818 ;
16819 return 0;
16820}
16821_ACEOF
16822rm -f conftest.$ac_objext conftest$ac_exeext
16823if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16824 (eval $ac_link) 2>&5
16825 ac_status=$?
16826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16827 (exit $ac_status); } &&
16828 { ac_try='test -s conftest$ac_exeext'
16829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16830 (eval $ac_try) 2>&5
16831 ac_status=$?
16832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016834 ac_cv_have_getc_unlocked=yes
16835else
Martin v. Löwis11437992002-04-12 09:54:03 +000016836 echo "$as_me: failed program was:" >&5
16837cat conftest.$ac_ext >&5
16838ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016840rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016841fi
16842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16844echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016845if test "$ac_cv_have_getc_unlocked" = yes
16846then
Martin v. Löwis11437992002-04-12 09:54:03 +000016847
16848cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016849#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016850_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016851
16852fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016854# check for readline 2.2
16855cat >conftest.$ac_ext <<_ACEOF
16856#line $LINENO "configure"
16857#include "confdefs.h"
16858#include <readline/readline.h>
16859_ACEOF
16860if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16861 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16862 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016863 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016864 rm -f conftest.er1
16865 cat conftest.err >&5
16866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16867 (exit $ac_status); } >/dev/null; then
16868 if test -s conftest.err; then
16869 ac_cpp_err=$ac_c_preproc_warn_flag
16870 else
16871 ac_cpp_err=
16872 fi
16873else
16874 ac_cpp_err=yes
16875fi
16876if test -z "$ac_cpp_err"; then
16877 have_readline=yes
16878else
16879 echo "$as_me: failed program was:" >&5
16880 cat conftest.$ac_ext >&5
16881 have_readline=no
16882fi
16883rm -f conftest.err conftest.$ac_ext
16884if test $have_readline = yes
16885then
16886 cat >conftest.$ac_ext <<_ACEOF
16887#line $LINENO "configure"
16888#include "confdefs.h"
16889#include <readline/readline.h>
16890
16891_ACEOF
16892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016893 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016894
16895cat >>confdefs.h <<\_ACEOF
16896#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16897_ACEOF
16898
16899fi
16900rm -f conftest*
16901
16902fi
16903
Martin v. Löwis0daad592001-09-30 21:09:59 +000016904# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016905echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16906echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16907if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16908 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016909else
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016911LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016912cat >conftest.$ac_ext <<_ACEOF
16913#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016914#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016915
Guido van Rossum353ae582001-07-10 16:45:32 +000016916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016917#ifdef __cplusplus
16918extern "C"
16919#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016920/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 builtin and then its argument prototype would still apply. */
16922char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016923#ifdef F77_DUMMY_MAIN
16924# ifdef __cplusplus
16925 extern "C"
16926# endif
16927 int F77_DUMMY_MAIN() { return 1; }
16928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016929int
16930main ()
16931{
16932rl_pre_input_hook ();
16933 ;
16934 return 0;
16935}
16936_ACEOF
16937rm -f conftest.$ac_objext conftest$ac_exeext
16938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16939 (eval $ac_link) 2>&5
16940 ac_status=$?
16941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942 (exit $ac_status); } &&
16943 { ac_try='test -s conftest$ac_exeext'
16944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16945 (eval $ac_try) 2>&5
16946 ac_status=$?
16947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948 (exit $ac_status); }; }; then
16949 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016950else
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 echo "$as_me: failed program was:" >&5
16952cat conftest.$ac_ext >&5
16953ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016955rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16956LIBS=$ac_check_lib_save_LIBS
16957fi
16958echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16959echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16960if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016961
Martin v. Löwis11437992002-04-12 09:54:03 +000016962cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016963#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016964_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016965
Martin v. Löwis0daad592001-09-30 21:09:59 +000016966fi
16967
Michael W. Hudson54241132001-12-07 15:38:26 +000016968
Martin v. Löwis0daad592001-09-30 21:09:59 +000016969# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016970echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16971echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16972if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16973 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016974else
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016976LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016977cat >conftest.$ac_ext <<_ACEOF
16978#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016979#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016980
Martin v. Löwis0daad592001-09-30 21:09:59 +000016981/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016982#ifdef __cplusplus
16983extern "C"
16984#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016985/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 builtin and then its argument prototype would still apply. */
16987char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016988#ifdef F77_DUMMY_MAIN
16989# ifdef __cplusplus
16990 extern "C"
16991# endif
16992 int F77_DUMMY_MAIN() { return 1; }
16993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016994int
16995main ()
16996{
16997rl_completion_matches ();
16998 ;
16999 return 0;
17000}
17001_ACEOF
17002rm -f conftest.$ac_objext conftest$ac_exeext
17003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17004 (eval $ac_link) 2>&5
17005 ac_status=$?
17006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17007 (exit $ac_status); } &&
17008 { ac_try='test -s conftest$ac_exeext'
17009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17010 (eval $ac_try) 2>&5
17011 ac_status=$?
17012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17013 (exit $ac_status); }; }; then
17014 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017015else
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 echo "$as_me: failed program was:" >&5
17017cat conftest.$ac_ext >&5
17018ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017020rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17021LIBS=$ac_check_lib_save_LIBS
17022fi
17023echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17024echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17025if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017026
Martin v. Löwis11437992002-04-12 09:54:03 +000017027cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017028#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017029_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017030
Guido van Rossum353ae582001-07-10 16:45:32 +000017031fi
17032
Jack Jansendd19cf82001-12-06 22:36:17 +000017033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034echo "$as_me:$LINENO: checking for broken nice()" >&5
17035echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17036if test "${ac_cv_broken_nice+set}" = set; then
17037 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017038else
Martin v. Löwis11437992002-04-12 09:54:03 +000017039
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017040if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017041 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017042else
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 cat >conftest.$ac_ext <<_ACEOF
17044#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017045#include "confdefs.h"
17046
17047int main()
17048{
17049 int val1 = nice(1);
17050 if (val1 != -1 && val1 == nice(2))
17051 exit(0);
17052 exit(1);
17053}
17054
Martin v. Löwis11437992002-04-12 09:54:03 +000017055_ACEOF
17056rm -f conftest$ac_exeext
17057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17058 (eval $ac_link) 2>&5
17059 ac_status=$?
17060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17063 (eval $ac_try) 2>&5
17064 ac_status=$?
17065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017067 ac_cv_broken_nice=yes
17068else
Martin v. Löwis11437992002-04-12 09:54:03 +000017069 echo "$as_me: program exited with status $ac_status" >&5
17070echo "$as_me: failed program was:" >&5
17071cat conftest.$ac_ext >&5
17072( exit $ac_status )
17073ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017074fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017075rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017076fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017077fi
17078
Martin v. Löwis11437992002-04-12 09:54:03 +000017079echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17080echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017081if test "$ac_cv_broken_nice" = yes
17082then
Martin v. Löwis11437992002-04-12 09:54:03 +000017083
17084cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017085#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017087
17088fi
17089
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017090# tzset(3) exists and works like we expect it to
17091echo "$as_me:$LINENO: checking for working tzset()" >&5
17092echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17093if test "${ac_cv_working_tzset+set}" = set; then
17094 echo $ECHO_N "(cached) $ECHO_C" >&6
17095else
17096
17097if test "$cross_compiling" = yes; then
17098 ac_cv_working_tzset=no
17099else
17100 cat >conftest.$ac_ext <<_ACEOF
17101#line $LINENO "configure"
17102#include "confdefs.h"
17103
17104#include <stdlib.h>
17105#include <time.h>
17106int main()
17107{
17108 int gmt_hour;
17109 int eastern_hour;
17110 time_t now;
17111 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017112 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017113 tzset();
17114 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017115 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017116 tzset();
17117 eastern_hour = localtime(&now)->tm_hour;
17118 if (eastern_hour == gmt_hour)
17119 exit(1);
17120 exit(0);
17121}
17122
17123_ACEOF
17124rm -f conftest$ac_exeext
17125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17126 (eval $ac_link) 2>&5
17127 ac_status=$?
17128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17129 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17131 (eval $ac_try) 2>&5
17132 ac_status=$?
17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134 (exit $ac_status); }; }; then
17135 ac_cv_working_tzset=yes
17136else
17137 echo "$as_me: program exited with status $ac_status" >&5
17138echo "$as_me: failed program was:" >&5
17139cat conftest.$ac_ext >&5
17140( exit $ac_status )
17141ac_cv_working_tzset=no
17142fi
17143rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17144fi
17145fi
17146
17147echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17148echo "${ECHO_T}$ac_cv_working_tzset" >&6
17149if test "$ac_cv_working_tzset" = yes
17150then
17151
17152cat >>confdefs.h <<\_ACEOF
17153#define HAVE_WORKING_TZSET 1
17154_ACEOF
17155
17156fi
17157
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017158# Look for subsecond timestamps in struct stat
17159echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17160echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17161if test "${ac_cv_stat_tv_nsec+set}" = set; then
17162 echo $ECHO_N "(cached) $ECHO_C" >&6
17163else
17164 cat >conftest.$ac_ext <<_ACEOF
17165#line $LINENO "configure"
17166#include "confdefs.h"
17167#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017168#ifdef F77_DUMMY_MAIN
17169# ifdef __cplusplus
17170 extern "C"
17171# endif
17172 int F77_DUMMY_MAIN() { return 1; }
17173#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017174int
17175main ()
17176{
17177
17178struct stat st;
17179st.st_mtim.tv_nsec = 1;
17180
17181 ;
17182 return 0;
17183}
17184_ACEOF
17185rm -f conftest.$ac_objext
17186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17187 (eval $ac_compile) 2>&5
17188 ac_status=$?
17189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17190 (exit $ac_status); } &&
17191 { ac_try='test -s conftest.$ac_objext'
17192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17193 (eval $ac_try) 2>&5
17194 ac_status=$?
17195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017197 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017198else
17199 echo "$as_me: failed program was:" >&5
17200cat conftest.$ac_ext >&5
17201ac_cv_stat_tv_nsec=no
17202fi
17203rm -f conftest.$ac_objext conftest.$ac_ext
17204fi
17205
17206echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17207echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17208if test "$ac_cv_stat_tv_nsec" = yes
17209then
17210
17211cat >>confdefs.h <<\_ACEOF
17212#define HAVE_STAT_TV_NSEC 1
17213_ACEOF
17214
17215fi
17216
Jack Jansen666b1e72001-10-31 12:11:48 +000017217# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017218echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17219echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17220if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17221 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017222else
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 cat >conftest.$ac_ext <<_ACEOF
17224#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017225#include "confdefs.h"
17226#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017227#ifdef F77_DUMMY_MAIN
17228# ifdef __cplusplus
17229 extern "C"
17230# endif
17231 int F77_DUMMY_MAIN() { return 1; }
17232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017233int
17234main ()
17235{
Jack Jansen666b1e72001-10-31 12:11:48 +000017236
17237 int rtn;
17238 rtn = mvwdelch(0,0,0);
17239
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 ;
17241 return 0;
17242}
17243_ACEOF
17244rm -f conftest.$ac_objext
17245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17246 (eval $ac_compile) 2>&5
17247 ac_status=$?
17248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17249 (exit $ac_status); } &&
17250 { ac_try='test -s conftest.$ac_objext'
17251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17252 (eval $ac_try) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017256 ac_cv_mvwdelch_is_expression=yes
17257else
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 echo "$as_me: failed program was:" >&5
17259cat conftest.$ac_ext >&5
17260ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017262rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017263fi
17264
Martin v. Löwis11437992002-04-12 09:54:03 +000017265echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17266echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017267
17268if test "$ac_cv_mvwdelch_is_expression" = yes
17269then
Martin v. Löwis11437992002-04-12 09:54:03 +000017270
17271cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017272#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017273_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017274
17275fi
17276
Martin v. Löwis11437992002-04-12 09:54:03 +000017277echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17278echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17279if test "${ac_cv_window_has_flags+set}" = set; then
17280 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017281else
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 cat >conftest.$ac_ext <<_ACEOF
17283#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017284#include "confdefs.h"
17285#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017286#ifdef F77_DUMMY_MAIN
17287# ifdef __cplusplus
17288 extern "C"
17289# endif
17290 int F77_DUMMY_MAIN() { return 1; }
17291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017292int
17293main ()
17294{
Jack Jansen666b1e72001-10-31 12:11:48 +000017295
17296 WINDOW *w;
17297 w->_flags = 0;
17298
Martin v. Löwis11437992002-04-12 09:54:03 +000017299 ;
17300 return 0;
17301}
17302_ACEOF
17303rm -f conftest.$ac_objext
17304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17305 (eval $ac_compile) 2>&5
17306 ac_status=$?
17307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17308 (exit $ac_status); } &&
17309 { ac_try='test -s conftest.$ac_objext'
17310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17311 (eval $ac_try) 2>&5
17312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017315 ac_cv_window_has_flags=yes
17316else
Martin v. Löwis11437992002-04-12 09:54:03 +000017317 echo "$as_me: failed program was:" >&5
17318cat conftest.$ac_ext >&5
17319ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017321rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017322fi
17323
Martin v. Löwis11437992002-04-12 09:54:03 +000017324echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17325echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017326
Jack Jansen666b1e72001-10-31 12:11:48 +000017327
17328if test "$ac_cv_window_has_flags" = yes
17329then
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
17331cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017332#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017333_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017334
17335fi
17336
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017337echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17338echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17339
17340if test -e /dev/ptmx
17341then
17342 echo "$as_me:$LINENO: result: yes" >&5
17343echo "${ECHO_T}yes" >&6
17344
17345cat >>confdefs.h <<\_ACEOF
17346#define HAVE_DEV_PTMX 1
17347_ACEOF
17348
17349else
17350 echo "$as_me:$LINENO: result: no" >&5
17351echo "${ECHO_T}no" >&6
17352fi
17353
Neal Norwitz865400f2003-03-21 01:42:58 +000017354echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17355echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17356
17357if test -e /dev/ptc
17358then
17359 echo "$as_me:$LINENO: result: yes" >&5
17360echo "${ECHO_T}yes" >&6
17361
17362cat >>confdefs.h <<\_ACEOF
17363#define HAVE_DEV_PTC 1
17364_ACEOF
17365
17366else
17367 echo "$as_me:$LINENO: result: no" >&5
17368echo "${ECHO_T}no" >&6
17369fi
17370
Martin v. Löwis11437992002-04-12 09:54:03 +000017371echo "$as_me:$LINENO: checking for socklen_t" >&5
17372echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17373if test "${ac_cv_type_socklen_t+set}" = set; then
17374 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017375else
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 cat >conftest.$ac_ext <<_ACEOF
17377#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017378#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017379
17380#ifdef HAVE_SYS_TYPES_H
17381#include <sys/types.h>
17382#endif
17383#ifdef HAVE_SYS_SOCKET_H
17384#include <sys/socket.h>
17385#endif
17386
17387
Barry Warsawfe33b792003-01-07 22:42:49 +000017388#ifdef F77_DUMMY_MAIN
17389# ifdef __cplusplus
17390 extern "C"
17391# endif
17392 int F77_DUMMY_MAIN() { return 1; }
17393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017394int
17395main ()
17396{
17397if ((socklen_t *) 0)
17398 return 0;
17399if (sizeof (socklen_t))
17400 return 0;
17401 ;
17402 return 0;
17403}
17404_ACEOF
17405rm -f conftest.$ac_objext
17406if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17407 (eval $ac_compile) 2>&5
17408 ac_status=$?
17409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17410 (exit $ac_status); } &&
17411 { ac_try='test -s conftest.$ac_objext'
17412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17413 (eval $ac_try) 2>&5
17414 ac_status=$?
17415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017417 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017418else
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 echo "$as_me: failed program was:" >&5
17420cat conftest.$ac_ext >&5
17421ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017422fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017423rm -f conftest.$ac_objext conftest.$ac_ext
17424fi
17425echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17426echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17427if test $ac_cv_type_socklen_t = yes; then
17428 :
17429else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017430
Martin v. Löwis01c04012002-11-11 14:58:44 +000017431cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017432#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017433_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017434
17435fi
17436
Michael W. Hudson54241132001-12-07 15:38:26 +000017437
Michael W. Hudson54241132001-12-07 15:38:26 +000017438
17439
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017440for h in `(cd $srcdir;echo Python/thread_*.h)`
17441do
17442 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17443done
17444
Michael W. Hudson54241132001-12-07 15:38:26 +000017445
Jack Jansen0b06be72002-06-21 14:48:38 +000017446SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017447echo "$as_me:$LINENO: checking for build directories" >&5
17448echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017449for dir in $SRCDIRS; do
17450 if test ! -d $dir; then
17451 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017452 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017453done
Martin v. Löwis11437992002-04-12 09:54:03 +000017454echo "$as_me:$LINENO: result: done" >&5
17455echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017456
Guido van Rossum627b2d71993-12-24 10:39:16 +000017457# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017458ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017459
Martin v. Löwis11437992002-04-12 09:54:03 +000017460cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017461# This file is a shell script that caches the results of configure
17462# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017463# scripts and configure runs, see configure's option --config-cache.
17464# It is not useful on other systems. If it contains results you don't
17465# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017466#
Martin v. Löwis11437992002-04-12 09:54:03 +000017467# config.status only pays attention to the cache file if you give it
17468# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017469#
Barry Warsawfe33b792003-01-07 22:42:49 +000017470# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017471# loading this file, other *unset* `ac_cv_foo' will be assigned the
17472# following values.
17473
17474_ACEOF
17475
Guido van Rossumf78abae1997-01-21 22:02:36 +000017476# The following way of writing the cache mishandles newlines in values,
17477# but we know of no workaround that is simple, portable, and efficient.
17478# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017479# Ultrix sh set writes to stderr and can't be redirected directly,
17480# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017481{
17482 (set) 2>&1 |
17483 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17484 *ac_space=\ *)
17485 # `set' does not quote correctly, so add quotes (double-quote
17486 # substitution turns \\\\ into \\, and sed turns \\ into \).
17487 sed -n \
17488 "s/'/'\\\\''/g;
17489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17490 ;;
17491 *)
17492 # `set' quotes correctly as required by POSIX, so do not add quotes.
17493 sed -n \
17494 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17495 ;;
17496 esac;
17497} |
17498 sed '
17499 t clear
17500 : clear
17501 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17502 t end
17503 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17504 : end' >>confcache
17505if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017506 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017507 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17508 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017509 else
17510 echo "not updating unwritable cache $cache_file"
17511 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017512fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017513rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017515test "x$prefix" = xNONE && prefix=$ac_default_prefix
17516# Let make expand exec_prefix.
17517test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017518
Martin v. Löwis11437992002-04-12 09:54:03 +000017519# VPATH may cause trouble with some makes, so we remove $(srcdir),
17520# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17521# trailing colons and then remove the whole line if VPATH becomes empty
17522# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017523if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017524 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17525s/:*\$(srcdir):*/:/;
17526s/:*\${srcdir}:*/:/;
17527s/:*@srcdir@:*/:/;
17528s/^\([^=]*=[ ]*\):*/\1/;
17529s/:*$//;
17530s/^[^=]*=[ ]*$//;
17531}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017532fi
17533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017534DEFS=-DHAVE_CONFIG_H
17535
Martin v. Löwis11437992002-04-12 09:54:03 +000017536
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017537: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017538ac_clean_files_save=$ac_clean_files
17539ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17540{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17541echo "$as_me: creating $CONFIG_STATUS" >&6;}
17542cat >$CONFIG_STATUS <<_ACEOF
17543#! $SHELL
17544# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017545# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017546# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017547# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017548
Martin v. Löwis11437992002-04-12 09:54:03 +000017549debug=false
17550SHELL=\${CONFIG_SHELL-$SHELL}
17551_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017552
Martin v. Löwis11437992002-04-12 09:54:03 +000017553cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555## --------------------- ##
17556## M4sh Initialization. ##
17557## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017558
Martin v. Löwis11437992002-04-12 09:54:03 +000017559# Be Bourne compatible
17560if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17561 emulate sh
17562 NULLCMD=:
17563elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17564 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017565fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017566
Barry Warsawfe33b792003-01-07 22:42:49 +000017567# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017568# Support unset when possible.
17569if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17570 as_unset=unset
17571else
17572 as_unset=false
17573fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017574
Barry Warsawfe33b792003-01-07 22:42:49 +000017575(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17576 { $as_unset LANG || test "${LANG+set}" != set; } ||
17577 { LANG=C; export LANG; }
17578(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17579 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17580 { LC_ALL=C; export LC_ALL; }
17581(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17582 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17583 { LC_TIME=C; export LC_TIME; }
17584(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17585 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17586 { LC_CTYPE=C; export LC_CTYPE; }
17587(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17588 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17589 { LANGUAGE=C; export LANGUAGE; }
17590(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17591 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17592 { LC_COLLATE=C; export LC_COLLATE; }
17593(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17594 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17595 { LC_NUMERIC=C; export LC_NUMERIC; }
17596(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17597 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17598 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017599
17600
17601# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017602as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017603$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17604 X"$0" : 'X\(//\)$' \| \
17605 X"$0" : 'X\(/\)$' \| \
17606 . : '\(.\)' 2>/dev/null ||
17607echo X/"$0" |
17608 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17609 /^X\/\(\/\/\)$/{ s//\1/; q; }
17610 /^X\/\(\/\).*/{ s//\1/; q; }
17611 s/.*/./; q'`
17612
17613# PATH needs CR, and LINENO needs CR and PATH.
17614# Avoid depending upon Character Ranges.
17615as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17616as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17617as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17618as_cr_digits='0123456789'
17619as_cr_alnum=$as_cr_Letters$as_cr_digits
17620
17621# The user is always right.
17622if test "${PATH_SEPARATOR+set}" != set; then
17623 echo "#! /bin/sh" >conftest.sh
17624 echo "exit 0" >>conftest.sh
17625 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017626 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 PATH_SEPARATOR=';'
17628 else
17629 PATH_SEPARATOR=:
17630 fi
17631 rm -f conftest.sh
17632fi
17633
17634
17635 as_lineno_1=$LINENO
17636 as_lineno_2=$LINENO
17637 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17638 test "x$as_lineno_1" != "x$as_lineno_2" &&
17639 test "x$as_lineno_3" = "x$as_lineno_2" || {
17640 # Find who we are. Look in the path if we contain no path at all
17641 # relative or not.
17642 case $0 in
17643 *[\\/]* ) as_myself=$0 ;;
17644 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17645for as_dir in $PATH
17646do
17647 IFS=$as_save_IFS
17648 test -z "$as_dir" && as_dir=.
17649 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17650done
17651
17652 ;;
17653 esac
17654 # We did not find ourselves, most probably we were run as `sh COMMAND'
17655 # in which case we are not to be found in the path.
17656 if test "x$as_myself" = x; then
17657 as_myself=$0
17658 fi
17659 if test ! -f "$as_myself"; then
17660 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17661echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17662 { (exit 1); exit 1; }; }
17663 fi
17664 case $CONFIG_SHELL in
17665 '')
17666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17667for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17668do
17669 IFS=$as_save_IFS
17670 test -z "$as_dir" && as_dir=.
17671 for as_base in sh bash ksh sh5; do
17672 case $as_dir in
17673 /*)
17674 if ("$as_dir/$as_base" -c '
17675 as_lineno_1=$LINENO
17676 as_lineno_2=$LINENO
17677 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17678 test "x$as_lineno_1" != "x$as_lineno_2" &&
17679 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17680 CONFIG_SHELL=$as_dir/$as_base
17681 export CONFIG_SHELL
17682 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17683 fi;;
17684 esac
17685 done
17686done
17687;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017688 esac
17689
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17691 # uniformly replaced by the line number. The first 'sed' inserts a
17692 # line-number line before each line; the second 'sed' does the real
17693 # work. The second script uses 'N' to pair each line-number line
17694 # with the numbered line, and appends trailing '-' during
17695 # substitution so that $LINENO is not a special case at line end.
17696 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17697 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17698 sed '=' <$as_myself |
17699 sed '
17700 N
17701 s,$,-,
17702 : loop
17703 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17704 t loop
17705 s,-$,,
17706 s,^['$as_cr_digits']*\n,,
17707 ' >$as_me.lineno &&
17708 chmod +x $as_me.lineno ||
17709 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17710echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17711 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017712
Martin v. Löwis11437992002-04-12 09:54:03 +000017713 # Don't try to exec as it changes $[0], causing all sort of problems
17714 # (the dirname of $[0] is not the place where we might find the
17715 # original and so on. Autoconf is especially sensible to this).
17716 . ./$as_me.lineno
17717 # Exit status is that of the last command.
17718 exit
17719}
17720
17721
17722case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17723 *c*,-n*) ECHO_N= ECHO_C='
17724' ECHO_T=' ' ;;
17725 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17726 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17727esac
17728
17729if expr a : '\(a\)' >/dev/null 2>&1; then
17730 as_expr=expr
17731else
17732 as_expr=false
17733fi
17734
17735rm -f conf$$ conf$$.exe conf$$.file
17736echo >conf$$.file
17737if ln -s conf$$.file conf$$ 2>/dev/null; then
17738 # We could just check for DJGPP; but this test a) works b) is more generic
17739 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17740 if test -f conf$$.exe; then
17741 # Don't use ln at all; we don't have any links
17742 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017743 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017744 as_ln_s='ln -s'
17745 fi
17746elif ln conf$$.file conf$$ 2>/dev/null; then
17747 as_ln_s=ln
17748else
17749 as_ln_s='cp -p'
17750fi
17751rm -f conf$$ conf$$.exe conf$$.file
17752
17753as_executable_p="test -f"
17754
17755# Sed expression to map a string onto a valid CPP name.
17756as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17757
17758# Sed expression to map a string onto a valid variable name.
17759as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17760
17761
17762# IFS
17763# We need space, tab and new line, in precisely that order.
17764as_nl='
17765'
17766IFS=" $as_nl"
17767
17768# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017769$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
17771exec 6>&1
17772
17773# Open the log real soon, to keep \$[0] and so on meaningful, and to
17774# report actual input values of CONFIG_FILES etc. instead of their
17775# values after options handling. Logging --version etc. is OK.
17776exec 5>>config.log
17777{
17778 echo
17779 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17780## Running $as_me. ##
17781_ASBOX
17782} >&5
17783cat >&5 <<_CSEOF
17784
Martin v. Löwis88afe662002-10-26 13:47:44 +000017785This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017786generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017787
17788 CONFIG_FILES = $CONFIG_FILES
17789 CONFIG_HEADERS = $CONFIG_HEADERS
17790 CONFIG_LINKS = $CONFIG_LINKS
17791 CONFIG_COMMANDS = $CONFIG_COMMANDS
17792 $ $0 $@
17793
17794_CSEOF
17795echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17796echo >&5
17797_ACEOF
17798
17799# Files that config.status was made for.
17800if test -n "$ac_config_files"; then
17801 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17802fi
17803
17804if test -n "$ac_config_headers"; then
17805 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17806fi
17807
17808if test -n "$ac_config_links"; then
17809 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17810fi
17811
17812if test -n "$ac_config_commands"; then
17813 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17814fi
17815
17816cat >>$CONFIG_STATUS <<\_ACEOF
17817
17818ac_cs_usage="\
17819\`$as_me' instantiates files from templates according to the
17820current configuration.
17821
17822Usage: $0 [OPTIONS] [FILE]...
17823
17824 -h, --help print this help, then exit
17825 -V, --version print version number, then exit
17826 -d, --debug don't remove temporary files
17827 --recheck update $as_me by reconfiguring in the same conditions
17828 --file=FILE[:TEMPLATE]
17829 instantiate the configuration file FILE
17830 --header=FILE[:TEMPLATE]
17831 instantiate the configuration header FILE
17832
17833Configuration files:
17834$config_files
17835
17836Configuration headers:
17837$config_headers
17838
17839Report bugs to <bug-autoconf@gnu.org>."
17840_ACEOF
17841
17842cat >>$CONFIG_STATUS <<_ACEOF
17843ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017844python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017845configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017846 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17847
17848Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17849Free Software Foundation, Inc.
17850This config.status script is free software; the Free Software Foundation
17851gives unlimited permission to copy, distribute and modify it."
17852srcdir=$srcdir
17853INSTALL="$INSTALL"
17854_ACEOF
17855
17856cat >>$CONFIG_STATUS <<\_ACEOF
17857# If no file are specified by the user, then we need to provide default
17858# value. By we need to know if files were specified by the user.
17859ac_need_defaults=:
17860while test $# != 0
17861do
17862 case $1 in
17863 --*=*)
17864 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17865 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017866 shift
17867 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17868 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017870 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017871 *) # This is not an option, so the user has probably given explicit
17872 # arguments.
17873 ac_need_defaults=false;;
17874 esac
17875
Barry Warsawfe33b792003-01-07 22:42:49 +000017876 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017877 # Handling of the options.
17878_ACEOF
17879cat >>$CONFIG_STATUS <<_ACEOF
17880 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17881 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17882 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17883_ACEOF
17884cat >>$CONFIG_STATUS <<\_ACEOF
17885 --version | --vers* | -V )
17886 echo "$ac_cs_version"; exit 0 ;;
17887 --he | --h)
17888 # Conflict between --help and --header
17889 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17890Try \`$0 --help' for more information." >&5
17891echo "$as_me: error: ambiguous option: $1
17892Try \`$0 --help' for more information." >&2;}
17893 { (exit 1); exit 1; }; };;
17894 --help | --hel | -h )
17895 echo "$ac_cs_usage"; exit 0 ;;
17896 --debug | --d* | -d )
17897 debug=: ;;
17898 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017899 shift
17900 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 ac_need_defaults=false;;
17902 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017903 shift
17904 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 ac_need_defaults=false;;
17906
17907 # This is an error.
17908 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17909Try \`$0 --help' for more information." >&5
17910echo "$as_me: error: unrecognized option: $1
17911Try \`$0 --help' for more information." >&2;}
17912 { (exit 1); exit 1; }; } ;;
17913
17914 *) ac_config_targets="$ac_config_targets $1" ;;
17915
17916 esac
17917 shift
17918done
17919
17920_ACEOF
17921
17922
17923
17924
17925
17926cat >>$CONFIG_STATUS <<\_ACEOF
17927for ac_config_target in $ac_config_targets
17928do
17929 case "$ac_config_target" in
17930 # Handling of arguments.
17931 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17932 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17933 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17934 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17935echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17936 { (exit 1); exit 1; }; };;
17937 esac
17938done
17939
17940# If the user did not use the arguments to specify the items to instantiate,
17941# then the envvar interface is used. Set only those that are not.
17942# We use the long form for the default assignment because of an extremely
17943# bizarre bug on SunOS 4.1.3.
17944if $ac_need_defaults; then
17945 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17946 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17947fi
17948
17949# Create a temporary directory, and hook for its removal unless debugging.
17950$debug ||
17951{
17952 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17953 trap '{ (exit 1); exit 1; }' 1 2 13 15
17954}
17955
17956# Create a (secure) tmp directory for tmp files.
17957: ${TMPDIR=/tmp}
17958{
17959 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17960 test -n "$tmp" && test -d "$tmp"
17961} ||
17962{
17963 tmp=$TMPDIR/cs$$-$RANDOM
17964 (umask 077 && mkdir $tmp)
17965} ||
17966{
17967 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17968 { (exit 1); exit 1; }
17969}
17970
17971_ACEOF
17972
17973cat >>$CONFIG_STATUS <<_ACEOF
17974
17975#
17976# CONFIG_FILES section.
17977#
17978
17979# No need to generate the scripts if there are no CONFIG_FILES.
17980# This happens for instance when ./config.status config.h
17981if test -n "\$CONFIG_FILES"; then
17982 # Protect against being on the right side of a sed subst in config.status.
17983 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17984 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17985s,@SHELL@,$SHELL,;t t
17986s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17987s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17988s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17989s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17990s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17991s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17992s,@exec_prefix@,$exec_prefix,;t t
17993s,@prefix@,$prefix,;t t
17994s,@program_transform_name@,$program_transform_name,;t t
17995s,@bindir@,$bindir,;t t
17996s,@sbindir@,$sbindir,;t t
17997s,@libexecdir@,$libexecdir,;t t
17998s,@datadir@,$datadir,;t t
17999s,@sysconfdir@,$sysconfdir,;t t
18000s,@sharedstatedir@,$sharedstatedir,;t t
18001s,@localstatedir@,$localstatedir,;t t
18002s,@libdir@,$libdir,;t t
18003s,@includedir@,$includedir,;t t
18004s,@oldincludedir@,$oldincludedir,;t t
18005s,@infodir@,$infodir,;t t
18006s,@mandir@,$mandir,;t t
18007s,@build_alias@,$build_alias,;t t
18008s,@host_alias@,$host_alias,;t t
18009s,@target_alias@,$target_alias,;t t
18010s,@DEFS@,$DEFS,;t t
18011s,@ECHO_C@,$ECHO_C,;t t
18012s,@ECHO_N@,$ECHO_N,;t t
18013s,@ECHO_T@,$ECHO_T,;t t
18014s,@LIBS@,$LIBS,;t t
18015s,@VERSION@,$VERSION,;t t
18016s,@SOVERSION@,$SOVERSION,;t t
18017s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18018s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18019s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18020s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18021s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18022s,@MACHDEP@,$MACHDEP,;t t
18023s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018024s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018025s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018026s,@CXX@,$CXX,;t t
18027s,@MAINOBJ@,$MAINOBJ,;t t
18028s,@EXEEXT@,$EXEEXT,;t t
18029s,@CC@,$CC,;t t
18030s,@CFLAGS@,$CFLAGS,;t t
18031s,@LDFLAGS@,$LDFLAGS,;t t
18032s,@CPPFLAGS@,$CPPFLAGS,;t t
18033s,@ac_ct_CC@,$ac_ct_CC,;t t
18034s,@OBJEXT@,$OBJEXT,;t t
18035s,@CPP@,$CPP,;t t
18036s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18037s,@LIBRARY@,$LIBRARY,;t t
18038s,@LDLIBRARY@,$LDLIBRARY,;t t
18039s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18040s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18041s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18042s,@INSTSONAME@,$INSTSONAME,;t t
18043s,@RUNSHARED@,$RUNSHARED,;t t
18044s,@LINKCC@,$LINKCC,;t t
18045s,@RANLIB@,$RANLIB,;t t
18046s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18047s,@AR@,$AR,;t t
18048s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18049s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18050s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18051s,@LN@,$LN,;t t
18052s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018053s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018054s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18055s,@SO@,$SO,;t t
18056s,@LDSHARED@,$LDSHARED,;t t
18057s,@BLDSHARED@,$BLDSHARED,;t t
18058s,@CCSHARED@,$CCSHARED,;t t
18059s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18060s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018061s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018062s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18063s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18064s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18065s,@LDLAST@,$LDLAST,;t t
18066s,@THREADOBJ@,$THREADOBJ,;t t
18067s,@DLINCLDIR@,$DLINCLDIR,;t t
18068s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18069s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18070s,@LIBOBJS@,$LIBOBJS,;t t
18071s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18072s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18073s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18074s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18075s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18076s,@LIBM@,$LIBM,;t t
18077s,@LIBC@,$LIBC,;t t
18078s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18079s,@THREADHEADERS@,$THREADHEADERS,;t t
18080s,@SRCDIRS@,$SRCDIRS,;t t
18081CEOF
18082
18083_ACEOF
18084
18085 cat >>$CONFIG_STATUS <<\_ACEOF
18086 # Split the substitutions into bite-sized pieces for seds with
18087 # small command number limits, like on Digital OSF/1 and HP-UX.
18088 ac_max_sed_lines=48
18089 ac_sed_frag=1 # Number of current file.
18090 ac_beg=1 # First line for current file.
18091 ac_end=$ac_max_sed_lines # Line after last line for current file.
18092 ac_more_lines=:
18093 ac_sed_cmds=
18094 while $ac_more_lines; do
18095 if test $ac_beg -gt 1; then
18096 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18097 else
18098 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18099 fi
18100 if test ! -s $tmp/subs.frag; then
18101 ac_more_lines=false
18102 else
18103 # The purpose of the label and of the branching condition is to
18104 # speed up the sed processing (if there are no `@' at all, there
18105 # is no need to browse any of the substitutions).
18106 # These are the two extra sed commands mentioned above.
18107 (echo ':t
18108 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18109 if test -z "$ac_sed_cmds"; then
18110 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18111 else
18112 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18113 fi
18114 ac_sed_frag=`expr $ac_sed_frag + 1`
18115 ac_beg=$ac_end
18116 ac_end=`expr $ac_end + $ac_max_sed_lines`
18117 fi
18118 done
18119 if test -z "$ac_sed_cmds"; then
18120 ac_sed_cmds=cat
18121 fi
18122fi # test -n "$CONFIG_FILES"
18123
18124_ACEOF
18125cat >>$CONFIG_STATUS <<\_ACEOF
18126for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18127 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18128 case $ac_file in
18129 - | *:- | *:-:* ) # input from stdin
18130 cat >$tmp/stdin
18131 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18132 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18133 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18134 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18135 * ) ac_file_in=$ac_file.in ;;
18136 esac
18137
18138 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18139 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18140$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18141 X"$ac_file" : 'X\(//\)[^/]' \| \
18142 X"$ac_file" : 'X\(//\)$' \| \
18143 X"$ac_file" : 'X\(/\)' \| \
18144 . : '\(.\)' 2>/dev/null ||
18145echo X"$ac_file" |
18146 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18147 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18148 /^X\(\/\/\)$/{ s//\1/; q; }
18149 /^X\(\/\).*/{ s//\1/; q; }
18150 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018151 { case "$ac_dir" in
18152 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18153 *) as_incr_dir=.;;
18154esac
18155as_dummy="$ac_dir"
18156for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18157 case $as_mkdir_dir in
18158 # Skip DOS drivespec
18159 ?:) as_incr_dir=$as_mkdir_dir ;;
18160 *)
18161 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18162 test -d "$as_incr_dir" ||
18163 mkdir "$as_incr_dir" ||
18164 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18165echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18166 { (exit 1); exit 1; }; }
18167 ;;
18168 esac
18169done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018170
18171 ac_builddir=.
18172
18173if test "$ac_dir" != .; then
18174 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18175 # A "../" for each directory in $ac_dir_suffix.
18176 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18177else
18178 ac_dir_suffix= ac_top_builddir=
18179fi
18180
18181case $srcdir in
18182 .) # No --srcdir option. We are building in place.
18183 ac_srcdir=.
18184 if test -z "$ac_top_builddir"; then
18185 ac_top_srcdir=.
18186 else
18187 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18188 fi ;;
18189 [\\/]* | ?:[\\/]* ) # Absolute path.
18190 ac_srcdir=$srcdir$ac_dir_suffix;
18191 ac_top_srcdir=$srcdir ;;
18192 *) # Relative path.
18193 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18194 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18195esac
18196# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18197# absolute.
18198ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwise9416172003-05-03 10:12:45 +000018199ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018200ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18201ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18202
18203
18204 case $INSTALL in
18205 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18206 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18207 esac
18208
18209 if test x"$ac_file" != x-; then
18210 { echo "$as_me:$LINENO: creating $ac_file" >&5
18211echo "$as_me: creating $ac_file" >&6;}
18212 rm -f "$ac_file"
18213 fi
18214 # Let's still pretend it is `configure' which instantiates (i.e., don't
18215 # use $as_me), people would be surprised to read:
18216 # /* config.h. Generated by config.status. */
18217 if test x"$ac_file" = x-; then
18218 configure_input=
18219 else
18220 configure_input="$ac_file. "
18221 fi
18222 configure_input=$configure_input"Generated from `echo $ac_file_in |
18223 sed 's,.*/,,'` by configure."
18224
18225 # First look for the input files in the build tree, otherwise in the
18226 # src tree.
18227 ac_file_inputs=`IFS=:
18228 for f in $ac_file_in; do
18229 case $f in
18230 -) echo $tmp/stdin ;;
18231 [\\/$]*)
18232 # Absolute (can't be DOS-style, as IFS=:)
18233 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18234echo "$as_me: error: cannot find input file: $f" >&2;}
18235 { (exit 1); exit 1; }; }
18236 echo $f;;
18237 *) # Relative
18238 if test -f "$f"; then
18239 # Build tree
18240 echo $f
18241 elif test -f "$srcdir/$f"; then
18242 # Source tree
18243 echo $srcdir/$f
18244 else
18245 # /dev/null tree
18246 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18247echo "$as_me: error: cannot find input file: $f" >&2;}
18248 { (exit 1); exit 1; }; }
18249 fi;;
18250 esac
18251 done` || { (exit 1); exit 1; }
18252_ACEOF
18253cat >>$CONFIG_STATUS <<_ACEOF
18254 sed "$ac_vpsub
18255$extrasub
18256_ACEOF
18257cat >>$CONFIG_STATUS <<\_ACEOF
18258:t
18259/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18260s,@configure_input@,$configure_input,;t t
18261s,@srcdir@,$ac_srcdir,;t t
18262s,@abs_srcdir@,$ac_abs_srcdir,;t t
18263s,@top_srcdir@,$ac_top_srcdir,;t t
18264s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18265s,@builddir@,$ac_builddir,;t t
18266s,@abs_builddir@,$ac_abs_builddir,;t t
18267s,@top_builddir@,$ac_top_builddir,;t t
18268s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18269s,@INSTALL@,$ac_INSTALL,;t t
18270" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18271 rm -f $tmp/stdin
18272 if test x"$ac_file" != x-; then
18273 mv $tmp/out $ac_file
18274 else
18275 cat $tmp/out
18276 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018277 fi
18278
Martin v. Löwis11437992002-04-12 09:54:03 +000018279done
18280_ACEOF
18281cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018282
Martin v. Löwis11437992002-04-12 09:54:03 +000018283#
18284# CONFIG_HEADER section.
18285#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018286
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018287# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18288# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018289#
18290# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018291ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18292ac_dB='[ ].*$,\1#\2'
18293ac_dC=' '
18294ac_dD=',;t'
18295# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18296ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18297ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018298ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018299ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018300
Martin v. Löwis11437992002-04-12 09:54:03 +000018301for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018302 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 case $ac_file in
18304 - | *:- | *:-:* ) # input from stdin
18305 cat >$tmp/stdin
18306 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18307 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18308 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18309 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18310 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018311 esac
18312
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18314echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018315
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 # First look for the input files in the build tree, otherwise in the
18317 # src tree.
18318 ac_file_inputs=`IFS=:
18319 for f in $ac_file_in; do
18320 case $f in
18321 -) echo $tmp/stdin ;;
18322 [\\/$]*)
18323 # Absolute (can't be DOS-style, as IFS=:)
18324 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18325echo "$as_me: error: cannot find input file: $f" >&2;}
18326 { (exit 1); exit 1; }; }
18327 echo $f;;
18328 *) # Relative
18329 if test -f "$f"; then
18330 # Build tree
18331 echo $f
18332 elif test -f "$srcdir/$f"; then
18333 # Source tree
18334 echo $srcdir/$f
18335 else
18336 # /dev/null tree
18337 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18338echo "$as_me: error: cannot find input file: $f" >&2;}
18339 { (exit 1); exit 1; }; }
18340 fi;;
18341 esac
18342 done` || { (exit 1); exit 1; }
18343 # Remove the trailing spaces.
18344 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018345
Martin v. Löwis11437992002-04-12 09:54:03 +000018346_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018347
Martin v. Löwis11437992002-04-12 09:54:03 +000018348# Transform confdefs.h into two sed scripts, `conftest.defines' and
18349# `conftest.undefs', that substitutes the proper values into
18350# config.h.in to produce config.h. The first handles `#define'
18351# templates, and the second `#undef' templates.
18352# And first: Protect against being on the right side of a sed subst in
18353# config.status. Protect against being in an unquoted here document
18354# in config.status.
18355rm -f conftest.defines conftest.undefs
18356# Using a here document instead of a string reduces the quoting nightmare.
18357# Putting comments in sed scripts is not portable.
18358#
18359# `end' is used to avoid that the second main sed command (meant for
18360# 0-ary CPP macros) applies to n-ary macro definitions.
18361# See the Autoconf documentation for `clear'.
18362cat >confdef2sed.sed <<\_ACEOF
18363s/[\\&,]/\\&/g
18364s,[\\$`],\\&,g
18365t clear
18366: clear
18367s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18368t end
18369s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18370: end
18371_ACEOF
18372# If some macros were called several times there might be several times
18373# the same #defines, which is useless. Nevertheless, we may not want to
18374# sort them, since we want the *last* AC-DEFINE to be honored.
18375uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18376sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18377rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018378
18379# This sed command replaces #undef with comments. This is necessary, for
18380# example, in the case of _POSIX_SOURCE, which is predefined and required
18381# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018382cat >>conftest.undefs <<\_ACEOF
18383s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18384_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018385
Martin v. Löwis11437992002-04-12 09:54:03 +000018386# Break up conftest.defines because some shells have a limit on the size
18387# of here documents, and old seds have small limits too (100 cmds).
18388echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018389echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018390echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18391echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018392rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018393while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018394do
Martin v. Löwis11437992002-04-12 09:54:03 +000018395 # Write a limited-size here document to $tmp/defines.sed.
18396 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18397 # Speed up: don't consider the non `#define' lines.
18398 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18399 # Work around the forget-to-reset-the-flag bug.
18400 echo 't clr' >>$CONFIG_STATUS
18401 echo ': clr' >>$CONFIG_STATUS
18402 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018403 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018404 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18405 rm -f $tmp/in
18406 mv $tmp/out $tmp/in
18407' >>$CONFIG_STATUS
18408 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18409 rm -f conftest.defines
18410 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018411done
Martin v. Löwis11437992002-04-12 09:54:03 +000018412rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018413echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018414echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018415
Martin v. Löwis11437992002-04-12 09:54:03 +000018416# Break up conftest.undefs because some shells have a limit on the size
18417# of here documents, and old seds have small limits too (100 cmds).
18418echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18419rm -f conftest.tail
18420while grep . conftest.undefs >/dev/null
18421do
18422 # Write a limited-size here document to $tmp/undefs.sed.
18423 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18424 # Speed up: don't consider the non `#undef'
18425 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18426 # Work around the forget-to-reset-the-flag bug.
18427 echo 't clr' >>$CONFIG_STATUS
18428 echo ': clr' >>$CONFIG_STATUS
18429 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18430 echo 'CEOF
18431 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18432 rm -f $tmp/in
18433 mv $tmp/out $tmp/in
18434' >>$CONFIG_STATUS
18435 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18436 rm -f conftest.undefs
18437 mv conftest.tail conftest.undefs
18438done
18439rm -f conftest.undefs
18440
18441cat >>$CONFIG_STATUS <<\_ACEOF
18442 # Let's still pretend it is `configure' which instantiates (i.e., don't
18443 # use $as_me), people would be surprised to read:
18444 # /* config.h. Generated by config.status. */
18445 if test x"$ac_file" = x-; then
18446 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018447 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018448 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018449 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 cat $tmp/in >>$tmp/config.h
18451 rm -f $tmp/in
18452 if test x"$ac_file" != x-; then
18453 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18454 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18455echo "$as_me: $ac_file is unchanged" >&6;}
18456 else
18457 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18458$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18459 X"$ac_file" : 'X\(//\)[^/]' \| \
18460 X"$ac_file" : 'X\(//\)$' \| \
18461 X"$ac_file" : 'X\(/\)' \| \
18462 . : '\(.\)' 2>/dev/null ||
18463echo X"$ac_file" |
18464 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18465 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18466 /^X\(\/\/\)$/{ s//\1/; q; }
18467 /^X\(\/\).*/{ s//\1/; q; }
18468 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018469 { case "$ac_dir" in
18470 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18471 *) as_incr_dir=.;;
18472esac
18473as_dummy="$ac_dir"
18474for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18475 case $as_mkdir_dir in
18476 # Skip DOS drivespec
18477 ?:) as_incr_dir=$as_mkdir_dir ;;
18478 *)
18479 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18480 test -d "$as_incr_dir" ||
18481 mkdir "$as_incr_dir" ||
18482 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18483echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18484 { (exit 1); exit 1; }; }
18485 ;;
18486 esac
18487done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018488
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 rm -f $ac_file
18490 mv $tmp/config.h $ac_file
18491 fi
18492 else
18493 cat $tmp/config.h
18494 rm -f $tmp/config.h
18495 fi
18496done
18497_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018498
Martin v. Löwis11437992002-04-12 09:54:03 +000018499cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018500
Martin v. Löwis11437992002-04-12 09:54:03 +000018501{ (exit 0); exit 0; }
18502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018503chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018504ac_clean_files=$ac_clean_files_save
18505
18506
18507# configure is writing to config.log, and then calls config.status.
18508# config.status does its own redirection, appending to config.log.
18509# Unfortunately, on DOS this fails, as config.log is still kept open
18510# by configure, so config.status won't be able to write to it; its
18511# output is simply discarded. So we exec the FD to /dev/null,
18512# effectively closing config.log, so it can be properly (re)opened and
18513# appended to by config.status. When coming back to configure, we
18514# need to make the FD available again.
18515if test "$no_create" != yes; then
18516 ac_cs_success=:
18517 exec 5>/dev/null
18518 $SHELL $CONFIG_STATUS || ac_cs_success=false
18519 exec 5>>config.log
18520 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18521 # would make configure fail if this is the last instruction.
18522 $ac_cs_success || { (exit 1); exit 1; }
18523fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018524
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018525
18526echo "creating Setup"
18527if test ! -f Modules/Setup
18528then
18529 cp $srcdir/Modules/Setup.dist Modules/Setup
18530fi
18531
18532echo "creating Setup.local"
18533if test ! -f Modules/Setup.local
18534then
18535 echo "# Edit this file for local setup changes" >Modules/Setup.local
18536fi
18537
18538echo "creating Makefile"
18539$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18540 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018541 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018542mv config.c Modules