blob: c5b4a5ceaaa9220d7333cf0514fe193ca9f86a16 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitz82251032003-05-23 14:35:24 +00002# From configure.in Revision: 1.409 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsawfe33b792003-01-07 22:42:49 +00004# Generated by GNU Autoconf 2.53 for python 2.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis11437992002-04-12 09:54:03 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Barry Warsawfe33b792003-01-07 22:42:49 +000010
11if expr a : '\(a\)' >/dev/null 2>&1; then
12 as_expr=expr
13else
14 as_expr=false
15fi
16
17
Martin v. Löwis11437992002-04-12 09:54:03 +000018## --------------------- ##
19## M4sh Initialization. ##
20## --------------------- ##
21
22# Be Bourne compatible
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24 emulate sh
25 NULLCMD=:
26elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
27 set -o posix
28fi
29
Barry Warsawfe33b792003-01-07 22:42:49 +000030# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000031# Support unset when possible.
32if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
33 as_unset=unset
34else
35 as_unset=false
36fi
37
Barry Warsawfe33b792003-01-07 22:42:49 +000038(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
39 { $as_unset LANG || test "${LANG+set}" != set; } ||
40 { LANG=C; export LANG; }
41(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
42 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
43 { LC_ALL=C; export LC_ALL; }
44(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
45 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
46 { LC_TIME=C; export LC_TIME; }
47(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
48 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
49 { LC_CTYPE=C; export LC_CTYPE; }
50(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
51 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
52 { LANGUAGE=C; export LANGUAGE; }
53(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
54 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
55 { LC_COLLATE=C; export LC_COLLATE; }
56(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
57 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
58 { LC_NUMERIC=C; export LC_NUMERIC; }
59(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
60 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
61 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000062
63
64# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000065as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000066$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67 X"$0" : 'X\(//\)$' \| \
68 X"$0" : 'X\(/\)$' \| \
69 . : '\(.\)' 2>/dev/null ||
70echo X/"$0" |
71 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
72 /^X\/\(\/\/\)$/{ s//\1/; q; }
73 /^X\/\(\/\).*/{ s//\1/; q; }
74 s/.*/./; q'`
75
76# PATH needs CR, and LINENO needs CR and PATH.
77# Avoid depending upon Character Ranges.
78as_cr_letters='abcdefghijklmnopqrstuvwxyz'
79as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
80as_cr_Letters=$as_cr_letters$as_cr_LETTERS
81as_cr_digits='0123456789'
82as_cr_alnum=$as_cr_Letters$as_cr_digits
83
84# The user is always right.
85if test "${PATH_SEPARATOR+set}" != set; then
86 echo "#! /bin/sh" >conftest.sh
87 echo "exit 0" >>conftest.sh
88 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000089 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000090 PATH_SEPARATOR=';'
91 else
92 PATH_SEPARATOR=:
93 fi
94 rm -f conftest.sh
95fi
96
97
98 as_lineno_1=$LINENO
99 as_lineno_2=$LINENO
100 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
101 test "x$as_lineno_1" != "x$as_lineno_2" &&
102 test "x$as_lineno_3" = "x$as_lineno_2" || {
103 # Find who we are. Look in the path if we contain no path at all
104 # relative or not.
105 case $0 in
106 *[\\/]* ) as_myself=$0 ;;
107 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
108for as_dir in $PATH
109do
110 IFS=$as_save_IFS
111 test -z "$as_dir" && as_dir=.
112 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
113done
114
115 ;;
116 esac
117 # We did not find ourselves, most probably we were run as `sh COMMAND'
118 # in which case we are not to be found in the path.
119 if test "x$as_myself" = x; then
120 as_myself=$0
121 fi
122 if test ! -f "$as_myself"; then
123 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
124 { (exit 1); exit 1; }; }
125 fi
126 case $CONFIG_SHELL in
127 '')
128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
129for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
130do
131 IFS=$as_save_IFS
132 test -z "$as_dir" && as_dir=.
133 for as_base in sh bash ksh sh5; do
134 case $as_dir in
135 /*)
136 if ("$as_dir/$as_base" -c '
137 as_lineno_1=$LINENO
138 as_lineno_2=$LINENO
139 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
140 test "x$as_lineno_1" != "x$as_lineno_2" &&
141 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
142 CONFIG_SHELL=$as_dir/$as_base
143 export CONFIG_SHELL
144 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
145 fi;;
146 esac
147 done
148done
149;;
150 esac
151
152 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
153 # uniformly replaced by the line number. The first 'sed' inserts a
154 # line-number line before each line; the second 'sed' does the real
155 # work. The second script uses 'N' to pair each line-number line
156 # with the numbered line, and appends trailing '-' during
157 # substitution so that $LINENO is not a special case at line end.
158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
159 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
160 sed '=' <$as_myself |
161 sed '
162 N
163 s,$,-,
164 : loop
165 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
166 t loop
167 s,-$,,
168 s,^['$as_cr_digits']*\n,,
169 ' >$as_me.lineno &&
170 chmod +x $as_me.lineno ||
171 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
172 { (exit 1); exit 1; }; }
173
174 # Don't try to exec as it changes $[0], causing all sort of problems
175 # (the dirname of $[0] is not the place where we might find the
176 # original and so on. Autoconf is especially sensible to this).
177 . ./$as_me.lineno
178 # Exit status is that of the last command.
179 exit
180}
181
182
183case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
184 *c*,-n*) ECHO_N= ECHO_C='
185' ECHO_T=' ' ;;
186 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
187 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
188esac
189
190if expr a : '\(a\)' >/dev/null 2>&1; then
191 as_expr=expr
192else
193 as_expr=false
194fi
195
196rm -f conf$$ conf$$.exe conf$$.file
197echo >conf$$.file
198if ln -s conf$$.file conf$$ 2>/dev/null; then
199 # We could just check for DJGPP; but this test a) works b) is more generic
200 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
201 if test -f conf$$.exe; then
202 # Don't use ln at all; we don't have any links
203 as_ln_s='cp -p'
204 else
205 as_ln_s='ln -s'
206 fi
207elif ln conf$$.file conf$$ 2>/dev/null; then
208 as_ln_s=ln
209else
210 as_ln_s='cp -p'
211fi
212rm -f conf$$ conf$$.exe conf$$.file
213
214as_executable_p="test -f"
215
216# Sed expression to map a string onto a valid CPP name.
217as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
218
219# Sed expression to map a string onto a valid variable name.
220as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
221
222
223# IFS
224# We need space, tab and new line, in precisely that order.
225as_nl='
226'
227IFS=" $as_nl"
228
229# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +0000230$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000231
232
233# Name of the host.
234# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
235# so uname gets run too.
236ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
237
238exec 6>&1
239
240#
241# Initializations.
242#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000243ac_default_prefix=/usr/local
Martin v. Löwis11437992002-04-12 09:54:03 +0000244cross_compiling=no
245subdirs=
246MFLAGS=
247MAKEFLAGS=
248SHELL=${CONFIG_SHELL-/bin/sh}
249
250# Maximum number of lines to put in a shell here document.
251# This variable seems obsolete. It should probably be removed, and
252# only ac_max_sed_lines should be used.
253: ${ac_max_here_lines=38}
254
255# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000256PACKAGE_NAME='python'
257PACKAGE_TARNAME='python'
258PACKAGE_VERSION='2.3'
259PACKAGE_STRING='python 2.3'
260PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000261
262ac_unique_file="Include/object.h"
263# Factoring default headers for most tests.
264ac_includes_default="\
265#include <stdio.h>
266#if HAVE_SYS_TYPES_H
267# include <sys/types.h>
268#endif
269#if HAVE_SYS_STAT_H
270# include <sys/stat.h>
271#endif
272#if STDC_HEADERS
273# include <stdlib.h>
274# include <stddef.h>
275#else
276# if HAVE_STDLIB_H
277# include <stdlib.h>
278# endif
279#endif
280#if HAVE_STRING_H
281# if !STDC_HEADERS && HAVE_MEMORY_H
282# include <memory.h>
283# endif
284# include <string.h>
285#endif
286#if HAVE_STRINGS_H
287# include <strings.h>
288#endif
289#if HAVE_INTTYPES_H
290# include <inttypes.h>
291#else
292# if HAVE_STDINT_H
293# include <stdint.h>
294# endif
295#endif
296#if HAVE_UNISTD_H
297# include <unistd.h>
298#endif"
299
Guido van Rossum627b2d71993-12-24 10:39:16 +0000300
Guido van Rossum7f43da71994-08-01 12:15:30 +0000301# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000302ac_init_help=
303ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304# The variables have the same names as the options, with
305# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000306cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000307exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000308no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000309no_recursion=
310prefix=NONE
311program_prefix=NONE
312program_suffix=NONE
313program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000314silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000315site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318x_includes=NONE
319x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000320
321# Installation directory options.
322# These are left unexpanded so users can "make install exec_prefix=/foo"
323# and all the variables that are supposed to be based on exec_prefix
324# by default will actually change.
325# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000326bindir='${exec_prefix}/bin'
327sbindir='${exec_prefix}/sbin'
328libexecdir='${exec_prefix}/libexec'
329datadir='${prefix}/share'
330sysconfdir='${prefix}/etc'
331sharedstatedir='${prefix}/com'
332localstatedir='${prefix}/var'
333libdir='${exec_prefix}/lib'
334includedir='${prefix}/include'
335oldincludedir='/usr/include'
336infodir='${prefix}/info'
337mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000338
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339ac_prev=
340for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000341do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000342 # If the previous option needs an argument, assign it.
343 if test -n "$ac_prev"; then
344 eval "$ac_prev=\$ac_option"
345 ac_prev=
346 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000347 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000348
Martin v. Löwis11437992002-04-12 09:54:03 +0000349 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000351 # Accept the important Cygnus configure options, so we can diagnose typos.
352
Martin v. Löwis11437992002-04-12 09:54:03 +0000353 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000355 -bindir | --bindir | --bindi | --bind | --bin | --bi)
356 ac_prev=bindir ;;
357 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000358 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000359
360 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000361 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 -cache-file | --cache-file | --cache-fil | --cache-fi \
366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
367 ac_prev=cache_file ;;
368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 cache_file=$ac_optarg ;;
371
372 --config-cache | -C)
373 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
376 ac_prev=datadir ;;
377 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
378 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000379 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000380
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000382 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
385 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
386 { (exit 1); exit 1; }; }
387 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
388 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389
390 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000391 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
394 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
395 { (exit 1); exit 1; }; }
396 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
397 case $ac_option in
398 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 *) ac_optarg=yes ;;
400 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
404 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
405 | --exec | --exe | --ex)
406 ac_prev=exec_prefix ;;
407 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
408 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
409 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000413 # Obsolete; use --with-gas.
414 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000415
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 -help | --help | --hel | --he | -h)
417 ac_init_help=long ;;
418 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
419 ac_init_help=recursive ;;
420 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
421 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000426 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 -includedir | --includedir | --includedi | --included | --include \
429 | --includ | --inclu | --incl | --inc)
430 ac_prev=includedir ;;
431 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
432 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000434
435 -infodir | --infodir | --infodi | --infod | --info | --inf)
436 ac_prev=infodir ;;
437 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439
440 -libdir | --libdir | --libdi | --libd)
441 ac_prev=libdir ;;
442 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000444
445 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
446 | --libexe | --libex | --libe)
447 ac_prev=libexecdir ;;
448 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
449 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -localstatedir | --localstatedir | --localstatedi | --localstated \
453 | --localstate | --localstat | --localsta | --localst \
454 | --locals | --local | --loca | --loc | --lo)
455 ac_prev=localstatedir ;;
456 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
457 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
458 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000460
461 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
462 ac_prev=mandir ;;
463 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 # Obsolete; use --without-fp.
468 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000469
470 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000471 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 no_create=yes ;;
473
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
475 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
476 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000478 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
479 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
480 | --oldin | --oldi | --old | --ol | --o)
481 ac_prev=oldincludedir ;;
482 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
483 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
484 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
488 ac_prev=prefix ;;
489 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000490 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
492 -program-prefix | --program-prefix | --program-prefi | --program-pref \
493 | --program-pre | --program-pr | --program-p)
494 ac_prev=program_prefix ;;
495 -program-prefix=* | --program-prefix=* | --program-prefi=* \
496 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000497 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498
499 -program-suffix | --program-suffix | --program-suffi | --program-suff \
500 | --program-suf | --program-su | --program-s)
501 ac_prev=program_suffix ;;
502 -program-suffix=* | --program-suffix=* | --program-suffi=* \
503 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-transform-name | --program-transform-name \
507 | --program-transform-nam | --program-transform-na \
508 | --program-transform-n | --program-transform- \
509 | --program-transform | --program-transfor \
510 | --program-transfo | --program-transf \
511 | --program-trans | --program-tran \
512 | --progr-tra | --program-tr | --program-t)
513 ac_prev=program_transform_name ;;
514 -program-transform-name=* | --program-transform-name=* \
515 | --program-transform-nam=* | --program-transform-na=* \
516 | --program-transform-n=* | --program-transform-=* \
517 | --program-transform=* | --program-transfor=* \
518 | --program-transfo=* | --program-transf=* \
519 | --program-trans=* | --program-tran=* \
520 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
524 | -silent | --silent | --silen | --sile | --sil)
525 silent=yes ;;
526
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000527 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
528 ac_prev=sbindir ;;
529 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
530 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000532
533 -sharedstatedir | --sharedstatedir | --sharedstatedi \
534 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
535 | --sharedst | --shareds | --shared | --share | --shar \
536 | --sha | --sh)
537 ac_prev=sharedstatedir ;;
538 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
539 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
540 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
541 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544 -site | --site | --sit)
545 ac_prev=site ;;
546 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000547 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
550 ac_prev=srcdir ;;
551 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000552 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
555 | --syscon | --sysco | --sysc | --sys | --sy)
556 ac_prev=sysconfdir ;;
557 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
558 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565
566 -v | -verbose | --verbose | --verbos | --verbo | --verb)
567 verbose=yes ;;
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 -version | --version | --versio | --versi | --vers | -V)
570 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000571
572 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000574 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
576 { echo "$as_me: error: invalid package name: $ac_package" >&2
577 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 case $ac_option in
580 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581 *) ac_optarg=yes ;;
582 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000584
585 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
589 { echo "$as_me: error: invalid package name: $ac_package" >&2
590 { (exit 1); exit 1; }; }
591 ac_package=`echo $ac_package | sed 's/-/_/g'`
592 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000594 --x)
595 # Obsolete; use --with-x.
596 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597
598 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
599 | --x-incl | --x-inc | --x-in | --x-i)
600 ac_prev=x_includes ;;
601 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
602 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
605 -x-libraries | --x-libraries | --x-librarie | --x-librari \
606 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
607 ac_prev=x_libraries ;;
608 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
609 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000610 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
Martin v. Löwis11437992002-04-12 09:54:03 +0000612 -*) { echo "$as_me: error: unrecognized option: $ac_option
613Try \`$0 --help' for more information." >&2
614 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615 ;;
616
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 *=*)
618 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
619 # Reject names that are not valid shell variable names.
620 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
621 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
622 { (exit 1); exit 1; }; }
623 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
624 eval "$ac_envvar='$ac_optarg'"
625 export $ac_envvar ;;
626
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000627 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 # FIXME: should be removed in autoconf 3.0.
629 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
630 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
631 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
632 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633 ;;
634
635 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000636done
637
Guido van Rossum7f43da71994-08-01 12:15:30 +0000638if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
640 { echo "$as_me: error: missing argument to $ac_option" >&2
641 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000642fi
643
Martin v. Löwis11437992002-04-12 09:54:03 +0000644# Be sure to have absolute paths.
645for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000646do
Martin v. Löwis11437992002-04-12 09:54:03 +0000647 eval ac_val=$`echo $ac_var`
648 case $ac_val in
649 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
650 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
651 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652 esac
653done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
657 localstatedir libdir includedir oldincludedir infodir mandir
658do
659 eval ac_val=$`echo $ac_var`
660 case $ac_val in
661 [\\/$]* | ?:[\\/]* ) ;;
662 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
663 { (exit 1); exit 1; }; };;
664 esac
665done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666
Martin v. Löwis11437992002-04-12 09:54:03 +0000667# There might be people who depend on the old broken behavior: `$host'
668# used to hold the argument of --host etc.
669# FIXME: To remove some day.
670build=$build_alias
671host=$host_alias
672target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673
Martin v. Löwis11437992002-04-12 09:54:03 +0000674# FIXME: To remove some day.
675if test "x$host_alias" != x; then
676 if test "x$build_alias" = x; then
677 cross_compiling=maybe
678 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
679 If a cross compiler is detected then cross compile mode will be used." >&2
680 elif test "x$build_alias" != "x$host_alias"; then
681 cross_compiling=yes
682 fi
683fi
684
685ac_tool_prefix=
686test -n "$host_alias" && ac_tool_prefix=$host_alias-
687
688test "$silent" = yes && exec 6>/dev/null
689
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
691# Find the source files, if location was not specified.
692if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000693 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000694 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000695 ac_confdir=`(dirname "$0") 2>/dev/null ||
696$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
697 X"$0" : 'X\(//\)[^/]' \| \
698 X"$0" : 'X\(//\)$' \| \
699 X"$0" : 'X\(/\)' \| \
700 . : '\(.\)' 2>/dev/null ||
701echo X"$0" |
702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
703 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
704 /^X\(\/\/\)$/{ s//\1/; q; }
705 /^X\(\/\).*/{ s//\1/; q; }
706 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 srcdir=$ac_confdir
708 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000709 srcdir=..
710 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711else
712 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000715 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000716 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
717 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000719 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
720 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000721 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000722fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000723srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
724ac_env_build_alias_set=${build_alias+set}
725ac_env_build_alias_value=$build_alias
726ac_cv_env_build_alias_set=${build_alias+set}
727ac_cv_env_build_alias_value=$build_alias
728ac_env_host_alias_set=${host_alias+set}
729ac_env_host_alias_value=$host_alias
730ac_cv_env_host_alias_set=${host_alias+set}
731ac_cv_env_host_alias_value=$host_alias
732ac_env_target_alias_set=${target_alias+set}
733ac_env_target_alias_value=$target_alias
734ac_cv_env_target_alias_set=${target_alias+set}
735ac_cv_env_target_alias_value=$target_alias
736ac_env_CC_set=${CC+set}
737ac_env_CC_value=$CC
738ac_cv_env_CC_set=${CC+set}
739ac_cv_env_CC_value=$CC
740ac_env_CFLAGS_set=${CFLAGS+set}
741ac_env_CFLAGS_value=$CFLAGS
742ac_cv_env_CFLAGS_set=${CFLAGS+set}
743ac_cv_env_CFLAGS_value=$CFLAGS
744ac_env_LDFLAGS_set=${LDFLAGS+set}
745ac_env_LDFLAGS_value=$LDFLAGS
746ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
747ac_cv_env_LDFLAGS_value=$LDFLAGS
748ac_env_CPPFLAGS_set=${CPPFLAGS+set}
749ac_env_CPPFLAGS_value=$CPPFLAGS
750ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
751ac_cv_env_CPPFLAGS_value=$CPPFLAGS
752ac_env_CPP_set=${CPP+set}
753ac_env_CPP_value=$CPP
754ac_cv_env_CPP_set=${CPP+set}
755ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756
Martin v. Löwis11437992002-04-12 09:54:03 +0000757#
758# Report the --help message.
759#
760if test "$ac_init_help" = "long"; then
761 # Omit some internal or obsolete options to make the list less imposing.
762 # This message is too long to be a string in the A/UX 3.1 sh.
763 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000764\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000765
766Usage: $0 [OPTION]... [VAR=VALUE]...
767
768To assign environment variables (e.g., CC, CFLAGS...), specify them as
769VAR=VALUE. See below for descriptions of some of the useful variables.
770
771Defaults for the options are specified in brackets.
772
773Configuration:
774 -h, --help display this help and exit
775 --help=short display options specific to this package
776 --help=recursive display the short help of all the included packages
777 -V, --version display version information and exit
778 -q, --quiet, --silent do not print \`checking...' messages
779 --cache-file=FILE cache test results in FILE [disabled]
780 -C, --config-cache alias for \`--cache-file=config.cache'
781 -n, --no-create do not create output files
782 --srcdir=DIR find the sources in DIR [configure dir or \`..']
783
784_ACEOF
785
786 cat <<_ACEOF
787Installation directories:
788 --prefix=PREFIX install architecture-independent files in PREFIX
789 [$ac_default_prefix]
790 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
791 [PREFIX]
792
793By default, \`make install' will install all the files in
794\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
795an installation prefix other than \`$ac_default_prefix' using \`--prefix',
796for instance \`--prefix=\$HOME'.
797
798For better control, use the options below.
799
800Fine tuning of the installation directories:
801 --bindir=DIR user executables [EPREFIX/bin]
802 --sbindir=DIR system admin executables [EPREFIX/sbin]
803 --libexecdir=DIR program executables [EPREFIX/libexec]
804 --datadir=DIR read-only architecture-independent data [PREFIX/share]
805 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
806 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
807 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
808 --libdir=DIR object code libraries [EPREFIX/lib]
809 --includedir=DIR C header files [PREFIX/include]
810 --oldincludedir=DIR C header files for non-gcc [/usr/include]
811 --infodir=DIR info documentation [PREFIX/info]
812 --mandir=DIR man documentation [PREFIX/man]
813_ACEOF
814
815 cat <<\_ACEOF
816_ACEOF
817fi
818
819if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000820 case $ac_init_help in
821 short | recursive ) echo "Configuration of python 2.3:";;
822 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 cat <<\_ACEOF
824
825Optional Features:
826 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
827 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000828 --enable-framework[=INSTALLDIR]
829 Build (MacOSX|Darwin) framework
830 --enable-shared disable/enable building shared python library
831 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
832 --enable-ipv6 Enable ipv6 (with ipv4) support
833 --disable-ipv6 Disable ipv6 support
834 --enable-unicode[=ucs[24]]
835 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836
837Optional Packages:
838 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
839 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000840 --without-gcc never use gcc
841 --with-cxx=<compiler> enable C++ support
842 --with-suffix=.exe set executable suffix
843 --with-pydebug build with Py_DEBUG defined
844 --with-libs='lib1 ...' link against additional libs
845 --with-signal-module disable/enable signal module
846 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
847 --with(out)-threads[=DIRECTORY]
848 disable/enable thread support
849 --with(out)-thread[=DIRECTORY]
850 deprecated; use --with(out)-threads
851 --with-pth use GNU pth threading libraries
852 --with(out)-universal-newlines
853 disable/enable foreign newlines
854 --with(out)-doc-strings disable/enable documentation strings
855 --with(out)-pymalloc disable/enable specialized mallocs
856 --with-wctype-functions use wctype.h functions
857 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
858 --with-dl-dld=DL_DIR GNU dynamic linking
859 --with-fpectl enable SIGFPE catching
860 --with-libm=STRING math library
861 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000862
863Some influential environment variables:
864 CC C compiler command
865 CFLAGS C compiler flags
866 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
867 nonstandard directory <lib dir>
868 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
869 headers in a nonstandard directory <include dir>
870 CPP C preprocessor
871
872Use these variables to override the choices made by `configure' or to help
873it to find libraries and programs with nonstandard names/locations.
874
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879 # If there are subdirs, report their specific --help.
880 ac_popdir=`pwd`
881 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882 test -d $ac_dir || continue
883 ac_builddir=.
884
885if test "$ac_dir" != .; then
886 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887 # A "../" for each directory in $ac_dir_suffix.
888 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890 ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894 .) # No --srcdir option. We are building in place.
895 ac_srcdir=.
896 if test -z "$ac_top_builddir"; then
897 ac_top_srcdir=.
898 else
899 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900 fi ;;
901 [\\/]* | ?:[\\/]* ) # Absolute path.
902 ac_srcdir=$srcdir$ac_dir_suffix;
903 ac_top_srcdir=$srcdir ;;
904 *) # Relative path.
905 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906 ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Neal Norwitz82251032003-05-23 14:35:24 +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öwisc2409b42003-05-11 05:53:41 +00001357 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1358 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
1359 OpenUNIX/8.0.0| UnixWare/7.1.[0-3])
1360 define_xopen_source=no;;
1361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001364 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001365esac
1366
1367if test $define_xopen_source = yes
1368then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001369
1370cat >>confdefs.h <<\_ACEOF
1371#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001372_ACEOF
1373
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001374
1375 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1376 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1377 # several APIs are not declared. Since this is also needed in some
1378 # cases for HP-UX, we define it globally.
1379
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define _XOPEN_SOURCE_EXTENDED 1
1383_ACEOF
1384
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _POSIX_C_SOURCE 200112L
1388_ACEOF
1389
1390
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001391fi
1392
Guido van Rossum91922671997-10-09 20:24:13 +00001393#
1394# SGI compilers allow the specification of the both the ABI and the
1395# ISA on the command line. Depending on the values of these switches,
1396# different and often incompatable code will be generated.
1397#
1398# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1399# thus supply support for various ABI/ISA combinations. The MACHDEP
1400# variable is also adjusted.
1401#
1402
1403if test ! -z "$SGI_ABI"
1404then
1405 CC="cc $SGI_ABI"
1406 LDFLAGS="$SGI_ABI $LDFLAGS"
1407 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1408fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001409echo "$as_me:$LINENO: result: $MACHDEP" >&5
1410echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001411
Jack Jansen83f898c2002-12-30 22:23:40 +00001412# And add extra plat-mac for darwin
1413
Jack Jansen7b59b422003-03-17 15:44:10 +00001414
Jack Jansen83f898c2002-12-30 22:23:40 +00001415echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1416echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1417if test -z "$EXTRAPLATDIR"
1418then
1419 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001420 darwin)
1421 EXTRAPLATDIR="\$(PLATMACDIRS)"
1422 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1423 ;;
1424 *)
1425 EXTRAPLATDIR=""
1426 EXTRAMACHDEPPATH=""
1427 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001428 esac
1429fi
1430echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1431echo "${ECHO_T}$EXTRAPLATDIR" >&6
1432
Guido van Rossum627b2d71993-12-24 10:39:16 +00001433# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001434
1435# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1436# for debug/optimization stuff. BASECFLAGS is for flags that are required
1437# just to get things to compile and link. Users are free to override OPT
1438# when running configure or make. The build should not break if they do.
1439# BASECFLAGS should generally not be messed with, however.
1440
1441# XXX shouldn't some/most/all of this code be merged with the stuff later
1442# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443echo "$as_me:$LINENO: checking for --without-gcc" >&5
1444echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001446# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001447if test "${with_gcc+set}" = set; then
1448 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001449
Guido van Rossum7f43da71994-08-01 12:15:30 +00001450 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001451 no) CC=cc
1452 without_gcc=yes;;
1453 yes) CC=gcc
1454 without_gcc=no;;
1455 *) CC=$withval
1456 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001457 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001458else
Martin v. Löwis11437992002-04-12 09:54:03 +00001459
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001460 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001461 AIX*) CC=cc_r
1462 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001463 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001464 case $BE_HOST_CPU in
1465 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001466 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001467 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001468 BASECFLAGS="$BASECFLAGS -export pragma"
1469 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001470 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001471 ;;
1472 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001473 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001474 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001475 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001476 ;;
1477 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1479echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1480 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 ;;
1482 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001483 AR="\$(srcdir)/Modules/ar_beos"
1484 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001485 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001486 Monterey*)
1487 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001488 without_gcc=;;
1489 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001490 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001491fi;
1492echo "$as_me:$LINENO: result: $without_gcc" >&5
1493echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001494
1495
Guido van Rossum95012191999-12-16 17:50:52 +00001496
Fred Drakea1a84e72001-03-06 05:52:16 +00001497MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001498echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1499echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1500
Guido van Rossum95012191999-12-16 17:50:52 +00001501# Check whether --with-cxx or --without-cxx was given.
1502if test "${with_cxx+set}" = set; then
1503 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
Martin v. Löwis22352952000-12-13 17:37:02 +00001505 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001506 case $withval in
1507 no) CXX=
1508 with_cxx=no;;
1509 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001510 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001511 with_cxx=$withval;;
1512 esac
1513else
Martin v. Löwis11437992002-04-12 09:54:03 +00001514
Guido van Rossum95012191999-12-16 17:50:52 +00001515 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001516 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001517
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi;
1519echo "$as_me:$LINENO: result: $with_cxx" >&5
1520echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001521
1522if test "$with_cxx" = "yes"
1523then
Martin v. Löwis11437992002-04-12 09:54:03 +00001524 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1525echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1526 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001527fi
1528
1529
1530
1531
Martin v. Löwis11437992002-04-12 09:54:03 +00001532if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001533then
1534 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1535do
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 # 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 +00001537set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001538echo "$as_me:$LINENO: checking for $ac_word" >&5
1539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1540if test "${ac_cv_prog_CXX+set}" = set; then
1541 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001542else
1543 if test -n "$CXX"; then
1544 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1545else
Martin v. Löwis11437992002-04-12 09:54:03 +00001546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1547for as_dir in $PATH
1548do
1549 IFS=$as_save_IFS
1550 test -z "$as_dir" && as_dir=.
1551 for ac_exec_ext in '' $ac_executable_extensions; do
1552 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1553 ac_cv_prog_CXX="$ac_prog"
1554 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1555 break 2
1556 fi
1557done
1558done
1559
Martin v. Löwis22352952000-12-13 17:37:02 +00001560fi
1561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001562CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001563if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 echo "$as_me:$LINENO: result: $CXX" >&5
1565echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001566else
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 echo "$as_me:$LINENO: result: no" >&5
1568echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001569fi
1570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001572done
1573test -n "$CXX" || CXX="notfound"
1574
1575 if test "$CXX" = "notfound"
1576 then
1577 CXX=
1578 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001580ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1584 cat >conftest.$ac_ext <<_ACEOF
1585#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001586#include "confdefs.h"
1587
Barry Warsawfe33b792003-01-07 22:42:49 +00001588#ifdef F77_DUMMY_MAIN
1589# ifdef __cplusplus
1590 extern "C"
1591# endif
1592 int F77_DUMMY_MAIN() { return 1; }
1593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00001594int
1595main ()
1596{
Michael W. Hudson54241132001-12-07 15:38:26 +00001597
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ;
1599 return 0;
1600}
1601_ACEOF
1602ac_clean_files_save=$ac_clean_files
1603ac_clean_files="$ac_clean_files a.out a.exe"
1604# Try to create an executable without -o first, disregard a.out.
1605# It will help us diagnose broken compilers, and finding out an intuition
1606# of exeext.
1607echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1608echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1609ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1610if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1611 (eval $ac_link_default) 2>&5
1612 ac_status=$?
1613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1614 (exit $ac_status); }; then
1615 # Find the output, starting from the most likely. This scheme is
1616# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1617# resort.
1618
1619# Be careful to initialize this variable, since it used to be cached.
1620# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1621ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00001622for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
1623 ls a.out conftest 2>/dev/null;
1624 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001626 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 a.out ) # We found the default executable, but exeext='' is most
1628 # certainly right.
1629 break;;
1630 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1631 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1632 export ac_cv_exeext
1633 break;;
1634 * ) break;;
1635 esac
1636done
1637else
1638 echo "$as_me: failed program was:" >&5
1639cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00001640{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables" >&5
1641echo "$as_me: error: C++ compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
1645ac_exeext=$ac_cv_exeext
1646echo "$as_me:$LINENO: result: $ac_file" >&5
1647echo "${ECHO_T}$ac_file" >&6
1648
1649# Check the compiler produces executables we can run. If not, either
1650# the compiler is broken, or we cross compile.
1651echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1652echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1653# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1654# If not cross compiling, check that we can run a simple program.
1655if test "$cross_compiling" != yes; then
1656 if { ac_try='./$ac_file'
1657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1658 (eval $ac_try) 2>&5
1659 ac_status=$?
1660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1661 (exit $ac_status); }; }; then
1662 cross_compiling=no
1663 else
1664 if test "$cross_compiling" = maybe; then
1665 cross_compiling=yes
1666 else
1667 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1668If you meant to cross compile, use \`--host'." >&5
1669echo "$as_me: error: cannot run C++ compiled programs.
1670If you meant to cross compile, use \`--host'." >&2;}
1671 { (exit 1); exit 1; }; }
1672 fi
1673 fi
1674fi
1675echo "$as_me:$LINENO: result: yes" >&5
1676echo "${ECHO_T}yes" >&6
1677
1678rm -f a.out a.exe conftest$ac_cv_exeext
1679ac_clean_files=$ac_clean_files_save
1680# Check the compiler produces executables we can run. If not, either
1681# the compiler is broken, or we cross compile.
1682echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1683echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1684echo "$as_me:$LINENO: result: $cross_compiling" >&5
1685echo "${ECHO_T}$cross_compiling" >&6
1686
1687echo "$as_me:$LINENO: checking for suffix of executables" >&5
1688echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1689if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1690 (eval $ac_link) 2>&5
1691 ac_status=$?
1692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1693 (exit $ac_status); }; then
1694 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1695# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1696# work properly (i.e., refer to `conftest.exe'), while it won't with
1697# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00001698for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00001700 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1702 export ac_cv_exeext
1703 break;;
1704 * ) break;;
1705 esac
1706done
1707else
1708 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1709echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1710 { (exit 1); exit 1; }; }
1711fi
1712
1713rm -f conftest$ac_cv_exeext
1714echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1715echo "${ECHO_T}$ac_cv_exeext" >&6
1716
1717rm -f conftest.$ac_ext
1718EXEEXT=$ac_cv_exeext
1719ac_exeext=$EXEEXT
1720
1721 ac_ext=c
1722ac_cpp='$CPP $CPPFLAGS'
1723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1725ac_compiler_gnu=$ac_cv_c_compiler_gnu
1726
1727
Martin v. Löwis22352952000-12-13 17:37:02 +00001728
1729 fi
1730fi
1731
Guido van Rossum8b131c51995-03-09 14:10:13 +00001732# If the user switches compilers, we can't believe the cache
1733if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1734then
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1736(it is also a good idea to do 'make clean' before compiling)" >&5
1737echo "$as_me: error: cached CC is different -- throw away $cache_file
1738(it is also a good idea to do 'make clean' before compiling)" >&2;}
1739 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001740fi
1741
Martin v. Löwis11437992002-04-12 09:54:03 +00001742ac_ext=c
1743ac_cpp='$CPP $CPPFLAGS'
1744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1746ac_compiler_gnu=$ac_cv_c_compiler_gnu
1747if test -n "$ac_tool_prefix"; then
1748 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1749set dummy ${ac_tool_prefix}gcc; ac_word=$2
1750echo "$as_me:$LINENO: checking for $ac_word" >&5
1751echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1752if test "${ac_cv_prog_CC+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001754else
1755 if test -n "$CC"; then
1756 ac_cv_prog_CC="$CC" # Let the user override the test.
1757else
Martin v. Löwis11437992002-04-12 09:54:03 +00001758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1759for as_dir in $PATH
1760do
1761 IFS=$as_save_IFS
1762 test -z "$as_dir" && as_dir=.
1763 for ac_exec_ext in '' $ac_executable_extensions; do
1764 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1765 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1766 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1767 break 2
1768 fi
1769done
1770done
1771
Jack Jansendd19cf82001-12-06 22:36:17 +00001772fi
1773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001774CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001775if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001776 echo "$as_me:$LINENO: result: $CC" >&5
1777echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001778else
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 echo "$as_me:$LINENO: result: no" >&5
1780echo "${ECHO_T}no" >&6
1781fi
1782
1783fi
1784if test -z "$ac_cv_prog_CC"; then
1785 ac_ct_CC=$CC
1786 # Extract the first word of "gcc", so it can be a program name with args.
1787set dummy gcc; ac_word=$2
1788echo "$as_me:$LINENO: checking for $ac_word" >&5
1789echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1790if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1791 echo $ECHO_N "(cached) $ECHO_C" >&6
1792else
1793 if test -n "$ac_ct_CC"; then
1794 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1795else
1796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1797for as_dir in $PATH
1798do
1799 IFS=$as_save_IFS
1800 test -z "$as_dir" && as_dir=.
1801 for ac_exec_ext in '' $ac_executable_extensions; do
1802 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1803 ac_cv_prog_ac_ct_CC="gcc"
1804 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1805 break 2
1806 fi
1807done
1808done
1809
1810fi
1811fi
1812ac_ct_CC=$ac_cv_prog_ac_ct_CC
1813if test -n "$ac_ct_CC"; then
1814 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1815echo "${ECHO_T}$ac_ct_CC" >&6
1816else
1817 echo "$as_me:$LINENO: result: no" >&5
1818echo "${ECHO_T}no" >&6
1819fi
1820
1821 CC=$ac_ct_CC
1822else
1823 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001824fi
1825
Jack Jansendd19cf82001-12-06 22:36:17 +00001826if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 if test -n "$ac_tool_prefix"; then
1828 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1829set dummy ${ac_tool_prefix}cc; ac_word=$2
1830echo "$as_me:$LINENO: checking for $ac_word" >&5
1831echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1832if test "${ac_cv_prog_CC+set}" = set; then
1833 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001834else
1835 if test -n "$CC"; then
1836 ac_cv_prog_CC="$CC" # Let the user override the test.
1837else
Martin v. Löwis11437992002-04-12 09:54:03 +00001838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1839for as_dir in $PATH
1840do
1841 IFS=$as_save_IFS
1842 test -z "$as_dir" && as_dir=.
1843 for ac_exec_ext in '' $ac_executable_extensions; do
1844 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1845 ac_cv_prog_CC="${ac_tool_prefix}cc"
1846 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1847 break 2
1848 fi
1849done
1850done
1851
1852fi
1853fi
1854CC=$ac_cv_prog_CC
1855if test -n "$CC"; then
1856 echo "$as_me:$LINENO: result: $CC" >&5
1857echo "${ECHO_T}$CC" >&6
1858else
1859 echo "$as_me:$LINENO: result: no" >&5
1860echo "${ECHO_T}no" >&6
1861fi
1862
1863fi
1864if test -z "$ac_cv_prog_CC"; then
1865 ac_ct_CC=$CC
1866 # Extract the first word of "cc", so it can be a program name with args.
1867set dummy cc; ac_word=$2
1868echo "$as_me:$LINENO: checking for $ac_word" >&5
1869echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1870if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1871 echo $ECHO_N "(cached) $ECHO_C" >&6
1872else
1873 if test -n "$ac_ct_CC"; then
1874 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1875else
1876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1877for as_dir in $PATH
1878do
1879 IFS=$as_save_IFS
1880 test -z "$as_dir" && as_dir=.
1881 for ac_exec_ext in '' $ac_executable_extensions; do
1882 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1883 ac_cv_prog_ac_ct_CC="cc"
1884 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1885 break 2
1886 fi
1887done
1888done
1889
1890fi
1891fi
1892ac_ct_CC=$ac_cv_prog_ac_ct_CC
1893if test -n "$ac_ct_CC"; then
1894 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1895echo "${ECHO_T}$ac_ct_CC" >&6
1896else
1897 echo "$as_me:$LINENO: result: no" >&5
1898echo "${ECHO_T}no" >&6
1899fi
1900
1901 CC=$ac_ct_CC
1902else
1903 CC="$ac_cv_prog_CC"
1904fi
1905
1906fi
1907if test -z "$CC"; then
1908 # Extract the first word of "cc", so it can be a program name with args.
1909set dummy cc; ac_word=$2
1910echo "$as_me:$LINENO: checking for $ac_word" >&5
1911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1912if test "${ac_cv_prog_CC+set}" = set; then
1913 echo $ECHO_N "(cached) $ECHO_C" >&6
1914else
1915 if test -n "$CC"; then
1916 ac_cv_prog_CC="$CC" # Let the user override the test.
1917else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001919as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1920for as_dir in $PATH
1921do
1922 IFS=$as_save_IFS
1923 test -z "$as_dir" && as_dir=.
1924 for ac_exec_ext in '' $ac_executable_extensions; do
1925 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1926 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1927 ac_prog_rejected=yes
1928 continue
1929 fi
1930 ac_cv_prog_CC="cc"
1931 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1932 break 2
1933 fi
1934done
1935done
1936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937if test $ac_prog_rejected = yes; then
1938 # We found a bogon in the path, so make sure we never use it.
1939 set dummy $ac_cv_prog_CC
1940 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001941 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001942 # We chose a different compiler from the bogus one.
1943 # However, it has the same basename, so the bogon will be chosen
1944 # first if we set CC to just the basename; use the full file name.
1945 shift
Barry Warsawfe33b792003-01-07 22:42:49 +00001946 set dummy "$as_dir/$ac_word" ${1+"$@"}
1947 shift
1948 ac_cv_prog_CC="$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001949 fi
1950fi
1951fi
1952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001953CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001955 echo "$as_me:$LINENO: result: $CC" >&5
1956echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957else
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 echo "$as_me:$LINENO: result: no" >&5
1959echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001960fi
1961
Martin v. Löwis11437992002-04-12 09:54:03 +00001962fi
1963if test -z "$CC"; then
1964 if test -n "$ac_tool_prefix"; then
1965 for ac_prog in cl
1966 do
1967 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1968set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1969echo "$as_me:$LINENO: checking for $ac_word" >&5
1970echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1971if test "${ac_cv_prog_CC+set}" = set; then
1972 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001973else
1974 if test -n "$CC"; then
1975 ac_cv_prog_CC="$CC" # Let the user override the test.
1976else
Martin v. Löwis11437992002-04-12 09:54:03 +00001977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1978for as_dir in $PATH
1979do
1980 IFS=$as_save_IFS
1981 test -z "$as_dir" && as_dir=.
1982 for ac_exec_ext in '' $ac_executable_extensions; do
1983 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1984 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1985 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1986 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001987 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001988done
1989done
1990
1991fi
1992fi
1993CC=$ac_cv_prog_CC
1994if test -n "$CC"; then
1995 echo "$as_me:$LINENO: result: $CC" >&5
1996echo "${ECHO_T}$CC" >&6
1997else
1998 echo "$as_me:$LINENO: result: no" >&5
1999echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002000fi
2001
Martin v. Löwis11437992002-04-12 09:54:03 +00002002 test -n "$CC" && break
2003 done
2004fi
2005if test -z "$CC"; then
2006 ac_ct_CC=$CC
2007 for ac_prog in cl
2008do
2009 # Extract the first word of "$ac_prog", so it can be a program name with args.
2010set dummy $ac_prog; ac_word=$2
2011echo "$as_me:$LINENO: checking for $ac_word" >&5
2012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2013if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2014 echo $ECHO_N "(cached) $ECHO_C" >&6
2015else
2016 if test -n "$ac_ct_CC"; then
2017 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2018else
2019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2020for as_dir in $PATH
2021do
2022 IFS=$as_save_IFS
2023 test -z "$as_dir" && as_dir=.
2024 for ac_exec_ext in '' $ac_executable_extensions; do
2025 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2026 ac_cv_prog_ac_ct_CC="$ac_prog"
2027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2028 break 2
2029 fi
2030done
2031done
Jack Jansendd19cf82001-12-06 22:36:17 +00002032
Martin v. Löwis11437992002-04-12 09:54:03 +00002033fi
2034fi
2035ac_ct_CC=$ac_cv_prog_ac_ct_CC
2036if test -n "$ac_ct_CC"; then
2037 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2038echo "${ECHO_T}$ac_ct_CC" >&6
2039else
2040 echo "$as_me:$LINENO: result: no" >&5
2041echo "${ECHO_T}no" >&6
2042fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002043
Martin v. Löwis11437992002-04-12 09:54:03 +00002044 test -n "$ac_ct_CC" && break
2045done
Michael W. Hudson54241132001-12-07 15:38:26 +00002046
Martin v. Löwis11437992002-04-12 09:54:03 +00002047 CC=$ac_ct_CC
2048fi
2049
2050fi
2051
2052
2053test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2054echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2055 { (exit 1); exit 1; }; }
2056
2057# Provide some information about the compiler.
2058echo "$as_me:$LINENO:" \
2059 "checking for C compiler version" >&5
2060ac_compiler=`set X $ac_compile; echo $2`
2061{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2062 (eval $ac_compiler --version </dev/null >&5) 2>&5
2063 ac_status=$?
2064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2065 (exit $ac_status); }
2066{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2067 (eval $ac_compiler -v </dev/null >&5) 2>&5
2068 ac_status=$?
2069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2070 (exit $ac_status); }
2071{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2072 (eval $ac_compiler -V </dev/null >&5) 2>&5
2073 ac_status=$?
2074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2075 (exit $ac_status); }
2076
2077cat >conftest.$ac_ext <<_ACEOF
2078#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002079#include "confdefs.h"
2080
Barry Warsawfe33b792003-01-07 22:42:49 +00002081#ifdef F77_DUMMY_MAIN
2082# ifdef __cplusplus
2083 extern "C"
2084# endif
2085 int F77_DUMMY_MAIN() { return 1; }
2086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002087int
2088main ()
2089{
2090
2091 ;
2092 return 0;
2093}
2094_ACEOF
2095ac_clean_files_save=$ac_clean_files
2096ac_clean_files="$ac_clean_files a.out a.exe"
2097# Try to create an executable without -o first, disregard a.out.
2098# It will help us diagnose broken compilers, and finding out an intuition
2099# of exeext.
2100echo "$as_me:$LINENO: checking for C compiler default output" >&5
2101echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2102ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2103if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2104 (eval $ac_link_default) 2>&5
2105 ac_status=$?
2106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2107 (exit $ac_status); }; then
2108 # Find the output, starting from the most likely. This scheme is
2109# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2110# resort.
2111
2112# Be careful to initialize this variable, since it used to be cached.
2113# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2114ac_cv_exeext=
Barry Warsawfe33b792003-01-07 22:42:49 +00002115for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2116 ls a.out conftest 2>/dev/null;
2117 ls a.* conftest.* 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002118 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002119 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002120 a.out ) # We found the default executable, but exeext='' is most
2121 # certainly right.
2122 break;;
2123 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2124 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2125 export ac_cv_exeext
2126 break;;
2127 * ) break;;
2128 esac
2129done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002130else
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 echo "$as_me: failed program was:" >&5
2132cat conftest.$ac_ext >&5
Barry Warsawfe33b792003-01-07 22:42:49 +00002133{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2134echo "$as_me: error: C compiler cannot create executables" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002135 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002136fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002137
Martin v. Löwis11437992002-04-12 09:54:03 +00002138ac_exeext=$ac_cv_exeext
2139echo "$as_me:$LINENO: result: $ac_file" >&5
2140echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002141
Martin v. Löwis11437992002-04-12 09:54:03 +00002142# Check the compiler produces executables we can run. If not, either
2143# the compiler is broken, or we cross compile.
2144echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2145echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2146# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2147# If not cross compiling, check that we can run a simple program.
2148if test "$cross_compiling" != yes; then
2149 if { ac_try='./$ac_file'
2150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2151 (eval $ac_try) 2>&5
2152 ac_status=$?
2153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2154 (exit $ac_status); }; }; then
2155 cross_compiling=no
2156 else
2157 if test "$cross_compiling" = maybe; then
2158 cross_compiling=yes
2159 else
2160 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2161If you meant to cross compile, use \`--host'." >&5
2162echo "$as_me: error: cannot run C compiled programs.
2163If you meant to cross compile, use \`--host'." >&2;}
2164 { (exit 1); exit 1; }; }
2165 fi
2166 fi
2167fi
2168echo "$as_me:$LINENO: result: yes" >&5
2169echo "${ECHO_T}yes" >&6
2170
2171rm -f a.out a.exe conftest$ac_cv_exeext
2172ac_clean_files=$ac_clean_files_save
2173# Check the compiler produces executables we can run. If not, either
2174# the compiler is broken, or we cross compile.
2175echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2176echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2177echo "$as_me:$LINENO: result: $cross_compiling" >&5
2178echo "${ECHO_T}$cross_compiling" >&6
2179
2180echo "$as_me:$LINENO: checking for suffix of executables" >&5
2181echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2182if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2183 (eval $ac_link) 2>&5
2184 ac_status=$?
2185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186 (exit $ac_status); }; then
2187 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2188# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2189# work properly (i.e., refer to `conftest.exe'), while it won't with
2190# `rm'.
Barry Warsawfe33b792003-01-07 22:42:49 +00002191for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002192 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002193 *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002194 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2195 export ac_cv_exeext
2196 break;;
2197 * ) break;;
2198 esac
2199done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200else
Martin v. Löwis11437992002-04-12 09:54:03 +00002201 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2202echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2203 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002204fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002205
Martin v. Löwis11437992002-04-12 09:54:03 +00002206rm -f conftest$ac_cv_exeext
2207echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2208echo "${ECHO_T}$ac_cv_exeext" >&6
2209
2210rm -f conftest.$ac_ext
2211EXEEXT=$ac_cv_exeext
2212ac_exeext=$EXEEXT
2213echo "$as_me:$LINENO: checking for suffix of object files" >&5
2214echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2215if test "${ac_cv_objext+set}" = set; then
2216 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002217else
Martin v. Löwis11437992002-04-12 09:54:03 +00002218 cat >conftest.$ac_ext <<_ACEOF
2219#line $LINENO "configure"
2220#include "confdefs.h"
2221
Barry Warsawfe33b792003-01-07 22:42:49 +00002222#ifdef F77_DUMMY_MAIN
2223# ifdef __cplusplus
2224 extern "C"
2225# endif
2226 int F77_DUMMY_MAIN() { return 1; }
2227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002228int
2229main ()
2230{
2231
2232 ;
2233 return 0;
2234}
2235_ACEOF
2236rm -f conftest.o conftest.obj
2237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2238 (eval $ac_compile) 2>&5
2239 ac_status=$?
2240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2241 (exit $ac_status); }; then
2242 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2243 case $ac_file in
Barry Warsawfe33b792003-01-07 22:42:49 +00002244 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2246 break;;
2247 esac
2248done
2249else
2250 echo "$as_me: failed program was:" >&5
2251cat conftest.$ac_ext >&5
2252{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2253echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2254 { (exit 1); exit 1; }; }
2255fi
2256
2257rm -f conftest.$ac_cv_objext conftest.$ac_ext
2258fi
2259echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2260echo "${ECHO_T}$ac_cv_objext" >&6
2261OBJEXT=$ac_cv_objext
2262ac_objext=$OBJEXT
2263echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2264echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2265if test "${ac_cv_c_compiler_gnu+set}" = set; then
2266 echo $ECHO_N "(cached) $ECHO_C" >&6
2267else
2268 cat >conftest.$ac_ext <<_ACEOF
2269#line $LINENO "configure"
2270#include "confdefs.h"
2271
Barry Warsawfe33b792003-01-07 22:42:49 +00002272#ifdef F77_DUMMY_MAIN
2273# ifdef __cplusplus
2274 extern "C"
2275# endif
2276 int F77_DUMMY_MAIN() { return 1; }
2277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002278int
2279main ()
2280{
2281#ifndef __GNUC__
2282 choke me
2283#endif
2284
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289rm -f conftest.$ac_objext
2290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2291 (eval $ac_compile) 2>&5
2292 ac_status=$?
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); } &&
2295 { ac_try='test -s conftest.$ac_objext'
2296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2297 (eval $ac_try) 2>&5
2298 ac_status=$?
2299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2300 (exit $ac_status); }; }; then
2301 ac_compiler_gnu=yes
2302else
2303 echo "$as_me: failed program was:" >&5
2304cat conftest.$ac_ext >&5
2305ac_compiler_gnu=no
2306fi
2307rm -f conftest.$ac_objext conftest.$ac_ext
2308ac_cv_c_compiler_gnu=$ac_compiler_gnu
2309
2310fi
2311echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2312echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2313GCC=`test $ac_compiler_gnu = yes && echo yes`
2314ac_test_CFLAGS=${CFLAGS+set}
2315ac_save_CFLAGS=$CFLAGS
2316CFLAGS="-g"
2317echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2318echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2319if test "${ac_cv_prog_cc_g+set}" = set; then
2320 echo $ECHO_N "(cached) $ECHO_C" >&6
2321else
2322 cat >conftest.$ac_ext <<_ACEOF
2323#line $LINENO "configure"
2324#include "confdefs.h"
2325
Barry Warsawfe33b792003-01-07 22:42:49 +00002326#ifdef F77_DUMMY_MAIN
2327# ifdef __cplusplus
2328 extern "C"
2329# endif
2330 int F77_DUMMY_MAIN() { return 1; }
2331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002332int
2333main ()
2334{
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340rm -f conftest.$ac_objext
2341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2342 (eval $ac_compile) 2>&5
2343 ac_status=$?
2344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2345 (exit $ac_status); } &&
2346 { ac_try='test -s conftest.$ac_objext'
2347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2348 (eval $ac_try) 2>&5
2349 ac_status=$?
2350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2351 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002352 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002353else
Martin v. Löwis11437992002-04-12 09:54:03 +00002354 echo "$as_me: failed program was:" >&5
2355cat conftest.$ac_ext >&5
2356ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002358rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002359fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002360echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2361echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002362if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002363 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002364elif test $ac_cv_prog_cc_g = yes; then
2365 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002366 CFLAGS="-g -O2"
2367 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002368 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002369 fi
2370else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002371 if test "$GCC" = yes; then
2372 CFLAGS="-O2"
2373 else
2374 CFLAGS=
2375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002377# Some people use a C++ compiler to compile C. Since we use `exit',
2378# in C++ we need to declare it. In case someone uses the same compiler
2379# for both compiling C and C++ we need to have the C++ compiler decide
2380# the declaration of exit, since it's the most demanding environment.
2381cat >conftest.$ac_ext <<_ACEOF
2382#ifndef __cplusplus
2383 choke me
2384#endif
2385_ACEOF
2386rm -f conftest.$ac_objext
2387if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2388 (eval $ac_compile) 2>&5
2389 ac_status=$?
2390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391 (exit $ac_status); } &&
2392 { ac_try='test -s conftest.$ac_objext'
2393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2394 (eval $ac_try) 2>&5
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }; }; then
2398 for ac_declaration in \
2399 ''\
2400 '#include <stdlib.h>' \
2401 'extern "C" void std::exit (int) throw (); using std::exit;' \
2402 'extern "C" void std::exit (int); using std::exit;' \
2403 'extern "C" void exit (int) throw ();' \
2404 'extern "C" void exit (int);' \
2405 'void exit (int);'
2406do
2407 cat >conftest.$ac_ext <<_ACEOF
2408#line $LINENO "configure"
2409#include "confdefs.h"
2410#include <stdlib.h>
2411$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002412#ifdef F77_DUMMY_MAIN
2413# ifdef __cplusplus
2414 extern "C"
2415# endif
2416 int F77_DUMMY_MAIN() { return 1; }
2417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002418int
2419main ()
2420{
2421exit (42);
2422 ;
2423 return 0;
2424}
2425_ACEOF
2426rm -f conftest.$ac_objext
2427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2428 (eval $ac_compile) 2>&5
2429 ac_status=$?
2430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2431 (exit $ac_status); } &&
2432 { ac_try='test -s conftest.$ac_objext'
2433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2434 (eval $ac_try) 2>&5
2435 ac_status=$?
2436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2437 (exit $ac_status); }; }; then
2438 :
2439else
2440 echo "$as_me: failed program was:" >&5
2441cat conftest.$ac_ext >&5
2442continue
2443fi
2444rm -f conftest.$ac_objext conftest.$ac_ext
2445 cat >conftest.$ac_ext <<_ACEOF
2446#line $LINENO "configure"
2447#include "confdefs.h"
2448$ac_declaration
Barry Warsawfe33b792003-01-07 22:42:49 +00002449#ifdef F77_DUMMY_MAIN
2450# ifdef __cplusplus
2451 extern "C"
2452# endif
2453 int F77_DUMMY_MAIN() { return 1; }
2454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00002455int
2456main ()
2457{
2458exit (42);
2459 ;
2460 return 0;
2461}
2462_ACEOF
2463rm -f conftest.$ac_objext
2464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2465 (eval $ac_compile) 2>&5
2466 ac_status=$?
2467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2468 (exit $ac_status); } &&
2469 { ac_try='test -s conftest.$ac_objext'
2470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2471 (eval $ac_try) 2>&5
2472 ac_status=$?
2473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2474 (exit $ac_status); }; }; then
2475 break
2476else
2477 echo "$as_me: failed program was:" >&5
2478cat conftest.$ac_ext >&5
2479fi
2480rm -f conftest.$ac_objext conftest.$ac_ext
2481done
2482rm -f conftest*
2483if test -n "$ac_declaration"; then
2484 echo '#ifdef __cplusplus' >>confdefs.h
2485 echo $ac_declaration >>confdefs.h
2486 echo '#endif' >>confdefs.h
2487fi
2488
2489else
2490 echo "$as_me: failed program was:" >&5
2491cat conftest.$ac_ext >&5
2492fi
2493rm -f conftest.$ac_objext conftest.$ac_ext
2494ac_ext=c
2495ac_cpp='$CPP $CPPFLAGS'
2496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2498ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002500
2501# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503ac_ext=c
2504ac_cpp='$CPP $CPPFLAGS'
2505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2507ac_compiler_gnu=$ac_cv_c_compiler_gnu
2508echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2509echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002510# On Suns, sometimes $CPP names a directory.
2511if test -n "$CPP" && test -d "$CPP"; then
2512 CPP=
2513fi
2514if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test "${ac_cv_prog_CPP+set}" = set; then
2516 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002517else
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 # Double quotes because CPP needs to be expanded
2519 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2520 do
2521 ac_preproc_ok=false
2522for ac_c_preproc_warn_flag in '' yes
2523do
2524 # Use a header file that comes with gcc, so configuring glibc
2525 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002526 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 # not just through cpp. "Syntax error" is here to catch this case.
2528 cat >conftest.$ac_ext <<_ACEOF
2529#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002530#include "confdefs.h"
2531#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 Syntax error
2533_ACEOF
2534if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2535 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2536 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002537 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 rm -f conftest.er1
2539 cat conftest.err >&5
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); } >/dev/null; then
2542 if test -s conftest.err; then
2543 ac_cpp_err=$ac_c_preproc_warn_flag
2544 else
2545 ac_cpp_err=
2546 fi
2547else
2548 ac_cpp_err=yes
2549fi
2550if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002551 :
2552else
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002554 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 # Broken: fails on valid input.
2556continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002558rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 # OK, works on sane cases. Now check whether non-existent headers
2561 # can be detected and how.
2562 cat >conftest.$ac_ext <<_ACEOF
2563#line $LINENO "configure"
2564#include "confdefs.h"
2565#include <ac_nonexistent.h>
2566_ACEOF
2567if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2568 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2569 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002570 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 rm -f conftest.er1
2572 cat conftest.err >&5
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); } >/dev/null; then
2575 if test -s conftest.err; then
2576 ac_cpp_err=$ac_c_preproc_warn_flag
2577 else
2578 ac_cpp_err=
2579 fi
2580else
2581 ac_cpp_err=yes
2582fi
2583if test -z "$ac_cpp_err"; then
2584 # Broken: success on invalid input.
2585continue
2586else
2587 echo "$as_me: failed program was:" >&5
2588 cat conftest.$ac_ext >&5
2589 # Passes both tests.
2590ac_preproc_ok=:
2591break
2592fi
2593rm -f conftest.err conftest.$ac_ext
2594
2595done
2596# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2597rm -f conftest.err conftest.$ac_ext
2598if $ac_preproc_ok; then
2599 break
2600fi
2601
2602 done
2603 ac_cv_prog_CPP=$CPP
2604
2605fi
2606 CPP=$ac_cv_prog_CPP
2607else
2608 ac_cv_prog_CPP=$CPP
2609fi
2610echo "$as_me:$LINENO: result: $CPP" >&5
2611echo "${ECHO_T}$CPP" >&6
2612ac_preproc_ok=false
2613for ac_c_preproc_warn_flag in '' yes
2614do
2615 # Use a header file that comes with gcc, so configuring glibc
2616 # with a fresh cross-compiler works.
2617 # On the NeXT, cc -E runs the code through the compiler's parser,
2618 # not just through cpp. "Syntax error" is here to catch this case.
2619 cat >conftest.$ac_ext <<_ACEOF
2620#line $LINENO "configure"
2621#include "confdefs.h"
2622#include <assert.h>
2623 Syntax error
2624_ACEOF
2625if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2626 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2627 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002628 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 rm -f conftest.er1
2630 cat conftest.err >&5
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); } >/dev/null; then
2633 if test -s conftest.err; then
2634 ac_cpp_err=$ac_c_preproc_warn_flag
2635 else
2636 ac_cpp_err=
2637 fi
2638else
2639 ac_cpp_err=yes
2640fi
2641if test -z "$ac_cpp_err"; then
2642 :
2643else
2644 echo "$as_me: failed program was:" >&5
2645 cat conftest.$ac_ext >&5
2646 # Broken: fails on valid input.
2647continue
2648fi
2649rm -f conftest.err conftest.$ac_ext
2650
2651 # OK, works on sane cases. Now check whether non-existent headers
2652 # can be detected and how.
2653 cat >conftest.$ac_ext <<_ACEOF
2654#line $LINENO "configure"
2655#include "confdefs.h"
2656#include <ac_nonexistent.h>
2657_ACEOF
2658if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2659 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2660 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002661 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 rm -f conftest.er1
2663 cat conftest.err >&5
2664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665 (exit $ac_status); } >/dev/null; then
2666 if test -s conftest.err; then
2667 ac_cpp_err=$ac_c_preproc_warn_flag
2668 else
2669 ac_cpp_err=
2670 fi
2671else
2672 ac_cpp_err=yes
2673fi
2674if test -z "$ac_cpp_err"; then
2675 # Broken: success on invalid input.
2676continue
2677else
2678 echo "$as_me: failed program was:" >&5
2679 cat conftest.$ac_ext >&5
2680 # Passes both tests.
2681ac_preproc_ok=:
2682break
2683fi
2684rm -f conftest.err conftest.$ac_ext
2685
2686done
2687# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2688rm -f conftest.err conftest.$ac_ext
2689if $ac_preproc_ok; then
2690 :
2691else
2692 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2693echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2694 { (exit 1); exit 1; }; }
2695fi
2696
2697ac_ext=c
2698ac_cpp='$CPP $CPPFLAGS'
2699ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2700ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2701ac_compiler_gnu=$ac_cv_c_compiler_gnu
2702
2703
2704
2705echo "$as_me:$LINENO: checking for AIX" >&5
2706echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2707cat >conftest.$ac_ext <<_ACEOF
2708#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002709#include "confdefs.h"
2710#ifdef _AIX
2711 yes
2712#endif
2713
Martin v. Löwis11437992002-04-12 09:54:03 +00002714_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002716 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 echo "$as_me:$LINENO: result: yes" >&5
2718echo "${ECHO_T}yes" >&6
2719cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002720#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002721_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002722
2723else
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 echo "$as_me:$LINENO: result: no" >&5
2725echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002726fi
2727rm -f conftest*
2728
Michael W. Hudson54241132001-12-07 15:38:26 +00002729
Martin v. Löwis11437992002-04-12 09:54:03 +00002730echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2731echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2732if test "${ac_cv_header_stdc+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002734else
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 cat >conftest.$ac_ext <<_ACEOF
2736#line $LINENO "configure"
2737#include "confdefs.h"
2738#include <stdlib.h>
2739#include <stdarg.h>
2740#include <string.h>
2741#include <float.h>
2742
2743_ACEOF
2744if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2745 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2746 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002747 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 rm -f conftest.er1
2749 cat conftest.err >&5
2750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2751 (exit $ac_status); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
2754 else
2755 ac_cpp_err=
2756 fi
2757else
2758 ac_cpp_err=yes
2759fi
2760if test -z "$ac_cpp_err"; then
2761 ac_cv_header_stdc=yes
2762else
2763 echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 ac_cv_header_stdc=no
2766fi
2767rm -f conftest.err conftest.$ac_ext
2768
2769if test $ac_cv_header_stdc = yes; then
2770 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2771 cat >conftest.$ac_ext <<_ACEOF
2772#line $LINENO "configure"
2773#include "confdefs.h"
2774#include <string.h>
2775
2776_ACEOF
2777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002778 egrep "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 :
2780else
2781 ac_cv_header_stdc=no
2782fi
2783rm -f conftest*
2784
2785fi
2786
2787if test $ac_cv_header_stdc = yes; then
2788 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2789 cat >conftest.$ac_ext <<_ACEOF
2790#line $LINENO "configure"
2791#include "confdefs.h"
2792#include <stdlib.h>
2793
2794_ACEOF
2795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00002796 egrep "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 :
2798else
2799 ac_cv_header_stdc=no
2800fi
2801rm -f conftest*
2802
2803fi
2804
2805if test $ac_cv_header_stdc = yes; then
2806 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2807 if test "$cross_compiling" = yes; then
2808 :
2809else
2810 cat >conftest.$ac_ext <<_ACEOF
2811#line $LINENO "configure"
2812#include "confdefs.h"
2813#include <ctype.h>
2814#if ((' ' & 0x0FF) == 0x020)
2815# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2816# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2817#else
2818# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2819 || ('j' <= (c) && (c) <= 'r') \
2820 || ('s' <= (c) && (c) <= 'z'))
2821# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2822#endif
2823
2824#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2825int
2826main ()
2827{
2828 int i;
2829 for (i = 0; i < 256; i++)
2830 if (XOR (islower (i), ISLOWER (i))
2831 || toupper (i) != TOUPPER (i))
2832 exit(2);
2833 exit (0);
2834}
2835_ACEOF
2836rm -f conftest$ac_exeext
2837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2838 (eval $ac_link) 2>&5
2839 ac_status=$?
2840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843 (eval $ac_try) 2>&5
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); }; }; then
2847 :
2848else
2849 echo "$as_me: program exited with status $ac_status" >&5
2850echo "$as_me: failed program was:" >&5
2851cat conftest.$ac_ext >&5
2852( exit $ac_status )
2853ac_cv_header_stdc=no
2854fi
Barry Warsawfe33b792003-01-07 22:42:49 +00002855rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002856fi
2857fi
2858fi
2859echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2860echo "${ECHO_T}$ac_cv_header_stdc" >&6
2861if test $ac_cv_header_stdc = yes; then
2862
2863cat >>confdefs.h <<\_ACEOF
2864#define STDC_HEADERS 1
2865_ACEOF
2866
2867fi
2868
2869# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2880 inttypes.h stdint.h unistd.h
2881do
2882as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2883echo "$as_me:$LINENO: checking for $ac_header" >&5
2884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2885if eval "test \"\${$as_ac_Header+set}\" = set"; then
2886 echo $ECHO_N "(cached) $ECHO_C" >&6
2887else
2888 cat >conftest.$ac_ext <<_ACEOF
2889#line $LINENO "configure"
2890#include "confdefs.h"
2891$ac_includes_default
2892
2893#include <$ac_header>
2894_ACEOF
2895rm -f conftest.$ac_objext
2896if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2897 (eval $ac_compile) 2>&5
2898 ac_status=$?
2899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900 (exit $ac_status); } &&
2901 { ac_try='test -s conftest.$ac_objext'
2902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2903 (eval $ac_try) 2>&5
2904 ac_status=$?
2905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2906 (exit $ac_status); }; }; then
2907 eval "$as_ac_Header=yes"
2908else
2909 echo "$as_me: failed program was:" >&5
2910cat conftest.$ac_ext >&5
2911eval "$as_ac_Header=no"
2912fi
2913rm -f conftest.$ac_objext conftest.$ac_ext
2914fi
2915echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2916echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2917if test `eval echo '${'$as_ac_Header'}'` = yes; then
2918 cat >>confdefs.h <<_ACEOF
2919#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
2920_ACEOF
2921
2922fi
2923
2924done
2925
2926
2927if test "${ac_cv_header_minix_config_h+set}" = set; then
2928 echo "$as_me:$LINENO: checking for minix/config.h" >&5
2929echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
2930if test "${ac_cv_header_minix_config_h+set}" = set; then
2931 echo $ECHO_N "(cached) $ECHO_C" >&6
2932fi
2933echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
2934echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
2935else
2936 # Is the header compilable?
2937echo "$as_me:$LINENO: checking minix/config.h usability" >&5
2938echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
2939cat >conftest.$ac_ext <<_ACEOF
2940#line $LINENO "configure"
2941#include "confdefs.h"
2942$ac_includes_default
2943#include <minix/config.h>
2944_ACEOF
2945rm -f conftest.$ac_objext
2946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2947 (eval $ac_compile) 2>&5
2948 ac_status=$?
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } &&
2951 { ac_try='test -s conftest.$ac_objext'
2952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2953 (eval $ac_try) 2>&5
2954 ac_status=$?
2955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2956 (exit $ac_status); }; }; then
2957 ac_header_compiler=yes
2958else
2959 echo "$as_me: failed program was:" >&5
2960cat conftest.$ac_ext >&5
2961ac_header_compiler=no
2962fi
2963rm -f conftest.$ac_objext conftest.$ac_ext
2964echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
2965echo "${ECHO_T}$ac_header_compiler" >&6
2966
2967# Is the header present?
2968echo "$as_me:$LINENO: checking minix/config.h presence" >&5
2969echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
2970cat >conftest.$ac_ext <<_ACEOF
2971#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002972#include "confdefs.h"
2973#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002974_ACEOF
2975if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2976 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2977 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00002978 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 rm -f conftest.er1
2980 cat conftest.err >&5
2981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2982 (exit $ac_status); } >/dev/null; then
2983 if test -s conftest.err; then
2984 ac_cpp_err=$ac_c_preproc_warn_flag
2985 else
2986 ac_cpp_err=
2987 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002988else
Martin v. Löwis11437992002-04-12 09:54:03 +00002989 ac_cpp_err=yes
2990fi
2991if test -z "$ac_cpp_err"; then
2992 ac_header_preproc=yes
2993else
2994 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002996 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002998rm -f conftest.err conftest.$ac_ext
2999echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3000echo "${ECHO_T}$ac_header_preproc" >&6
3001
3002# So? What about this header?
3003case $ac_header_compiler:$ac_header_preproc in
3004 yes:no )
3005 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3006echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3007 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3008echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3009 no:yes )
3010 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3011echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3012 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3013echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3014 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3015echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3016esac
3017echo "$as_me:$LINENO: checking for minix/config.h" >&5
3018echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3019if test "${ac_cv_header_minix_config_h+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3021else
3022 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003023fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003024echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3025echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3026
3027fi
3028if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003029 MINIX=yes
3030else
Martin v. Löwis11437992002-04-12 09:54:03 +00003031 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003032fi
3033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003035if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
3037cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003038#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003039_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003040
Martin v. Löwis11437992002-04-12 09:54:03 +00003041
3042cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003043#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003044_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003045
Martin v. Löwis11437992002-04-12 09:54:03 +00003046
3047cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003048#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003049_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003050
3051fi
3052
3053
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003054# Check for unsupported systems
3055case $ac_sys_system/$ac_sys_release in
3056SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3057 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3058 echo See README for details.
3059 exit 1;;
3060esac
3061
3062if test "$MINIX" = yes; then
3063 echo This system \(MINIX\) is no longer supported.
3064 echo Read README for details.
3065 exit 1
3066fi
3067
Michael W. Hudson54241132001-12-07 15:38:26 +00003068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069echo "$as_me:$LINENO: checking for --with-suffix" >&5
3070echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003071
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003072# Check whether --with-suffix or --without-suffix was given.
3073if test "${with_suffix+set}" = set; then
3074 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003076 case $withval in
3077 no) EXEEXT=;;
3078 yes) EXEEXT=.exe;;
3079 *) EXEEXT=$withval;;
3080 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003081fi;
3082echo "$as_me:$LINENO: result: $EXEEXT" >&5
3083echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003084
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003085# Test whether we're running on a non-case-sensitive system, in which
3086# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003087
Martin v. Löwis11437992002-04-12 09:54:03 +00003088echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3089echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003090if test ! -d CaseSensitiveTestDir; then
3091mkdir CaseSensitiveTestDir
3092fi
3093
3094if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003095then
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 echo "$as_me:$LINENO: result: yes" >&5
3097echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003098 BUILDEXEEXT=.exe
3099else
Martin v. Löwis11437992002-04-12 09:54:03 +00003100 echo "$as_me:$LINENO: result: no" >&5
3101echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003102 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003103fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003104rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003105
Guido van Rossumdd997f71998-10-07 19:58:26 +00003106case $MACHDEP in
3107bsdos*)
3108 case $CC in
3109 gcc) CC="$CC -D_HAVE_BSDI";;
3110 esac;;
3111esac
3112
Guido van Rossum24b1e751997-08-21 02:29:16 +00003113case $ac_sys_system in
3114hp*|HP*)
3115 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003116 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003117 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003118Monterey*)
3119 case $CC in
3120 cc) CC="$CC -Wl,-Bexport";;
3121 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003122SunOS*)
3123 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
3125cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003126#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003127_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003128
3129 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003130esac
3131
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
3133
Martin v. Löwis11437992002-04-12 09:54:03 +00003134echo "$as_me:$LINENO: checking LIBRARY" >&5
3135echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003136if test -z "$LIBRARY"
3137then
3138 LIBRARY='libpython$(VERSION).a'
3139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003140echo "$as_me:$LINENO: result: $LIBRARY" >&5
3141echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003142
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003143# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003144# name of the library into which to insert object files). BLDLIBRARY is also
3145# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3146# is blank as the main program is not linked directly against LDLIBRARY.
3147# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3148# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3149# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3150# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003151#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003152# RUNSHARED is used to run shared python without installed libraries
3153#
3154# INSTSONAME is the name of the shared library that will be use to install
3155# on the system - some systems like version suffix, others don't
3156
3157
Michael W. Hudson54241132001-12-07 15:38:26 +00003158
3159
3160
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003161
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003162LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003163BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003164INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003165DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003166LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003168
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003169# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003170# If CXX is set, and if it is needed to link a main function that was
3171# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3172# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003173# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003174# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003175
Martin v. Löwis11437992002-04-12 09:54:03 +00003176echo "$as_me:$LINENO: checking LINKCC" >&5
3177echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003178if test -z "$LINKCC"
3179then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003180 if test -z "$CXX"; then
3181 LINKCC="\$(PURIFY) \$(CC)"
3182 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003183 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003184 $CXX -c conftest.$ac_ext 2>&5
3185 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3186 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3187 then
3188 LINKCC="\$(PURIFY) \$(CC)"
3189 else
3190 LINKCC="\$(PURIFY) \$(CXX)"
3191 fi
3192 rm -fr conftest*
3193 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003194 case $ac_sys_system in
3195 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003196 exp_extra="\"\""
3197 if test $ac_sys_release -ge 5 -o \
3198 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3199 exp_extra="."
3200 fi
3201 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003202 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003203 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003204 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003205 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003206 esac
3207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003208echo "$as_me:$LINENO: result: $LINKCC" >&5
3209echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003210
Martin v. Löwis11437992002-04-12 09:54:03 +00003211echo "$as_me:$LINENO: checking for --enable-shared" >&5
3212echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003213# Check whether --enable-shared or --disable-shared was given.
3214if test "${enable_shared+set}" = set; then
3215 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003218
3219if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003220then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003221 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003222 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003223 enable_shared="yes";;
3224 *)
3225 enable_shared="no";;
3226 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003227fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: result: $enable_shared" >&5
3229echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003230
3231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3233echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003234
Guido van Rossumb8552162001-09-05 14:58:11 +00003235# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3236# library that we build, but we do not want to link against it (we
3237# will find it with a -framework option). For this reason there is an
3238# extra variable BLDLIBRARY against which Python and the extension
3239# modules are linked, BLDLIBRARY. This is normally the same as
3240# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003241if test "$enable_framework"
3242then
3243 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3244 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3245 BLDLIBRARY=''
3246else
3247 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003248fi
Jack Jansene578a632001-08-15 01:27:14 +00003249
Martin v. Löwis1142de32002-03-29 16:28:31 +00003250# Other platforms follow
3251if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003252
3253cat >>confdefs.h <<\_ACEOF
3254#define Py_ENABLE_SHARED 1
3255_ACEOF
3256
Martin v. Löwis1142de32002-03-29 16:28:31 +00003257 case $ac_sys_system in
3258 BeOS*)
3259 LDLIBRARY='libpython$(VERSION).so'
3260 ;;
3261 CYGWIN*)
3262 LDLIBRARY='libpython$(VERSION).dll.a'
3263 DLLLIBRARY='libpython$(VERSION).dll'
3264 ;;
3265 SunOS*)
3266 LDLIBRARY='libpython$(VERSION).so'
3267 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3268 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3269 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003270 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003271 LDLIBRARY='libpython$(VERSION).so'
3272 BLDLIBRARY='-L. -lpython$(VERSION)'
3273 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3274 INSTSONAME="$LDLIBRARY".$SOVERSION
3275 ;;
3276 hp*|HP*)
3277 LDLIBRARY='libpython$(VERSION).sl'
3278 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3279 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3280 ;;
3281 OSF*)
3282 LDLIBRARY='libpython$(VERSION).so'
3283 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3284 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3285 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003286 atheos*)
3287 LDLIBRARY='libpython$(VERSION).so'
3288 BLDLIBRARY='-L. -lpython$(VERSION)'
3289 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3290 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003291 esac
3292 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3293 case $MACHDEP in
3294 dguxR4)
3295 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003296 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003297 ;;
3298 esac
3299fi
3300
Martin v. Löwis11437992002-04-12 09:54:03 +00003301echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3302echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003303
Martin v. Löwis11437992002-04-12 09:54:03 +00003304if test -n "$ac_tool_prefix"; then
3305 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3306set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3307echo "$as_me:$LINENO: checking for $ac_word" >&5
3308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3309if test "${ac_cv_prog_RANLIB+set}" = set; then
3310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311else
3312 if test -n "$RANLIB"; then
3313 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3314else
Martin v. Löwis11437992002-04-12 09:54:03 +00003315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
3321 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3322 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3324 break 2
3325 fi
3326done
3327done
3328
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003331RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003332if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003333 echo "$as_me:$LINENO: result: $RANLIB" >&5
3334echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335else
Martin v. Löwis11437992002-04-12 09:54:03 +00003336 echo "$as_me:$LINENO: result: no" >&5
3337echo "${ECHO_T}no" >&6
3338fi
3339
3340fi
3341if test -z "$ac_cv_prog_RANLIB"; then
3342 ac_ct_RANLIB=$RANLIB
3343 # Extract the first word of "ranlib", so it can be a program name with args.
3344set dummy ranlib; ac_word=$2
3345echo "$as_me:$LINENO: checking for $ac_word" >&5
3346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3347if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3348 echo $ECHO_N "(cached) $ECHO_C" >&6
3349else
3350 if test -n "$ac_ct_RANLIB"; then
3351 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3352else
3353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3354for as_dir in $PATH
3355do
3356 IFS=$as_save_IFS
3357 test -z "$as_dir" && as_dir=.
3358 for ac_exec_ext in '' $ac_executable_extensions; do
3359 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3360 ac_cv_prog_ac_ct_RANLIB="ranlib"
3361 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3362 break 2
3363 fi
3364done
3365done
3366
3367 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3368fi
3369fi
3370ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3371if test -n "$ac_ct_RANLIB"; then
3372 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3373echo "${ECHO_T}$ac_ct_RANLIB" >&6
3374else
3375 echo "$as_me:$LINENO: result: no" >&5
3376echo "${ECHO_T}no" >&6
3377fi
3378
3379 RANLIB=$ac_ct_RANLIB
3380else
3381 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383
3384
Guido van Rossum7f43da71994-08-01 12:15:30 +00003385for ac_prog in ar aal
3386do
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003389echo "$as_me:$LINENO: checking for $ac_word" >&5
3390echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3391if test "${ac_cv_prog_AR+set}" = set; then
3392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393else
3394 if test -n "$AR"; then
3395 ac_cv_prog_AR="$AR" # Let the user override the test.
3396else
Martin v. Löwis11437992002-04-12 09:54:03 +00003397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3398for as_dir in $PATH
3399do
3400 IFS=$as_save_IFS
3401 test -z "$as_dir" && as_dir=.
3402 for ac_exec_ext in '' $ac_executable_extensions; do
3403 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3404 ac_cv_prog_AR="$ac_prog"
3405 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3406 break 2
3407 fi
3408done
3409done
3410
Guido van Rossum7f43da71994-08-01 12:15:30 +00003411fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003413AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003414if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 echo "$as_me:$LINENO: result: $AR" >&5
3416echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003417else
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003420fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003421
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003423done
3424test -n "$AR" || AR="ar"
3425
Michael W. Hudson54241132001-12-07 15:38:26 +00003426
Neil Schemenauera42c8272001-03-31 00:01:55 +00003427case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003428bsdos*|hp*|HP*)
3429 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003430 if test -z "$INSTALL"
3431 then
3432 INSTALL="${srcdir}/install-sh -c"
3433 fi
3434esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003435ac_aux_dir=
3436for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3437 if 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
3441 elif test -f $ac_dir/install.sh; then
3442 ac_aux_dir=$ac_dir
3443 ac_install_sh="$ac_aux_dir/install.sh -c"
3444 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003445 elif test -f $ac_dir/shtool; then
3446 ac_aux_dir=$ac_dir
3447 ac_install_sh="$ac_aux_dir/shtool install -c"
3448 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003449 fi
3450done
3451if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3453echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3454 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3458ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003459
3460# Find a good install program. We prefer a C program (faster),
3461# so one script is as good as another. But avoid the broken or
3462# incompatible versions:
3463# SysV /etc/install, /usr/sbin/install
3464# SunOS /usr/etc/install
3465# IRIX /sbin/install
3466# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003467# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003468# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3469# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3470# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3471# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003472echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3473echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003475if test "${ac_cv_path_install+set}" = set; then
3476 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3479for as_dir in $PATH
3480do
3481 IFS=$as_save_IFS
3482 test -z "$as_dir" && as_dir=.
3483 # Account for people who put trailing slashes in PATH elements.
3484case $as_dir/ in
3485 ./ | .// | /cC/* | \
3486 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3487 /usr/ucb/* ) ;;
3488 *)
3489 # OSF1 and SCO ODT 3.0 have their own names for install.
3490 # Don't use installbsd from OSF since it installs stuff as root
3491 # by default.
3492 for ac_prog in ginstall scoinst install; do
3493 for ac_exec_ext in '' $ac_executable_extensions; do
3494 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3495 if test $ac_prog = install &&
3496 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3497 # AIX install. It has an incompatible calling convention.
3498 :
3499 elif test $ac_prog = install &&
3500 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3501 # program-specific install script used by HP pwplus--don't use.
3502 :
3503 else
3504 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3505 break 3
3506 fi
3507 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003508 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 done
3510 ;;
3511esac
3512done
3513
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003514
3515fi
3516 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003518 else
3519 # As a last resort, use the slow shell script. We don't cache a
3520 # path for INSTALL within a source directory, because that will
3521 # break other packages using the cache if that directory is
3522 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524 fi
3525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003526echo "$as_me:$LINENO: result: $INSTALL" >&5
3527echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003528
3529# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3530# It thinks the first close brace ends the variable substitution.
3531test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3532
Martin v. Löwis11437992002-04-12 09:54:03 +00003533test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003534
3535test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3536
Michael W. Hudson54241132001-12-07 15:38:26 +00003537
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003538# Not every filesystem supports hard links
3539
3540if test -z "$LN" ; then
3541 case $ac_sys_system in
3542 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003543 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003544 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003545 *) LN=ln;;
3546 esac
3547fi
3548
Fred Drake109d9862001-07-11 06:27:56 +00003549# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003550echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3551echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3552
Fred Drake109d9862001-07-11 06:27:56 +00003553# Check whether --with-pydebug or --without-pydebug was given.
3554if test "${with_pydebug+set}" = set; then
3555 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003556
Fred Drake109d9862001-07-11 06:27:56 +00003557if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003558then
3559
3560cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003561#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003562_ACEOF
3563
3564 echo "$as_me:$LINENO: result: yes" >&5
3565echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003566 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003567else echo "$as_me:$LINENO: result: no" >&5
3568echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003569fi
3570else
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 echo "$as_me:$LINENO: result: no" >&5
3572echo "${ECHO_T}no" >&6
3573fi;
Fred Drake109d9862001-07-11 06:27:56 +00003574
Skip Montanarodecc6a42003-01-01 20:07:49 +00003575# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3576# merged with this chunk of code?
3577
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003578# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003579# ------------------------
3580# (The following bit of code is complicated enough - please keep things
3581# indented properly. Just pretend you're editing Python code. ;-)
3582
3583# There are two parallel sets of case statements below, one that checks to
3584# see if OPT was set and one that does BASECFLAGS setting based upon
3585# compiler and platform. BASECFLAGS tweaks need to be made even if the
3586# user set OPT.
3587
3588# tweak OPT based on compiler and platform, only if the user didn't set
3589# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003590
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003591if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003592then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003593 case $GCC in
3594 yes)
3595 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003596 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003597 if test "$Py_DEBUG" = 'true' ; then
3598 # Optimization messes up debuggers, so turn it off for
3599 # debug builds.
3600 OPT="-g -Wall -Wstrict-prototypes"
3601 else
3602 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003603 fi
3604 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003605 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003606 OPT="-O3 -Wall -Wstrict-prototypes"
3607 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003608 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003609 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3611 ;;
3612 esac
Fred Drake109d9862001-07-11 06:27:56 +00003613 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003614
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003615 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003616 OPT="-O"
3617 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003618 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003619
3620 # The current (beta) Monterey compiler dies with optimizations
3621 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003622 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003623 Monterey*)
3624 OPT=""
3625 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003626 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003627
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003628fi
3629
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630
3631# tweak BASECFLAGS based on compiler and platform
3632case $GCC in
3633yes)
3634 case $ac_sys_system in
3635 SCO_SV*)
3636 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3637 ;;
3638 # is there any other compiler on Darwin besides gcc?
3639 Darwin*)
3640 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3641 ;;
3642 esac
3643 ;;
3644
3645*)
3646 case $ac_sys_system in
3647 OpenUNIX*|UnixWare*)
3648 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3649 ;;
3650 SCO_SV*)
3651 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3652 ;;
3653 esac
3654 ;;
3655esac
3656
Fred Drakee1ceaa02001-12-04 20:55:47 +00003657if test "$Py_DEBUG" = 'true'; then
3658 :
3659else
3660 OPT="-DNDEBUG $OPT"
3661fi
3662
Guido van Rossum563e7081996-09-10 18:20:48 +00003663if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003664then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003665 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003666fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003667
Martin v. Löwis11437992002-04-12 09:54:03 +00003668echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3669echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3670if test "${ac_cv_opt_olimit_ok+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003672else
3673 ac_save_cc="$CC"
3674CC="$CC -OPT:Olimit=0"
3675if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003676 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 cat >conftest.$ac_ext <<_ACEOF
3679#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003680#include "confdefs.h"
3681int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003682_ACEOF
3683rm -f conftest$ac_exeext
3684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3685 (eval $ac_link) 2>&5
3686 ac_status=$?
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3690 (eval $ac_try) 2>&5
3691 ac_status=$?
3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3693 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003694 ac_cv_opt_olimit_ok=yes
3695else
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 echo "$as_me: program exited with status $ac_status" >&5
3697echo "$as_me: failed program was:" >&5
3698cat conftest.$ac_ext >&5
3699( exit $ac_status )
3700ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003701fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003702rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003703fi
Guido van Rossum91922671997-10-09 20:24:13 +00003704CC="$ac_save_cc"
3705fi
3706
Martin v. Löwis11437992002-04-12 09:54:03 +00003707echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3708echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003709if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003710 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3712 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3713 # environment?
3714 Darwin*)
3715 ;;
3716 *)
3717 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3718 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003719 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003720else
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3722echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3723 if test "${ac_cv_olimit_ok+set}" = set; then
3724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003725else
3726 ac_save_cc="$CC"
3727 CC="$CC -Olimit 1500"
3728 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003729 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003730else
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 cat >conftest.$ac_ext <<_ACEOF
3732#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003733#include "confdefs.h"
3734int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003735_ACEOF
3736rm -f conftest$ac_exeext
3737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3738 (eval $ac_link) 2>&5
3739 ac_status=$?
3740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3743 (eval $ac_try) 2>&5
3744 ac_status=$?
3745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3746 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003747 ac_cv_olimit_ok=yes
3748else
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 echo "$as_me: program exited with status $ac_status" >&5
3750echo "$as_me: failed program was:" >&5
3751cat conftest.$ac_ext >&5
3752( exit $ac_status )
3753ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003754fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003755rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003756fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003757 CC="$ac_save_cc"
3758fi
3759
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3761echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003762 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003763 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003764 fi
3765fi
3766
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003767# On some compilers, pthreads are available without further options
3768# (e.g. MacOS X). On some of these systems, the compiler will not
3769# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3770# So we have to see first whether pthreads are available without
3771# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003772echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3773echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3774if test "${ac_cv_pthread_is_default+set}" = set; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003776else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003777 if test "$cross_compiling" = yes; then
3778 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 cat >conftest.$ac_ext <<_ACEOF
3781#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003782#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003783
Martin v. Löwis130fb172001-07-19 11:00:41 +00003784#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003785
3786void* routine(void* p){return NULL;}
3787
3788int main(){
3789 pthread_t p;
3790 if(pthread_create(&p,NULL,routine,NULL)!=0)
3791 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003792 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003793 return 0;
3794}
3795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796_ACEOF
3797rm -f conftest$ac_exeext
3798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3799 (eval $ac_link) 2>&5
3800 ac_status=$?
3801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3804 (eval $ac_try) 2>&5
3805 ac_status=$?
3806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003808 ac_cv_pthread_is_default=yes
3809else
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 echo "$as_me: program exited with status $ac_status" >&5
3811echo "$as_me: failed program was:" >&5
3812cat conftest.$ac_ext >&5
3813( exit $ac_status )
3814ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003815fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003816rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003817fi
3818
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003819fi
3820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3822echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003823
Michael W. Hudson54241132001-12-07 15:38:26 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003826then
3827 ac_cv_kpthread=no
3828else
3829# -Kpthread, if available, provides the right #defines
3830# and linker options to make pthread_create available
3831# Some compilers won't report that they do not support -Kpthread,
3832# so we need to run a program to see whether it really made the
3833# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003834echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3835echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3836if test "${ac_cv_kpthread+set}" = set; then
3837 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003838else
3839 ac_save_cc="$CC"
3840CC="$CC -Kpthread"
3841if test "$cross_compiling" = yes; then
3842 ac_cv_kpthread=no
3843else
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 cat >conftest.$ac_ext <<_ACEOF
3845#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003846#include "confdefs.h"
3847
3848#include <pthread.h>
3849
3850void* routine(void* p){return NULL;}
3851
3852int main(){
3853 pthread_t p;
3854 if(pthread_create(&p,NULL,routine,NULL)!=0)
3855 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003856 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003857 return 0;
3858}
3859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860_ACEOF
3861rm -f conftest$ac_exeext
3862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3863 (eval $ac_link) 2>&5
3864 ac_status=$?
3865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3868 (eval $ac_try) 2>&5
3869 ac_status=$?
3870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003872 ac_cv_kpthread=yes
3873else
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 echo "$as_me: program exited with status $ac_status" >&5
3875echo "$as_me: failed program was:" >&5
3876cat conftest.$ac_ext >&5
3877( exit $ac_status )
3878ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003879fi
Barry Warsawfe33b792003-01-07 22:42:49 +00003880rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003881fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003882CC="$ac_save_cc"
3883fi
3884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3886echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003887fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003888
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003889if test $ac_cv_kpthread = no
3890then
3891# -Kthread, if available, provides the right #defines
3892# and linker options to make pthread_create available
3893# Some compilers won't report that they do not support -Kthread,
3894# so we need to run a program to see whether it really made the
3895# function available.
3896echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3897echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3898if test "${ac_cv_kthread+set}" = set; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3900else
3901 ac_save_cc="$CC"
3902CC="$CC -Kthread"
3903if test "$cross_compiling" = yes; then
3904 ac_cv_kthread=no
3905else
3906 cat >conftest.$ac_ext <<_ACEOF
3907#line $LINENO "configure"
3908#include "confdefs.h"
3909
3910#include <pthread.h>
3911
3912void* routine(void* p){return NULL;}
3913
3914int main(){
3915 pthread_t p;
3916 if(pthread_create(&p,NULL,routine,NULL)!=0)
3917 return 1;
3918 (void)pthread_detach(p);
3919 return 0;
3920}
3921
3922_ACEOF
3923rm -f conftest$ac_exeext
3924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3925 (eval $ac_link) 2>&5
3926 ac_status=$?
3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3930 (eval $ac_try) 2>&5
3931 ac_status=$?
3932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933 (exit $ac_status); }; }; then
3934 ac_cv_kthread=yes
3935else
3936 echo "$as_me: program exited with status $ac_status" >&5
3937echo "$as_me: failed program was:" >&5
3938cat conftest.$ac_ext >&5
3939( exit $ac_status )
3940ac_cv_kthread=no
3941fi
3942rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3943fi
3944CC="$ac_save_cc"
3945fi
3946
3947echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
3948echo "${ECHO_T}$ac_cv_kthread" >&6
3949fi
3950
Michael W. Hudson54241132001-12-07 15:38:26 +00003951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003952# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003953echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3954echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3955if test "${ac_cv_header_stdc+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957else
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 cat >conftest.$ac_ext <<_ACEOF
3959#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003960#include "confdefs.h"
3961#include <stdlib.h>
3962#include <stdarg.h>
3963#include <string.h>
3964#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003965
3966_ACEOF
3967if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3968 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3969 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00003970 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 rm -f conftest.er1
3972 cat conftest.err >&5
3973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3974 (exit $ac_status); } >/dev/null; then
3975 if test -s conftest.err; then
3976 ac_cpp_err=$ac_c_preproc_warn_flag
3977 else
3978 ac_cpp_err=
3979 fi
3980else
3981 ac_cpp_err=yes
3982fi
3983if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984 ac_cv_header_stdc=yes
3985else
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003987 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988 ac_cv_header_stdc=no
3989fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003990rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991
3992if test $ac_cv_header_stdc = yes; then
3993 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 cat >conftest.$ac_ext <<_ACEOF
3995#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996#include "confdefs.h"
3997#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003998
3999_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004001 egrep "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002 :
4003else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004 ac_cv_header_stdc=no
4005fi
4006rm -f conftest*
4007
4008fi
4009
4010if test $ac_cv_header_stdc = yes; then
4011 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 cat >conftest.$ac_ext <<_ACEOF
4013#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014#include "confdefs.h"
4015#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004016
4017_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004019 egrep "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004020 :
4021else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004022 ac_cv_header_stdc=no
4023fi
4024rm -f conftest*
4025
4026fi
4027
4028if test $ac_cv_header_stdc = yes; then
4029 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032else
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 cat >conftest.$ac_ext <<_ACEOF
4034#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004035#include "confdefs.h"
4036#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004037#if ((' ' & 0x0FF) == 0x020)
4038# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4039# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4040#else
4041# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4042 || ('j' <= (c) && (c) <= 'r') \
4043 || ('s' <= (c) && (c) <= 'z'))
4044# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4045#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004046
Martin v. Löwis11437992002-04-12 09:54:03 +00004047#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4048int
4049main ()
4050{
4051 int i;
4052 for (i = 0; i < 256; i++)
4053 if (XOR (islower (i), ISLOWER (i))
4054 || toupper (i) != TOUPPER (i))
4055 exit(2);
4056 exit (0);
4057}
4058_ACEOF
4059rm -f conftest$ac_exeext
4060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4061 (eval $ac_link) 2>&5
4062 ac_status=$?
4063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4066 (eval $ac_try) 2>&5
4067 ac_status=$?
4068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4069 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 :
4071else
Martin v. Löwis11437992002-04-12 09:54:03 +00004072 echo "$as_me: program exited with status $ac_status" >&5
4073echo "$as_me: failed program was:" >&5
4074cat conftest.$ac_ext >&5
4075( exit $ac_status )
4076ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004077fi
Barry Warsawfe33b792003-01-07 22:42:49 +00004078rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
4080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004081fi
4082echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4083echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004084if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085
4086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004089
4090fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004091
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
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
4125
4126
4127
4128
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004129
Barry Warsawfe33b792003-01-07 22:42:49 +00004130
Neal Norwitz82251032003-05-23 14:35:24 +00004131
Martin v. Löwis11437992002-04-12 09:54:03 +00004132for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004133libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004134signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4135unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004136sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004137sys/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 +00004138sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Barry Warsawfe33b792003-01-07 22:42:49 +00004139sys/resource.h netpacket/packet.h sysexits.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004140do
Martin v. Löwis11437992002-04-12 09:54:03 +00004141as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4142if eval "test \"\${$as_ac_Header+set}\" = set"; then
4143 echo "$as_me:$LINENO: checking for $ac_header" >&5
4144echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4145if eval "test \"\${$as_ac_Header+set}\" = set"; then
4146 echo $ECHO_N "(cached) $ECHO_C" >&6
4147fi
4148echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4149echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150else
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 # Is the header compilable?
4152echo "$as_me:$LINENO: checking $ac_header usability" >&5
4153echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4154cat >conftest.$ac_ext <<_ACEOF
4155#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004156#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004157$ac_includes_default
4158#include <$ac_header>
4159_ACEOF
4160rm -f conftest.$ac_objext
4161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4162 (eval $ac_compile) 2>&5
4163 ac_status=$?
4164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4165 (exit $ac_status); } &&
4166 { ac_try='test -s conftest.$ac_objext'
4167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4168 (eval $ac_try) 2>&5
4169 ac_status=$?
4170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171 (exit $ac_status); }; }; then
4172 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004173else
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 echo "$as_me: failed program was:" >&5
4175cat conftest.$ac_ext >&5
4176ac_header_compiler=no
4177fi
4178rm -f conftest.$ac_objext conftest.$ac_ext
4179echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4180echo "${ECHO_T}$ac_header_compiler" >&6
4181
4182# Is the header present?
4183echo "$as_me:$LINENO: checking $ac_header presence" >&5
4184echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4185cat >conftest.$ac_ext <<_ACEOF
4186#line $LINENO "configure"
4187#include "confdefs.h"
4188#include <$ac_header>
4189_ACEOF
4190if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4191 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4192 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004193 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004194 rm -f conftest.er1
4195 cat conftest.err >&5
4196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4197 (exit $ac_status); } >/dev/null; then
4198 if test -s conftest.err; then
4199 ac_cpp_err=$ac_c_preproc_warn_flag
4200 else
4201 ac_cpp_err=
4202 fi
4203else
4204 ac_cpp_err=yes
4205fi
4206if test -z "$ac_cpp_err"; then
4207 ac_header_preproc=yes
4208else
4209 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004210 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004213rm -f conftest.err conftest.$ac_ext
4214echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4215echo "${ECHO_T}$ac_header_preproc" >&6
4216
4217# So? What about this header?
4218case $ac_header_compiler:$ac_header_preproc in
4219 yes:no )
4220 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4221echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4222 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4223echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4224 no:yes )
4225 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4226echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4227 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4228echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4229 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4230echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4231esac
4232echo "$as_me:$LINENO: checking for $ac_header" >&5
4233echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4234if eval "test \"\${$as_ac_Header+set}\" = set"; then
4235 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004236else
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004239echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4240echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4241
4242fi
4243if test `eval echo '${'$as_ac_Header'}'` = yes; then
4244 cat >>confdefs.h <<_ACEOF
4245#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4246_ACEOF
4247
4248fi
4249
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250done
4251
Martin v. Löwis11437992002-04-12 09:54:03 +00004252
4253
4254
4255
4256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004258for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4259 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4260echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4261echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4262if eval "test \"\${$as_ac_Header+set}\" = set"; then
4263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264else
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 cat >conftest.$ac_ext <<_ACEOF
4266#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267#include "confdefs.h"
4268#include <sys/types.h>
4269#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004270
Barry Warsawfe33b792003-01-07 22:42:49 +00004271#ifdef F77_DUMMY_MAIN
4272# ifdef __cplusplus
4273 extern "C"
4274# endif
4275 int F77_DUMMY_MAIN() { return 1; }
4276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004277int
4278main ()
4279{
4280if ((DIR *) 0)
4281return 0;
4282 ;
4283 return 0;
4284}
4285_ACEOF
4286rm -f conftest.$ac_objext
4287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4288 (eval $ac_compile) 2>&5
4289 ac_status=$?
4290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291 (exit $ac_status); } &&
4292 { ac_try='test -s conftest.$ac_objext'
4293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4294 (eval $ac_try) 2>&5
4295 ac_status=$?
4296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4297 (exit $ac_status); }; }; then
4298 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004299else
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 echo "$as_me: failed program was:" >&5
4301cat conftest.$ac_ext >&5
4302eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004304rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004305fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004306echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4307echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4308if test `eval echo '${'$as_ac_Header'}'` = yes; then
4309 cat >>confdefs.h <<_ACEOF
4310#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4311_ACEOF
4312
4313ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004314fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316done
4317# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4318if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004319 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4320echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4321if test "${ac_cv_search_opendir+set}" = set; then
4322 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323else
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 ac_func_search_save_LIBS=$LIBS
4325ac_cv_search_opendir=no
4326cat >conftest.$ac_ext <<_ACEOF
4327#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004329
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004330/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004331#ifdef __cplusplus
4332extern "C"
4333#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004334/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 builtin and then its argument prototype would still apply. */
4336char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004337#ifdef F77_DUMMY_MAIN
4338# ifdef __cplusplus
4339 extern "C"
4340# endif
4341 int F77_DUMMY_MAIN() { return 1; }
4342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004343int
4344main ()
4345{
4346opendir ();
4347 ;
4348 return 0;
4349}
4350_ACEOF
4351rm -f conftest.$ac_objext conftest$ac_exeext
4352if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4353 (eval $ac_link) 2>&5
4354 ac_status=$?
4355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4356 (exit $ac_status); } &&
4357 { ac_try='test -s conftest$ac_exeext'
4358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4359 (eval $ac_try) 2>&5
4360 ac_status=$?
4361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4362 (exit $ac_status); }; }; then
4363 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364else
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 echo "$as_me: failed program was:" >&5
4366cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4369if test "$ac_cv_search_opendir" = no; then
4370 for ac_lib in dir; do
4371 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4372 cat >conftest.$ac_ext <<_ACEOF
4373#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004375
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004376/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004377#ifdef __cplusplus
4378extern "C"
4379#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004380/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004381 builtin and then its argument prototype would still apply. */
4382char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004383#ifdef F77_DUMMY_MAIN
4384# ifdef __cplusplus
4385 extern "C"
4386# endif
4387 int F77_DUMMY_MAIN() { return 1; }
4388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004389int
4390main ()
4391{
4392opendir ();
4393 ;
4394 return 0;
4395}
4396_ACEOF
4397rm -f conftest.$ac_objext conftest$ac_exeext
4398if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4399 (eval $ac_link) 2>&5
4400 ac_status=$?
4401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4402 (exit $ac_status); } &&
4403 { ac_try='test -s conftest$ac_exeext'
4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; }; then
4409 ac_cv_search_opendir="-l$ac_lib"
4410break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004411else
Martin v. Löwis11437992002-04-12 09:54:03 +00004412 echo "$as_me: failed program was:" >&5
4413cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4416 done
4417fi
4418LIBS=$ac_func_search_save_LIBS
4419fi
4420echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4421echo "${ECHO_T}$ac_cv_search_opendir" >&6
4422if test "$ac_cv_search_opendir" != no; then
4423 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004426
Michael W. Hudson54241132001-12-07 15:38:26 +00004427else
Martin v. Löwis11437992002-04-12 09:54:03 +00004428 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4429echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4430if test "${ac_cv_search_opendir+set}" = set; then
4431 echo $ECHO_N "(cached) $ECHO_C" >&6
4432else
4433 ac_func_search_save_LIBS=$LIBS
4434ac_cv_search_opendir=no
4435cat >conftest.$ac_ext <<_ACEOF
4436#line $LINENO "configure"
4437#include "confdefs.h"
4438
4439/* Override any gcc2 internal prototype to avoid an error. */
4440#ifdef __cplusplus
4441extern "C"
4442#endif
4443/* We use char because int might match the return type of a gcc2
4444 builtin and then its argument prototype would still apply. */
4445char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004446#ifdef F77_DUMMY_MAIN
4447# ifdef __cplusplus
4448 extern "C"
4449# endif
4450 int F77_DUMMY_MAIN() { return 1; }
4451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004452int
4453main ()
4454{
4455opendir ();
4456 ;
4457 return 0;
4458}
4459_ACEOF
4460rm -f conftest.$ac_objext conftest$ac_exeext
4461if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4462 (eval $ac_link) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); } &&
4466 { ac_try='test -s conftest$ac_exeext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
4472 ac_cv_search_opendir="none required"
4473else
4474 echo "$as_me: failed program was:" >&5
4475cat conftest.$ac_ext >&5
4476fi
4477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4478if test "$ac_cv_search_opendir" = no; then
4479 for ac_lib in x; do
4480 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4481 cat >conftest.$ac_ext <<_ACEOF
4482#line $LINENO "configure"
4483#include "confdefs.h"
4484
4485/* Override any gcc2 internal prototype to avoid an error. */
4486#ifdef __cplusplus
4487extern "C"
4488#endif
4489/* We use char because int might match the return type of a gcc2
4490 builtin and then its argument prototype would still apply. */
4491char opendir ();
Barry Warsawfe33b792003-01-07 22:42:49 +00004492#ifdef F77_DUMMY_MAIN
4493# ifdef __cplusplus
4494 extern "C"
4495# endif
4496 int F77_DUMMY_MAIN() { return 1; }
4497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00004498int
4499main ()
4500{
4501opendir ();
4502 ;
4503 return 0;
4504}
4505_ACEOF
4506rm -f conftest.$ac_objext conftest$ac_exeext
4507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4508 (eval $ac_link) 2>&5
4509 ac_status=$?
4510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4511 (exit $ac_status); } &&
4512 { ac_try='test -s conftest$ac_exeext'
4513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4514 (eval $ac_try) 2>&5
4515 ac_status=$?
4516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4517 (exit $ac_status); }; }; then
4518 ac_cv_search_opendir="-l$ac_lib"
4519break
4520else
4521 echo "$as_me: failed program was:" >&5
4522cat conftest.$ac_ext >&5
4523fi
4524rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4525 done
4526fi
4527LIBS=$ac_func_search_save_LIBS
4528fi
4529echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4530echo "${ECHO_T}$ac_cv_search_opendir" >&6
4531if test "$ac_cv_search_opendir" != no; then
4532 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534fi
4535
4536fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004537
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004538echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4539echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4540if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4541 echo $ECHO_N "(cached) $ECHO_C" >&6
4542else
4543 cat >conftest.$ac_ext <<_ACEOF
4544#line $LINENO "configure"
4545#include "confdefs.h"
4546#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004547#ifdef F77_DUMMY_MAIN
4548# ifdef __cplusplus
4549 extern "C"
4550# endif
4551 int F77_DUMMY_MAIN() { return 1; }
4552#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004553int
4554main ()
4555{
4556return makedev(0, 0);
4557 ;
4558 return 0;
4559}
4560_ACEOF
4561rm -f conftest.$ac_objext conftest$ac_exeext
4562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4563 (eval $ac_link) 2>&5
4564 ac_status=$?
4565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4566 (exit $ac_status); } &&
4567 { ac_try='test -s conftest$ac_exeext'
4568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4569 (eval $ac_try) 2>&5
4570 ac_status=$?
4571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4572 (exit $ac_status); }; }; then
4573 ac_cv_header_sys_types_h_makedev=yes
4574else
4575 echo "$as_me: failed program was:" >&5
4576cat conftest.$ac_ext >&5
4577ac_cv_header_sys_types_h_makedev=no
4578fi
4579rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4580
4581fi
4582echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4583echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4584
4585if test $ac_cv_header_sys_types_h_makedev = no; then
4586if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4587 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4588echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4589if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4590 echo $ECHO_N "(cached) $ECHO_C" >&6
4591fi
4592echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4593echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4594else
4595 # Is the header compilable?
4596echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4597echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4598cat >conftest.$ac_ext <<_ACEOF
4599#line $LINENO "configure"
4600#include "confdefs.h"
4601$ac_includes_default
4602#include <sys/mkdev.h>
4603_ACEOF
4604rm -f conftest.$ac_objext
4605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4606 (eval $ac_compile) 2>&5
4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); } &&
4610 { ac_try='test -s conftest.$ac_objext'
4611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612 (eval $ac_try) 2>&5
4613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; }; then
4616 ac_header_compiler=yes
4617else
4618 echo "$as_me: failed program was:" >&5
4619cat conftest.$ac_ext >&5
4620ac_header_compiler=no
4621fi
4622rm -f conftest.$ac_objext conftest.$ac_ext
4623echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4624echo "${ECHO_T}$ac_header_compiler" >&6
4625
4626# Is the header present?
4627echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4628echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4629cat >conftest.$ac_ext <<_ACEOF
4630#line $LINENO "configure"
4631#include "confdefs.h"
4632#include <sys/mkdev.h>
4633_ACEOF
4634if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4635 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4636 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004637 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004638 rm -f conftest.er1
4639 cat conftest.err >&5
4640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4641 (exit $ac_status); } >/dev/null; then
4642 if test -s conftest.err; then
4643 ac_cpp_err=$ac_c_preproc_warn_flag
4644 else
4645 ac_cpp_err=
4646 fi
4647else
4648 ac_cpp_err=yes
4649fi
4650if test -z "$ac_cpp_err"; then
4651 ac_header_preproc=yes
4652else
4653 echo "$as_me: failed program was:" >&5
4654 cat conftest.$ac_ext >&5
4655 ac_header_preproc=no
4656fi
4657rm -f conftest.err conftest.$ac_ext
4658echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4659echo "${ECHO_T}$ac_header_preproc" >&6
4660
4661# So? What about this header?
4662case $ac_header_compiler:$ac_header_preproc in
4663 yes:no )
4664 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4665echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4666 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4667echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4668 no:yes )
4669 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4670echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4671 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4672echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4673 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4674echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4675esac
4676echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4677echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4678if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4679 echo $ECHO_N "(cached) $ECHO_C" >&6
4680else
4681 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4682fi
4683echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4684echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4685
4686fi
4687if test $ac_cv_header_sys_mkdev_h = yes; then
4688
4689cat >>confdefs.h <<\_ACEOF
4690#define MAJOR_IN_MKDEV 1
4691_ACEOF
4692
4693fi
4694
4695
4696
4697 if test $ac_cv_header_sys_mkdev_h = no; then
4698 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4699 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4700echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4701if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4702 echo $ECHO_N "(cached) $ECHO_C" >&6
4703fi
4704echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4705echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4706else
4707 # Is the header compilable?
4708echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4709echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4710cat >conftest.$ac_ext <<_ACEOF
4711#line $LINENO "configure"
4712#include "confdefs.h"
4713$ac_includes_default
4714#include <sys/sysmacros.h>
4715_ACEOF
4716rm -f conftest.$ac_objext
4717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4718 (eval $ac_compile) 2>&5
4719 ac_status=$?
4720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4721 (exit $ac_status); } &&
4722 { ac_try='test -s conftest.$ac_objext'
4723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4724 (eval $ac_try) 2>&5
4725 ac_status=$?
4726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4727 (exit $ac_status); }; }; then
4728 ac_header_compiler=yes
4729else
4730 echo "$as_me: failed program was:" >&5
4731cat conftest.$ac_ext >&5
4732ac_header_compiler=no
4733fi
4734rm -f conftest.$ac_objext conftest.$ac_ext
4735echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4736echo "${ECHO_T}$ac_header_compiler" >&6
4737
4738# Is the header present?
4739echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4740echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4741cat >conftest.$ac_ext <<_ACEOF
4742#line $LINENO "configure"
4743#include "confdefs.h"
4744#include <sys/sysmacros.h>
4745_ACEOF
4746if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4747 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4748 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +00004749 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004750 rm -f conftest.er1
4751 cat conftest.err >&5
4752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4753 (exit $ac_status); } >/dev/null; then
4754 if test -s conftest.err; then
4755 ac_cpp_err=$ac_c_preproc_warn_flag
4756 else
4757 ac_cpp_err=
4758 fi
4759else
4760 ac_cpp_err=yes
4761fi
4762if test -z "$ac_cpp_err"; then
4763 ac_header_preproc=yes
4764else
4765 echo "$as_me: failed program was:" >&5
4766 cat conftest.$ac_ext >&5
4767 ac_header_preproc=no
4768fi
4769rm -f conftest.err conftest.$ac_ext
4770echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4771echo "${ECHO_T}$ac_header_preproc" >&6
4772
4773# So? What about this header?
4774case $ac_header_compiler:$ac_header_preproc in
4775 yes:no )
4776 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4777echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4778 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4779echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4780 no:yes )
4781 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4782echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4783 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4784echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4785 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4786echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4787esac
4788echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4789echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4790if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4791 echo $ECHO_N "(cached) $ECHO_C" >&6
4792else
4793 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4794fi
4795echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4796echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4797
4798fi
4799if test $ac_cv_header_sys_sysmacros_h = yes; then
4800
4801cat >>confdefs.h <<\_ACEOF
4802#define MAJOR_IN_SYSMACROS 1
4803_ACEOF
4804
4805fi
4806
4807
4808 fi
4809fi
4810
Michael W. Hudson54241132001-12-07 15:38:26 +00004811
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004813was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004814echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4815echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4816cat >conftest.$ac_ext <<_ACEOF
4817#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004818#include "confdefs.h"
4819#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004820
4821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00004823 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004824 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004825else
Martin v. Löwis11437992002-04-12 09:54:03 +00004826
4827
4828cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004830_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004831
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004832
Guido van Rossum627b2d71993-12-24 10:39:16 +00004833fi
4834rm -f conftest*
4835
Martin v. Löwis11437992002-04-12 09:54:03 +00004836echo "$as_me:$LINENO: result: $was_it_defined" >&5
4837echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004838
Neal Norwitz11690112002-07-30 01:08:28 +00004839# Check whether using makedev requires defining _OSF_SOURCE
4840echo "$as_me:$LINENO: checking for makedev" >&5
4841echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4842cat >conftest.$ac_ext <<_ACEOF
4843#line $LINENO "configure"
4844#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004845#include <sys/types.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00004846#ifdef F77_DUMMY_MAIN
4847# ifdef __cplusplus
4848 extern "C"
4849# endif
4850 int F77_DUMMY_MAIN() { return 1; }
4851#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004852int
4853main ()
4854{
4855 makedev(0, 0)
4856 ;
4857 return 0;
4858}
4859_ACEOF
4860rm -f conftest.$ac_objext conftest$ac_exeext
4861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4862 (eval $ac_link) 2>&5
4863 ac_status=$?
4864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4865 (exit $ac_status); } &&
4866 { ac_try='test -s conftest$ac_exeext'
4867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4868 (eval $ac_try) 2>&5
4869 ac_status=$?
4870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871 (exit $ac_status); }; }; then
4872 ac_cv_has_makedev=yes
4873else
4874 echo "$as_me: failed program was:" >&5
4875cat conftest.$ac_ext >&5
4876ac_cv_has_makedev=no
4877fi
4878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4879if test "$ac_cv_has_makedev" = "no"; then
4880 # we didn't link, try if _OSF_SOURCE will allow us to link
4881 cat >conftest.$ac_ext <<_ACEOF
4882#line $LINENO "configure"
4883#include "confdefs.h"
4884
Neal Norwitz6eb37f02003-02-23 23:28:15 +00004885#define _OSF_SOURCE 1
4886#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004887
Barry Warsawfe33b792003-01-07 22:42:49 +00004888#ifdef F77_DUMMY_MAIN
4889# ifdef __cplusplus
4890 extern "C"
4891# endif
4892 int F77_DUMMY_MAIN() { return 1; }
4893#endif
Neal Norwitz11690112002-07-30 01:08:28 +00004894int
4895main ()
4896{
4897 makedev(0, 0)
4898 ;
4899 return 0;
4900}
4901_ACEOF
4902rm -f conftest.$ac_objext conftest$ac_exeext
4903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4904 (eval $ac_link) 2>&5
4905 ac_status=$?
4906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4907 (exit $ac_status); } &&
4908 { ac_try='test -s conftest$ac_exeext'
4909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4910 (eval $ac_try) 2>&5
4911 ac_status=$?
4912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4913 (exit $ac_status); }; }; then
4914 ac_cv_has_makedev=yes
4915else
4916 echo "$as_me: failed program was:" >&5
4917cat conftest.$ac_ext >&5
4918ac_cv_has_makedev=no
4919fi
4920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4921 if test "$ac_cv_has_makedev" = "yes"; then
4922
4923cat >>confdefs.h <<\_ACEOF
4924#define _OSF_SOURCE 1
4925_ACEOF
4926
4927 fi
4928fi
4929echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4930echo "${ECHO_T}$ac_cv_has_makedev" >&6
4931if test "$ac_cv_has_makedev" = "yes"; then
4932
4933cat >>confdefs.h <<\_ACEOF
4934#define HAVE_MAKEDEV 1
4935_ACEOF
4936
4937fi
4938
Martin v. Löwis399a6892002-10-04 10:22:02 +00004939# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4940# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4941# defined, but the compiler does not support pragma redefine_extname,
4942# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4943# structures (such as rlimit64) without declaring them. As a
4944# work-around, disable LFS on such configurations
4945
4946use_lfs=yes
4947echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4948echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4949cat >conftest.$ac_ext <<_ACEOF
4950#line $LINENO "configure"
4951#include "confdefs.h"
4952
4953#define _LARGEFILE_SOURCE 1
4954#define _FILE_OFFSET_BITS 64
4955#include <sys/resource.h>
4956
Barry Warsawfe33b792003-01-07 22:42:49 +00004957#ifdef F77_DUMMY_MAIN
4958# ifdef __cplusplus
4959 extern "C"
4960# endif
4961 int F77_DUMMY_MAIN() { return 1; }
4962#endif
Martin v. Löwis399a6892002-10-04 10:22:02 +00004963int
4964main ()
4965{
4966struct rlimit foo;
4967 ;
4968 return 0;
4969}
4970_ACEOF
4971rm -f conftest.$ac_objext
4972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4973 (eval $ac_compile) 2>&5
4974 ac_status=$?
4975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4976 (exit $ac_status); } &&
4977 { ac_try='test -s conftest.$ac_objext'
4978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4979 (eval $ac_try) 2>&5
4980 ac_status=$?
4981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4982 (exit $ac_status); }; }; then
4983 sol_lfs_bug=no
4984else
4985 echo "$as_me: failed program was:" >&5
4986cat conftest.$ac_ext >&5
4987sol_lfs_bug=yes
4988fi
4989rm -f conftest.$ac_objext conftest.$ac_ext
4990echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4991echo "${ECHO_T}$sol_lfs_bug" >&6
4992if test "$sol_lfs_bug" = "yes"; then
4993 use_lfs=no
4994fi
4995
4996if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004997# Two defines needed to enable largefile support on various platforms
4998# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004999
Martin v. Löwis11437992002-04-12 09:54:03 +00005000cat >>confdefs.h <<\_ACEOF
5001#define _LARGEFILE_SOURCE 1
5002_ACEOF
5003
5004
5005cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005006#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005007_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005008
Martin v. Löwis399a6892002-10-04 10:22:02 +00005009fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005010
Guido van Rossum84e7b241996-08-19 21:59:00 +00005011# Add some code to confdefs.h so that the test for off_t works on SCO
5012cat >> confdefs.h <<\EOF
5013#if defined(SCO_DS)
5014#undef _OFF_T
5015#endif
5016EOF
5017
Guido van Rossumef2255b2000-03-10 22:30:29 +00005018# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005019echo "$as_me:$LINENO: checking for mode_t" >&5
5020echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5021if test "${ac_cv_type_mode_t+set}" = set; then
5022 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023else
Martin v. Löwis11437992002-04-12 09:54:03 +00005024 cat >conftest.$ac_ext <<_ACEOF
5025#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005026#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005027$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005028#ifdef F77_DUMMY_MAIN
5029# ifdef __cplusplus
5030 extern "C"
5031# endif
5032 int F77_DUMMY_MAIN() { return 1; }
5033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005034int
5035main ()
5036{
5037if ((mode_t *) 0)
5038 return 0;
5039if (sizeof (mode_t))
5040 return 0;
5041 ;
5042 return 0;
5043}
5044_ACEOF
5045rm -f conftest.$ac_objext
5046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5047 (eval $ac_compile) 2>&5
5048 ac_status=$?
5049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); } &&
5051 { ac_try='test -s conftest.$ac_objext'
5052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5053 (eval $ac_try) 2>&5
5054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005057 ac_cv_type_mode_t=yes
5058else
Martin v. Löwis11437992002-04-12 09:54:03 +00005059 echo "$as_me: failed program was:" >&5
5060cat conftest.$ac_ext >&5
5061ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005063rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005065echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5066echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5067if test $ac_cv_type_mode_t = yes; then
5068 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069else
Martin v. Löwis11437992002-04-12 09:54:03 +00005070
5071cat >>confdefs.h <<_ACEOF
5072#define mode_t int
5073_ACEOF
5074
5075fi
5076
5077echo "$as_me:$LINENO: checking for off_t" >&5
5078echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5079if test "${ac_cv_type_off_t+set}" = set; then
5080 echo $ECHO_N "(cached) $ECHO_C" >&6
5081else
5082 cat >conftest.$ac_ext <<_ACEOF
5083#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005085$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005086#ifdef F77_DUMMY_MAIN
5087# ifdef __cplusplus
5088 extern "C"
5089# endif
5090 int F77_DUMMY_MAIN() { return 1; }
5091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005092int
5093main ()
5094{
5095if ((off_t *) 0)
5096 return 0;
5097if (sizeof (off_t))
5098 return 0;
5099 ;
5100 return 0;
5101}
5102_ACEOF
5103rm -f conftest.$ac_objext
5104if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5105 (eval $ac_compile) 2>&5
5106 ac_status=$?
5107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); } &&
5109 { ac_try='test -s conftest.$ac_objext'
5110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5111 (eval $ac_try) 2>&5
5112 ac_status=$?
5113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5114 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005115 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005116else
Martin v. Löwis11437992002-04-12 09:54:03 +00005117 echo "$as_me: failed program was:" >&5
5118cat conftest.$ac_ext >&5
5119ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005121rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005122fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005123echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5124echo "${ECHO_T}$ac_cv_type_off_t" >&6
5125if test $ac_cv_type_off_t = yes; then
5126 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127else
Martin v. Löwis11437992002-04-12 09:54:03 +00005128
5129cat >>confdefs.h <<_ACEOF
5130#define off_t long
5131_ACEOF
5132
5133fi
5134
5135echo "$as_me:$LINENO: checking for pid_t" >&5
5136echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5137if test "${ac_cv_type_pid_t+set}" = set; then
5138 echo $ECHO_N "(cached) $ECHO_C" >&6
5139else
5140 cat >conftest.$ac_ext <<_ACEOF
5141#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005143$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005144#ifdef F77_DUMMY_MAIN
5145# ifdef __cplusplus
5146 extern "C"
5147# endif
5148 int F77_DUMMY_MAIN() { return 1; }
5149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005150int
5151main ()
5152{
5153if ((pid_t *) 0)
5154 return 0;
5155if (sizeof (pid_t))
5156 return 0;
5157 ;
5158 return 0;
5159}
5160_ACEOF
5161rm -f conftest.$ac_objext
5162if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5163 (eval $ac_compile) 2>&5
5164 ac_status=$?
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); } &&
5167 { ac_try='test -s conftest.$ac_objext'
5168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5169 (eval $ac_try) 2>&5
5170 ac_status=$?
5171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5172 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005173 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005174else
Martin v. Löwis11437992002-04-12 09:54:03 +00005175 echo "$as_me: failed program was:" >&5
5176cat conftest.$ac_ext >&5
5177ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005179rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005181echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5182echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5183if test $ac_cv_type_pid_t = yes; then
5184 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185else
Martin v. Löwis11437992002-04-12 09:54:03 +00005186
5187cat >>confdefs.h <<_ACEOF
5188#define pid_t int
5189_ACEOF
5190
5191fi
5192
5193echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5194echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5195if test "${ac_cv_type_signal+set}" = set; then
5196 echo $ECHO_N "(cached) $ECHO_C" >&6
5197else
5198 cat >conftest.$ac_ext <<_ACEOF
5199#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005200#include "confdefs.h"
5201#include <sys/types.h>
5202#include <signal.h>
5203#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005204# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005205#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005206#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005207extern "C" void (*signal (int, void (*)(int)))(int);
5208#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005209void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005210#endif
5211
Barry Warsawfe33b792003-01-07 22:42:49 +00005212#ifdef F77_DUMMY_MAIN
5213# ifdef __cplusplus
5214 extern "C"
5215# endif
5216 int F77_DUMMY_MAIN() { return 1; }
5217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005218int
5219main ()
5220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005222 ;
5223 return 0;
5224}
5225_ACEOF
5226rm -f conftest.$ac_objext
5227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5228 (eval $ac_compile) 2>&5
5229 ac_status=$?
5230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5231 (exit $ac_status); } &&
5232 { ac_try='test -s conftest.$ac_objext'
5233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5234 (eval $ac_try) 2>&5
5235 ac_status=$?
5236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005239else
Martin v. Löwis11437992002-04-12 09:54:03 +00005240 echo "$as_me: failed program was:" >&5
5241cat conftest.$ac_ext >&5
5242ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005243fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005244rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005246echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5247echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005248
Martin v. Löwis11437992002-04-12 09:54:03 +00005249cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005251_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005252
Michael W. Hudson54241132001-12-07 15:38:26 +00005253
Martin v. Löwis11437992002-04-12 09:54:03 +00005254echo "$as_me:$LINENO: checking for size_t" >&5
5255echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5256if test "${ac_cv_type_size_t+set}" = set; then
5257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005258else
Martin v. Löwis11437992002-04-12 09:54:03 +00005259 cat >conftest.$ac_ext <<_ACEOF
5260#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005261#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005262$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005263#ifdef F77_DUMMY_MAIN
5264# ifdef __cplusplus
5265 extern "C"
5266# endif
5267 int F77_DUMMY_MAIN() { return 1; }
5268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005269int
5270main ()
5271{
5272if ((size_t *) 0)
5273 return 0;
5274if (sizeof (size_t))
5275 return 0;
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280rm -f conftest.$ac_objext
5281if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5282 (eval $ac_compile) 2>&5
5283 ac_status=$?
5284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5285 (exit $ac_status); } &&
5286 { ac_try='test -s conftest.$ac_objext'
5287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5288 (eval $ac_try) 2>&5
5289 ac_status=$?
5290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5291 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005292 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005293else
Martin v. Löwis11437992002-04-12 09:54:03 +00005294 echo "$as_me: failed program was:" >&5
5295cat conftest.$ac_ext >&5
5296ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005297fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005298rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005299fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005300echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5301echo "${ECHO_T}$ac_cv_type_size_t" >&6
5302if test $ac_cv_type_size_t = yes; then
5303 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005304else
Martin v. Löwis11437992002-04-12 09:54:03 +00005305
5306cat >>confdefs.h <<_ACEOF
5307#define size_t unsigned
5308_ACEOF
5309
5310fi
5311
5312echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5313echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5314if test "${ac_cv_type_uid_t+set}" = set; then
5315 echo $ECHO_N "(cached) $ECHO_C" >&6
5316else
5317 cat >conftest.$ac_ext <<_ACEOF
5318#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319#include "confdefs.h"
5320#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005321
5322_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +00005324 egrep "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005325 ac_cv_type_uid_t=yes
5326else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327 ac_cv_type_uid_t=no
5328fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005329rm -f conftest*
5330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005332echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5333echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005334if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005335
Martin v. Löwis11437992002-04-12 09:54:03 +00005336cat >>confdefs.h <<\_ACEOF
5337#define uid_t int
5338_ACEOF
5339
5340
5341cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005343_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344
5345fi
5346
Jack Jansendd19cf82001-12-06 22:36:17 +00005347
Michael W. Hudson54241132001-12-07 15:38:26 +00005348# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005349echo "$as_me:$LINENO: checking for int" >&5
5350echo $ECHO_N "checking for int... $ECHO_C" >&6
5351if test "${ac_cv_type_int+set}" = set; then
5352 echo $ECHO_N "(cached) $ECHO_C" >&6
5353else
5354 cat >conftest.$ac_ext <<_ACEOF
5355#line $LINENO "configure"
5356#include "confdefs.h"
5357$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005358#ifdef F77_DUMMY_MAIN
5359# ifdef __cplusplus
5360 extern "C"
5361# endif
5362 int F77_DUMMY_MAIN() { return 1; }
5363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005364int
5365main ()
5366{
5367if ((int *) 0)
5368 return 0;
5369if (sizeof (int))
5370 return 0;
5371 ;
5372 return 0;
5373}
5374_ACEOF
5375rm -f conftest.$ac_objext
5376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5377 (eval $ac_compile) 2>&5
5378 ac_status=$?
5379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5380 (exit $ac_status); } &&
5381 { ac_try='test -s conftest.$ac_objext'
5382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5383 (eval $ac_try) 2>&5
5384 ac_status=$?
5385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386 (exit $ac_status); }; }; then
5387 ac_cv_type_int=yes
5388else
5389 echo "$as_me: failed program was:" >&5
5390cat conftest.$ac_ext >&5
5391ac_cv_type_int=no
5392fi
5393rm -f conftest.$ac_objext conftest.$ac_ext
5394fi
5395echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5396echo "${ECHO_T}$ac_cv_type_int" >&6
5397
5398echo "$as_me:$LINENO: checking size of int" >&5
5399echo $ECHO_N "checking size of int... $ECHO_C" >&6
5400if test "${ac_cv_sizeof_int+set}" = set; then
5401 echo $ECHO_N "(cached) $ECHO_C" >&6
5402else
5403 if test "$ac_cv_type_int" = yes; then
5404 # The cast to unsigned long works around a bug in the HP C Compiler
5405 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5406 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5407 # This bug is HP SR number 8606223364.
5408 if test "$cross_compiling" = yes; then
5409 # Depending upon the size, compute the lo and hi bounds.
5410cat >conftest.$ac_ext <<_ACEOF
5411#line $LINENO "configure"
5412#include "confdefs.h"
5413$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005414#ifdef F77_DUMMY_MAIN
5415# ifdef __cplusplus
5416 extern "C"
5417# endif
5418 int F77_DUMMY_MAIN() { return 1; }
5419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005420int
5421main ()
5422{
5423static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5424test_array [0] = 0
5425
5426 ;
5427 return 0;
5428}
5429_ACEOF
5430rm -f conftest.$ac_objext
5431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5432 (eval $ac_compile) 2>&5
5433 ac_status=$?
5434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5435 (exit $ac_status); } &&
5436 { ac_try='test -s conftest.$ac_objext'
5437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5438 (eval $ac_try) 2>&5
5439 ac_status=$?
5440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5441 (exit $ac_status); }; }; then
5442 ac_lo=0 ac_mid=0
5443 while :; do
5444 cat >conftest.$ac_ext <<_ACEOF
5445#line $LINENO "configure"
5446#include "confdefs.h"
5447$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005448#ifdef F77_DUMMY_MAIN
5449# ifdef __cplusplus
5450 extern "C"
5451# endif
5452 int F77_DUMMY_MAIN() { return 1; }
5453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005454int
5455main ()
5456{
5457static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5458test_array [0] = 0
5459
5460 ;
5461 return 0;
5462}
5463_ACEOF
5464rm -f conftest.$ac_objext
5465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5466 (eval $ac_compile) 2>&5
5467 ac_status=$?
5468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5469 (exit $ac_status); } &&
5470 { ac_try='test -s conftest.$ac_objext'
5471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5472 (eval $ac_try) 2>&5
5473 ac_status=$?
5474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475 (exit $ac_status); }; }; then
5476 ac_hi=$ac_mid; break
5477else
5478 echo "$as_me: failed program was:" >&5
5479cat conftest.$ac_ext >&5
5480ac_lo=`expr $ac_mid + 1`
5481 if test $ac_lo -le $ac_mid; then
5482 ac_lo= ac_hi=
5483 break
5484 fi
5485 ac_mid=`expr 2 '*' $ac_mid + 1`
5486fi
5487rm -f conftest.$ac_objext conftest.$ac_ext
5488 done
5489else
5490 echo "$as_me: failed program was:" >&5
5491cat conftest.$ac_ext >&5
5492cat >conftest.$ac_ext <<_ACEOF
5493#line $LINENO "configure"
5494#include "confdefs.h"
5495$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005496#ifdef F77_DUMMY_MAIN
5497# ifdef __cplusplus
5498 extern "C"
5499# endif
5500 int F77_DUMMY_MAIN() { return 1; }
5501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005502int
5503main ()
5504{
5505static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5506test_array [0] = 0
5507
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512rm -f conftest.$ac_objext
5513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5514 (eval $ac_compile) 2>&5
5515 ac_status=$?
5516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517 (exit $ac_status); } &&
5518 { ac_try='test -s conftest.$ac_objext'
5519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }; }; then
5524 ac_hi=-1 ac_mid=-1
5525 while :; do
5526 cat >conftest.$ac_ext <<_ACEOF
5527#line $LINENO "configure"
5528#include "confdefs.h"
5529$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005530#ifdef F77_DUMMY_MAIN
5531# ifdef __cplusplus
5532 extern "C"
5533# endif
5534 int F77_DUMMY_MAIN() { return 1; }
5535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005536int
5537main ()
5538{
5539static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5540test_array [0] = 0
5541
5542 ;
5543 return 0;
5544}
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5548 (eval $ac_compile) 2>&5
5549 ac_status=$?
5550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551 (exit $ac_status); } &&
5552 { ac_try='test -s conftest.$ac_objext'
5553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5554 (eval $ac_try) 2>&5
5555 ac_status=$?
5556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557 (exit $ac_status); }; }; then
5558 ac_lo=$ac_mid; break
5559else
5560 echo "$as_me: failed program was:" >&5
5561cat conftest.$ac_ext >&5
5562ac_hi=`expr '(' $ac_mid ')' - 1`
5563 if test $ac_mid -le $ac_hi; then
5564 ac_lo= ac_hi=
5565 break
5566 fi
5567 ac_mid=`expr 2 '*' $ac_mid`
5568fi
5569rm -f conftest.$ac_objext conftest.$ac_ext
5570 done
5571else
5572 echo "$as_me: failed program was:" >&5
5573cat conftest.$ac_ext >&5
5574ac_lo= ac_hi=
5575fi
5576rm -f conftest.$ac_objext conftest.$ac_ext
5577fi
5578rm -f conftest.$ac_objext conftest.$ac_ext
5579# Binary search between lo and hi bounds.
5580while test "x$ac_lo" != "x$ac_hi"; do
5581 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5582 cat >conftest.$ac_ext <<_ACEOF
5583#line $LINENO "configure"
5584#include "confdefs.h"
5585$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005586#ifdef F77_DUMMY_MAIN
5587# ifdef __cplusplus
5588 extern "C"
5589# endif
5590 int F77_DUMMY_MAIN() { return 1; }
5591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005592int
5593main ()
5594{
5595static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5596test_array [0] = 0
5597
5598 ;
5599 return 0;
5600}
5601_ACEOF
5602rm -f conftest.$ac_objext
5603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5604 (eval $ac_compile) 2>&5
5605 ac_status=$?
5606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5607 (exit $ac_status); } &&
5608 { ac_try='test -s conftest.$ac_objext'
5609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5610 (eval $ac_try) 2>&5
5611 ac_status=$?
5612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5613 (exit $ac_status); }; }; then
5614 ac_hi=$ac_mid
5615else
5616 echo "$as_me: failed program was:" >&5
5617cat conftest.$ac_ext >&5
5618ac_lo=`expr '(' $ac_mid ')' + 1`
5619fi
5620rm -f conftest.$ac_objext conftest.$ac_ext
5621done
5622case $ac_lo in
5623?*) ac_cv_sizeof_int=$ac_lo;;
5624'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5625echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5626 { (exit 1); exit 1; }; } ;;
5627esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005628else
5629 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005630 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5631echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5632 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005633else
Martin v. Löwis11437992002-04-12 09:54:03 +00005634 cat >conftest.$ac_ext <<_ACEOF
5635#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005636#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005637$ac_includes_default
5638long longval () { return (long) (sizeof (int)); }
5639unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005640#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005641#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00005642#ifdef F77_DUMMY_MAIN
5643# ifdef __cplusplus
5644 extern "C"
5645# endif
5646 int F77_DUMMY_MAIN() { return 1; }
5647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005648int
5649main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005650{
Martin v. Löwis11437992002-04-12 09:54:03 +00005651
5652 FILE *f = fopen ("conftest.val", "w");
5653 if (! f)
5654 exit (1);
5655 if (((long) (sizeof (int))) < 0)
5656 {
5657 long i = longval ();
5658 if (i != ((long) (sizeof (int))))
5659 exit (1);
5660 fprintf (f, "%ld\n", i);
5661 }
5662 else
5663 {
5664 unsigned long i = ulongval ();
5665 if (i != ((long) (sizeof (int))))
5666 exit (1);
5667 fprintf (f, "%lu\n", i);
5668 }
5669 exit (ferror (f) || fclose (f) != 0);
5670
5671 ;
5672 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005673}
Martin v. Löwis11437992002-04-12 09:54:03 +00005674_ACEOF
5675rm -f conftest$ac_exeext
5676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5677 (eval $ac_link) 2>&5
5678 ac_status=$?
5679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682 (eval $ac_try) 2>&5
5683 ac_status=$?
5684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685 (exit $ac_status); }; }; then
5686 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005687else
Martin v. Löwis11437992002-04-12 09:54:03 +00005688 echo "$as_me: program exited with status $ac_status" >&5
5689echo "$as_me: failed program was:" >&5
5690cat conftest.$ac_ext >&5
5691( exit $ac_status )
5692{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5693echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5694 { (exit 1); exit 1; }; }
5695fi
Barry Warsawfe33b792003-01-07 22:42:49 +00005696rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005697fi
5698fi
5699rm -f conftest.val
5700else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005701 ac_cv_sizeof_int=0
5702fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005704echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5705echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5706cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005707#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005708_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005709
5710
Martin v. Löwis11437992002-04-12 09:54:03 +00005711echo "$as_me:$LINENO: checking for long" >&5
5712echo $ECHO_N "checking for long... $ECHO_C" >&6
5713if test "${ac_cv_type_long+set}" = set; then
5714 echo $ECHO_N "(cached) $ECHO_C" >&6
5715else
5716 cat >conftest.$ac_ext <<_ACEOF
5717#line $LINENO "configure"
5718#include "confdefs.h"
5719$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005720#ifdef F77_DUMMY_MAIN
5721# ifdef __cplusplus
5722 extern "C"
5723# endif
5724 int F77_DUMMY_MAIN() { return 1; }
5725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005726int
5727main ()
5728{
5729if ((long *) 0)
5730 return 0;
5731if (sizeof (long))
5732 return 0;
5733 ;
5734 return 0;
5735}
5736_ACEOF
5737rm -f conftest.$ac_objext
5738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); } &&
5743 { ac_try='test -s conftest.$ac_objext'
5744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
5747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5748 (exit $ac_status); }; }; then
5749 ac_cv_type_long=yes
5750else
5751 echo "$as_me: failed program was:" >&5
5752cat conftest.$ac_ext >&5
5753ac_cv_type_long=no
5754fi
5755rm -f conftest.$ac_objext conftest.$ac_ext
5756fi
5757echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5758echo "${ECHO_T}$ac_cv_type_long" >&6
5759
5760echo "$as_me:$LINENO: checking size of long" >&5
5761echo $ECHO_N "checking size of long... $ECHO_C" >&6
5762if test "${ac_cv_sizeof_long+set}" = set; then
5763 echo $ECHO_N "(cached) $ECHO_C" >&6
5764else
5765 if test "$ac_cv_type_long" = yes; then
5766 # The cast to unsigned long works around a bug in the HP C Compiler
5767 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5768 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5769 # This bug is HP SR number 8606223364.
5770 if test "$cross_compiling" = yes; then
5771 # Depending upon the size, compute the lo and hi bounds.
5772cat >conftest.$ac_ext <<_ACEOF
5773#line $LINENO "configure"
5774#include "confdefs.h"
5775$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005776#ifdef F77_DUMMY_MAIN
5777# ifdef __cplusplus
5778 extern "C"
5779# endif
5780 int F77_DUMMY_MAIN() { return 1; }
5781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005782int
5783main ()
5784{
5785static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5786test_array [0] = 0
5787
5788 ;
5789 return 0;
5790}
5791_ACEOF
5792rm -f conftest.$ac_objext
5793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5794 (eval $ac_compile) 2>&5
5795 ac_status=$?
5796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); } &&
5798 { ac_try='test -s conftest.$ac_objext'
5799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5800 (eval $ac_try) 2>&5
5801 ac_status=$?
5802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803 (exit $ac_status); }; }; then
5804 ac_lo=0 ac_mid=0
5805 while :; do
5806 cat >conftest.$ac_ext <<_ACEOF
5807#line $LINENO "configure"
5808#include "confdefs.h"
5809$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005810#ifdef F77_DUMMY_MAIN
5811# ifdef __cplusplus
5812 extern "C"
5813# endif
5814 int F77_DUMMY_MAIN() { return 1; }
5815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005816int
5817main ()
5818{
5819static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5820test_array [0] = 0
5821
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
5827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5828 (eval $ac_compile) 2>&5
5829 ac_status=$?
5830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5831 (exit $ac_status); } &&
5832 { ac_try='test -s conftest.$ac_objext'
5833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5834 (eval $ac_try) 2>&5
5835 ac_status=$?
5836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5837 (exit $ac_status); }; }; then
5838 ac_hi=$ac_mid; break
5839else
5840 echo "$as_me: failed program was:" >&5
5841cat conftest.$ac_ext >&5
5842ac_lo=`expr $ac_mid + 1`
5843 if test $ac_lo -le $ac_mid; then
5844 ac_lo= ac_hi=
5845 break
5846 fi
5847 ac_mid=`expr 2 '*' $ac_mid + 1`
5848fi
5849rm -f conftest.$ac_objext conftest.$ac_ext
5850 done
5851else
5852 echo "$as_me: failed program was:" >&5
5853cat conftest.$ac_ext >&5
5854cat >conftest.$ac_ext <<_ACEOF
5855#line $LINENO "configure"
5856#include "confdefs.h"
5857$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005858#ifdef F77_DUMMY_MAIN
5859# ifdef __cplusplus
5860 extern "C"
5861# endif
5862 int F77_DUMMY_MAIN() { return 1; }
5863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005864int
5865main ()
5866{
5867static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5868test_array [0] = 0
5869
5870 ;
5871 return 0;
5872}
5873_ACEOF
5874rm -f conftest.$ac_objext
5875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5876 (eval $ac_compile) 2>&5
5877 ac_status=$?
5878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5879 (exit $ac_status); } &&
5880 { ac_try='test -s conftest.$ac_objext'
5881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5882 (eval $ac_try) 2>&5
5883 ac_status=$?
5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885 (exit $ac_status); }; }; then
5886 ac_hi=-1 ac_mid=-1
5887 while :; do
5888 cat >conftest.$ac_ext <<_ACEOF
5889#line $LINENO "configure"
5890#include "confdefs.h"
5891$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005892#ifdef F77_DUMMY_MAIN
5893# ifdef __cplusplus
5894 extern "C"
5895# endif
5896 int F77_DUMMY_MAIN() { return 1; }
5897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005898int
5899main ()
5900{
5901static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5902test_array [0] = 0
5903
5904 ;
5905 return 0;
5906}
5907_ACEOF
5908rm -f conftest.$ac_objext
5909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5910 (eval $ac_compile) 2>&5
5911 ac_status=$?
5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913 (exit $ac_status); } &&
5914 { ac_try='test -s conftest.$ac_objext'
5915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5916 (eval $ac_try) 2>&5
5917 ac_status=$?
5918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5919 (exit $ac_status); }; }; then
5920 ac_lo=$ac_mid; break
5921else
5922 echo "$as_me: failed program was:" >&5
5923cat conftest.$ac_ext >&5
5924ac_hi=`expr '(' $ac_mid ')' - 1`
5925 if test $ac_mid -le $ac_hi; then
5926 ac_lo= ac_hi=
5927 break
5928 fi
5929 ac_mid=`expr 2 '*' $ac_mid`
5930fi
5931rm -f conftest.$ac_objext conftest.$ac_ext
5932 done
5933else
5934 echo "$as_me: failed program was:" >&5
5935cat conftest.$ac_ext >&5
5936ac_lo= ac_hi=
5937fi
5938rm -f conftest.$ac_objext conftest.$ac_ext
5939fi
5940rm -f conftest.$ac_objext conftest.$ac_ext
5941# Binary search between lo and hi bounds.
5942while test "x$ac_lo" != "x$ac_hi"; do
5943 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5944 cat >conftest.$ac_ext <<_ACEOF
5945#line $LINENO "configure"
5946#include "confdefs.h"
5947$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00005948#ifdef F77_DUMMY_MAIN
5949# ifdef __cplusplus
5950 extern "C"
5951# endif
5952 int F77_DUMMY_MAIN() { return 1; }
5953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005954int
5955main ()
5956{
5957static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5958test_array [0] = 0
5959
5960 ;
5961 return 0;
5962}
5963_ACEOF
5964rm -f conftest.$ac_objext
5965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5966 (eval $ac_compile) 2>&5
5967 ac_status=$?
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); } &&
5970 { ac_try='test -s conftest.$ac_objext'
5971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); }; }; then
5976 ac_hi=$ac_mid
5977else
5978 echo "$as_me: failed program was:" >&5
5979cat conftest.$ac_ext >&5
5980ac_lo=`expr '(' $ac_mid ')' + 1`
5981fi
5982rm -f conftest.$ac_objext conftest.$ac_ext
5983done
5984case $ac_lo in
5985?*) ac_cv_sizeof_long=$ac_lo;;
5986'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5987echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5988 { (exit 1); exit 1; }; } ;;
5989esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005990else
5991 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005992 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5993echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5994 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005995else
Martin v. Löwis11437992002-04-12 09:54:03 +00005996 cat >conftest.$ac_ext <<_ACEOF
5997#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005998#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005999$ac_includes_default
6000long longval () { return (long) (sizeof (long)); }
6001unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006003#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006004#ifdef F77_DUMMY_MAIN
6005# ifdef __cplusplus
6006 extern "C"
6007# endif
6008 int F77_DUMMY_MAIN() { return 1; }
6009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006010int
6011main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006012{
Martin v. Löwis11437992002-04-12 09:54:03 +00006013
6014 FILE *f = fopen ("conftest.val", "w");
6015 if (! f)
6016 exit (1);
6017 if (((long) (sizeof (long))) < 0)
6018 {
6019 long i = longval ();
6020 if (i != ((long) (sizeof (long))))
6021 exit (1);
6022 fprintf (f, "%ld\n", i);
6023 }
6024 else
6025 {
6026 unsigned long i = ulongval ();
6027 if (i != ((long) (sizeof (long))))
6028 exit (1);
6029 fprintf (f, "%lu\n", i);
6030 }
6031 exit (ferror (f) || fclose (f) != 0);
6032
6033 ;
6034 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006035}
Martin v. Löwis11437992002-04-12 09:54:03 +00006036_ACEOF
6037rm -f conftest$ac_exeext
6038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6039 (eval $ac_link) 2>&5
6040 ac_status=$?
6041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6044 (eval $ac_try) 2>&5
6045 ac_status=$?
6046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6047 (exit $ac_status); }; }; then
6048 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006049else
Martin v. Löwis11437992002-04-12 09:54:03 +00006050 echo "$as_me: program exited with status $ac_status" >&5
6051echo "$as_me: failed program was:" >&5
6052cat conftest.$ac_ext >&5
6053( exit $ac_status )
6054{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
6055echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
6056 { (exit 1); exit 1; }; }
6057fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006058rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006059fi
6060fi
6061rm -f conftest.val
6062else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006063 ac_cv_sizeof_long=0
6064fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006066echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6067echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6068cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006069#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006070_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006071
6072
Martin v. Löwis11437992002-04-12 09:54:03 +00006073echo "$as_me:$LINENO: checking for void *" >&5
6074echo $ECHO_N "checking for void *... $ECHO_C" >&6
6075if test "${ac_cv_type_void_p+set}" = set; then
6076 echo $ECHO_N "(cached) $ECHO_C" >&6
6077else
6078 cat >conftest.$ac_ext <<_ACEOF
6079#line $LINENO "configure"
6080#include "confdefs.h"
6081$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006082#ifdef F77_DUMMY_MAIN
6083# ifdef __cplusplus
6084 extern "C"
6085# endif
6086 int F77_DUMMY_MAIN() { return 1; }
6087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006088int
6089main ()
6090{
6091if ((void * *) 0)
6092 return 0;
6093if (sizeof (void *))
6094 return 0;
6095 ;
6096 return 0;
6097}
6098_ACEOF
6099rm -f conftest.$ac_objext
6100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6101 (eval $ac_compile) 2>&5
6102 ac_status=$?
6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104 (exit $ac_status); } &&
6105 { ac_try='test -s conftest.$ac_objext'
6106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6107 (eval $ac_try) 2>&5
6108 ac_status=$?
6109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6110 (exit $ac_status); }; }; then
6111 ac_cv_type_void_p=yes
6112else
6113 echo "$as_me: failed program was:" >&5
6114cat conftest.$ac_ext >&5
6115ac_cv_type_void_p=no
6116fi
6117rm -f conftest.$ac_objext conftest.$ac_ext
6118fi
6119echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6120echo "${ECHO_T}$ac_cv_type_void_p" >&6
6121
6122echo "$as_me:$LINENO: checking size of void *" >&5
6123echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6124if test "${ac_cv_sizeof_void_p+set}" = set; then
6125 echo $ECHO_N "(cached) $ECHO_C" >&6
6126else
6127 if test "$ac_cv_type_void_p" = yes; then
6128 # The cast to unsigned long works around a bug in the HP C Compiler
6129 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6130 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6131 # This bug is HP SR number 8606223364.
6132 if test "$cross_compiling" = yes; then
6133 # Depending upon the size, compute the lo and hi bounds.
6134cat >conftest.$ac_ext <<_ACEOF
6135#line $LINENO "configure"
6136#include "confdefs.h"
6137$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006138#ifdef F77_DUMMY_MAIN
6139# ifdef __cplusplus
6140 extern "C"
6141# endif
6142 int F77_DUMMY_MAIN() { return 1; }
6143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006144int
6145main ()
6146{
6147static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6148test_array [0] = 0
6149
6150 ;
6151 return 0;
6152}
6153_ACEOF
6154rm -f conftest.$ac_objext
6155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6156 (eval $ac_compile) 2>&5
6157 ac_status=$?
6158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6159 (exit $ac_status); } &&
6160 { ac_try='test -s conftest.$ac_objext'
6161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6162 (eval $ac_try) 2>&5
6163 ac_status=$?
6164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6165 (exit $ac_status); }; }; then
6166 ac_lo=0 ac_mid=0
6167 while :; do
6168 cat >conftest.$ac_ext <<_ACEOF
6169#line $LINENO "configure"
6170#include "confdefs.h"
6171$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006172#ifdef F77_DUMMY_MAIN
6173# ifdef __cplusplus
6174 extern "C"
6175# endif
6176 int F77_DUMMY_MAIN() { return 1; }
6177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006178int
6179main ()
6180{
6181static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6182test_array [0] = 0
6183
6184 ;
6185 return 0;
6186}
6187_ACEOF
6188rm -f conftest.$ac_objext
6189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6190 (eval $ac_compile) 2>&5
6191 ac_status=$?
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); } &&
6194 { ac_try='test -s conftest.$ac_objext'
6195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6196 (eval $ac_try) 2>&5
6197 ac_status=$?
6198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6199 (exit $ac_status); }; }; then
6200 ac_hi=$ac_mid; break
6201else
6202 echo "$as_me: failed program was:" >&5
6203cat conftest.$ac_ext >&5
6204ac_lo=`expr $ac_mid + 1`
6205 if test $ac_lo -le $ac_mid; then
6206 ac_lo= ac_hi=
6207 break
6208 fi
6209 ac_mid=`expr 2 '*' $ac_mid + 1`
6210fi
6211rm -f conftest.$ac_objext conftest.$ac_ext
6212 done
6213else
6214 echo "$as_me: failed program was:" >&5
6215cat conftest.$ac_ext >&5
6216cat >conftest.$ac_ext <<_ACEOF
6217#line $LINENO "configure"
6218#include "confdefs.h"
6219$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006220#ifdef F77_DUMMY_MAIN
6221# ifdef __cplusplus
6222 extern "C"
6223# endif
6224 int F77_DUMMY_MAIN() { return 1; }
6225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006226int
6227main ()
6228{
6229static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6230test_array [0] = 0
6231
6232 ;
6233 return 0;
6234}
6235_ACEOF
6236rm -f conftest.$ac_objext
6237if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6238 (eval $ac_compile) 2>&5
6239 ac_status=$?
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); } &&
6242 { ac_try='test -s conftest.$ac_objext'
6243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; }; then
6248 ac_hi=-1 ac_mid=-1
6249 while :; do
6250 cat >conftest.$ac_ext <<_ACEOF
6251#line $LINENO "configure"
6252#include "confdefs.h"
6253$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006254#ifdef F77_DUMMY_MAIN
6255# ifdef __cplusplus
6256 extern "C"
6257# endif
6258 int F77_DUMMY_MAIN() { return 1; }
6259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006260int
6261main ()
6262{
6263static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6264test_array [0] = 0
6265
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270rm -f conftest.$ac_objext
6271if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6272 (eval $ac_compile) 2>&5
6273 ac_status=$?
6274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275 (exit $ac_status); } &&
6276 { ac_try='test -s conftest.$ac_objext'
6277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6278 (eval $ac_try) 2>&5
6279 ac_status=$?
6280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6281 (exit $ac_status); }; }; then
6282 ac_lo=$ac_mid; break
6283else
6284 echo "$as_me: failed program was:" >&5
6285cat conftest.$ac_ext >&5
6286ac_hi=`expr '(' $ac_mid ')' - 1`
6287 if test $ac_mid -le $ac_hi; then
6288 ac_lo= ac_hi=
6289 break
6290 fi
6291 ac_mid=`expr 2 '*' $ac_mid`
6292fi
6293rm -f conftest.$ac_objext conftest.$ac_ext
6294 done
6295else
6296 echo "$as_me: failed program was:" >&5
6297cat conftest.$ac_ext >&5
6298ac_lo= ac_hi=
6299fi
6300rm -f conftest.$ac_objext conftest.$ac_ext
6301fi
6302rm -f conftest.$ac_objext conftest.$ac_ext
6303# Binary search between lo and hi bounds.
6304while test "x$ac_lo" != "x$ac_hi"; do
6305 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6306 cat >conftest.$ac_ext <<_ACEOF
6307#line $LINENO "configure"
6308#include "confdefs.h"
6309$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006310#ifdef F77_DUMMY_MAIN
6311# ifdef __cplusplus
6312 extern "C"
6313# endif
6314 int F77_DUMMY_MAIN() { return 1; }
6315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006316int
6317main ()
6318{
6319static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6320test_array [0] = 0
6321
6322 ;
6323 return 0;
6324}
6325_ACEOF
6326rm -f conftest.$ac_objext
6327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6328 (eval $ac_compile) 2>&5
6329 ac_status=$?
6330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331 (exit $ac_status); } &&
6332 { ac_try='test -s conftest.$ac_objext'
6333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334 (eval $ac_try) 2>&5
6335 ac_status=$?
6336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337 (exit $ac_status); }; }; then
6338 ac_hi=$ac_mid
6339else
6340 echo "$as_me: failed program was:" >&5
6341cat conftest.$ac_ext >&5
6342ac_lo=`expr '(' $ac_mid ')' + 1`
6343fi
6344rm -f conftest.$ac_objext conftest.$ac_ext
6345done
6346case $ac_lo in
6347?*) ac_cv_sizeof_void_p=$ac_lo;;
6348'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6349echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6350 { (exit 1); exit 1; }; } ;;
6351esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006352else
6353 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6355echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6356 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006357else
Martin v. Löwis11437992002-04-12 09:54:03 +00006358 cat >conftest.$ac_ext <<_ACEOF
6359#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006360#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006361$ac_includes_default
6362long longval () { return (long) (sizeof (void *)); }
6363unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006364#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006365#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006366#ifdef F77_DUMMY_MAIN
6367# ifdef __cplusplus
6368 extern "C"
6369# endif
6370 int F77_DUMMY_MAIN() { return 1; }
6371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006372int
6373main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006374{
Martin v. Löwis11437992002-04-12 09:54:03 +00006375
6376 FILE *f = fopen ("conftest.val", "w");
6377 if (! f)
6378 exit (1);
6379 if (((long) (sizeof (void *))) < 0)
6380 {
6381 long i = longval ();
6382 if (i != ((long) (sizeof (void *))))
6383 exit (1);
6384 fprintf (f, "%ld\n", i);
6385 }
6386 else
6387 {
6388 unsigned long i = ulongval ();
6389 if (i != ((long) (sizeof (void *))))
6390 exit (1);
6391 fprintf (f, "%lu\n", i);
6392 }
6393 exit (ferror (f) || fclose (f) != 0);
6394
6395 ;
6396 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006397}
Martin v. Löwis11437992002-04-12 09:54:03 +00006398_ACEOF
6399rm -f conftest$ac_exeext
6400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6401 (eval $ac_link) 2>&5
6402 ac_status=$?
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6406 (eval $ac_try) 2>&5
6407 ac_status=$?
6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409 (exit $ac_status); }; }; then
6410 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006411else
Martin v. Löwis11437992002-04-12 09:54:03 +00006412 echo "$as_me: program exited with status $ac_status" >&5
6413echo "$as_me: failed program was:" >&5
6414cat conftest.$ac_ext >&5
6415( exit $ac_status )
6416{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6417echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6418 { (exit 1); exit 1; }; }
6419fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006420rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006421fi
6422fi
6423rm -f conftest.val
6424else
Guido van Rossumad678af1998-10-02 14:42:15 +00006425 ac_cv_sizeof_void_p=0
6426fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006428echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6429echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6430cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006431#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006432_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006433
6434
Martin v. Löwis11437992002-04-12 09:54:03 +00006435echo "$as_me:$LINENO: checking for char" >&5
6436echo $ECHO_N "checking for char... $ECHO_C" >&6
6437if test "${ac_cv_type_char+set}" = set; then
6438 echo $ECHO_N "(cached) $ECHO_C" >&6
6439else
6440 cat >conftest.$ac_ext <<_ACEOF
6441#line $LINENO "configure"
6442#include "confdefs.h"
6443$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006444#ifdef F77_DUMMY_MAIN
6445# ifdef __cplusplus
6446 extern "C"
6447# endif
6448 int F77_DUMMY_MAIN() { return 1; }
6449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006450int
6451main ()
6452{
6453if ((char *) 0)
6454 return 0;
6455if (sizeof (char))
6456 return 0;
6457 ;
6458 return 0;
6459}
6460_ACEOF
6461rm -f conftest.$ac_objext
6462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6463 (eval $ac_compile) 2>&5
6464 ac_status=$?
6465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466 (exit $ac_status); } &&
6467 { ac_try='test -s conftest.$ac_objext'
6468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6469 (eval $ac_try) 2>&5
6470 ac_status=$?
6471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6472 (exit $ac_status); }; }; then
6473 ac_cv_type_char=yes
6474else
6475 echo "$as_me: failed program was:" >&5
6476cat conftest.$ac_ext >&5
6477ac_cv_type_char=no
6478fi
6479rm -f conftest.$ac_objext conftest.$ac_ext
6480fi
6481echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6482echo "${ECHO_T}$ac_cv_type_char" >&6
6483
6484echo "$as_me:$LINENO: checking size of char" >&5
6485echo $ECHO_N "checking size of char... $ECHO_C" >&6
6486if test "${ac_cv_sizeof_char+set}" = set; then
6487 echo $ECHO_N "(cached) $ECHO_C" >&6
6488else
6489 if test "$ac_cv_type_char" = yes; then
6490 # The cast to unsigned long works around a bug in the HP C Compiler
6491 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6492 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6493 # This bug is HP SR number 8606223364.
6494 if test "$cross_compiling" = yes; then
6495 # Depending upon the size, compute the lo and hi bounds.
6496cat >conftest.$ac_ext <<_ACEOF
6497#line $LINENO "configure"
6498#include "confdefs.h"
6499$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006500#ifdef F77_DUMMY_MAIN
6501# ifdef __cplusplus
6502 extern "C"
6503# endif
6504 int F77_DUMMY_MAIN() { return 1; }
6505#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006506int
6507main ()
6508{
6509static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6510test_array [0] = 0
6511
6512 ;
6513 return 0;
6514}
6515_ACEOF
6516rm -f conftest.$ac_objext
6517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6518 (eval $ac_compile) 2>&5
6519 ac_status=$?
6520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6521 (exit $ac_status); } &&
6522 { ac_try='test -s conftest.$ac_objext'
6523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6524 (eval $ac_try) 2>&5
6525 ac_status=$?
6526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527 (exit $ac_status); }; }; then
6528 ac_lo=0 ac_mid=0
6529 while :; do
6530 cat >conftest.$ac_ext <<_ACEOF
6531#line $LINENO "configure"
6532#include "confdefs.h"
6533$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006534#ifdef F77_DUMMY_MAIN
6535# ifdef __cplusplus
6536 extern "C"
6537# endif
6538 int F77_DUMMY_MAIN() { return 1; }
6539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006540int
6541main ()
6542{
6543static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6544test_array [0] = 0
6545
6546 ;
6547 return 0;
6548}
6549_ACEOF
6550rm -f conftest.$ac_objext
6551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6552 (eval $ac_compile) 2>&5
6553 ac_status=$?
6554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555 (exit $ac_status); } &&
6556 { ac_try='test -s conftest.$ac_objext'
6557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6558 (eval $ac_try) 2>&5
6559 ac_status=$?
6560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6561 (exit $ac_status); }; }; then
6562 ac_hi=$ac_mid; break
6563else
6564 echo "$as_me: failed program was:" >&5
6565cat conftest.$ac_ext >&5
6566ac_lo=`expr $ac_mid + 1`
6567 if test $ac_lo -le $ac_mid; then
6568 ac_lo= ac_hi=
6569 break
6570 fi
6571 ac_mid=`expr 2 '*' $ac_mid + 1`
6572fi
6573rm -f conftest.$ac_objext conftest.$ac_ext
6574 done
6575else
6576 echo "$as_me: failed program was:" >&5
6577cat conftest.$ac_ext >&5
6578cat >conftest.$ac_ext <<_ACEOF
6579#line $LINENO "configure"
6580#include "confdefs.h"
6581$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006582#ifdef F77_DUMMY_MAIN
6583# ifdef __cplusplus
6584 extern "C"
6585# endif
6586 int F77_DUMMY_MAIN() { return 1; }
6587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006588int
6589main ()
6590{
6591static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6592test_array [0] = 0
6593
6594 ;
6595 return 0;
6596}
6597_ACEOF
6598rm -f conftest.$ac_objext
6599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6600 (eval $ac_compile) 2>&5
6601 ac_status=$?
6602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603 (exit $ac_status); } &&
6604 { ac_try='test -s conftest.$ac_objext'
6605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606 (eval $ac_try) 2>&5
6607 ac_status=$?
6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609 (exit $ac_status); }; }; then
6610 ac_hi=-1 ac_mid=-1
6611 while :; do
6612 cat >conftest.$ac_ext <<_ACEOF
6613#line $LINENO "configure"
6614#include "confdefs.h"
6615$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006616#ifdef F77_DUMMY_MAIN
6617# ifdef __cplusplus
6618 extern "C"
6619# endif
6620 int F77_DUMMY_MAIN() { return 1; }
6621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
6624{
6625static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6626test_array [0] = 0
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
6633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6634 (eval $ac_compile) 2>&5
6635 ac_status=$?
6636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6637 (exit $ac_status); } &&
6638 { ac_try='test -s conftest.$ac_objext'
6639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6640 (eval $ac_try) 2>&5
6641 ac_status=$?
6642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6643 (exit $ac_status); }; }; then
6644 ac_lo=$ac_mid; break
6645else
6646 echo "$as_me: failed program was:" >&5
6647cat conftest.$ac_ext >&5
6648ac_hi=`expr '(' $ac_mid ')' - 1`
6649 if test $ac_mid -le $ac_hi; then
6650 ac_lo= ac_hi=
6651 break
6652 fi
6653 ac_mid=`expr 2 '*' $ac_mid`
6654fi
6655rm -f conftest.$ac_objext conftest.$ac_ext
6656 done
6657else
6658 echo "$as_me: failed program was:" >&5
6659cat conftest.$ac_ext >&5
6660ac_lo= ac_hi=
6661fi
6662rm -f conftest.$ac_objext conftest.$ac_ext
6663fi
6664rm -f conftest.$ac_objext conftest.$ac_ext
6665# Binary search between lo and hi bounds.
6666while test "x$ac_lo" != "x$ac_hi"; do
6667 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6668 cat >conftest.$ac_ext <<_ACEOF
6669#line $LINENO "configure"
6670#include "confdefs.h"
6671$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006672#ifdef F77_DUMMY_MAIN
6673# ifdef __cplusplus
6674 extern "C"
6675# endif
6676 int F77_DUMMY_MAIN() { return 1; }
6677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006678int
6679main ()
6680{
6681static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6682test_array [0] = 0
6683
6684 ;
6685 return 0;
6686}
6687_ACEOF
6688rm -f conftest.$ac_objext
6689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6690 (eval $ac_compile) 2>&5
6691 ac_status=$?
6692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6693 (exit $ac_status); } &&
6694 { ac_try='test -s conftest.$ac_objext'
6695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6696 (eval $ac_try) 2>&5
6697 ac_status=$?
6698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699 (exit $ac_status); }; }; then
6700 ac_hi=$ac_mid
6701else
6702 echo "$as_me: failed program was:" >&5
6703cat conftest.$ac_ext >&5
6704ac_lo=`expr '(' $ac_mid ')' + 1`
6705fi
6706rm -f conftest.$ac_objext conftest.$ac_ext
6707done
6708case $ac_lo in
6709?*) ac_cv_sizeof_char=$ac_lo;;
6710'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6711echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6712 { (exit 1); exit 1; }; } ;;
6713esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006714else
6715 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6717echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6718 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006719else
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 cat >conftest.$ac_ext <<_ACEOF
6721#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006722#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006723$ac_includes_default
6724long longval () { return (long) (sizeof (char)); }
6725unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006726#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006727#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00006728#ifdef F77_DUMMY_MAIN
6729# ifdef __cplusplus
6730 extern "C"
6731# endif
6732 int F77_DUMMY_MAIN() { return 1; }
6733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006734int
6735main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006736{
Martin v. Löwis11437992002-04-12 09:54:03 +00006737
6738 FILE *f = fopen ("conftest.val", "w");
6739 if (! f)
6740 exit (1);
6741 if (((long) (sizeof (char))) < 0)
6742 {
6743 long i = longval ();
6744 if (i != ((long) (sizeof (char))))
6745 exit (1);
6746 fprintf (f, "%ld\n", i);
6747 }
6748 else
6749 {
6750 unsigned long i = ulongval ();
6751 if (i != ((long) (sizeof (char))))
6752 exit (1);
6753 fprintf (f, "%lu\n", i);
6754 }
6755 exit (ferror (f) || fclose (f) != 0);
6756
6757 ;
6758 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759}
Martin v. Löwis11437992002-04-12 09:54:03 +00006760_ACEOF
6761rm -f conftest$ac_exeext
6762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6763 (eval $ac_link) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6768 (eval $ac_try) 2>&5
6769 ac_status=$?
6770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6771 (exit $ac_status); }; }; then
6772 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006773else
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 echo "$as_me: program exited with status $ac_status" >&5
6775echo "$as_me: failed program was:" >&5
6776cat conftest.$ac_ext >&5
6777( exit $ac_status )
6778{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6779echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6780 { (exit 1); exit 1; }; }
6781fi
Barry Warsawfe33b792003-01-07 22:42:49 +00006782rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
6784fi
6785rm -f conftest.val
6786else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787 ac_cv_sizeof_char=0
6788fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006790echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6791echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6792cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006793#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006794_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795
6796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797echo "$as_me:$LINENO: checking for short" >&5
6798echo $ECHO_N "checking for short... $ECHO_C" >&6
6799if test "${ac_cv_type_short+set}" = set; then
6800 echo $ECHO_N "(cached) $ECHO_C" >&6
6801else
6802 cat >conftest.$ac_ext <<_ACEOF
6803#line $LINENO "configure"
6804#include "confdefs.h"
6805$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006806#ifdef F77_DUMMY_MAIN
6807# ifdef __cplusplus
6808 extern "C"
6809# endif
6810 int F77_DUMMY_MAIN() { return 1; }
6811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006812int
6813main ()
6814{
6815if ((short *) 0)
6816 return 0;
6817if (sizeof (short))
6818 return 0;
6819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6825 (eval $ac_compile) 2>&5
6826 ac_status=$?
6827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6828 (exit $ac_status); } &&
6829 { ac_try='test -s conftest.$ac_objext'
6830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6831 (eval $ac_try) 2>&5
6832 ac_status=$?
6833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6834 (exit $ac_status); }; }; then
6835 ac_cv_type_short=yes
6836else
6837 echo "$as_me: failed program was:" >&5
6838cat conftest.$ac_ext >&5
6839ac_cv_type_short=no
6840fi
6841rm -f conftest.$ac_objext conftest.$ac_ext
6842fi
6843echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6844echo "${ECHO_T}$ac_cv_type_short" >&6
6845
6846echo "$as_me:$LINENO: checking size of short" >&5
6847echo $ECHO_N "checking size of short... $ECHO_C" >&6
6848if test "${ac_cv_sizeof_short+set}" = set; then
6849 echo $ECHO_N "(cached) $ECHO_C" >&6
6850else
6851 if test "$ac_cv_type_short" = yes; then
6852 # The cast to unsigned long works around a bug in the HP C Compiler
6853 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855 # This bug is HP SR number 8606223364.
6856 if test "$cross_compiling" = yes; then
6857 # Depending upon the size, compute the lo and hi bounds.
6858cat >conftest.$ac_ext <<_ACEOF
6859#line $LINENO "configure"
6860#include "confdefs.h"
6861$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006862#ifdef F77_DUMMY_MAIN
6863# ifdef __cplusplus
6864 extern "C"
6865# endif
6866 int F77_DUMMY_MAIN() { return 1; }
6867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006868int
6869main ()
6870{
6871static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6872test_array [0] = 0
6873
6874 ;
6875 return 0;
6876}
6877_ACEOF
6878rm -f conftest.$ac_objext
6879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6880 (eval $ac_compile) 2>&5
6881 ac_status=$?
6882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883 (exit $ac_status); } &&
6884 { ac_try='test -s conftest.$ac_objext'
6885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6886 (eval $ac_try) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); }; }; then
6890 ac_lo=0 ac_mid=0
6891 while :; do
6892 cat >conftest.$ac_ext <<_ACEOF
6893#line $LINENO "configure"
6894#include "confdefs.h"
6895$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006896#ifdef F77_DUMMY_MAIN
6897# ifdef __cplusplus
6898 extern "C"
6899# endif
6900 int F77_DUMMY_MAIN() { return 1; }
6901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006902int
6903main ()
6904{
6905static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6906test_array [0] = 0
6907
6908 ;
6909 return 0;
6910}
6911_ACEOF
6912rm -f conftest.$ac_objext
6913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6914 (eval $ac_compile) 2>&5
6915 ac_status=$?
6916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917 (exit $ac_status); } &&
6918 { ac_try='test -s conftest.$ac_objext'
6919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6920 (eval $ac_try) 2>&5
6921 ac_status=$?
6922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923 (exit $ac_status); }; }; then
6924 ac_hi=$ac_mid; break
6925else
6926 echo "$as_me: failed program was:" >&5
6927cat conftest.$ac_ext >&5
6928ac_lo=`expr $ac_mid + 1`
6929 if test $ac_lo -le $ac_mid; then
6930 ac_lo= ac_hi=
6931 break
6932 fi
6933 ac_mid=`expr 2 '*' $ac_mid + 1`
6934fi
6935rm -f conftest.$ac_objext conftest.$ac_ext
6936 done
6937else
6938 echo "$as_me: failed program was:" >&5
6939cat conftest.$ac_ext >&5
6940cat >conftest.$ac_ext <<_ACEOF
6941#line $LINENO "configure"
6942#include "confdefs.h"
6943$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006944#ifdef F77_DUMMY_MAIN
6945# ifdef __cplusplus
6946 extern "C"
6947# endif
6948 int F77_DUMMY_MAIN() { return 1; }
6949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006950int
6951main ()
6952{
6953static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6954test_array [0] = 0
6955
6956 ;
6957 return 0;
6958}
6959_ACEOF
6960rm -f conftest.$ac_objext
6961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6962 (eval $ac_compile) 2>&5
6963 ac_status=$?
6964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6965 (exit $ac_status); } &&
6966 { ac_try='test -s conftest.$ac_objext'
6967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6968 (eval $ac_try) 2>&5
6969 ac_status=$?
6970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971 (exit $ac_status); }; }; then
6972 ac_hi=-1 ac_mid=-1
6973 while :; do
6974 cat >conftest.$ac_ext <<_ACEOF
6975#line $LINENO "configure"
6976#include "confdefs.h"
6977$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00006978#ifdef F77_DUMMY_MAIN
6979# ifdef __cplusplus
6980 extern "C"
6981# endif
6982 int F77_DUMMY_MAIN() { return 1; }
6983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006984int
6985main ()
6986{
6987static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6988test_array [0] = 0
6989
6990 ;
6991 return 0;
6992}
6993_ACEOF
6994rm -f conftest.$ac_objext
6995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6996 (eval $ac_compile) 2>&5
6997 ac_status=$?
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); } &&
7000 { ac_try='test -s conftest.$ac_objext'
7001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7002 (eval $ac_try) 2>&5
7003 ac_status=$?
7004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7005 (exit $ac_status); }; }; then
7006 ac_lo=$ac_mid; break
7007else
7008 echo "$as_me: failed program was:" >&5
7009cat conftest.$ac_ext >&5
7010ac_hi=`expr '(' $ac_mid ')' - 1`
7011 if test $ac_mid -le $ac_hi; then
7012 ac_lo= ac_hi=
7013 break
7014 fi
7015 ac_mid=`expr 2 '*' $ac_mid`
7016fi
7017rm -f conftest.$ac_objext conftest.$ac_ext
7018 done
7019else
7020 echo "$as_me: failed program was:" >&5
7021cat conftest.$ac_ext >&5
7022ac_lo= ac_hi=
7023fi
7024rm -f conftest.$ac_objext conftest.$ac_ext
7025fi
7026rm -f conftest.$ac_objext conftest.$ac_ext
7027# Binary search between lo and hi bounds.
7028while test "x$ac_lo" != "x$ac_hi"; do
7029 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7030 cat >conftest.$ac_ext <<_ACEOF
7031#line $LINENO "configure"
7032#include "confdefs.h"
7033$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007034#ifdef F77_DUMMY_MAIN
7035# ifdef __cplusplus
7036 extern "C"
7037# endif
7038 int F77_DUMMY_MAIN() { return 1; }
7039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007040int
7041main ()
7042{
7043static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7044test_array [0] = 0
7045
7046 ;
7047 return 0;
7048}
7049_ACEOF
7050rm -f conftest.$ac_objext
7051if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7052 (eval $ac_compile) 2>&5
7053 ac_status=$?
7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055 (exit $ac_status); } &&
7056 { ac_try='test -s conftest.$ac_objext'
7057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7058 (eval $ac_try) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); }; }; then
7062 ac_hi=$ac_mid
7063else
7064 echo "$as_me: failed program was:" >&5
7065cat conftest.$ac_ext >&5
7066ac_lo=`expr '(' $ac_mid ')' + 1`
7067fi
7068rm -f conftest.$ac_objext conftest.$ac_ext
7069done
7070case $ac_lo in
7071?*) ac_cv_sizeof_short=$ac_lo;;
7072'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7073echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7074 { (exit 1); exit 1; }; } ;;
7075esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007076else
7077 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7079echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7080 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007081else
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 cat >conftest.$ac_ext <<_ACEOF
7083#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007085$ac_includes_default
7086long longval () { return (long) (sizeof (short)); }
7087unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007088#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007089#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007090#ifdef F77_DUMMY_MAIN
7091# ifdef __cplusplus
7092 extern "C"
7093# endif
7094 int F77_DUMMY_MAIN() { return 1; }
7095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007096int
7097main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098{
Martin v. Löwis11437992002-04-12 09:54:03 +00007099
7100 FILE *f = fopen ("conftest.val", "w");
7101 if (! f)
7102 exit (1);
7103 if (((long) (sizeof (short))) < 0)
7104 {
7105 long i = longval ();
7106 if (i != ((long) (sizeof (short))))
7107 exit (1);
7108 fprintf (f, "%ld\n", i);
7109 }
7110 else
7111 {
7112 unsigned long i = ulongval ();
7113 if (i != ((long) (sizeof (short))))
7114 exit (1);
7115 fprintf (f, "%lu\n", i);
7116 }
7117 exit (ferror (f) || fclose (f) != 0);
7118
7119 ;
7120 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007121}
Martin v. Löwis11437992002-04-12 09:54:03 +00007122_ACEOF
7123rm -f conftest$ac_exeext
7124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7125 (eval $ac_link) 2>&5
7126 ac_status=$?
7127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7130 (eval $ac_try) 2>&5
7131 ac_status=$?
7132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133 (exit $ac_status); }; }; then
7134 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007135else
Martin v. Löwis11437992002-04-12 09:54:03 +00007136 echo "$as_me: program exited with status $ac_status" >&5
7137echo "$as_me: failed program was:" >&5
7138cat conftest.$ac_ext >&5
7139( exit $ac_status )
7140{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
7141echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
7142 { (exit 1); exit 1; }; }
7143fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007144rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007145fi
7146fi
7147rm -f conftest.val
7148else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007149 ac_cv_sizeof_short=0
7150fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007152echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7153echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7154cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007155#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007156_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007157
7158
Martin v. Löwis11437992002-04-12 09:54:03 +00007159echo "$as_me:$LINENO: checking for float" >&5
7160echo $ECHO_N "checking for float... $ECHO_C" >&6
7161if test "${ac_cv_type_float+set}" = set; then
7162 echo $ECHO_N "(cached) $ECHO_C" >&6
7163else
7164 cat >conftest.$ac_ext <<_ACEOF
7165#line $LINENO "configure"
7166#include "confdefs.h"
7167$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007168#ifdef F77_DUMMY_MAIN
7169# ifdef __cplusplus
7170 extern "C"
7171# endif
7172 int F77_DUMMY_MAIN() { return 1; }
7173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007174int
7175main ()
7176{
7177if ((float *) 0)
7178 return 0;
7179if (sizeof (float))
7180 return 0;
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7187 (eval $ac_compile) 2>&5
7188 ac_status=$?
7189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7190 (exit $ac_status); } &&
7191 { ac_try='test -s conftest.$ac_objext'
7192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7193 (eval $ac_try) 2>&5
7194 ac_status=$?
7195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7196 (exit $ac_status); }; }; then
7197 ac_cv_type_float=yes
7198else
7199 echo "$as_me: failed program was:" >&5
7200cat conftest.$ac_ext >&5
7201ac_cv_type_float=no
7202fi
7203rm -f conftest.$ac_objext conftest.$ac_ext
7204fi
7205echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7206echo "${ECHO_T}$ac_cv_type_float" >&6
7207
7208echo "$as_me:$LINENO: checking size of float" >&5
7209echo $ECHO_N "checking size of float... $ECHO_C" >&6
7210if test "${ac_cv_sizeof_float+set}" = set; then
7211 echo $ECHO_N "(cached) $ECHO_C" >&6
7212else
7213 if test "$ac_cv_type_float" = yes; then
7214 # The cast to unsigned long works around a bug in the HP C Compiler
7215 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7216 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7217 # This bug is HP SR number 8606223364.
7218 if test "$cross_compiling" = yes; then
7219 # Depending upon the size, compute the lo and hi bounds.
7220cat >conftest.$ac_ext <<_ACEOF
7221#line $LINENO "configure"
7222#include "confdefs.h"
7223$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007224#ifdef F77_DUMMY_MAIN
7225# ifdef __cplusplus
7226 extern "C"
7227# endif
7228 int F77_DUMMY_MAIN() { return 1; }
7229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007230int
7231main ()
7232{
7233static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7234test_array [0] = 0
7235
7236 ;
7237 return 0;
7238}
7239_ACEOF
7240rm -f conftest.$ac_objext
7241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7242 (eval $ac_compile) 2>&5
7243 ac_status=$?
7244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7245 (exit $ac_status); } &&
7246 { ac_try='test -s conftest.$ac_objext'
7247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7248 (eval $ac_try) 2>&5
7249 ac_status=$?
7250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7251 (exit $ac_status); }; }; then
7252 ac_lo=0 ac_mid=0
7253 while :; do
7254 cat >conftest.$ac_ext <<_ACEOF
7255#line $LINENO "configure"
7256#include "confdefs.h"
7257$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007258#ifdef F77_DUMMY_MAIN
7259# ifdef __cplusplus
7260 extern "C"
7261# endif
7262 int F77_DUMMY_MAIN() { return 1; }
7263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007264int
7265main ()
7266{
7267static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7268test_array [0] = 0
7269
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext
7275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7276 (eval $ac_compile) 2>&5
7277 ac_status=$?
7278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279 (exit $ac_status); } &&
7280 { ac_try='test -s conftest.$ac_objext'
7281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); }; }; then
7286 ac_hi=$ac_mid; break
7287else
7288 echo "$as_me: failed program was:" >&5
7289cat conftest.$ac_ext >&5
7290ac_lo=`expr $ac_mid + 1`
7291 if test $ac_lo -le $ac_mid; then
7292 ac_lo= ac_hi=
7293 break
7294 fi
7295 ac_mid=`expr 2 '*' $ac_mid + 1`
7296fi
7297rm -f conftest.$ac_objext conftest.$ac_ext
7298 done
7299else
7300 echo "$as_me: failed program was:" >&5
7301cat conftest.$ac_ext >&5
7302cat >conftest.$ac_ext <<_ACEOF
7303#line $LINENO "configure"
7304#include "confdefs.h"
7305$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007306#ifdef F77_DUMMY_MAIN
7307# ifdef __cplusplus
7308 extern "C"
7309# endif
7310 int F77_DUMMY_MAIN() { return 1; }
7311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007312int
7313main ()
7314{
7315static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7316test_array [0] = 0
7317
7318 ;
7319 return 0;
7320}
7321_ACEOF
7322rm -f conftest.$ac_objext
7323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7324 (eval $ac_compile) 2>&5
7325 ac_status=$?
7326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7327 (exit $ac_status); } &&
7328 { ac_try='test -s conftest.$ac_objext'
7329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7330 (eval $ac_try) 2>&5
7331 ac_status=$?
7332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7333 (exit $ac_status); }; }; then
7334 ac_hi=-1 ac_mid=-1
7335 while :; do
7336 cat >conftest.$ac_ext <<_ACEOF
7337#line $LINENO "configure"
7338#include "confdefs.h"
7339$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007340#ifdef F77_DUMMY_MAIN
7341# ifdef __cplusplus
7342 extern "C"
7343# endif
7344 int F77_DUMMY_MAIN() { return 1; }
7345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7358 (eval $ac_compile) 2>&5
7359 ac_status=$?
7360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7361 (exit $ac_status); } &&
7362 { ac_try='test -s conftest.$ac_objext'
7363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7364 (eval $ac_try) 2>&5
7365 ac_status=$?
7366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7367 (exit $ac_status); }; }; then
7368 ac_lo=$ac_mid; break
7369else
7370 echo "$as_me: failed program was:" >&5
7371cat conftest.$ac_ext >&5
7372ac_hi=`expr '(' $ac_mid ')' - 1`
7373 if test $ac_mid -le $ac_hi; then
7374 ac_lo= ac_hi=
7375 break
7376 fi
7377 ac_mid=`expr 2 '*' $ac_mid`
7378fi
7379rm -f conftest.$ac_objext conftest.$ac_ext
7380 done
7381else
7382 echo "$as_me: failed program was:" >&5
7383cat conftest.$ac_ext >&5
7384ac_lo= ac_hi=
7385fi
7386rm -f conftest.$ac_objext conftest.$ac_ext
7387fi
7388rm -f conftest.$ac_objext conftest.$ac_ext
7389# Binary search between lo and hi bounds.
7390while test "x$ac_lo" != "x$ac_hi"; do
7391 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7392 cat >conftest.$ac_ext <<_ACEOF
7393#line $LINENO "configure"
7394#include "confdefs.h"
7395$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007396#ifdef F77_DUMMY_MAIN
7397# ifdef __cplusplus
7398 extern "C"
7399# endif
7400 int F77_DUMMY_MAIN() { return 1; }
7401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007402int
7403main ()
7404{
7405static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7406test_array [0] = 0
7407
7408 ;
7409 return 0;
7410}
7411_ACEOF
7412rm -f conftest.$ac_objext
7413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7414 (eval $ac_compile) 2>&5
7415 ac_status=$?
7416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7417 (exit $ac_status); } &&
7418 { ac_try='test -s conftest.$ac_objext'
7419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7420 (eval $ac_try) 2>&5
7421 ac_status=$?
7422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7423 (exit $ac_status); }; }; then
7424 ac_hi=$ac_mid
7425else
7426 echo "$as_me: failed program was:" >&5
7427cat conftest.$ac_ext >&5
7428ac_lo=`expr '(' $ac_mid ')' + 1`
7429fi
7430rm -f conftest.$ac_objext conftest.$ac_ext
7431done
7432case $ac_lo in
7433?*) ac_cv_sizeof_float=$ac_lo;;
7434'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7435echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7436 { (exit 1); exit 1; }; } ;;
7437esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438else
7439 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007440 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7441echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7442 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007443else
Martin v. Löwis11437992002-04-12 09:54:03 +00007444 cat >conftest.$ac_ext <<_ACEOF
7445#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007446#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007447$ac_includes_default
7448long longval () { return (long) (sizeof (float)); }
7449unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007450#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007451#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007452#ifdef F77_DUMMY_MAIN
7453# ifdef __cplusplus
7454 extern "C"
7455# endif
7456 int F77_DUMMY_MAIN() { return 1; }
7457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007458int
7459main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007460{
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462 FILE *f = fopen ("conftest.val", "w");
7463 if (! f)
7464 exit (1);
7465 if (((long) (sizeof (float))) < 0)
7466 {
7467 long i = longval ();
7468 if (i != ((long) (sizeof (float))))
7469 exit (1);
7470 fprintf (f, "%ld\n", i);
7471 }
7472 else
7473 {
7474 unsigned long i = ulongval ();
7475 if (i != ((long) (sizeof (float))))
7476 exit (1);
7477 fprintf (f, "%lu\n", i);
7478 }
7479 exit (ferror (f) || fclose (f) != 0);
7480
7481 ;
7482 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007483}
Martin v. Löwis11437992002-04-12 09:54:03 +00007484_ACEOF
7485rm -f conftest$ac_exeext
7486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7487 (eval $ac_link) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7492 (eval $ac_try) 2>&5
7493 ac_status=$?
7494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7495 (exit $ac_status); }; }; then
7496 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007497else
Martin v. Löwis11437992002-04-12 09:54:03 +00007498 echo "$as_me: program exited with status $ac_status" >&5
7499echo "$as_me: failed program was:" >&5
7500cat conftest.$ac_ext >&5
7501( exit $ac_status )
7502{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7503echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7504 { (exit 1); exit 1; }; }
7505fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007506rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007507fi
7508fi
7509rm -f conftest.val
7510else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007511 ac_cv_sizeof_float=0
7512fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007513fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007514echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7515echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7516cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007517#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007518_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007519
7520
Martin v. Löwis11437992002-04-12 09:54:03 +00007521echo "$as_me:$LINENO: checking for double" >&5
7522echo $ECHO_N "checking for double... $ECHO_C" >&6
7523if test "${ac_cv_type_double+set}" = set; then
7524 echo $ECHO_N "(cached) $ECHO_C" >&6
7525else
7526 cat >conftest.$ac_ext <<_ACEOF
7527#line $LINENO "configure"
7528#include "confdefs.h"
7529$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007530#ifdef F77_DUMMY_MAIN
7531# ifdef __cplusplus
7532 extern "C"
7533# endif
7534 int F77_DUMMY_MAIN() { return 1; }
7535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007536int
7537main ()
7538{
7539if ((double *) 0)
7540 return 0;
7541if (sizeof (double))
7542 return 0;
7543 ;
7544 return 0;
7545}
7546_ACEOF
7547rm -f conftest.$ac_objext
7548if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7549 (eval $ac_compile) 2>&5
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); } &&
7553 { ac_try='test -s conftest.$ac_objext'
7554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7555 (eval $ac_try) 2>&5
7556 ac_status=$?
7557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7558 (exit $ac_status); }; }; then
7559 ac_cv_type_double=yes
7560else
7561 echo "$as_me: failed program was:" >&5
7562cat conftest.$ac_ext >&5
7563ac_cv_type_double=no
7564fi
7565rm -f conftest.$ac_objext conftest.$ac_ext
7566fi
7567echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7568echo "${ECHO_T}$ac_cv_type_double" >&6
7569
7570echo "$as_me:$LINENO: checking size of double" >&5
7571echo $ECHO_N "checking size of double... $ECHO_C" >&6
7572if test "${ac_cv_sizeof_double+set}" = set; then
7573 echo $ECHO_N "(cached) $ECHO_C" >&6
7574else
7575 if test "$ac_cv_type_double" = yes; then
7576 # The cast to unsigned long works around a bug in the HP C Compiler
7577 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579 # This bug is HP SR number 8606223364.
7580 if test "$cross_compiling" = yes; then
7581 # Depending upon the size, compute the lo and hi bounds.
7582cat >conftest.$ac_ext <<_ACEOF
7583#line $LINENO "configure"
7584#include "confdefs.h"
7585$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007586#ifdef F77_DUMMY_MAIN
7587# ifdef __cplusplus
7588 extern "C"
7589# endif
7590 int F77_DUMMY_MAIN() { return 1; }
7591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
7595static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7596test_array [0] = 0
7597
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602rm -f conftest.$ac_objext
7603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7604 (eval $ac_compile) 2>&5
7605 ac_status=$?
7606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7607 (exit $ac_status); } &&
7608 { ac_try='test -s conftest.$ac_objext'
7609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7610 (eval $ac_try) 2>&5
7611 ac_status=$?
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); }; }; then
7614 ac_lo=0 ac_mid=0
7615 while :; do
7616 cat >conftest.$ac_ext <<_ACEOF
7617#line $LINENO "configure"
7618#include "confdefs.h"
7619$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007620#ifdef F77_DUMMY_MAIN
7621# ifdef __cplusplus
7622 extern "C"
7623# endif
7624 int F77_DUMMY_MAIN() { return 1; }
7625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007626int
7627main ()
7628{
7629static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7630test_array [0] = 0
7631
7632 ;
7633 return 0;
7634}
7635_ACEOF
7636rm -f conftest.$ac_objext
7637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7638 (eval $ac_compile) 2>&5
7639 ac_status=$?
7640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641 (exit $ac_status); } &&
7642 { ac_try='test -s conftest.$ac_objext'
7643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7644 (eval $ac_try) 2>&5
7645 ac_status=$?
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); }; }; then
7648 ac_hi=$ac_mid; break
7649else
7650 echo "$as_me: failed program was:" >&5
7651cat conftest.$ac_ext >&5
7652ac_lo=`expr $ac_mid + 1`
7653 if test $ac_lo -le $ac_mid; then
7654 ac_lo= ac_hi=
7655 break
7656 fi
7657 ac_mid=`expr 2 '*' $ac_mid + 1`
7658fi
7659rm -f conftest.$ac_objext conftest.$ac_ext
7660 done
7661else
7662 echo "$as_me: failed program was:" >&5
7663cat conftest.$ac_ext >&5
7664cat >conftest.$ac_ext <<_ACEOF
7665#line $LINENO "configure"
7666#include "confdefs.h"
7667$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007668#ifdef F77_DUMMY_MAIN
7669# ifdef __cplusplus
7670 extern "C"
7671# endif
7672 int F77_DUMMY_MAIN() { return 1; }
7673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007674int
7675main ()
7676{
7677static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7678test_array [0] = 0
7679
7680 ;
7681 return 0;
7682}
7683_ACEOF
7684rm -f conftest.$ac_objext
7685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7686 (eval $ac_compile) 2>&5
7687 ac_status=$?
7688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689 (exit $ac_status); } &&
7690 { ac_try='test -s conftest.$ac_objext'
7691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7692 (eval $ac_try) 2>&5
7693 ac_status=$?
7694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); }; }; then
7696 ac_hi=-1 ac_mid=-1
7697 while :; do
7698 cat >conftest.$ac_ext <<_ACEOF
7699#line $LINENO "configure"
7700#include "confdefs.h"
7701$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007702#ifdef F77_DUMMY_MAIN
7703# ifdef __cplusplus
7704 extern "C"
7705# endif
7706 int F77_DUMMY_MAIN() { return 1; }
7707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007708int
7709main ()
7710{
7711static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7712test_array [0] = 0
7713
7714 ;
7715 return 0;
7716}
7717_ACEOF
7718rm -f conftest.$ac_objext
7719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7720 (eval $ac_compile) 2>&5
7721 ac_status=$?
7722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7723 (exit $ac_status); } &&
7724 { ac_try='test -s conftest.$ac_objext'
7725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7726 (eval $ac_try) 2>&5
7727 ac_status=$?
7728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7729 (exit $ac_status); }; }; then
7730 ac_lo=$ac_mid; break
7731else
7732 echo "$as_me: failed program was:" >&5
7733cat conftest.$ac_ext >&5
7734ac_hi=`expr '(' $ac_mid ')' - 1`
7735 if test $ac_mid -le $ac_hi; then
7736 ac_lo= ac_hi=
7737 break
7738 fi
7739 ac_mid=`expr 2 '*' $ac_mid`
7740fi
7741rm -f conftest.$ac_objext conftest.$ac_ext
7742 done
7743else
7744 echo "$as_me: failed program was:" >&5
7745cat conftest.$ac_ext >&5
7746ac_lo= ac_hi=
7747fi
7748rm -f conftest.$ac_objext conftest.$ac_ext
7749fi
7750rm -f conftest.$ac_objext conftest.$ac_ext
7751# Binary search between lo and hi bounds.
7752while test "x$ac_lo" != "x$ac_hi"; do
7753 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7754 cat >conftest.$ac_ext <<_ACEOF
7755#line $LINENO "configure"
7756#include "confdefs.h"
7757$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007758#ifdef F77_DUMMY_MAIN
7759# ifdef __cplusplus
7760 extern "C"
7761# endif
7762 int F77_DUMMY_MAIN() { return 1; }
7763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007764int
7765main ()
7766{
7767static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7768test_array [0] = 0
7769
7770 ;
7771 return 0;
7772}
7773_ACEOF
7774rm -f conftest.$ac_objext
7775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7776 (eval $ac_compile) 2>&5
7777 ac_status=$?
7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7779 (exit $ac_status); } &&
7780 { ac_try='test -s conftest.$ac_objext'
7781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); }; }; then
7786 ac_hi=$ac_mid
7787else
7788 echo "$as_me: failed program was:" >&5
7789cat conftest.$ac_ext >&5
7790ac_lo=`expr '(' $ac_mid ')' + 1`
7791fi
7792rm -f conftest.$ac_objext conftest.$ac_ext
7793done
7794case $ac_lo in
7795?*) ac_cv_sizeof_double=$ac_lo;;
7796'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7797echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7798 { (exit 1); exit 1; }; } ;;
7799esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007800else
7801 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7803echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7804 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007805else
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 cat >conftest.$ac_ext <<_ACEOF
7807#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007808#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007809$ac_includes_default
7810long longval () { return (long) (sizeof (double)); }
7811unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007812#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007813#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00007814#ifdef F77_DUMMY_MAIN
7815# ifdef __cplusplus
7816 extern "C"
7817# endif
7818 int F77_DUMMY_MAIN() { return 1; }
7819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007820int
7821main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007822{
Martin v. Löwis11437992002-04-12 09:54:03 +00007823
7824 FILE *f = fopen ("conftest.val", "w");
7825 if (! f)
7826 exit (1);
7827 if (((long) (sizeof (double))) < 0)
7828 {
7829 long i = longval ();
7830 if (i != ((long) (sizeof (double))))
7831 exit (1);
7832 fprintf (f, "%ld\n", i);
7833 }
7834 else
7835 {
7836 unsigned long i = ulongval ();
7837 if (i != ((long) (sizeof (double))))
7838 exit (1);
7839 fprintf (f, "%lu\n", i);
7840 }
7841 exit (ferror (f) || fclose (f) != 0);
7842
7843 ;
7844 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007845}
Martin v. Löwis11437992002-04-12 09:54:03 +00007846_ACEOF
7847rm -f conftest$ac_exeext
7848if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7849 (eval $ac_link) 2>&5
7850 ac_status=$?
7851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7852 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7854 (eval $ac_try) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
7858 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007859else
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 echo "$as_me: program exited with status $ac_status" >&5
7861echo "$as_me: failed program was:" >&5
7862cat conftest.$ac_ext >&5
7863( exit $ac_status )
7864{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7865echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7866 { (exit 1); exit 1; }; }
7867fi
Barry Warsawfe33b792003-01-07 22:42:49 +00007868rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007869fi
7870fi
7871rm -f conftest.val
7872else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007873 ac_cv_sizeof_double=0
7874fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007876echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7877echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7878cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007879#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007881
7882
Martin v. Löwis11437992002-04-12 09:54:03 +00007883echo "$as_me:$LINENO: checking for fpos_t" >&5
7884echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7885if test "${ac_cv_type_fpos_t+set}" = set; then
7886 echo $ECHO_N "(cached) $ECHO_C" >&6
7887else
7888 cat >conftest.$ac_ext <<_ACEOF
7889#line $LINENO "configure"
7890#include "confdefs.h"
7891$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007892#ifdef F77_DUMMY_MAIN
7893# ifdef __cplusplus
7894 extern "C"
7895# endif
7896 int F77_DUMMY_MAIN() { return 1; }
7897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
7901if ((fpos_t *) 0)
7902 return 0;
7903if (sizeof (fpos_t))
7904 return 0;
7905 ;
7906 return 0;
7907}
7908_ACEOF
7909rm -f conftest.$ac_objext
7910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7911 (eval $ac_compile) 2>&5
7912 ac_status=$?
7913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7914 (exit $ac_status); } &&
7915 { ac_try='test -s conftest.$ac_objext'
7916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7917 (eval $ac_try) 2>&5
7918 ac_status=$?
7919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7920 (exit $ac_status); }; }; then
7921 ac_cv_type_fpos_t=yes
7922else
7923 echo "$as_me: failed program was:" >&5
7924cat conftest.$ac_ext >&5
7925ac_cv_type_fpos_t=no
7926fi
7927rm -f conftest.$ac_objext conftest.$ac_ext
7928fi
7929echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7930echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7931
7932echo "$as_me:$LINENO: checking size of fpos_t" >&5
7933echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7934if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937 if test "$ac_cv_type_fpos_t" = yes; then
7938 # The cast to unsigned long works around a bug in the HP C Compiler
7939 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7940 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7941 # This bug is HP SR number 8606223364.
7942 if test "$cross_compiling" = yes; then
7943 # Depending upon the size, compute the lo and hi bounds.
7944cat >conftest.$ac_ext <<_ACEOF
7945#line $LINENO "configure"
7946#include "confdefs.h"
7947$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007948#ifdef F77_DUMMY_MAIN
7949# ifdef __cplusplus
7950 extern "C"
7951# endif
7952 int F77_DUMMY_MAIN() { return 1; }
7953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007954int
7955main ()
7956{
7957static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7958test_array [0] = 0
7959
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964rm -f conftest.$ac_objext
7965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7966 (eval $ac_compile) 2>&5
7967 ac_status=$?
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); } &&
7970 { ac_try='test -s conftest.$ac_objext'
7971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7972 (eval $ac_try) 2>&5
7973 ac_status=$?
7974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7975 (exit $ac_status); }; }; then
7976 ac_lo=0 ac_mid=0
7977 while :; do
7978 cat >conftest.$ac_ext <<_ACEOF
7979#line $LINENO "configure"
7980#include "confdefs.h"
7981$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00007982#ifdef F77_DUMMY_MAIN
7983# ifdef __cplusplus
7984 extern "C"
7985# endif
7986 int F77_DUMMY_MAIN() { return 1; }
7987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
7991static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7992test_array [0] = 0
7993
7994 ;
7995 return 0;
7996}
7997_ACEOF
7998rm -f conftest.$ac_objext
7999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8000 (eval $ac_compile) 2>&5
8001 ac_status=$?
8002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8003 (exit $ac_status); } &&
8004 { ac_try='test -s conftest.$ac_objext'
8005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8006 (eval $ac_try) 2>&5
8007 ac_status=$?
8008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8009 (exit $ac_status); }; }; then
8010 ac_hi=$ac_mid; break
8011else
8012 echo "$as_me: failed program was:" >&5
8013cat conftest.$ac_ext >&5
8014ac_lo=`expr $ac_mid + 1`
8015 if test $ac_lo -le $ac_mid; then
8016 ac_lo= ac_hi=
8017 break
8018 fi
8019 ac_mid=`expr 2 '*' $ac_mid + 1`
8020fi
8021rm -f conftest.$ac_objext conftest.$ac_ext
8022 done
8023else
8024 echo "$as_me: failed program was:" >&5
8025cat conftest.$ac_ext >&5
8026cat >conftest.$ac_ext <<_ACEOF
8027#line $LINENO "configure"
8028#include "confdefs.h"
8029$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008030#ifdef F77_DUMMY_MAIN
8031# ifdef __cplusplus
8032 extern "C"
8033# endif
8034 int F77_DUMMY_MAIN() { return 1; }
8035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008036int
8037main ()
8038{
8039static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8040test_array [0] = 0
8041
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046rm -f conftest.$ac_objext
8047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8048 (eval $ac_compile) 2>&5
8049 ac_status=$?
8050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8051 (exit $ac_status); } &&
8052 { ac_try='test -s conftest.$ac_objext'
8053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8054 (eval $ac_try) 2>&5
8055 ac_status=$?
8056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8057 (exit $ac_status); }; }; then
8058 ac_hi=-1 ac_mid=-1
8059 while :; do
8060 cat >conftest.$ac_ext <<_ACEOF
8061#line $LINENO "configure"
8062#include "confdefs.h"
8063$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008064#ifdef F77_DUMMY_MAIN
8065# ifdef __cplusplus
8066 extern "C"
8067# endif
8068 int F77_DUMMY_MAIN() { return 1; }
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070int
8071main ()
8072{
8073static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8074test_array [0] = 0
8075
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
8081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8082 (eval $ac_compile) 2>&5
8083 ac_status=$?
8084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8085 (exit $ac_status); } &&
8086 { ac_try='test -s conftest.$ac_objext'
8087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8088 (eval $ac_try) 2>&5
8089 ac_status=$?
8090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8091 (exit $ac_status); }; }; then
8092 ac_lo=$ac_mid; break
8093else
8094 echo "$as_me: failed program was:" >&5
8095cat conftest.$ac_ext >&5
8096ac_hi=`expr '(' $ac_mid ')' - 1`
8097 if test $ac_mid -le $ac_hi; then
8098 ac_lo= ac_hi=
8099 break
8100 fi
8101 ac_mid=`expr 2 '*' $ac_mid`
8102fi
8103rm -f conftest.$ac_objext conftest.$ac_ext
8104 done
8105else
8106 echo "$as_me: failed program was:" >&5
8107cat conftest.$ac_ext >&5
8108ac_lo= ac_hi=
8109fi
8110rm -f conftest.$ac_objext conftest.$ac_ext
8111fi
8112rm -f conftest.$ac_objext conftest.$ac_ext
8113# Binary search between lo and hi bounds.
8114while test "x$ac_lo" != "x$ac_hi"; do
8115 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8116 cat >conftest.$ac_ext <<_ACEOF
8117#line $LINENO "configure"
8118#include "confdefs.h"
8119$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008120#ifdef F77_DUMMY_MAIN
8121# ifdef __cplusplus
8122 extern "C"
8123# endif
8124 int F77_DUMMY_MAIN() { return 1; }
8125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008126int
8127main ()
8128{
8129static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8130test_array [0] = 0
8131
8132 ;
8133 return 0;
8134}
8135_ACEOF
8136rm -f conftest.$ac_objext
8137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8138 (eval $ac_compile) 2>&5
8139 ac_status=$?
8140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8141 (exit $ac_status); } &&
8142 { ac_try='test -s conftest.$ac_objext'
8143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8144 (eval $ac_try) 2>&5
8145 ac_status=$?
8146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8147 (exit $ac_status); }; }; then
8148 ac_hi=$ac_mid
8149else
8150 echo "$as_me: failed program was:" >&5
8151cat conftest.$ac_ext >&5
8152ac_lo=`expr '(' $ac_mid ')' + 1`
8153fi
8154rm -f conftest.$ac_objext conftest.$ac_ext
8155done
8156case $ac_lo in
8157?*) ac_cv_sizeof_fpos_t=$ac_lo;;
8158'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8159echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8160 { (exit 1); exit 1; }; } ;;
8161esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008162else
8163 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008164 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8165echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8166 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167else
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 cat >conftest.$ac_ext <<_ACEOF
8169#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008171$ac_includes_default
8172long longval () { return (long) (sizeof (fpos_t)); }
8173unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008174#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008175#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008176#ifdef F77_DUMMY_MAIN
8177# ifdef __cplusplus
8178 extern "C"
8179# endif
8180 int F77_DUMMY_MAIN() { return 1; }
8181#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008182int
8183main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008184{
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
8186 FILE *f = fopen ("conftest.val", "w");
8187 if (! f)
8188 exit (1);
8189 if (((long) (sizeof (fpos_t))) < 0)
8190 {
8191 long i = longval ();
8192 if (i != ((long) (sizeof (fpos_t))))
8193 exit (1);
8194 fprintf (f, "%ld\n", i);
8195 }
8196 else
8197 {
8198 unsigned long i = ulongval ();
8199 if (i != ((long) (sizeof (fpos_t))))
8200 exit (1);
8201 fprintf (f, "%lu\n", i);
8202 }
8203 exit (ferror (f) || fclose (f) != 0);
8204
8205 ;
8206 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008207}
Martin v. Löwis11437992002-04-12 09:54:03 +00008208_ACEOF
8209rm -f conftest$ac_exeext
8210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8211 (eval $ac_link) 2>&5
8212 ac_status=$?
8213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8216 (eval $ac_try) 2>&5
8217 ac_status=$?
8218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219 (exit $ac_status); }; }; then
8220 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008221else
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 echo "$as_me: program exited with status $ac_status" >&5
8223echo "$as_me: failed program was:" >&5
8224cat conftest.$ac_ext >&5
8225( exit $ac_status )
8226{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
8227echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
8228 { (exit 1); exit 1; }; }
8229fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008230rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008231fi
8232fi
8233rm -f conftest.val
8234else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008235 ac_cv_sizeof_fpos_t=0
8236fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008237fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008238echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8239echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8240cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008241#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008242_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008243
Michael W. Hudson54241132001-12-07 15:38:26 +00008244
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246echo "$as_me:$LINENO: checking for long long support" >&5
8247echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008248have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >conftest.$ac_ext <<_ACEOF
8250#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008251#include "confdefs.h"
8252
Barry Warsawfe33b792003-01-07 22:42:49 +00008253#ifdef F77_DUMMY_MAIN
8254# ifdef __cplusplus
8255 extern "C"
8256# endif
8257 int F77_DUMMY_MAIN() { return 1; }
8258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008259int
8260main ()
8261{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008262long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 ;
8264 return 0;
8265}
8266_ACEOF
8267rm -f conftest.$ac_objext
8268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8269 (eval $ac_compile) 2>&5
8270 ac_status=$?
8271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8272 (exit $ac_status); } &&
8273 { ac_try='test -s conftest.$ac_objext'
8274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8275 (eval $ac_try) 2>&5
8276 ac_status=$?
8277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8278 (exit $ac_status); }; }; then
8279
8280
8281cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008282#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008283_ACEOF
8284
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008285 have_long_long=yes
8286
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008287else
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 echo "$as_me: failed program was:" >&5
8289cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008290fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008291rm -f conftest.$ac_objext conftest.$ac_ext
8292echo "$as_me:$LINENO: result: $have_long_long" >&5
8293echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008294if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008295echo "$as_me:$LINENO: checking for long long" >&5
8296echo $ECHO_N "checking for long long... $ECHO_C" >&6
8297if test "${ac_cv_type_long_long+set}" = set; then
8298 echo $ECHO_N "(cached) $ECHO_C" >&6
8299else
8300 cat >conftest.$ac_ext <<_ACEOF
8301#line $LINENO "configure"
8302#include "confdefs.h"
8303$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008304#ifdef F77_DUMMY_MAIN
8305# ifdef __cplusplus
8306 extern "C"
8307# endif
8308 int F77_DUMMY_MAIN() { return 1; }
8309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008310int
8311main ()
8312{
8313if ((long long *) 0)
8314 return 0;
8315if (sizeof (long long))
8316 return 0;
8317 ;
8318 return 0;
8319}
8320_ACEOF
8321rm -f conftest.$ac_objext
8322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8323 (eval $ac_compile) 2>&5
8324 ac_status=$?
8325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8326 (exit $ac_status); } &&
8327 { ac_try='test -s conftest.$ac_objext'
8328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8329 (eval $ac_try) 2>&5
8330 ac_status=$?
8331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8332 (exit $ac_status); }; }; then
8333 ac_cv_type_long_long=yes
8334else
8335 echo "$as_me: failed program was:" >&5
8336cat conftest.$ac_ext >&5
8337ac_cv_type_long_long=no
8338fi
8339rm -f conftest.$ac_objext conftest.$ac_ext
8340fi
8341echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8342echo "${ECHO_T}$ac_cv_type_long_long" >&6
8343
8344echo "$as_me:$LINENO: checking size of long long" >&5
8345echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8346if test "${ac_cv_sizeof_long_long+set}" = set; then
8347 echo $ECHO_N "(cached) $ECHO_C" >&6
8348else
8349 if test "$ac_cv_type_long_long" = yes; then
8350 # The cast to unsigned long works around a bug in the HP C Compiler
8351 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8352 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8353 # This bug is HP SR number 8606223364.
8354 if test "$cross_compiling" = yes; then
8355 # Depending upon the size, compute the lo and hi bounds.
8356cat >conftest.$ac_ext <<_ACEOF
8357#line $LINENO "configure"
8358#include "confdefs.h"
8359$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008360#ifdef F77_DUMMY_MAIN
8361# ifdef __cplusplus
8362 extern "C"
8363# endif
8364 int F77_DUMMY_MAIN() { return 1; }
8365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008366int
8367main ()
8368{
8369static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8370test_array [0] = 0
8371
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376rm -f conftest.$ac_objext
8377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8378 (eval $ac_compile) 2>&5
8379 ac_status=$?
8380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8381 (exit $ac_status); } &&
8382 { ac_try='test -s conftest.$ac_objext'
8383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8384 (eval $ac_try) 2>&5
8385 ac_status=$?
8386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8387 (exit $ac_status); }; }; then
8388 ac_lo=0 ac_mid=0
8389 while :; do
8390 cat >conftest.$ac_ext <<_ACEOF
8391#line $LINENO "configure"
8392#include "confdefs.h"
8393$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008394#ifdef F77_DUMMY_MAIN
8395# ifdef __cplusplus
8396 extern "C"
8397# endif
8398 int F77_DUMMY_MAIN() { return 1; }
8399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008400int
8401main ()
8402{
8403static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8404test_array [0] = 0
8405
8406 ;
8407 return 0;
8408}
8409_ACEOF
8410rm -f conftest.$ac_objext
8411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8412 (eval $ac_compile) 2>&5
8413 ac_status=$?
8414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8415 (exit $ac_status); } &&
8416 { ac_try='test -s conftest.$ac_objext'
8417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8418 (eval $ac_try) 2>&5
8419 ac_status=$?
8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8421 (exit $ac_status); }; }; then
8422 ac_hi=$ac_mid; break
8423else
8424 echo "$as_me: failed program was:" >&5
8425cat conftest.$ac_ext >&5
8426ac_lo=`expr $ac_mid + 1`
8427 if test $ac_lo -le $ac_mid; then
8428 ac_lo= ac_hi=
8429 break
8430 fi
8431 ac_mid=`expr 2 '*' $ac_mid + 1`
8432fi
8433rm -f conftest.$ac_objext conftest.$ac_ext
8434 done
8435else
8436 echo "$as_me: failed program was:" >&5
8437cat conftest.$ac_ext >&5
8438cat >conftest.$ac_ext <<_ACEOF
8439#line $LINENO "configure"
8440#include "confdefs.h"
8441$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008442#ifdef F77_DUMMY_MAIN
8443# ifdef __cplusplus
8444 extern "C"
8445# endif
8446 int F77_DUMMY_MAIN() { return 1; }
8447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008448int
8449main ()
8450{
8451static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8452test_array [0] = 0
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458rm -f conftest.$ac_objext
8459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8460 (eval $ac_compile) 2>&5
8461 ac_status=$?
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); } &&
8464 { ac_try='test -s conftest.$ac_objext'
8465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8466 (eval $ac_try) 2>&5
8467 ac_status=$?
8468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8469 (exit $ac_status); }; }; then
8470 ac_hi=-1 ac_mid=-1
8471 while :; do
8472 cat >conftest.$ac_ext <<_ACEOF
8473#line $LINENO "configure"
8474#include "confdefs.h"
8475$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008476#ifdef F77_DUMMY_MAIN
8477# ifdef __cplusplus
8478 extern "C"
8479# endif
8480 int F77_DUMMY_MAIN() { return 1; }
8481#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
8485static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8486test_array [0] = 0
8487
8488 ;
8489 return 0;
8490}
8491_ACEOF
8492rm -f conftest.$ac_objext
8493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8494 (eval $ac_compile) 2>&5
8495 ac_status=$?
8496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497 (exit $ac_status); } &&
8498 { ac_try='test -s conftest.$ac_objext'
8499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8500 (eval $ac_try) 2>&5
8501 ac_status=$?
8502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8503 (exit $ac_status); }; }; then
8504 ac_lo=$ac_mid; break
8505else
8506 echo "$as_me: failed program was:" >&5
8507cat conftest.$ac_ext >&5
8508ac_hi=`expr '(' $ac_mid ')' - 1`
8509 if test $ac_mid -le $ac_hi; then
8510 ac_lo= ac_hi=
8511 break
8512 fi
8513 ac_mid=`expr 2 '*' $ac_mid`
8514fi
8515rm -f conftest.$ac_objext conftest.$ac_ext
8516 done
8517else
8518 echo "$as_me: failed program was:" >&5
8519cat conftest.$ac_ext >&5
8520ac_lo= ac_hi=
8521fi
8522rm -f conftest.$ac_objext conftest.$ac_ext
8523fi
8524rm -f conftest.$ac_objext conftest.$ac_ext
8525# Binary search between lo and hi bounds.
8526while test "x$ac_lo" != "x$ac_hi"; do
8527 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8528 cat >conftest.$ac_ext <<_ACEOF
8529#line $LINENO "configure"
8530#include "confdefs.h"
8531$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008532#ifdef F77_DUMMY_MAIN
8533# ifdef __cplusplus
8534 extern "C"
8535# endif
8536 int F77_DUMMY_MAIN() { return 1; }
8537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
8541static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8542test_array [0] = 0
8543
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
8549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8550 (eval $ac_compile) 2>&5
8551 ac_status=$?
8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8553 (exit $ac_status); } &&
8554 { ac_try='test -s conftest.$ac_objext'
8555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8556 (eval $ac_try) 2>&5
8557 ac_status=$?
8558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8559 (exit $ac_status); }; }; then
8560 ac_hi=$ac_mid
8561else
8562 echo "$as_me: failed program was:" >&5
8563cat conftest.$ac_ext >&5
8564ac_lo=`expr '(' $ac_mid ')' + 1`
8565fi
8566rm -f conftest.$ac_objext conftest.$ac_ext
8567done
8568case $ac_lo in
8569?*) ac_cv_sizeof_long_long=$ac_lo;;
8570'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8571echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8572 { (exit 1); exit 1; }; } ;;
8573esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008574else
8575 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8577echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8578 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 cat >conftest.$ac_ext <<_ACEOF
8581#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008582#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008583$ac_includes_default
8584long longval () { return (long) (sizeof (long long)); }
8585unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00008588#ifdef F77_DUMMY_MAIN
8589# ifdef __cplusplus
8590 extern "C"
8591# endif
8592 int F77_DUMMY_MAIN() { return 1; }
8593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008596{
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
8598 FILE *f = fopen ("conftest.val", "w");
8599 if (! f)
8600 exit (1);
8601 if (((long) (sizeof (long long))) < 0)
8602 {
8603 long i = longval ();
8604 if (i != ((long) (sizeof (long long))))
8605 exit (1);
8606 fprintf (f, "%ld\n", i);
8607 }
8608 else
8609 {
8610 unsigned long i = ulongval ();
8611 if (i != ((long) (sizeof (long long))))
8612 exit (1);
8613 fprintf (f, "%lu\n", i);
8614 }
8615 exit (ferror (f) || fclose (f) != 0);
8616
8617 ;
8618 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008619}
Martin v. Löwis11437992002-04-12 09:54:03 +00008620_ACEOF
8621rm -f conftest$ac_exeext
8622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8623 (eval $ac_link) 2>&5
8624 ac_status=$?
8625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8628 (eval $ac_try) 2>&5
8629 ac_status=$?
8630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8631 (exit $ac_status); }; }; then
8632 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008633else
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 echo "$as_me: program exited with status $ac_status" >&5
8635echo "$as_me: failed program was:" >&5
8636cat conftest.$ac_ext >&5
8637( exit $ac_status )
8638{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8639echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8640 { (exit 1); exit 1; }; }
8641fi
Barry Warsawfe33b792003-01-07 22:42:49 +00008642rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008643fi
8644fi
8645rm -f conftest.val
8646else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008647 ac_cv_sizeof_long_long=0
8648fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008650echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8651echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8652cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008653#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008654_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008655
Michael W. Hudson54241132001-12-07 15:38:26 +00008656
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008657fi
8658
Martin v. Löwis11437992002-04-12 09:54:03 +00008659echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8660echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008661have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008662cat >conftest.$ac_ext <<_ACEOF
8663#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008664#include "confdefs.h"
8665
Barry Warsawfe33b792003-01-07 22:42:49 +00008666#ifdef F77_DUMMY_MAIN
8667# ifdef __cplusplus
8668 extern "C"
8669# endif
8670 int F77_DUMMY_MAIN() { return 1; }
8671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008672int
8673main ()
8674{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008675uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ;
8677 return 0;
8678}
8679_ACEOF
8680rm -f conftest.$ac_objext
8681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8682 (eval $ac_compile) 2>&5
8683 ac_status=$?
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
8686 { ac_try='test -s conftest.$ac_objext'
8687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8688 (eval $ac_try) 2>&5
8689 ac_status=$?
8690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691 (exit $ac_status); }; }; then
8692
8693
8694cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008695#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
8697
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008698 have_uintptr_t=yes
8699
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008700else
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 echo "$as_me: failed program was:" >&5
8702cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008704rm -f conftest.$ac_objext conftest.$ac_ext
8705echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8706echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008707if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008708echo "$as_me:$LINENO: checking for uintptr_t" >&5
8709echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8710if test "${ac_cv_type_uintptr_t+set}" = set; then
8711 echo $ECHO_N "(cached) $ECHO_C" >&6
8712else
8713 cat >conftest.$ac_ext <<_ACEOF
8714#line $LINENO "configure"
8715#include "confdefs.h"
8716$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008717#ifdef F77_DUMMY_MAIN
8718# ifdef __cplusplus
8719 extern "C"
8720# endif
8721 int F77_DUMMY_MAIN() { return 1; }
8722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008723int
8724main ()
8725{
8726if ((uintptr_t *) 0)
8727 return 0;
8728if (sizeof (uintptr_t))
8729 return 0;
8730 ;
8731 return 0;
8732}
8733_ACEOF
8734rm -f conftest.$ac_objext
8735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8736 (eval $ac_compile) 2>&5
8737 ac_status=$?
8738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8739 (exit $ac_status); } &&
8740 { ac_try='test -s conftest.$ac_objext'
8741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8742 (eval $ac_try) 2>&5
8743 ac_status=$?
8744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8745 (exit $ac_status); }; }; then
8746 ac_cv_type_uintptr_t=yes
8747else
8748 echo "$as_me: failed program was:" >&5
8749cat conftest.$ac_ext >&5
8750ac_cv_type_uintptr_t=no
8751fi
8752rm -f conftest.$ac_objext conftest.$ac_ext
8753fi
8754echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8755echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8756
8757echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8758echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8759if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8760 echo $ECHO_N "(cached) $ECHO_C" >&6
8761else
8762 if test "$ac_cv_type_uintptr_t" = yes; then
8763 # The cast to unsigned long works around a bug in the HP C Compiler
8764 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8765 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8766 # This bug is HP SR number 8606223364.
8767 if test "$cross_compiling" = yes; then
8768 # Depending upon the size, compute the lo and hi bounds.
8769cat >conftest.$ac_ext <<_ACEOF
8770#line $LINENO "configure"
8771#include "confdefs.h"
8772$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008773#ifdef F77_DUMMY_MAIN
8774# ifdef __cplusplus
8775 extern "C"
8776# endif
8777 int F77_DUMMY_MAIN() { return 1; }
8778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008779int
8780main ()
8781{
8782static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8783test_array [0] = 0
8784
8785 ;
8786 return 0;
8787}
8788_ACEOF
8789rm -f conftest.$ac_objext
8790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8791 (eval $ac_compile) 2>&5
8792 ac_status=$?
8793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8794 (exit $ac_status); } &&
8795 { ac_try='test -s conftest.$ac_objext'
8796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8797 (eval $ac_try) 2>&5
8798 ac_status=$?
8799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800 (exit $ac_status); }; }; then
8801 ac_lo=0 ac_mid=0
8802 while :; do
8803 cat >conftest.$ac_ext <<_ACEOF
8804#line $LINENO "configure"
8805#include "confdefs.h"
8806$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008807#ifdef F77_DUMMY_MAIN
8808# ifdef __cplusplus
8809 extern "C"
8810# endif
8811 int F77_DUMMY_MAIN() { return 1; }
8812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
8816static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8817test_array [0] = 0
8818
8819 ;
8820 return 0;
8821}
8822_ACEOF
8823rm -f conftest.$ac_objext
8824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8825 (eval $ac_compile) 2>&5
8826 ac_status=$?
8827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8828 (exit $ac_status); } &&
8829 { ac_try='test -s conftest.$ac_objext'
8830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8831 (eval $ac_try) 2>&5
8832 ac_status=$?
8833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8834 (exit $ac_status); }; }; then
8835 ac_hi=$ac_mid; break
8836else
8837 echo "$as_me: failed program was:" >&5
8838cat conftest.$ac_ext >&5
8839ac_lo=`expr $ac_mid + 1`
8840 if test $ac_lo -le $ac_mid; then
8841 ac_lo= ac_hi=
8842 break
8843 fi
8844 ac_mid=`expr 2 '*' $ac_mid + 1`
8845fi
8846rm -f conftest.$ac_objext conftest.$ac_ext
8847 done
8848else
8849 echo "$as_me: failed program was:" >&5
8850cat conftest.$ac_ext >&5
8851cat >conftest.$ac_ext <<_ACEOF
8852#line $LINENO "configure"
8853#include "confdefs.h"
8854$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008855#ifdef F77_DUMMY_MAIN
8856# ifdef __cplusplus
8857 extern "C"
8858# endif
8859 int F77_DUMMY_MAIN() { return 1; }
8860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
8864static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8865test_array [0] = 0
8866
8867 ;
8868 return 0;
8869}
8870_ACEOF
8871rm -f conftest.$ac_objext
8872if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8873 (eval $ac_compile) 2>&5
8874 ac_status=$?
8875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8876 (exit $ac_status); } &&
8877 { ac_try='test -s conftest.$ac_objext'
8878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8879 (eval $ac_try) 2>&5
8880 ac_status=$?
8881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8882 (exit $ac_status); }; }; then
8883 ac_hi=-1 ac_mid=-1
8884 while :; do
8885 cat >conftest.$ac_ext <<_ACEOF
8886#line $LINENO "configure"
8887#include "confdefs.h"
8888$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008889#ifdef F77_DUMMY_MAIN
8890# ifdef __cplusplus
8891 extern "C"
8892# endif
8893 int F77_DUMMY_MAIN() { return 1; }
8894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008895int
8896main ()
8897{
8898static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8899test_array [0] = 0
8900
8901 ;
8902 return 0;
8903}
8904_ACEOF
8905rm -f conftest.$ac_objext
8906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8907 (eval $ac_compile) 2>&5
8908 ac_status=$?
8909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910 (exit $ac_status); } &&
8911 { ac_try='test -s conftest.$ac_objext'
8912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8913 (eval $ac_try) 2>&5
8914 ac_status=$?
8915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8916 (exit $ac_status); }; }; then
8917 ac_lo=$ac_mid; break
8918else
8919 echo "$as_me: failed program was:" >&5
8920cat conftest.$ac_ext >&5
8921ac_hi=`expr '(' $ac_mid ')' - 1`
8922 if test $ac_mid -le $ac_hi; then
8923 ac_lo= ac_hi=
8924 break
8925 fi
8926 ac_mid=`expr 2 '*' $ac_mid`
8927fi
8928rm -f conftest.$ac_objext conftest.$ac_ext
8929 done
8930else
8931 echo "$as_me: failed program was:" >&5
8932cat conftest.$ac_ext >&5
8933ac_lo= ac_hi=
8934fi
8935rm -f conftest.$ac_objext conftest.$ac_ext
8936fi
8937rm -f conftest.$ac_objext conftest.$ac_ext
8938# Binary search between lo and hi bounds.
8939while test "x$ac_lo" != "x$ac_hi"; do
8940 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8941 cat >conftest.$ac_ext <<_ACEOF
8942#line $LINENO "configure"
8943#include "confdefs.h"
8944$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +00008945#ifdef F77_DUMMY_MAIN
8946# ifdef __cplusplus
8947 extern "C"
8948# endif
8949 int F77_DUMMY_MAIN() { return 1; }
8950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008951int
8952main ()
8953{
8954static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8955test_array [0] = 0
8956
8957 ;
8958 return 0;
8959}
8960_ACEOF
8961rm -f conftest.$ac_objext
8962if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8963 (eval $ac_compile) 2>&5
8964 ac_status=$?
8965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966 (exit $ac_status); } &&
8967 { ac_try='test -s conftest.$ac_objext'
8968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8969 (eval $ac_try) 2>&5
8970 ac_status=$?
8971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8972 (exit $ac_status); }; }; then
8973 ac_hi=$ac_mid
8974else
8975 echo "$as_me: failed program was:" >&5
8976cat conftest.$ac_ext >&5
8977ac_lo=`expr '(' $ac_mid ')' + 1`
8978fi
8979rm -f conftest.$ac_objext conftest.$ac_ext
8980done
8981case $ac_lo in
8982?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8983'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8984echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8985 { (exit 1); exit 1; }; } ;;
8986esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008987else
8988 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8990echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8991 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008992else
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 cat >conftest.$ac_ext <<_ACEOF
8994#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008995#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008996$ac_includes_default
8997long longval () { return (long) (sizeof (uintptr_t)); }
8998unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008999#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009000#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009001#ifdef F77_DUMMY_MAIN
9002# ifdef __cplusplus
9003 extern "C"
9004# endif
9005 int F77_DUMMY_MAIN() { return 1; }
9006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009009{
Martin v. Löwis11437992002-04-12 09:54:03 +00009010
9011 FILE *f = fopen ("conftest.val", "w");
9012 if (! f)
9013 exit (1);
9014 if (((long) (sizeof (uintptr_t))) < 0)
9015 {
9016 long i = longval ();
9017 if (i != ((long) (sizeof (uintptr_t))))
9018 exit (1);
9019 fprintf (f, "%ld\n", i);
9020 }
9021 else
9022 {
9023 unsigned long i = ulongval ();
9024 if (i != ((long) (sizeof (uintptr_t))))
9025 exit (1);
9026 fprintf (f, "%lu\n", i);
9027 }
9028 exit (ferror (f) || fclose (f) != 0);
9029
9030 ;
9031 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009032}
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
9034rm -f conftest$ac_exeext
9035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9036 (eval $ac_link) 2>&5
9037 ac_status=$?
9038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9041 (eval $ac_try) 2>&5
9042 ac_status=$?
9043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044 (exit $ac_status); }; }; then
9045 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009046else
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 echo "$as_me: program exited with status $ac_status" >&5
9048echo "$as_me: failed program was:" >&5
9049cat conftest.$ac_ext >&5
9050( exit $ac_status )
9051{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
9052echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
9053 { (exit 1); exit 1; }; }
9054fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009055rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009056fi
9057fi
9058rm -f conftest.val
9059else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009060 ac_cv_sizeof_uintptr_t=0
9061fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009062fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009063echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9064echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9065cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009066#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009068
Michael W. Hudson54241132001-12-07 15:38:26 +00009069
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009070fi
9071
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009072# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009073echo "$as_me:$LINENO: checking size of off_t" >&5
9074echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9075if test "${ac_cv_sizeof_off_t+set}" = set; then
9076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009077else
9078 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009079 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009080else
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 cat >conftest.$ac_ext <<_ACEOF
9082#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009083#include "confdefs.h"
9084#include <stdio.h>
9085#include <sys/types.h>
9086main()
9087{
9088 FILE *f=fopen("conftestval", "w");
9089 if (!f) exit(1);
9090 fprintf(f, "%d\n", sizeof(off_t));
9091 exit(0);
9092}
Martin v. Löwis11437992002-04-12 09:54:03 +00009093_ACEOF
9094rm -f conftest$ac_exeext
9095if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9096 (eval $ac_link) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9101 (eval $ac_try) 2>&5
9102 ac_status=$?
9103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9104 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009105 ac_cv_sizeof_off_t=`cat conftestval`
9106else
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 echo "$as_me: program exited with status $ac_status" >&5
9108echo "$as_me: failed program was:" >&5
9109cat conftest.$ac_ext >&5
9110( exit $ac_status )
9111ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009112fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009113rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009114fi
9115
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009116fi
9117
Martin v. Löwis11437992002-04-12 09:54:03 +00009118echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9119echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9120
9121cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009122#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009123_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009124
Michael W. Hudson54241132001-12-07 15:38:26 +00009125
Martin v. Löwis11437992002-04-12 09:54:03 +00009126echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9127echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009128if test "$have_long_long" = yes -a \
9129 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9130 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009131
Martin v. Löwis11437992002-04-12 09:54:03 +00009132cat >>confdefs.h <<\_ACEOF
9133#define HAVE_LARGEFILE_SUPPORT 1
9134_ACEOF
9135
9136 echo "$as_me:$LINENO: result: yes" >&5
9137echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 echo "$as_me:$LINENO: result: no" >&5
9140echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009141fi
9142
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009143# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009144echo "$as_me:$LINENO: checking size of time_t" >&5
9145echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9146if test "${ac_cv_sizeof_time_t+set}" = set; then
9147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009148else
9149 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009150 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009151else
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 cat >conftest.$ac_ext <<_ACEOF
9153#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009154#include "confdefs.h"
9155#include <stdio.h>
9156#include <time.h>
9157main()
9158{
9159 FILE *f=fopen("conftestval", "w");
9160 if (!f) exit(1);
9161 fprintf(f, "%d\n", sizeof(time_t));
9162 exit(0);
9163}
Martin v. Löwis11437992002-04-12 09:54:03 +00009164_ACEOF
9165rm -f conftest$ac_exeext
9166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9172 (eval $ac_try) 2>&5
9173 ac_status=$?
9174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9175 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009176 ac_cv_sizeof_time_t=`cat conftestval`
9177else
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 echo "$as_me: program exited with status $ac_status" >&5
9179echo "$as_me: failed program was:" >&5
9180cat conftest.$ac_ext >&5
9181( exit $ac_status )
9182ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009183fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009184rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009185fi
9186
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009187fi
9188
Martin v. Löwis11437992002-04-12 09:54:03 +00009189echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9190echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9191
9192cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009193#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009195
Michael W. Hudson54241132001-12-07 15:38:26 +00009196
9197
Trent Mick635f6fb2000-08-23 21:33:05 +00009198# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009199ac_save_cc="$CC"
9200if test "$ac_cv_kpthread" = "yes"
9201then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009202elif test "$ac_cv_kthread" = "yes"
9203then CC="$CC -Kthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009205echo "$as_me:$LINENO: checking for pthread_t" >&5
9206echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009207have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009208cat >conftest.$ac_ext <<_ACEOF
9209#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009210#include "confdefs.h"
9211#include <pthread.h>
Barry Warsawfe33b792003-01-07 22:42:49 +00009212#ifdef F77_DUMMY_MAIN
9213# ifdef __cplusplus
9214 extern "C"
9215# endif
9216 int F77_DUMMY_MAIN() { return 1; }
9217#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009218int
9219main ()
9220{
Guido van Rossum12580492000-09-24 16:47:19 +00009221pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
9227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9228 (eval $ac_compile) 2>&5
9229 ac_status=$?
9230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9231 (exit $ac_status); } &&
9232 { ac_try='test -s conftest.$ac_objext'
9233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9234 (eval $ac_try) 2>&5
9235 ac_status=$?
9236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9237 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009238 have_pthread_t=yes
9239else
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 echo "$as_me: failed program was:" >&5
9241cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00009242fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009243rm -f conftest.$ac_objext conftest.$ac_ext
9244echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9245echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009246if test "$have_pthread_t" = yes ; then
9247 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9249echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9250 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9251 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009252else
9253 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009254 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009255else
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 cat >conftest.$ac_ext <<_ACEOF
9257#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00009258#include "confdefs.h"
9259#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009260#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009261 main()
9262 {
9263 FILE *f=fopen("conftestval", "w");
9264 if (!f) exit(1);
9265 fprintf(f, "%d\n", sizeof(pthread_t));
9266 exit(0);
9267 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009268_ACEOF
9269rm -f conftest$ac_exeext
9270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9271 (eval $ac_link) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9276 (eval $ac_try) 2>&5
9277 ac_status=$?
9278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009280 ac_cv_sizeof_pthread_t=`cat conftestval`
9281else
Martin v. Löwis11437992002-04-12 09:54:03 +00009282 echo "$as_me: program exited with status $ac_status" >&5
9283echo "$as_me: failed program was:" >&5
9284cat conftest.$ac_ext >&5
9285( exit $ac_status )
9286ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009287fi
Barry Warsawfe33b792003-01-07 22:42:49 +00009288rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009289fi
9290
Trent Mick635f6fb2000-08-23 21:33:05 +00009291fi
9292
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9294echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9295
9296cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009297#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009298_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009299
9300fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009301CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009302
Martin v. Löwis11437992002-04-12 09:54:03 +00009303echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9304echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009305# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9306if test "${enable_toolbox_glue+set}" = set; then
9307 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009308
Martin v. Löwis11437992002-04-12 09:54:03 +00009309fi;
Jack Jansene578a632001-08-15 01:27:14 +00009310
9311if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009312then
Jack Jansene578a632001-08-15 01:27:14 +00009313 case $ac_sys_system/$ac_sys_release in
9314 Darwin/*)
9315 enable_toolbox_glue="yes";;
9316 *)
9317 enable_toolbox_glue="no";;
9318 esac
9319fi
9320case "$enable_toolbox_glue" in
9321yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009322 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009323 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009324 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009325
9326cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009327#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009328_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009329
9330 ;;
9331*)
9332 extra_frameworks=""
9333 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009334 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009335 ;;
9336esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009337echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9338echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009339
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009340
9341case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009342 Darwin/1.3*)
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 Jansena3891ea2001-09-07 14:25:12 +00009345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009347 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009348 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009349 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00009350 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
9351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009352esac
9353
Martin v. Löwis11437992002-04-12 09:54:03 +00009354echo "$as_me:$LINENO: checking for --enable-framework" >&5
9355echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009356if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009357then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009358 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009360 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00009361 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362
Martin v. Löwis11437992002-04-12 09:54:03 +00009363cat >>confdefs.h <<\_ACEOF
9364#define WITH_NEXT_FRAMEWORK 1
9365_ACEOF
9366
9367 echo "$as_me:$LINENO: result: yes" >&5
9368echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369else
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 echo "$as_me:$LINENO: result: no" >&5
9371echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009372fi
9373
Martin v. Löwis11437992002-04-12 09:54:03 +00009374echo "$as_me:$LINENO: checking for dyld" >&5
9375echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009376case $ac_sys_system/$ac_sys_release in
9377 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009378
Martin v. Löwis11437992002-04-12 09:54:03 +00009379cat >>confdefs.h <<\_ACEOF
9380#define WITH_DYLD 1
9381_ACEOF
9382
9383 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9384echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009385 ;;
9386 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 echo "$as_me:$LINENO: result: no" >&5
9388echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009389 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009390esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009391
Guido van Rossum0a516c91994-09-12 10:58:40 +00009392# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009393
Michael W. Hudson54241132001-12-07 15:38:26 +00009394
9395
9396
9397
Guido van Rossum0a516c91994-09-12 10:58:40 +00009398# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009399# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009400echo "$as_me:$LINENO: checking SO" >&5
9401echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009402if test -z "$SO"
9403then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009404 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009405 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009406 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009407 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009410echo "$as_me:$LINENO: result: $SO" >&5
9411echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009412# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00009413# -- "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 +00009414# (Shared libraries in this instance are shared modules to be loaded into
9415# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009416echo "$as_me:$LINENO: checking LDSHARED" >&5
9417echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009418if test -z "$LDSHARED"
9419then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009420 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009421 AIX*)
9422 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009423 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009424 ;;
9425 BeOS*)
9426 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009427 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009428 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009429 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009430 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009433 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009434 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009435 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009436 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009437 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009438 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
9439 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009440 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009441 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9442 if test "$enable_framework" ; then
9443 # Link against the framework. All externals should be defined.
9444 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9445 else
9446 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009447 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009448 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00009449 Darwin/*)
9450 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9451 if test "$enable_framework" ; then
9452 # Link against the framework. All externals should be defined.
9453 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
9454 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009455 # No framework, use the Python app as bundle-loader
9456 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009457 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009458 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009459 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00009460 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009461 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009462 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009463 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009464 then
9465 LDSHARED="cc -shared ${LDFLAGS}"
9466 else
9467 LDSHARED="ld -Bshareable ${LDFLAGS}"
9468 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009469 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009470 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009471 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009472 then LDSHARED='$(CC) -shared'
9473 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009474 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009475 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009476 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009477 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009478 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009479 *) LDSHARED="ld";;
9480 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009482echo "$as_me:$LINENO: result: $LDSHARED" >&5
9483echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009484BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009485# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009486# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009487echo "$as_me:$LINENO: checking CCSHARED" >&5
9488echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009489if test -z "$CCSHARED"
9490then
Guido van Rossum07397971997-04-29 21:49:50 +00009491 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009492 SunOS*) if test "$GCC" = yes;
9493 then CCSHARED="-fPIC";
9494 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009495 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009496 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009497 else CCSHARED="+z";
9498 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009499 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009500 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009501 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009502 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009503 if test "$GCC" = "yes"
9504 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009505 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009506 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009507 SCO_SV*)
9508 if test "$GCC" = "yes"
9509 then CCSHARED="-fPIC"
9510 else CCSHARED="-Kpic -belf"
9511 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009512 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009513 IRIX*/6*) case $CC in
9514 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009515 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009516 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009517 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009518 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009519fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009520echo "$as_me:$LINENO: result: $CCSHARED" >&5
9521echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009522# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009523# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009524echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9525echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526if test -z "$LINKFORSHARED"
9527then
Guido van Rossum07397971997-04-29 21:49:50 +00009528 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009529 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009530 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009531 LINKFORSHARED="-Wl,-E -Wl,+s";;
9532# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009533 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009534 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009535 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009537 # -u __dummy makes the linker aware of the objc runtime
9538 # in System.framework; otherwise, __objcInit (referenced in
9539 # crt1.o) gets erroneously defined as common, which breaks dynamic
9540 # loading of any modules which reference it in System.framework.
9541 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9542 # not used by the core itself but which needs to be in the core so
9543 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009544 # -prebind is no longer used, because it actually seems to give a
9545 # slowdown in stead of a speedup, maybe due to the large number of
9546 # dynamic loads Python does.
9547 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009548 if test "$enable_framework"
9549 then
9550 LINKFORSHARED="$LINKFORSHARED -framework Python"
9551 fi
9552 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009553 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009554 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009555 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009557 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9558 then
9559 LINKFORSHARED="-Wl,--export-dynamic"
9560 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009561 SunOS/5*) case $CC in
9562 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009563 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009564 then
9565 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009566 fi;;
9567 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009570echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9571echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009572
Michael W. Hudson54241132001-12-07 15:38:26 +00009573
Martin v. Löwis11437992002-04-12 09:54:03 +00009574echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9575echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009576if test ! "$LIBRARY" = "$LDLIBRARY"
9577then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009578 case $ac_sys_system in
9579 CYGWIN*)
9580 # Cygwin needs CCSHARED when building extension DLLs
9581 # but not when building the interpreter DLL.
9582 CFLAGSFORSHARED='';;
9583 *)
9584 CFLAGSFORSHARED='$(CCSHARED)'
9585 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009587echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9588echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009589
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9591# library (with --enable-shared).
9592# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009593# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9594# if it is not required, since it creates a dependency of the shared library
9595# to LIBS. This, in turn, means that applications linking the shared libpython
9596# don't need to link LIBS explicitly. The default should be only changed
9597# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598
9599echo "$as_me:$LINENO: checking SHLIBS" >&5
9600echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9601case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009602 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009603 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009604esac
9605echo "$as_me:$LINENO: result: $SHLIBS" >&5
9606echo "${ECHO_T}$SHLIBS" >&6
9607
9608
Guido van Rossum627b2d71993-12-24 10:39:16 +00009609# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009610
9611echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9612echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9613if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9614 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009615else
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009617LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009618cat >conftest.$ac_ext <<_ACEOF
9619#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009620#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009621
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009622/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009626/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 builtin and then its argument prototype would still apply. */
9628char dlopen ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009629#ifdef F77_DUMMY_MAIN
9630# ifdef __cplusplus
9631 extern "C"
9632# endif
9633 int F77_DUMMY_MAIN() { return 1; }
9634#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009635int
9636main ()
9637{
9638dlopen ();
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643rm -f conftest.$ac_objext conftest$ac_exeext
9644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9645 (eval $ac_link) 2>&5
9646 ac_status=$?
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); } &&
9649 { ac_try='test -s conftest$ac_exeext'
9650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9651 (eval $ac_try) 2>&5
9652 ac_status=$?
9653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9654 (exit $ac_status); }; }; then
9655 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009656else
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 echo "$as_me: failed program was:" >&5
9658cat conftest.$ac_ext >&5
9659ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009660fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009661rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9662LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009663fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009664echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9665echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9666if test $ac_cv_lib_dl_dlopen = yes; then
9667 cat >>confdefs.h <<_ACEOF
9668#define HAVE_LIBDL 1
9669_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009671 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009672
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009673fi
9674 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
9676echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9677echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9678if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009680else
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009682LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009683cat >conftest.$ac_ext <<_ACEOF
9684#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009687/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009688#ifdef __cplusplus
9689extern "C"
9690#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009691/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 builtin and then its argument prototype would still apply. */
9693char shl_load ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009694#ifdef F77_DUMMY_MAIN
9695# ifdef __cplusplus
9696 extern "C"
9697# endif
9698 int F77_DUMMY_MAIN() { return 1; }
9699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
9703shl_load ();
9704 ;
9705 return 0;
9706}
9707_ACEOF
9708rm -f conftest.$ac_objext conftest$ac_exeext
9709if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9710 (eval $ac_link) 2>&5
9711 ac_status=$?
9712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713 (exit $ac_status); } &&
9714 { ac_try='test -s conftest$ac_exeext'
9715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9716 (eval $ac_try) 2>&5
9717 ac_status=$?
9718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719 (exit $ac_status); }; }; then
9720 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 echo "$as_me: failed program was:" >&5
9723cat conftest.$ac_ext >&5
9724ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9727LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009728fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009729echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9730echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9731if test $ac_cv_lib_dld_shl_load = yes; then
9732 cat >>confdefs.h <<_ACEOF
9733#define HAVE_LIBDLD 1
9734_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009736 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738fi
9739 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009740echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9741echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9742if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009744else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009745 ac_func_search_save_LIBS=$LIBS
9746ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009747cat >conftest.$ac_ext <<_ACEOF
9748#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009749#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009750
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009751/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009752#ifdef __cplusplus
9753extern "C"
9754#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009755/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 builtin and then its argument prototype would still apply. */
9757char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009758#ifdef F77_DUMMY_MAIN
9759# ifdef __cplusplus
9760 extern "C"
9761# endif
9762 int F77_DUMMY_MAIN() { return 1; }
9763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
9767sem_init ();
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772rm -f conftest.$ac_objext conftest$ac_exeext
9773if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9774 (eval $ac_link) 2>&5
9775 ac_status=$?
9776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777 (exit $ac_status); } &&
9778 { ac_try='test -s conftest$ac_exeext'
9779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780 (eval $ac_try) 2>&5
9781 ac_status=$?
9782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009784 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009785else
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 echo "$as_me: failed program was:" >&5
9787cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009789rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009790if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009791 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009792 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9793 cat >conftest.$ac_ext <<_ACEOF
9794#line $LINENO "configure"
9795#include "confdefs.h"
9796
9797/* Override any gcc2 internal prototype to avoid an error. */
9798#ifdef __cplusplus
9799extern "C"
9800#endif
9801/* We use char because int might match the return type of a gcc2
9802 builtin and then its argument prototype would still apply. */
9803char sem_init ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009804#ifdef F77_DUMMY_MAIN
9805# ifdef __cplusplus
9806 extern "C"
9807# endif
9808 int F77_DUMMY_MAIN() { return 1; }
9809#endif
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009810int
9811main ()
9812{
9813sem_init ();
9814 ;
9815 return 0;
9816}
Martin v. Löwis11437992002-04-12 09:54:03 +00009817_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009818rm -f conftest.$ac_objext conftest$ac_exeext
9819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9820 (eval $ac_link) 2>&5
9821 ac_status=$?
9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823 (exit $ac_status); } &&
9824 { ac_try='test -s conftest$ac_exeext'
9825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9826 (eval $ac_try) 2>&5
9827 ac_status=$?
9828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9829 (exit $ac_status); }; }; then
9830 ac_cv_search_sem_init="-l$ac_lib"
9831break
9832else
9833 echo "$as_me: failed program was:" >&5
9834cat conftest.$ac_ext >&5
9835fi
9836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9837 done
9838fi
9839LIBS=$ac_func_search_save_LIBS
9840fi
9841echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9842echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9843if test "$ac_cv_search_sem_init" != no; then
9844 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009845
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009846fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009847 # 'Real Time' functions on Solaris
9848 # posix4 on Solaris 2.6
9849 # pthread (first!) on Linux
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009850
9851# checks for system dependent C++ extensions support
9852case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9854echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9855 cat >conftest.$ac_ext <<_ACEOF
9856#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009857#include "confdefs.h"
9858#include "/usr/lpp/xlC/include/load.h"
Barry Warsawfe33b792003-01-07 22:42:49 +00009859#ifdef F77_DUMMY_MAIN
9860# ifdef __cplusplus
9861 extern "C"
9862# endif
9863 int F77_DUMMY_MAIN() { return 1; }
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865int
9866main ()
9867{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009868loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ;
9870 return 0;
9871}
9872_ACEOF
9873rm -f conftest.$ac_objext conftest$ac_exeext
9874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9875 (eval $ac_link) 2>&5
9876 ac_status=$?
9877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878 (exit $ac_status); } &&
9879 { ac_try='test -s conftest$ac_exeext'
9880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9881 (eval $ac_try) 2>&5
9882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009885
Martin v. Löwis11437992002-04-12 09:54:03 +00009886cat >>confdefs.h <<\_ACEOF
9887#define AIX_GENUINE_CPLUSPLUS 1
9888_ACEOF
9889
9890 echo "$as_me:$LINENO: result: yes" >&5
9891echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009892else
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 echo "$as_me: failed program was:" >&5
9894cat conftest.$ac_ext >&5
9895echo "$as_me:$LINENO: result: no" >&5
9896echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009899 *) ;;
9900esac
9901
Guido van Rossum70c7f481998-03-26 18:44:10 +00009902# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009903# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009904# BeOS' sockets are stashed in libnet.
9905case "$ac_sys_system" in
9906IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009907*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009908echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9909echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9910if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009912else
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009914LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009915cat >conftest.$ac_ext <<_ACEOF
9916#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009917#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009919/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009920#ifdef __cplusplus
9921extern "C"
9922#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009923/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 builtin and then its argument prototype would still apply. */
9925char t_open ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009926#ifdef F77_DUMMY_MAIN
9927# ifdef __cplusplus
9928 extern "C"
9929# endif
9930 int F77_DUMMY_MAIN() { return 1; }
9931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009932int
9933main ()
9934{
9935t_open ();
9936 ;
9937 return 0;
9938}
9939_ACEOF
9940rm -f conftest.$ac_objext conftest$ac_exeext
9941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9942 (eval $ac_link) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); } &&
9946 { ac_try='test -s conftest$ac_exeext'
9947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; }; then
9952 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009953else
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 echo "$as_me: failed program was:" >&5
9955cat conftest.$ac_ext >&5
9956ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009957fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009958rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9959LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009961echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9962echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9963if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009964 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009965fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009966 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009967echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9968echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9969if test "${ac_cv_lib_socket_socket+set}" = set; then
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009971else
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009973LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009974cat >conftest.$ac_ext <<_ACEOF
9975#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009977
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009978/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009979#ifdef __cplusplus
9980extern "C"
9981#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009982/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 builtin and then its argument prototype would still apply. */
9984char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +00009985#ifdef F77_DUMMY_MAIN
9986# ifdef __cplusplus
9987 extern "C"
9988# endif
9989 int F77_DUMMY_MAIN() { return 1; }
9990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009991int
9992main ()
9993{
9994socket ();
9995 ;
9996 return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext conftest$ac_exeext
10000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10001 (eval $ac_link) 2>&5
10002 ac_status=$?
10003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10004 (exit $ac_status); } &&
10005 { ac_try='test -s conftest$ac_exeext'
10006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10007 (eval $ac_try) 2>&5
10008 ac_status=$?
10009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10010 (exit $ac_status); }; }; then
10011 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010012else
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 echo "$as_me: failed program was:" >&5
10014cat conftest.$ac_ext >&5
10015ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010016fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010017rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10018LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010020echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10021echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10022if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010023 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010024fi
10025 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010026;;
10027esac
10028case "$ac_sys_system" in
10029BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010030echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10031echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10032if test "${ac_cv_lib_net_socket+set}" = set; then
10033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010034else
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010036LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010037cat >conftest.$ac_ext <<_ACEOF
10038#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010039#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010040
Guido van Rossumad678af1998-10-02 14:42:15 +000010041/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010042#ifdef __cplusplus
10043extern "C"
10044#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010045/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 builtin and then its argument prototype would still apply. */
10047char socket ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010048#ifdef F77_DUMMY_MAIN
10049# ifdef __cplusplus
10050 extern "C"
10051# endif
10052 int F77_DUMMY_MAIN() { return 1; }
10053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010054int
10055main ()
10056{
10057socket ();
10058 ;
10059 return 0;
10060}
10061_ACEOF
10062rm -f conftest.$ac_objext conftest$ac_exeext
10063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10064 (eval $ac_link) 2>&5
10065 ac_status=$?
10066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10067 (exit $ac_status); } &&
10068 { ac_try='test -s conftest$ac_exeext'
10069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10070 (eval $ac_try) 2>&5
10071 ac_status=$?
10072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10073 (exit $ac_status); }; }; then
10074 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010075else
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 echo "$as_me: failed program was:" >&5
10077cat conftest.$ac_ext >&5
10078ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10081LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010083echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10084echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10085if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010086 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010087fi
10088 # BeOS
10089;;
10090esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010091
Martin v. Löwis11437992002-04-12 09:54:03 +000010092echo "$as_me:$LINENO: checking for --with-libs" >&5
10093echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10094
Guido van Rossuma68acba1996-07-31 17:36:39 +000010095# Check whether --with-libs or --without-libs was given.
10096if test "${with_libs+set}" = set; then
10097 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010098
10099echo "$as_me:$LINENO: result: $withval" >&5
10100echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010101LIBS="$withval $LIBS"
10102
10103else
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 echo "$as_me:$LINENO: result: no" >&5
10105echo "${ECHO_T}no" >&6
10106fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010107
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010108# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010109
10110
Martin v. Löwis11437992002-04-12 09:54:03 +000010111echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10112echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10113
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010114# Check whether --with-signal-module or --without-signal-module was given.
10115if test "${with_signal_module+set}" = set; then
10116 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010117
Martin v. Löwis11437992002-04-12 09:54:03 +000010118fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010119
10120if test -z "$with_signal_module"
10121then with_signal_module="yes"
10122fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010123echo "$as_me:$LINENO: result: $with_signal_module" >&5
10124echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010125
10126if test "${with_signal_module}" = "yes"; then
10127 USE_SIGNAL_MODULE=""
10128 SIGNAL_OBJS=""
10129else
10130 USE_SIGNAL_MODULE="#"
10131 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10132fi
10133
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010134# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010135
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010136USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010137
Martin v. Löwis11437992002-04-12 09:54:03 +000010138echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10139echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10140
Guido van Rossumec2f0731997-01-22 20:54:01 +000010141
10142# Check whether --with-dec-threads or --without-dec-threads was given.
10143if test "${with_dec_threads+set}" = set; then
10144 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010145
10146echo "$as_me:$LINENO: result: $withval" >&5
10147echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010148LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010149if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010150 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010151fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010152else
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 echo "$as_me:$LINENO: result: no" >&5
10154echo "${ECHO_T}no" >&6
10155fi;
10156
10157# Templates for things AC_DEFINEd more than once.
10158# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010159
10160
Martin v. Löwis11437992002-04-12 09:54:03 +000010161
10162
10163
10164
10165
10166echo "$as_me:$LINENO: checking for --with-threads" >&5
10167echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10168
Guido van Rossumec2f0731997-01-22 20:54:01 +000010169# Check whether --with-threads or --without-threads was given.
10170if test "${with_threads+set}" = set; then
10171 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010172
Martin v. Löwis11437992002-04-12 09:54:03 +000010173fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010174
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010175# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010176
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010177# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010178if test "${with_thread+set}" = set; then
10179 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010180 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010181fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010182
10183if test -z "$with_threads"
10184then with_threads="yes"
10185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010186echo "$as_me:$LINENO: result: $with_threads" >&5
10187echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010188
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010190if test "$with_threads" = "no"
10191then
10192 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193elif test "$ac_cv_pthread_is_default" = yes
10194then
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 WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010197_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010201#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010202_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010203
10204 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010206elif test "$ac_cv_kpthread" = "yes"
10207then
10208 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010210#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010211_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010213 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010214 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215elif test "$ac_cv_kthread" = "yes"
10216then
10217 CC="$CC -Kthread"
10218 cat >>confdefs.h <<\_ACEOF
10219#define WITH_THREAD 1
10220_ACEOF
10221
10222 posix_threads=yes
10223 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010224else
10225 if test ! -z "$with_threads" -a -d "$with_threads"
10226 then LDFLAGS="$LDFLAGS -L$with_threads"
10227 fi
10228 if test ! -z "$withval" -a -d "$withval"
10229 then LDFLAGS="$LDFLAGS -L$withval"
10230 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010231
10232 # According to the POSIX spec, a pthreads implementation must
10233 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10235echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10236 cat >conftest.$ac_ext <<_ACEOF
10237#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010238#include "confdefs.h"
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010239
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010240#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010241#ifdef _POSIX_THREADS
10242yes
10243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010244
10245_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000010247 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010248 unistd_defines_pthreads=yes
10249else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250 unistd_defines_pthreads=no
10251fi
10252rm -f conftest*
10253
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10255echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010256
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010258#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010260
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 if test "${ac_cv_header_cthreads_h+set}" = set; then
10262 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10263echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10264if test "${ac_cv_header_cthreads_h+set}" = set; then
10265 echo $ECHO_N "(cached) $ECHO_C" >&6
10266fi
10267echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10268echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010269else
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 # Is the header compilable?
10271echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10272echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10273cat >conftest.$ac_ext <<_ACEOF
10274#line $LINENO "configure"
10275#include "confdefs.h"
10276$ac_includes_default
10277#include <cthreads.h>
10278_ACEOF
10279rm -f conftest.$ac_objext
10280if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10281 (eval $ac_compile) 2>&5
10282 ac_status=$?
10283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10284 (exit $ac_status); } &&
10285 { ac_try='test -s conftest.$ac_objext'
10286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10287 (eval $ac_try) 2>&5
10288 ac_status=$?
10289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10290 (exit $ac_status); }; }; then
10291 ac_header_compiler=yes
10292else
10293 echo "$as_me: failed program was:" >&5
10294cat conftest.$ac_ext >&5
10295ac_header_compiler=no
10296fi
10297rm -f conftest.$ac_objext conftest.$ac_ext
10298echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10299echo "${ECHO_T}$ac_header_compiler" >&6
10300
10301# Is the header present?
10302echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10303echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10304cat >conftest.$ac_ext <<_ACEOF
10305#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010306#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010307#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010308_ACEOF
10309if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10310 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10311 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010312 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 rm -f conftest.er1
10314 cat conftest.err >&5
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); } >/dev/null; then
10317 if test -s conftest.err; then
10318 ac_cpp_err=$ac_c_preproc_warn_flag
10319 else
10320 ac_cpp_err=
10321 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010322else
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_cpp_err=yes
10324fi
10325if test -z "$ac_cpp_err"; then
10326 ac_header_preproc=yes
10327else
10328 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +000010329 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010332rm -f conftest.err conftest.$ac_ext
10333echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10334echo "${ECHO_T}$ac_header_preproc" >&6
10335
10336# So? What about this header?
10337case $ac_header_compiler:$ac_header_preproc in
10338 yes:no )
10339 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10340echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10341 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10342echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10343 no:yes )
10344 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10345echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10346 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10347echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10348 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10349echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
10350esac
10351echo "$as_me:$LINENO: checking for cthreads.h" >&5
10352echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10353if test "${ac_cv_header_cthreads_h+set}" = set; then
10354 echo $ECHO_N "(cached) $ECHO_C" >&6
10355else
10356 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010357fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010358echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10359echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10360
10361fi
10362if test $ac_cv_header_cthreads_h = yes; then
10363 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010364#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010365_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010366
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010368#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371
10372cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010373#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010375
10376 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010377 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010378else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010379
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10381 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10382echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10383if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10384 echo $ECHO_N "(cached) $ECHO_C" >&6
10385fi
10386echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10387echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 # Is the header compilable?
10390echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10391echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10392cat >conftest.$ac_ext <<_ACEOF
10393#line $LINENO "configure"
10394#include "confdefs.h"
10395$ac_includes_default
10396#include <mach/cthreads.h>
10397_ACEOF
10398rm -f conftest.$ac_objext
10399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10400 (eval $ac_compile) 2>&5
10401 ac_status=$?
10402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10403 (exit $ac_status); } &&
10404 { ac_try='test -s conftest.$ac_objext'
10405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
10408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10409 (exit $ac_status); }; }; then
10410 ac_header_compiler=yes
10411else
10412 echo "$as_me: failed program was:" >&5
10413cat conftest.$ac_ext >&5
10414ac_header_compiler=no
10415fi
10416rm -f conftest.$ac_objext conftest.$ac_ext
10417echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10418echo "${ECHO_T}$ac_header_compiler" >&6
10419
10420# Is the header present?
10421echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10422echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10423cat >conftest.$ac_ext <<_ACEOF
10424#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010425#include "confdefs.h"
10426#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
10428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10430 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010431 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 rm -f conftest.er1
10433 cat conftest.err >&5
10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435 (exit $ac_status); } >/dev/null; then
10436 if test -s conftest.err; then
10437 ac_cpp_err=$ac_c_preproc_warn_flag
10438 else
10439 ac_cpp_err=
10440 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010441else
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ac_cpp_err=yes
10443fi
10444if test -z "$ac_cpp_err"; then
10445 ac_header_preproc=yes
10446else
10447 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010448 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010451rm -f conftest.err conftest.$ac_ext
10452echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10453echo "${ECHO_T}$ac_header_preproc" >&6
10454
10455# So? What about this header?
10456case $ac_header_compiler:$ac_header_preproc in
10457 yes:no )
10458 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10459echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10460 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10461echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10462 no:yes )
10463 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10464echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10465 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10466echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10467 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10468echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
10469esac
10470echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10471echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10472if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10473 echo $ECHO_N "(cached) $ECHO_C" >&6
10474else
10475 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010477echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10478echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10479
10480fi
10481if test $ac_cv_header_mach_cthreads_h = yes; then
10482 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010484_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010485
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010487#define 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öwis11437992002-04-12 09:54:03 +000010490
10491cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010492#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010493_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010494
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010495 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010496else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010497
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 echo "$as_me:$LINENO: checking for --with-pth" >&5
10499echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10500
10501# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010502if test "${with_pth+set}" = set; then
10503 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010504 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010505echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010506 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010507#define WITH_THREAD 1
10508_ACEOF
10509
10510
10511cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010512#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010513_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010514
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010515 LIBS="-lpth $LIBS"
10516 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010517else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010518 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010519echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010520
10521 # Just looking for pthread_create in libpthread is not enough:
10522 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10523 # So we really have to include pthread.h, and then link.
10524 _libs=$LIBS
10525 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10527echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10528 cat >conftest.$ac_ext <<_ACEOF
10529#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010530#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010531#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010532
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010533void * start_routine (void *arg) { exit (0); }
Barry Warsawfe33b792003-01-07 22:42:49 +000010534#ifdef F77_DUMMY_MAIN
10535# ifdef __cplusplus
10536 extern "C"
10537# endif
10538 int F77_DUMMY_MAIN() { return 1; }
10539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010540int
10541main ()
10542{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010543
10544pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ;
10546 return 0;
10547}
10548_ACEOF
10549rm -f conftest.$ac_objext conftest$ac_exeext
10550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10551 (eval $ac_link) 2>&5
10552 ac_status=$?
10553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10554 (exit $ac_status); } &&
10555 { ac_try='test -s conftest$ac_exeext'
10556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10557 (eval $ac_try) 2>&5
10558 ac_status=$?
10559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10560 (exit $ac_status); }; }; then
10561
10562 echo "$as_me:$LINENO: result: yes" >&5
10563echo "${ECHO_T}yes" >&6
10564 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010565#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010566_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010567
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010569 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 echo "$as_me: failed program was:" >&5
10572cat conftest.$ac_ext >&5
10573
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010574 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10576echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10577if test "${ac_cv_func_pthread_detach+set}" = set; then
10578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 cat >conftest.$ac_ext <<_ACEOF
10581#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010582#include "confdefs.h"
10583/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010585#include <assert.h>
10586/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010587#ifdef __cplusplus
10588extern "C"
10589#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010590/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 builtin and then its argument prototype would still apply. */
10592char pthread_detach ();
10593char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010594
Barry Warsawfe33b792003-01-07 22:42:49 +000010595#ifdef F77_DUMMY_MAIN
10596# ifdef __cplusplus
10597 extern "C"
10598# endif
10599 int F77_DUMMY_MAIN() { return 1; }
10600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010601int
10602main ()
10603{
Guido van Rossumad678af1998-10-02 14:42:15 +000010604/* The GNU C library defines this for functions which it implements
10605 to always fail with ENOSYS. Some functions are actually named
10606 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010607#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010608choke me
10609#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010610f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010611#endif
10612
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 ;
10614 return 0;
10615}
10616_ACEOF
10617rm -f conftest.$ac_objext conftest$ac_exeext
10618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10619 (eval $ac_link) 2>&5
10620 ac_status=$?
10621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622 (exit $ac_status); } &&
10623 { ac_try='test -s conftest$ac_exeext'
10624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10625 (eval $ac_try) 2>&5
10626 ac_status=$?
10627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628 (exit $ac_status); }; }; then
10629 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010630else
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 echo "$as_me: failed program was:" >&5
10632cat conftest.$ac_ext >&5
10633ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010635rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010636fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010637echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10638echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10639if test $ac_cv_func_pthread_detach = yes; then
10640 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010641#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010642_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010643
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010644 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010645 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010646else
Guido van Rossumad678af1998-10-02 14:42:15 +000010647
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010648 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10649 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10650echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10651if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10652 echo $ECHO_N "(cached) $ECHO_C" >&6
10653fi
10654echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10655echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10656else
10657 # Is the header compilable?
10658echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10659echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10660cat >conftest.$ac_ext <<_ACEOF
10661#line $LINENO "configure"
10662#include "confdefs.h"
10663$ac_includes_default
10664#include <atheos/threads.h>
10665_ACEOF
10666rm -f conftest.$ac_objext
10667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10668 (eval $ac_compile) 2>&5
10669 ac_status=$?
10670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10671 (exit $ac_status); } &&
10672 { ac_try='test -s conftest.$ac_objext'
10673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10674 (eval $ac_try) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); }; }; then
10678 ac_header_compiler=yes
10679else
10680 echo "$as_me: failed program was:" >&5
10681cat conftest.$ac_ext >&5
10682ac_header_compiler=no
10683fi
10684rm -f conftest.$ac_objext conftest.$ac_ext
10685echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10686echo "${ECHO_T}$ac_header_compiler" >&6
10687
10688# Is the header present?
10689echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10690echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10691cat >conftest.$ac_ext <<_ACEOF
10692#line $LINENO "configure"
10693#include "confdefs.h"
10694#include <atheos/threads.h>
10695_ACEOF
10696if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10697 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10698 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010699 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010700 rm -f conftest.er1
10701 cat conftest.err >&5
10702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10703 (exit $ac_status); } >/dev/null; then
10704 if test -s conftest.err; then
10705 ac_cpp_err=$ac_c_preproc_warn_flag
10706 else
10707 ac_cpp_err=
10708 fi
10709else
10710 ac_cpp_err=yes
10711fi
10712if test -z "$ac_cpp_err"; then
10713 ac_header_preproc=yes
10714else
10715 echo "$as_me: failed program was:" >&5
10716 cat conftest.$ac_ext >&5
10717 ac_header_preproc=no
10718fi
10719rm -f conftest.err conftest.$ac_ext
10720echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10721echo "${ECHO_T}$ac_header_preproc" >&6
10722
10723# So? What about this header?
10724case $ac_header_compiler:$ac_header_preproc in
10725 yes:no )
10726 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10727echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10728 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10729echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10730 no:yes )
10731 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10732echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10733 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10734echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10735 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10736echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10737esac
10738echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10739echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10740if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10741 echo $ECHO_N "(cached) $ECHO_C" >&6
10742else
10743 ac_cv_header_atheos_threads_h=$ac_header_preproc
10744fi
10745echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10746echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10747
10748fi
10749if test $ac_cv_header_atheos_threads_h = yes; then
10750 cat >>confdefs.h <<\_ACEOF
10751#define WITH_THREAD 1
10752_ACEOF
10753
10754
10755cat >>confdefs.h <<\_ACEOF
10756#define ATHEOS_THREADS 1
10757_ACEOF
10758
10759 THREADOBJ="Python/thread.o"
10760else
10761
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10763 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10764echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10765if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10766 echo $ECHO_N "(cached) $ECHO_C" >&6
10767fi
10768echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10769echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010770else
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 # Is the header compilable?
10772echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10773echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10774cat >conftest.$ac_ext <<_ACEOF
10775#line $LINENO "configure"
10776#include "confdefs.h"
10777$ac_includes_default
10778#include <kernel/OS.h>
10779_ACEOF
10780rm -f conftest.$ac_objext
10781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10782 (eval $ac_compile) 2>&5
10783 ac_status=$?
10784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10785 (exit $ac_status); } &&
10786 { ac_try='test -s conftest.$ac_objext'
10787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10788 (eval $ac_try) 2>&5
10789 ac_status=$?
10790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10791 (exit $ac_status); }; }; then
10792 ac_header_compiler=yes
10793else
10794 echo "$as_me: failed program was:" >&5
10795cat conftest.$ac_ext >&5
10796ac_header_compiler=no
10797fi
10798rm -f conftest.$ac_objext conftest.$ac_ext
10799echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10800echo "${ECHO_T}$ac_header_compiler" >&6
10801
10802# Is the header present?
10803echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10804echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10805cat >conftest.$ac_ext <<_ACEOF
10806#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010807#include "confdefs.h"
10808#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010809_ACEOF
10810if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10811 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10812 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000010813 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010814 rm -f conftest.er1
10815 cat conftest.err >&5
10816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817 (exit $ac_status); } >/dev/null; then
10818 if test -s conftest.err; then
10819 ac_cpp_err=$ac_c_preproc_warn_flag
10820 else
10821 ac_cpp_err=
10822 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010823else
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ac_cpp_err=yes
10825fi
10826if test -z "$ac_cpp_err"; then
10827 ac_header_preproc=yes
10828else
10829 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010830 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010833rm -f conftest.err conftest.$ac_ext
10834echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10835echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010836
Martin v. Löwis11437992002-04-12 09:54:03 +000010837# So? What about this header?
10838case $ac_header_compiler:$ac_header_preproc in
10839 yes:no )
10840 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10841echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10842 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10843echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10844 no:yes )
10845 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10846echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10847 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10848echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10849 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10850echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10851esac
10852echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10853echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10854if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10855 echo $ECHO_N "(cached) $ECHO_C" >&6
10856else
10857 ac_cv_header_kernel_OS_h=$ac_header_preproc
10858fi
10859echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10860echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10861
10862fi
10863if test $ac_cv_header_kernel_OS_h = yes; then
10864 cat >>confdefs.h <<\_ACEOF
10865#define WITH_THREAD 1
10866_ACEOF
10867
10868
10869cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010870#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010871_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010872
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010873 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010874else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010875
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10877echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10878if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10879 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010880else
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010882LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010883cat >conftest.$ac_ext <<_ACEOF
10884#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010885#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010886
Greg Steinadf63d62000-07-05 10:38:09 +000010887/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010888#ifdef __cplusplus
10889extern "C"
10890#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010891/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 builtin and then its argument prototype would still apply. */
10893char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010894#ifdef F77_DUMMY_MAIN
10895# ifdef __cplusplus
10896 extern "C"
10897# endif
10898 int F77_DUMMY_MAIN() { return 1; }
10899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010900int
10901main ()
10902{
10903pthread_create ();
10904 ;
10905 return 0;
10906}
10907_ACEOF
10908rm -f conftest.$ac_objext conftest$ac_exeext
10909if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10910 (eval $ac_link) 2>&5
10911 ac_status=$?
10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913 (exit $ac_status); } &&
10914 { ac_try='test -s conftest$ac_exeext'
10915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10916 (eval $ac_try) 2>&5
10917 ac_status=$?
10918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10919 (exit $ac_status); }; }; then
10920 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010921else
Martin v. Löwis11437992002-04-12 09:54:03 +000010922 echo "$as_me: failed program was:" >&5
10923cat conftest.$ac_ext >&5
10924ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010925fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010926rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10927LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010928fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010929echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10930echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10931if test $ac_cv_lib_pthreads_pthread_create = yes; then
10932 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010933#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010934_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010935
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010936 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010937 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010938 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010939else
Greg Steinadf63d62000-07-05 10:38:09 +000010940
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10942echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10943if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10944 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010945else
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010947LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010948cat >conftest.$ac_ext <<_ACEOF
10949#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010950#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010951
Guido van Rossum49545951997-12-02 19:28:29 +000010952/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010953#ifdef __cplusplus
10954extern "C"
10955#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010956/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 builtin and then its argument prototype would still apply. */
10958char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000010959#ifdef F77_DUMMY_MAIN
10960# ifdef __cplusplus
10961 extern "C"
10962# endif
10963 int F77_DUMMY_MAIN() { return 1; }
10964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010965int
10966main ()
10967{
10968pthread_create ();
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext conftest$ac_exeext
10974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10975 (eval $ac_link) 2>&5
10976 ac_status=$?
10977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); } &&
10979 { ac_try='test -s conftest$ac_exeext'
10980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10981 (eval $ac_try) 2>&5
10982 ac_status=$?
10983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10984 (exit $ac_status); }; }; then
10985 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010986else
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 echo "$as_me: failed program was:" >&5
10988cat conftest.$ac_ext >&5
10989ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010990fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010991rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10992LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010993fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010994echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10995echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10996if test $ac_cv_lib_c_r_pthread_create = yes; then
10997 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010998#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010999_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011001 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011002 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011003 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011004else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011005
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
11007echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
11008if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
11009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011010else
Martin v. Löwis11437992002-04-12 09:54:03 +000011011 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011012LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011013cat >conftest.$ac_ext <<_ACEOF
11014#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011015#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011017/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011018#ifdef __cplusplus
11019extern "C"
11020#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011021/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 builtin and then its argument prototype would still apply. */
11023char __d6_pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011024#ifdef F77_DUMMY_MAIN
11025# ifdef __cplusplus
11026 extern "C"
11027# endif
11028 int F77_DUMMY_MAIN() { return 1; }
11029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011030int
11031main ()
11032{
11033__d6_pthread_create ();
11034 ;
11035 return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext conftest$ac_exeext
11039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11040 (eval $ac_link) 2>&5
11041 ac_status=$?
11042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11043 (exit $ac_status); } &&
11044 { ac_try='test -s conftest$ac_exeext'
11045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11046 (eval $ac_try) 2>&5
11047 ac_status=$?
11048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11049 (exit $ac_status); }; }; then
11050 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011051else
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 echo "$as_me: failed program was:" >&5
11053cat conftest.$ac_ext >&5
11054ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11057LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011059echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
11060echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
11061if test $ac_cv_lib_thread___d6_pthread_create = yes; then
11062 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011063#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011065
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011066 echo Systems with __d6_pthread_create are not supported anymore.
11067 echo See README
11068 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011069 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011070 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011071 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000011072else
Guido van Rossum49545951997-12-02 19:28:29 +000011073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11075echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11076if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011078else
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011080LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011081cat >conftest.$ac_ext <<_ACEOF
11082#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011083#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011084
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011085/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011086#ifdef __cplusplus
11087extern "C"
11088#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011089/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 builtin and then its argument prototype would still apply. */
11091char __pthread_create_system ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011092#ifdef F77_DUMMY_MAIN
11093# ifdef __cplusplus
11094 extern "C"
11095# endif
11096 int F77_DUMMY_MAIN() { return 1; }
11097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
11101__pthread_create_system ();
11102 ;
11103 return 0;
11104}
11105_ACEOF
11106rm -f conftest.$ac_objext conftest$ac_exeext
11107if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11108 (eval $ac_link) 2>&5
11109 ac_status=$?
11110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11111 (exit $ac_status); } &&
11112 { ac_try='test -s conftest$ac_exeext'
11113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11114 (eval $ac_try) 2>&5
11115 ac_status=$?
11116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); }; }; then
11118 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011119else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 echo "$as_me: failed program was:" >&5
11121cat conftest.$ac_ext >&5
11122ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011123fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11125LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011126fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011127echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11128echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11129if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11130 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011131#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011133
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011134 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011135 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011136 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011137else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011138
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11140echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11141if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011143else
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011145LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011146cat >conftest.$ac_ext <<_ACEOF
11147#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011148#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011149
Guido van Rossumb93a8621998-05-07 13:27:32 +000011150/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011151#ifdef __cplusplus
11152extern "C"
11153#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011154/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011155 builtin and then its argument prototype would still apply. */
11156char pthread_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011157#ifdef F77_DUMMY_MAIN
11158# ifdef __cplusplus
11159 extern "C"
11160# endif
11161 int F77_DUMMY_MAIN() { return 1; }
11162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011163int
11164main ()
11165{
11166pthread_create ();
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext conftest$ac_exeext
11172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11173 (eval $ac_link) 2>&5
11174 ac_status=$?
11175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176 (exit $ac_status); } &&
11177 { ac_try='test -s conftest$ac_exeext'
11178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11179 (eval $ac_try) 2>&5
11180 ac_status=$?
11181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11182 (exit $ac_status); }; }; then
11183 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011184else
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 echo "$as_me: failed program was:" >&5
11186cat conftest.$ac_ext >&5
11187ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011189rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11190LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011191fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011192echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11193echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11194if test $ac_cv_lib_cma_pthread_create = yes; then
11195 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011196#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011197_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011198
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011199 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011200 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011201 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011202else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011203
Martin v. Löwis130fb172001-07-19 11:00:41 +000011204 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011205fi
11206
Guido van Rossum627b2d71993-12-24 10:39:16 +000011207
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011208fi
11209
Guido van Rossum0be3e491997-05-22 20:33:33 +000011210fi
11211
Guido van Rossum49545951997-12-02 19:28:29 +000011212fi
11213
Guido van Rossumb93a8621998-05-07 13:27:32 +000011214fi
11215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216fi
11217
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011218
Michael W. Hudson54241132001-12-07 15:38:26 +000011219fi
11220
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011221
11222fi
11223
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11226fi;
11227fi
11228
11229
11230fi
11231
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011232
Michael W. Hudson54241132001-12-07 15:38:26 +000011233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011234 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011235 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
11237cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011238#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011239_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011240
11241 fi
11242
Martin v. Löwisdfc33fd2003-01-21 10:14:41 +000011243 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11244 case $ac_sys_system/$ac_sys_release in
11245 SunOS/5.8)
11246cat >>confdefs.h <<\_ACEOF
11247#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11248_ACEOF
11249;;
11250 esac
11251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11253echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11254 if test "${ac_cv_pthread_system_supported+set}" = set; then
11255 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011256else
11257 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011258 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011259else
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 cat >conftest.$ac_ext <<_ACEOF
11261#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011262#include "confdefs.h"
11263#include <pthread.h>
11264 void *foo(void *parm) {
11265 return NULL;
11266 }
11267 main() {
11268 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011269 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011270 if (pthread_attr_init(&attr)) exit(-1);
11271 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000011272 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011273 exit(0);
11274 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
11276rm -f conftest$ac_exeext
11277if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11278 (eval $ac_link) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11283 (eval $ac_try) 2>&5
11284 ac_status=$?
11285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11286 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011287 ac_cv_pthread_system_supported=yes
11288else
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 echo "$as_me: program exited with status $ac_status" >&5
11290echo "$as_me: failed program was:" >&5
11291cat conftest.$ac_ext >&5
11292( exit $ac_status )
11293ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011294fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011295rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011296fi
11297
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011298fi
11299
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11301echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011302 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
11304cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011305#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011306_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011307
11308 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
11310for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011311do
Martin v. Löwis11437992002-04-12 09:54:03 +000011312as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11313echo "$as_me:$LINENO: checking for $ac_func" >&5
11314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11315if eval "test \"\${$as_ac_var+set}\" = set"; then
11316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011317else
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 cat >conftest.$ac_ext <<_ACEOF
11319#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011320#include "confdefs.h"
11321/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011323#include <assert.h>
11324/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011325#ifdef __cplusplus
11326extern "C"
11327#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011328/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011329 builtin and then its argument prototype would still apply. */
11330char $ac_func ();
11331char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011332
Barry Warsawfe33b792003-01-07 22:42:49 +000011333#ifdef F77_DUMMY_MAIN
11334# ifdef __cplusplus
11335 extern "C"
11336# endif
11337 int F77_DUMMY_MAIN() { return 1; }
11338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011342/* The GNU C library defines this for functions which it implements
11343 to always fail with ENOSYS. Some functions are actually named
11344 something starting with __ and the normal name is an alias. */
11345#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11346choke me
11347#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011348f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011349#endif
11350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ;
11352 return 0;
11353}
11354_ACEOF
11355rm -f conftest.$ac_objext conftest$ac_exeext
11356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11357 (eval $ac_link) 2>&5
11358 ac_status=$?
11359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360 (exit $ac_status); } &&
11361 { ac_try='test -s conftest$ac_exeext'
11362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11363 (eval $ac_try) 2>&5
11364 ac_status=$?
11365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11366 (exit $ac_status); }; }; then
11367 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011368else
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 echo "$as_me: failed program was:" >&5
11370cat conftest.$ac_ext >&5
11371eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011373rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011374fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011375echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11376echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11377if test `eval echo '${'$as_ac_var'}'` = yes; then
11378 cat >>confdefs.h <<_ACEOF
11379#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11380_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011381
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011382fi
11383done
11384
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011385 fi
11386
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11388echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11389if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011391else
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011393LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011394cat >conftest.$ac_ext <<_ACEOF
11395#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011396#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011399#ifdef __cplusplus
11400extern "C"
11401#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 builtin and then its argument prototype would still apply. */
11404char usconfig ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011405#ifdef F77_DUMMY_MAIN
11406# ifdef __cplusplus
11407 extern "C"
11408# endif
11409 int F77_DUMMY_MAIN() { return 1; }
11410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
11414usconfig ();
11415 ;
11416 return 0;
11417}
11418_ACEOF
11419rm -f conftest.$ac_objext conftest$ac_exeext
11420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11421 (eval $ac_link) 2>&5
11422 ac_status=$?
11423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11424 (exit $ac_status); } &&
11425 { ac_try='test -s conftest$ac_exeext'
11426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11427 (eval $ac_try) 2>&5
11428 ac_status=$?
11429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11430 (exit $ac_status); }; }; then
11431 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432else
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 echo "$as_me: failed program was:" >&5
11434cat conftest.$ac_ext >&5
11435ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011440echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11441echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11442if test $ac_cv_lib_mpc_usconfig = yes; then
11443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011446
Martin v. Löwis130fb172001-07-19 11:00:41 +000011447 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011448 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011449 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450fi
11451
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011452
Neal Norwitza978ab02002-11-02 16:58:05 +000011453 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11455echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11456if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458else
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011460LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011461cat >conftest.$ac_ext <<_ACEOF
11462#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011465/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011466#ifdef __cplusplus
11467extern "C"
11468#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011469/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 builtin and then its argument prototype would still apply. */
11471char thr_create ();
Barry Warsawfe33b792003-01-07 22:42:49 +000011472#ifdef F77_DUMMY_MAIN
11473# ifdef __cplusplus
11474 extern "C"
11475# endif
11476 int F77_DUMMY_MAIN() { return 1; }
11477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
11481thr_create ();
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486rm -f conftest.$ac_objext conftest$ac_exeext
11487if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11488 (eval $ac_link) 2>&5
11489 ac_status=$?
11490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11491 (exit $ac_status); } &&
11492 { ac_try='test -s conftest$ac_exeext'
11493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11494 (eval $ac_try) 2>&5
11495 ac_status=$?
11496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11497 (exit $ac_status); }; }; then
11498 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011499else
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 echo "$as_me: failed program was:" >&5
11501cat conftest.$ac_ext >&5
11502ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011504rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011507echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11508echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11509if test $ac_cv_lib_thread_thr_create = yes; then
11510 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011512_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011514 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011515 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011516 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011517fi
11518
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011519 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011520
Martin v. Löwis130fb172001-07-19 11:00:41 +000011521 if test "$USE_THREAD_MODULE" != "#"
11522 then
11523 # If the above checks didn't disable threads, (at least) OSF1
11524 # needs this '-threads' argument during linking.
11525 case $ac_sys_system in
11526 OSF1) LDLAST=-threads;;
11527 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011528 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011529
11530 if test "$posix_threads" = yes -a \
11531 "$ac_sys_system" = "SunOS" -a \
11532 "$ac_sys_release" = "5.6"; then
11533
11534cat >>confdefs.h <<\_ACEOF
11535#define HAVE_PTHREAD_DESTRUCTOR 1
11536_ACEOF
11537
11538 fi
11539
Guido van Rossum627b2d71993-12-24 10:39:16 +000011540fi
11541
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011542# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
11544
11545echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11546echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011547# Check whether --enable-ipv6 or --disable-ipv6 was given.
11548if test "${enable_ipv6+set}" = set; then
11549 enableval="$enable_ipv6"
11550 case "$enableval" in
11551 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011552 echo "$as_me:$LINENO: result: no" >&5
11553echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011554 ipv6=no
11555 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 *) echo "$as_me:$LINENO: result: yes" >&5
11557echo "${ECHO_T}yes" >&6
11558 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011559#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011560_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011561
11562 ipv6=yes
11563 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011565else
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011567 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 echo "$as_me:$LINENO: result: no" >&5
11569echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011570 ipv6=no
11571
11572else
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 cat >conftest.$ac_ext <<_ACEOF
11574#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011575#include "confdefs.h"
11576 /* AF_INET6 available check */
11577#include <sys/types.h>
11578#include <sys/socket.h>
11579main()
11580{
11581 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11582 exit(1);
11583 else
11584 exit(0);
11585}
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587_ACEOF
11588rm -f conftest$ac_exeext
11589if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11590 (eval $ac_link) 2>&5
11591 ac_status=$?
11592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595 (eval $ac_try) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); }; }; then
11599 echo "$as_me:$LINENO: result: yes" >&5
11600echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011601 ipv6=yes
11602else
Martin v. Löwis11437992002-04-12 09:54:03 +000011603 echo "$as_me: program exited with status $ac_status" >&5
11604echo "$as_me: failed program was:" >&5
11605cat conftest.$ac_ext >&5
11606( exit $ac_status )
11607echo "$as_me:$LINENO: result: no" >&5
11608echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011609 ipv6=no
11610fi
Barry Warsawfe33b792003-01-07 22:42:49 +000011611rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011612fi
11613
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011614if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11616echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11617 cat >conftest.$ac_ext <<_ACEOF
11618#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011619#include "confdefs.h"
11620#include <sys/types.h>
11621#include <netinet/in.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000011622#ifdef F77_DUMMY_MAIN
11623# ifdef __cplusplus
11624 extern "C"
11625# endif
11626 int F77_DUMMY_MAIN() { return 1; }
11627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011628int
11629main ()
11630{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011631struct sockaddr_in6 x;
11632x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 ;
11634 return 0;
11635}
11636_ACEOF
11637rm -f conftest.$ac_objext
11638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11639 (eval $ac_compile) 2>&5
11640 ac_status=$?
11641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11642 (exit $ac_status); } &&
11643 { ac_try='test -s conftest.$ac_objext'
11644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11645 (eval $ac_try) 2>&5
11646 ac_status=$?
11647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11648 (exit $ac_status); }; }; then
11649 echo "$as_me:$LINENO: result: yes" >&5
11650echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011651 ipv6=yes
11652else
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me: failed program was:" >&5
11654cat conftest.$ac_ext >&5
11655echo "$as_me:$LINENO: result: no" >&5
11656echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011657 ipv6=no
11658fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011659rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011660fi
11661
11662if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011664#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011665_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011666
11667fi
11668
Martin v. Löwis11437992002-04-12 09:54:03 +000011669fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011670
11671ipv6type=unknown
11672ipv6lib=none
11673ipv6trylibc=no
11674
11675if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11677echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011678 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11679 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011680 case $i in
11681 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 cat >conftest.$ac_ext <<_ACEOF
11683#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011684#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011685
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011686#include <netinet/in.h>
11687#ifdef IPV6_INRIA_VERSION
11688yes
11689#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011690_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011692 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011693 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011694fi
11695rm -f conftest*
11696
11697 ;;
11698 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011699 cat >conftest.$ac_ext <<_ACEOF
11700#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011701#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011702
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011703#include <netinet/in.h>
11704#ifdef __KAME__
11705yes
11706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011707_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011709 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011710 ipv6type=$i;
11711 ipv6lib=inet6
11712 ipv6libdir=/usr/local/v6/lib
11713 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011714fi
11715rm -f conftest*
11716
11717 ;;
11718 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 cat >conftest.$ac_ext <<_ACEOF
11720#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011721#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011722
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011723#include <features.h>
11724#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11725yes
11726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011729 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011730 ipv6type=$i;
11731 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011732fi
11733rm -f conftest*
11734
11735 ;;
11736 linux-inet6)
11737 if test -d /usr/inet6; then
11738 ipv6type=$i
11739 ipv6lib=inet6
11740 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011741 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011742 fi
11743 ;;
11744 solaris)
11745 if test -f /etc/netconfig; then
11746 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11747 ipv6type=$i
11748 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011749 fi
11750 fi
11751 ;;
11752 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 cat >conftest.$ac_ext <<_ACEOF
11754#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011755#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011757#include <sys/param.h>
11758#ifdef _TOSHIBA_INET6
11759yes
11760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011761_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011763 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011764 ipv6type=$i;
11765 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011766 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011767fi
11768rm -f conftest*
11769
11770 ;;
11771 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011772 cat >conftest.$ac_ext <<_ACEOF
11773#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011774#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011776#include </usr/local/v6/include/sys/v6config.h>
11777#ifdef __V6D__
11778yes
11779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011782 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011783 ipv6type=$i;
11784 ipv6lib=v6;
11785 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011786 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011787fi
11788rm -f conftest*
11789
11790 ;;
11791 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 cat >conftest.$ac_ext <<_ACEOF
11793#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011794#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011796#include <sys/param.h>
11797#ifdef _ZETA_MINAMI_INET6
11798yes
11799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000011802 egrep "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011803 ipv6type=$i;
11804 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011805 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011806fi
11807rm -f conftest*
11808
11809 ;;
11810 esac
11811 if test "$ipv6type" != "unknown"; then
11812 break
11813 fi
11814 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 echo "$as_me:$LINENO: result: $ipv6type" >&5
11816echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011817fi
11818
11819if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11820 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11821 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11822 echo "using lib$ipv6lib"
11823 else
11824 if test $ipv6trylibc = "yes"; then
11825 echo "using libc"
11826 else
11827 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11828 echo "You need to fetch lib$ipv6lib.a from appropriate"
11829 echo 'ipv6 kit and compile beforehand.'
11830 exit 1
11831 fi
11832 fi
11833fi
11834
Jack Jansen7b8c7542002-04-14 20:12:41 +000011835# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011836echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11837echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011838
11839# Check whether --with-universal-newlines or --without-universal-newlines was given.
11840if test "${with_universal_newlines+set}" = set; then
11841 withval="$with_universal_newlines"
11842
11843fi;
11844
11845if test -z "$with_universal_newlines"
11846then with_universal_newlines="yes"
11847fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011848if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011849then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011850 echo --without-universal-newlines is unsupported, see README
11851 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011852else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011853
11854cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011855#define WITH_UNIVERSAL_NEWLINES 1
11856_ACEOF
11857
11858fi
11859echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11860echo "${ECHO_T}$with_universal_newlines" >&6
11861
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011862# Check for --with-doc-strings
11863echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11864echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11865
11866# Check whether --with-doc-strings or --without-doc-strings was given.
11867if test "${with_doc_strings+set}" = set; then
11868 withval="$with_doc_strings"
11869
11870fi;
11871
11872if test -z "$with_doc_strings"
11873then with_doc_strings="yes"
11874fi
11875if test "$with_doc_strings" != "no"
11876then
11877
11878cat >>confdefs.h <<\_ACEOF
11879#define WITH_DOC_STRINGS 1
11880_ACEOF
11881
11882fi
11883echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11884echo "${ECHO_T}$with_doc_strings" >&6
11885
Neil Schemenauera35c6882001-02-27 04:45:05 +000011886# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011887echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11888echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11889
Neil Schemenauera35c6882001-02-27 04:45:05 +000011890# Check whether --with-pymalloc or --without-pymalloc was given.
11891if test "${with_pymalloc+set}" = set; then
11892 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011893
Martin v. Löwis11437992002-04-12 09:54:03 +000011894fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011895
Neil Schemenauer16c22972002-03-22 15:34:49 +000011896if test -z "$with_pymalloc"
11897then with_pymalloc="yes"
11898fi
11899if test "$with_pymalloc" != "no"
11900then
Martin v. Löwis11437992002-04-12 09:54:03 +000011901
11902cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011903#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011904_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011905
11906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011907echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11908echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011909
Barry Warsawef82cd72000-06-30 16:21:01 +000011910# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011911echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11912echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11913
Barry Warsawef82cd72000-06-30 16:21:01 +000011914# Check whether --with-wctype-functions or --without-wctype-functions was given.
11915if test "${with_wctype_functions+set}" = set; then
11916 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011917
Barry Warsawef82cd72000-06-30 16:21:01 +000011918if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011919then
11920
11921cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011922#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011923_ACEOF
11924
11925 echo "$as_me:$LINENO: result: yes" >&5
11926echo "${ECHO_T}yes" >&6
11927else echo "$as_me:$LINENO: result: no" >&5
11928echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011929fi
11930else
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 echo "$as_me:$LINENO: result: no" >&5
11932echo "${ECHO_T}no" >&6
11933fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011935# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011936
Guido van Rossum98935bf2001-09-05 19:13:16 +000011937DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011938
Martin v. Löwis11437992002-04-12 09:54:03 +000011939echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11940echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11941
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011943if test "${with_sgi_dl+set}" = set; then
11944 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011945
11946echo "$as_me:$LINENO: result: $withval" >&5
11947echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011948echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011949exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011950
11951cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011952#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011953_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011954
Guido van Rossume97ee181999-12-20 21:27:22 +000011955DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011956dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011957if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011958then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011959else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11960echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11961 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011962fi
11963DLINCLDIR=${dldir}
11964LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011965else
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 echo "$as_me:$LINENO: result: no" >&5
11967echo "${ECHO_T}no" >&6
11968fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011969
Martin v. Löwis11437992002-04-12 09:54:03 +000011970echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11971echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011972
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011974if test "${with_dl_dld+set}" = set; then
11975 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
11977echo "$as_me:$LINENO: result: $withval" >&5
11978echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011979echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011980exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011981
11982cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011983#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011984_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011985
Guido van Rossume97ee181999-12-20 21:27:22 +000011986DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011987dldir=`echo "$withval" | sed 's/,.*//'`
11988dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011989if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011990then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011991else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11992echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11993 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011994fi
11995DLINCLDIR=${dldir}
11996LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011997else
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 echo "$as_me:$LINENO: result: no" >&5
11999echo "${ECHO_T}no" >&6
12000fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012001
Guido van Rossume97ee181999-12-20 21:27:22 +000012002# the dlopen() function means we might want to use dynload_shlib.o. some
12003# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012004
Thomas Wouters3a584202000-08-05 23:28:51 +000012005for ac_func in dlopen
12006do
Martin v. Löwis11437992002-04-12 09:54:03 +000012007as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12008echo "$as_me:$LINENO: checking for $ac_func" >&5
12009echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12010if eval "test \"\${$as_ac_var+set}\" = set"; then
12011 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012012else
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 cat >conftest.$ac_ext <<_ACEOF
12014#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000012015#include "confdefs.h"
12016/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012018#include <assert.h>
12019/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012020#ifdef __cplusplus
12021extern "C"
12022#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012023/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 builtin and then its argument prototype would still apply. */
12025char $ac_func ();
12026char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012027
Barry Warsawfe33b792003-01-07 22:42:49 +000012028#ifdef F77_DUMMY_MAIN
12029# ifdef __cplusplus
12030 extern "C"
12031# endif
12032 int F77_DUMMY_MAIN() { return 1; }
12033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012034int
12035main ()
12036{
Guido van Rossume97ee181999-12-20 21:27:22 +000012037/* The GNU C library defines this for functions which it implements
12038 to always fail with ENOSYS. Some functions are actually named
12039 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012040#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012041choke me
12042#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012043f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000012044#endif
12045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 ;
12047 return 0;
12048}
12049_ACEOF
12050rm -f conftest.$ac_objext conftest$ac_exeext
12051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12052 (eval $ac_link) 2>&5
12053 ac_status=$?
12054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12055 (exit $ac_status); } &&
12056 { ac_try='test -s conftest$ac_exeext'
12057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12058 (eval $ac_try) 2>&5
12059 ac_status=$?
12060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12061 (exit $ac_status); }; }; then
12062 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012063else
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 echo "$as_me: failed program was:" >&5
12065cat conftest.$ac_ext >&5
12066eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012068rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012069fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012070echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12071echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12072if test `eval echo '${'$as_ac_var'}'` = yes; then
12073 cat >>confdefs.h <<_ACEOF
12074#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12075_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012076
Guido van Rossume97ee181999-12-20 21:27:22 +000012077fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012078done
Guido van Rossume97ee181999-12-20 21:27:22 +000012079
Michael W. Hudson54241132001-12-07 15:38:26 +000012080
Guido van Rossume97ee181999-12-20 21:27:22 +000012081# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12082# loading of modules.
12083
Martin v. Löwis11437992002-04-12 09:54:03 +000012084echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12085echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012086if test -z "$DYNLOADFILE"
12087then
12088 case $ac_sys_system/$ac_sys_release in
12089 AIX*) DYNLOADFILE="dynload_aix.o";;
12090 BeOS*) DYNLOADFILE="dynload_beos.o";;
12091 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012092 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012093 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012094 *)
12095 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12096 # out any dynamic loading
12097 if test "$ac_cv_func_dlopen" = yes
12098 then DYNLOADFILE="dynload_shlib.o"
12099 else DYNLOADFILE="dynload_stub.o"
12100 fi
12101 ;;
12102 esac
12103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012104echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12105echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012106if test "$DYNLOADFILE" != "dynload_stub.o"
12107then
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
12109cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012110#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012111_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012112
12113fi
12114
Neil Schemenauer4e425612001-06-19 15:44:15 +000012115# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12116
Michael W. Hudson54241132001-12-07 15:38:26 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12119echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012120if test -z "$MACHDEP_OBJS"
12121then
Jack Jansene578a632001-08-15 01:27:14 +000012122 MACHDEP_OBJS=$extra_machdep_objs
12123else
12124 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012126echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12127echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012128
Guido van Rossum627b2d71993-12-24 10:39:16 +000012129# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012130
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
12198
12199
12200
12201
12202
Martin v. Löwis9c36c292002-12-21 18:34:06 +000012203
Martin v. Löwisd5843682002-11-21 20:41:28 +000012204for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012205 fchdir fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012206 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
12207 getpriority getpwent getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012208 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012209 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012210 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012211 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012212 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012213 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012214 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012215 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216do
Martin v. Löwis11437992002-04-12 09:54:03 +000012217as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12218echo "$as_me:$LINENO: checking for $ac_func" >&5
12219echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12220if eval "test \"\${$as_ac_var+set}\" = set"; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012222else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 cat >conftest.$ac_ext <<_ACEOF
12224#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012226/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012228#include <assert.h>
12229/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012230#ifdef __cplusplus
12231extern "C"
12232#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012233/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 builtin and then its argument prototype would still apply. */
12235char $ac_func ();
12236char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012237
Barry Warsawfe33b792003-01-07 22:42:49 +000012238#ifdef F77_DUMMY_MAIN
12239# ifdef __cplusplus
12240 extern "C"
12241# endif
12242 int F77_DUMMY_MAIN() { return 1; }
12243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012247/* The GNU C library defines this for functions which it implements
12248 to always fail with ENOSYS. Some functions are actually named
12249 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012251choke me
12252#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012253f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest.$ac_objext conftest$ac_exeext
12261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12262 (eval $ac_link) 2>&5
12263 ac_status=$?
12264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12265 (exit $ac_status); } &&
12266 { ac_try='test -s conftest$ac_exeext'
12267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12268 (eval $ac_try) 2>&5
12269 ac_status=$?
12270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12271 (exit $ac_status); }; }; then
12272 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012273else
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 echo "$as_me: failed program was:" >&5
12275cat conftest.$ac_ext >&5
12276eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012279fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012280echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12281echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12282if test `eval echo '${'$as_ac_var'}'` = yes; then
12283 cat >>confdefs.h <<_ACEOF
12284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12285_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012286
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012287fi
12288done
12289
Michael W. Hudson54241132001-12-07 15:38:26 +000012290
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012291# For some functions, having a definition is not sufficient, since
12292# we want to take their address.
12293echo "$as_me:$LINENO: checking for chroot" >&5
12294echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12295cat >conftest.$ac_ext <<_ACEOF
12296#line $LINENO "configure"
12297#include "confdefs.h"
12298#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012299#ifdef F77_DUMMY_MAIN
12300# ifdef __cplusplus
12301 extern "C"
12302# endif
12303 int F77_DUMMY_MAIN() { return 1; }
12304#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012305int
12306main ()
12307{
12308void *x=chroot
12309 ;
12310 return 0;
12311}
12312_ACEOF
12313rm -f conftest.$ac_objext
12314if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12315 (eval $ac_compile) 2>&5
12316 ac_status=$?
12317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318 (exit $ac_status); } &&
12319 { ac_try='test -s conftest.$ac_objext'
12320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12321 (eval $ac_try) 2>&5
12322 ac_status=$?
12323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12324 (exit $ac_status); }; }; then
12325
12326cat >>confdefs.h <<\_ACEOF
12327#define HAVE_CHROOT 1
12328_ACEOF
12329
12330 echo "$as_me:$LINENO: result: yes" >&5
12331echo "${ECHO_T}yes" >&6
12332else
12333 echo "$as_me: failed program was:" >&5
12334cat conftest.$ac_ext >&5
12335echo "$as_me:$LINENO: result: no" >&5
12336echo "${ECHO_T}no" >&6
12337
12338fi
12339rm -f conftest.$ac_objext conftest.$ac_ext
12340echo "$as_me:$LINENO: checking for link" >&5
12341echo $ECHO_N "checking for link... $ECHO_C" >&6
12342cat >conftest.$ac_ext <<_ACEOF
12343#line $LINENO "configure"
12344#include "confdefs.h"
12345#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012346#ifdef F77_DUMMY_MAIN
12347# ifdef __cplusplus
12348 extern "C"
12349# endif
12350 int F77_DUMMY_MAIN() { return 1; }
12351#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012352int
12353main ()
12354{
12355void *x=link
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
12361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12362 (eval $ac_compile) 2>&5
12363 ac_status=$?
12364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12365 (exit $ac_status); } &&
12366 { ac_try='test -s conftest.$ac_objext'
12367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12368 (eval $ac_try) 2>&5
12369 ac_status=$?
12370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12371 (exit $ac_status); }; }; then
12372
12373cat >>confdefs.h <<\_ACEOF
12374#define HAVE_LINK 1
12375_ACEOF
12376
12377 echo "$as_me:$LINENO: result: yes" >&5
12378echo "${ECHO_T}yes" >&6
12379else
12380 echo "$as_me: failed program was:" >&5
12381cat conftest.$ac_ext >&5
12382echo "$as_me:$LINENO: result: no" >&5
12383echo "${ECHO_T}no" >&6
12384
12385fi
12386rm -f conftest.$ac_objext conftest.$ac_ext
12387echo "$as_me:$LINENO: checking for symlink" >&5
12388echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12389cat >conftest.$ac_ext <<_ACEOF
12390#line $LINENO "configure"
12391#include "confdefs.h"
12392#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000012393#ifdef F77_DUMMY_MAIN
12394# ifdef __cplusplus
12395 extern "C"
12396# endif
12397 int F77_DUMMY_MAIN() { return 1; }
12398#endif
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012399int
12400main ()
12401{
12402void *x=symlink
12403 ;
12404 return 0;
12405}
12406_ACEOF
12407rm -f conftest.$ac_objext
12408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12409 (eval $ac_compile) 2>&5
12410 ac_status=$?
12411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12412 (exit $ac_status); } &&
12413 { ac_try='test -s conftest.$ac_objext'
12414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12415 (eval $ac_try) 2>&5
12416 ac_status=$?
12417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12418 (exit $ac_status); }; }; then
12419
12420cat >>confdefs.h <<\_ACEOF
12421#define HAVE_SYMLINK 1
12422_ACEOF
12423
12424 echo "$as_me:$LINENO: result: yes" >&5
12425echo "${ECHO_T}yes" >&6
12426else
12427 echo "$as_me: failed program was:" >&5
12428cat conftest.$ac_ext >&5
12429echo "$as_me:$LINENO: result: no" >&5
12430echo "${ECHO_T}no" >&6
12431
12432fi
12433rm -f conftest.$ac_objext conftest.$ac_ext
12434
Martin v. Löwisd5843682002-11-21 20:41:28 +000012435# On some systems (eg. FreeBSD 5), we would find a definition of the
12436# functions ctermid_r, setgroups in the library, but no prototype
12437# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12438# address to avoid compiler warnings and potential miscompilations
12439# because of the missing prototypes.
12440
12441echo "$as_me:$LINENO: checking for ctermid_r" >&5
12442echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12443cat >conftest.$ac_ext <<_ACEOF
12444#line $LINENO "configure"
12445#include "confdefs.h"
12446
12447#include "confdefs.h"
12448#include <stdio.h>
12449
Barry Warsawfe33b792003-01-07 22:42:49 +000012450#ifdef F77_DUMMY_MAIN
12451# ifdef __cplusplus
12452 extern "C"
12453# endif
12454 int F77_DUMMY_MAIN() { return 1; }
12455#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012456int
12457main ()
12458{
12459void* p = ctermid_r
12460 ;
12461 return 0;
12462}
12463_ACEOF
12464rm -f conftest.$ac_objext
12465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12466 (eval $ac_compile) 2>&5
12467 ac_status=$?
12468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12469 (exit $ac_status); } &&
12470 { ac_try='test -s conftest.$ac_objext'
12471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472 (eval $ac_try) 2>&5
12473 ac_status=$?
12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475 (exit $ac_status); }; }; then
12476
12477cat >>confdefs.h <<\_ACEOF
12478#define HAVE_CTERMID_R 1
12479_ACEOF
12480
12481 echo "$as_me:$LINENO: result: yes" >&5
12482echo "${ECHO_T}yes" >&6
12483else
12484 echo "$as_me: failed program was:" >&5
12485cat conftest.$ac_ext >&5
12486echo "$as_me:$LINENO: result: no" >&5
12487echo "${ECHO_T}no" >&6
12488
12489fi
12490rm -f conftest.$ac_objext conftest.$ac_ext
12491
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012492echo "$as_me:$LINENO: checking for flock" >&5
12493echo $ECHO_N "checking for flock... $ECHO_C" >&6
12494cat >conftest.$ac_ext <<_ACEOF
12495#line $LINENO "configure"
12496#include "confdefs.h"
12497
12498#include "confdefs.h"
12499#include <sys/file.h>
12500
12501#ifdef F77_DUMMY_MAIN
12502# ifdef __cplusplus
12503 extern "C"
12504# endif
12505 int F77_DUMMY_MAIN() { return 1; }
12506#endif
12507int
12508main ()
12509{
12510void* p = flock
12511 ;
12512 return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext
12516if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12517 (eval $ac_compile) 2>&5
12518 ac_status=$?
12519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } &&
12521 { ac_try='test -s conftest.$ac_objext'
12522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12523 (eval $ac_try) 2>&5
12524 ac_status=$?
12525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12526 (exit $ac_status); }; }; then
12527
12528cat >>confdefs.h <<\_ACEOF
12529#define HAVE_FLOCK 1
12530_ACEOF
12531
12532 echo "$as_me:$LINENO: result: yes" >&5
12533echo "${ECHO_T}yes" >&6
12534else
12535 echo "$as_me: failed program was:" >&5
12536cat conftest.$ac_ext >&5
12537echo "$as_me:$LINENO: result: no" >&5
12538echo "${ECHO_T}no" >&6
12539
12540fi
12541rm -f conftest.$ac_objext conftest.$ac_ext
12542
12543echo "$as_me:$LINENO: checking for getpagesize" >&5
12544echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12545cat >conftest.$ac_ext <<_ACEOF
12546#line $LINENO "configure"
12547#include "confdefs.h"
12548
12549#include "confdefs.h"
12550#include <unistd.h>
12551
12552#ifdef F77_DUMMY_MAIN
12553# ifdef __cplusplus
12554 extern "C"
12555# endif
12556 int F77_DUMMY_MAIN() { return 1; }
12557#endif
12558int
12559main ()
12560{
12561void* p = getpagesize
12562 ;
12563 return 0;
12564}
12565_ACEOF
12566rm -f conftest.$ac_objext
12567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12568 (eval $ac_compile) 2>&5
12569 ac_status=$?
12570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12571 (exit $ac_status); } &&
12572 { ac_try='test -s conftest.$ac_objext'
12573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12574 (eval $ac_try) 2>&5
12575 ac_status=$?
12576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12577 (exit $ac_status); }; }; then
12578
12579cat >>confdefs.h <<\_ACEOF
12580#define HAVE_GETPAGESIZE 1
12581_ACEOF
12582
12583 echo "$as_me:$LINENO: result: yes" >&5
12584echo "${ECHO_T}yes" >&6
12585else
12586 echo "$as_me: failed program was:" >&5
12587cat conftest.$ac_ext >&5
12588echo "$as_me:$LINENO: result: no" >&5
12589echo "${ECHO_T}no" >&6
12590
12591fi
12592rm -f conftest.$ac_objext conftest.$ac_ext
12593
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012594echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12595echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12596if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12597 echo $ECHO_N "(cached) $ECHO_C" >&6
12598else
12599 ac_check_lib_save_LIBS=$LIBS
12600LIBS="-lc $LIBS"
12601cat >conftest.$ac_ext <<_ACEOF
12602#line $LINENO "configure"
12603#include "confdefs.h"
12604
12605/* Override any gcc2 internal prototype to avoid an error. */
12606#ifdef __cplusplus
12607extern "C"
12608#endif
12609/* We use char because int might match the return type of a gcc2
12610 builtin and then its argument prototype would still apply. */
12611char inet_aton ();
12612#ifdef F77_DUMMY_MAIN
12613# ifdef __cplusplus
12614 extern "C"
12615# endif
12616 int F77_DUMMY_MAIN() { return 1; }
12617#endif
12618int
12619main ()
12620{
12621inet_aton ();
12622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext conftest$ac_exeext
12627if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12628 (eval $ac_link) 2>&5
12629 ac_status=$?
12630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12631 (exit $ac_status); } &&
12632 { ac_try='test -s conftest$ac_exeext'
12633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12634 (eval $ac_try) 2>&5
12635 ac_status=$?
12636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12637 (exit $ac_status); }; }; then
12638 ac_cv_lib_c_inet_aton=yes
12639else
12640 echo "$as_me: failed program was:" >&5
12641cat conftest.$ac_ext >&5
12642ac_cv_lib_c_inet_aton=no
12643fi
12644rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12645LIBS=$ac_check_lib_save_LIBS
12646fi
12647echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12648echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12649if test $ac_cv_lib_c_inet_aton = yes; then
12650 /bin/true
12651else
12652
12653echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12654echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12655if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12656 echo $ECHO_N "(cached) $ECHO_C" >&6
12657else
12658 ac_check_lib_save_LIBS=$LIBS
12659LIBS="-lresolv $LIBS"
12660cat >conftest.$ac_ext <<_ACEOF
12661#line $LINENO "configure"
12662#include "confdefs.h"
12663
12664/* Override any gcc2 internal prototype to avoid an error. */
12665#ifdef __cplusplus
12666extern "C"
12667#endif
12668/* We use char because int might match the return type of a gcc2
12669 builtin and then its argument prototype would still apply. */
12670char inet_aton ();
12671#ifdef F77_DUMMY_MAIN
12672# ifdef __cplusplus
12673 extern "C"
12674# endif
12675 int F77_DUMMY_MAIN() { return 1; }
12676#endif
12677int
12678main ()
12679{
12680inet_aton ();
12681 ;
12682 return 0;
12683}
12684_ACEOF
12685rm -f conftest.$ac_objext conftest$ac_exeext
12686if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12687 (eval $ac_link) 2>&5
12688 ac_status=$?
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } &&
12691 { ac_try='test -s conftest$ac_exeext'
12692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12694 ac_status=$?
12695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
12697 ac_cv_lib_resolv_inet_aton=yes
12698else
12699 echo "$as_me: failed program was:" >&5
12700cat conftest.$ac_ext >&5
12701ac_cv_lib_resolv_inet_aton=no
12702fi
12703rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12704LIBS=$ac_check_lib_save_LIBS
12705fi
12706echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12707echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
12708if test $ac_cv_lib_resolv_inet_aton = yes; then
12709 cat >>confdefs.h <<_ACEOF
12710#define HAVE_LIBRESOLV 1
12711_ACEOF
12712
12713 LIBS="-lresolv $LIBS"
12714
12715fi
12716
12717
12718fi
12719
12720
Martin v. Löwise9416172003-05-03 10:12:45 +000012721echo "$as_me:$LINENO: checking for hstrerror" >&5
12722echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
12723cat >conftest.$ac_ext <<_ACEOF
12724#line $LINENO "configure"
12725#include "confdefs.h"
12726
12727#include "confdefs.h"
12728#include <netdb.h>
12729
12730#ifdef F77_DUMMY_MAIN
12731# ifdef __cplusplus
12732 extern "C"
12733# endif
12734 int F77_DUMMY_MAIN() { return 1; }
12735#endif
12736int
12737main ()
12738{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012739void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012740 ;
12741 return 0;
12742}
12743_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012744rm -f conftest.$ac_objext conftest$ac_exeext
12745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12746 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012747 ac_status=$?
12748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12749 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012750 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12752 (eval $ac_try) 2>&5
12753 ac_status=$?
12754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12755 (exit $ac_status); }; }; then
12756
12757cat >>confdefs.h <<\_ACEOF
12758#define HAVE_HSTRERROR 1
12759_ACEOF
12760
12761 echo "$as_me:$LINENO: result: yes" >&5
12762echo "${ECHO_T}yes" >&6
12763else
12764 echo "$as_me: failed program was:" >&5
12765cat conftest.$ac_ext >&5
12766echo "$as_me:$LINENO: result: no" >&5
12767echo "${ECHO_T}no" >&6
12768
12769fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012771
12772echo "$as_me:$LINENO: checking for inet_aton" >&5
12773echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
12774cat >conftest.$ac_ext <<_ACEOF
12775#line $LINENO "configure"
12776#include "confdefs.h"
12777
12778#include "confdefs.h"
12779#include <sys/socket.h>
12780#include <netinet/in.h>
12781#include <arpa/inet.h>
12782
12783#ifdef F77_DUMMY_MAIN
12784# ifdef __cplusplus
12785 extern "C"
12786# endif
12787 int F77_DUMMY_MAIN() { return 1; }
12788#endif
12789int
12790main ()
12791{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012792void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012797rm -f conftest.$ac_objext conftest$ac_exeext
12798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12799 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000012800 ac_status=$?
12801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12802 (exit $ac_status); } &&
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012803 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000012804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12805 (eval $ac_try) 2>&5
12806 ac_status=$?
12807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808 (exit $ac_status); }; }; then
12809
12810cat >>confdefs.h <<\_ACEOF
12811#define HAVE_INET_ATON 1
12812_ACEOF
12813
12814 echo "$as_me:$LINENO: result: yes" >&5
12815echo "${ECHO_T}yes" >&6
12816else
12817 echo "$as_me: failed program was:" >&5
12818cat conftest.$ac_ext >&5
12819echo "$as_me:$LINENO: result: no" >&5
12820echo "${ECHO_T}no" >&6
12821
12822fi
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012824
12825echo "$as_me:$LINENO: checking for inet_pton" >&5
12826echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
12827cat >conftest.$ac_ext <<_ACEOF
12828#line $LINENO "configure"
12829#include "confdefs.h"
12830
12831#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012832#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012833#include <sys/socket.h>
12834#include <netinet/in.h>
12835#include <arpa/inet.h>
12836
12837#ifdef F77_DUMMY_MAIN
12838# ifdef __cplusplus
12839 extern "C"
12840# endif
12841 int F77_DUMMY_MAIN() { return 1; }
12842#endif
12843int
12844main ()
12845{
12846void* p = inet_pton
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext
12852if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12853 (eval $ac_compile) 2>&5
12854 ac_status=$?
12855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12856 (exit $ac_status); } &&
12857 { ac_try='test -s conftest.$ac_objext'
12858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12859 (eval $ac_try) 2>&5
12860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); }; }; then
12863
12864cat >>confdefs.h <<\_ACEOF
12865#define HAVE_INET_PTON 1
12866_ACEOF
12867
12868 echo "$as_me:$LINENO: result: yes" >&5
12869echo "${ECHO_T}yes" >&6
12870else
12871 echo "$as_me: failed program was:" >&5
12872cat conftest.$ac_ext >&5
12873echo "$as_me:$LINENO: result: no" >&5
12874echo "${ECHO_T}no" >&6
12875
12876fi
12877rm -f conftest.$ac_objext conftest.$ac_ext
12878
Martin v. Löwisd5843682002-11-21 20:41:28 +000012879echo "$as_me:$LINENO: checking for setgroups" >&5
12880echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
12881cat >conftest.$ac_ext <<_ACEOF
12882#line $LINENO "configure"
12883#include "confdefs.h"
12884
12885#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012886#include <unistd.h>
Martin v. Löwisd5843682002-11-21 20:41:28 +000012887
Barry Warsawfe33b792003-01-07 22:42:49 +000012888#ifdef F77_DUMMY_MAIN
12889# ifdef __cplusplus
12890 extern "C"
12891# endif
12892 int F77_DUMMY_MAIN() { return 1; }
12893#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012894int
12895main ()
12896{
12897void* p = setgroups
12898 ;
12899 return 0;
12900}
12901_ACEOF
12902rm -f conftest.$ac_objext
12903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12904 (eval $ac_compile) 2>&5
12905 ac_status=$?
12906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12907 (exit $ac_status); } &&
12908 { ac_try='test -s conftest.$ac_objext'
12909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12910 (eval $ac_try) 2>&5
12911 ac_status=$?
12912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12913 (exit $ac_status); }; }; then
12914
12915cat >>confdefs.h <<\_ACEOF
12916#define HAVE_SETGROUPS 1
12917_ACEOF
12918
12919 echo "$as_me:$LINENO: result: yes" >&5
12920echo "${ECHO_T}yes" >&6
12921else
12922 echo "$as_me: failed program was:" >&5
12923cat conftest.$ac_ext >&5
12924echo "$as_me:$LINENO: result: no" >&5
12925echo "${ECHO_T}no" >&6
12926
12927fi
12928rm -f conftest.$ac_objext conftest.$ac_ext
12929
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012930# check for openpty and forkpty
12931
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012933for ac_func in openpty
12934do
Martin v. Löwis11437992002-04-12 09:54:03 +000012935as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12936echo "$as_me:$LINENO: checking for $ac_func" >&5
12937echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12938if eval "test \"\${$as_ac_var+set}\" = set"; then
12939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012940else
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 cat >conftest.$ac_ext <<_ACEOF
12942#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012943#include "confdefs.h"
12944/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012946#include <assert.h>
12947/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012948#ifdef __cplusplus
12949extern "C"
12950#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012951/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 builtin and then its argument prototype would still apply. */
12953char $ac_func ();
12954char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012955
Barry Warsawfe33b792003-01-07 22:42:49 +000012956#ifdef F77_DUMMY_MAIN
12957# ifdef __cplusplus
12958 extern "C"
12959# endif
12960 int F77_DUMMY_MAIN() { return 1; }
12961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012962int
12963main ()
12964{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012965/* The GNU C library defines this for functions which it implements
12966 to always fail with ENOSYS. Some functions are actually named
12967 something starting with __ and the normal name is an alias. */
12968#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12969choke me
12970#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012971f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012972#endif
12973
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ;
12975 return 0;
12976}
12977_ACEOF
12978rm -f conftest.$ac_objext conftest$ac_exeext
12979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12980 (eval $ac_link) 2>&5
12981 ac_status=$?
12982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12983 (exit $ac_status); } &&
12984 { ac_try='test -s conftest$ac_exeext'
12985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12986 (eval $ac_try) 2>&5
12987 ac_status=$?
12988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12989 (exit $ac_status); }; }; then
12990 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012991else
Martin v. Löwis11437992002-04-12 09:54:03 +000012992 echo "$as_me: failed program was:" >&5
12993cat conftest.$ac_ext >&5
12994eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012998echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12999echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13000if test `eval echo '${'$as_ac_var'}'` = yes; then
13001 cat >>confdefs.h <<_ACEOF
13002#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13003_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013004
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013005else
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13007echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13008if test "${ac_cv_lib_util_openpty+set}" = set; then
13009 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013010else
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013012LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013013cat >conftest.$ac_ext <<_ACEOF
13014#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013015#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
Fred Drake8cef4cf2000-06-28 16:40:38 +000013017/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013018#ifdef __cplusplus
13019extern "C"
13020#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013021/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 builtin and then its argument prototype would still apply. */
13023char openpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013024#ifdef F77_DUMMY_MAIN
13025# ifdef __cplusplus
13026 extern "C"
13027# endif
13028 int F77_DUMMY_MAIN() { return 1; }
13029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
13033openpty ();
13034 ;
13035 return 0;
13036}
13037_ACEOF
13038rm -f conftest.$ac_objext conftest$ac_exeext
13039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13040 (eval $ac_link) 2>&5
13041 ac_status=$?
13042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043 (exit $ac_status); } &&
13044 { ac_try='test -s conftest$ac_exeext'
13045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13046 (eval $ac_try) 2>&5
13047 ac_status=$?
13048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13049 (exit $ac_status); }; }; then
13050 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013051else
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 echo "$as_me: failed program was:" >&5
13053cat conftest.$ac_ext >&5
13054ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13057LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013059echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13060echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13061if test $ac_cv_lib_util_openpty = yes; then
13062 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013063#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013064_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013065 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013066fi
13067
13068fi
13069done
13070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071
Fred Drake8cef4cf2000-06-28 16:40:38 +000013072for ac_func in forkpty
13073do
Martin v. Löwis11437992002-04-12 09:54:03 +000013074as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13075echo "$as_me:$LINENO: checking for $ac_func" >&5
13076echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13077if eval "test \"\${$as_ac_var+set}\" = set"; then
13078 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013079else
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 cat >conftest.$ac_ext <<_ACEOF
13081#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013082#include "confdefs.h"
13083/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013085#include <assert.h>
13086/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013087#ifdef __cplusplus
13088extern "C"
13089#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013090/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 builtin and then its argument prototype would still apply. */
13092char $ac_func ();
13093char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013094
Barry Warsawfe33b792003-01-07 22:42:49 +000013095#ifdef F77_DUMMY_MAIN
13096# ifdef __cplusplus
13097 extern "C"
13098# endif
13099 int F77_DUMMY_MAIN() { return 1; }
13100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013101int
13102main ()
13103{
Fred Drake8cef4cf2000-06-28 16:40:38 +000013104/* The GNU C library defines this for functions which it implements
13105 to always fail with ENOSYS. Some functions are actually named
13106 something starting with __ and the normal name is an alias. */
13107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13108choke me
13109#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013110f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000013111#endif
13112
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 ;
13114 return 0;
13115}
13116_ACEOF
13117rm -f conftest.$ac_objext conftest$ac_exeext
13118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13119 (eval $ac_link) 2>&5
13120 ac_status=$?
13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13122 (exit $ac_status); } &&
13123 { ac_try='test -s conftest$ac_exeext'
13124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13125 (eval $ac_try) 2>&5
13126 ac_status=$?
13127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13128 (exit $ac_status); }; }; then
13129 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013130else
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 echo "$as_me: failed program was:" >&5
13132cat conftest.$ac_ext >&5
13133eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013135rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013137echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13138echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13139if test `eval echo '${'$as_ac_var'}'` = yes; then
13140 cat >>confdefs.h <<_ACEOF
13141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13142_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013143
Fred Drake8cef4cf2000-06-28 16:40:38 +000013144else
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13146echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13147if test "${ac_cv_lib_util_forkpty+set}" = set; then
13148 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013149else
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013151LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013152cat >conftest.$ac_ext <<_ACEOF
13153#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013154#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
Fred Drake8cef4cf2000-06-28 16:40:38 +000013156/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013157#ifdef __cplusplus
13158extern "C"
13159#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013160/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 builtin and then its argument prototype would still apply. */
13162char forkpty ();
Barry Warsawfe33b792003-01-07 22:42:49 +000013163#ifdef F77_DUMMY_MAIN
13164# ifdef __cplusplus
13165 extern "C"
13166# endif
13167 int F77_DUMMY_MAIN() { return 1; }
13168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013169int
13170main ()
13171{
13172forkpty ();
13173 ;
13174 return 0;
13175}
13176_ACEOF
13177rm -f conftest.$ac_objext conftest$ac_exeext
13178if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13179 (eval $ac_link) 2>&5
13180 ac_status=$?
13181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13182 (exit $ac_status); } &&
13183 { ac_try='test -s conftest$ac_exeext'
13184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13185 (eval $ac_try) 2>&5
13186 ac_status=$?
13187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13188 (exit $ac_status); }; }; then
13189 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013190else
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 echo "$as_me: failed program was:" >&5
13192cat conftest.$ac_ext >&5
13193ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013194fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013195rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13196LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013197fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013198echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13199echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13200if test $ac_cv_lib_util_forkpty = yes; then
13201 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013202#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013203_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013204 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013205fi
13206
13207fi
13208done
13209
Jack Jansendd19cf82001-12-06 22:36:17 +000013210
Michael W. Hudson54241132001-12-07 15:38:26 +000013211# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
13213
13214
13215
13216
13217
Fred Drake8cef4cf2000-06-28 16:40:38 +000013218for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13219do
Martin v. Löwis11437992002-04-12 09:54:03 +000013220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13221echo "$as_me:$LINENO: checking for $ac_func" >&5
13222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13223if eval "test \"\${$as_ac_var+set}\" = set"; then
13224 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 cat >conftest.$ac_ext <<_ACEOF
13227#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013228#include "confdefs.h"
13229/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013231#include <assert.h>
13232/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013233#ifdef __cplusplus
13234extern "C"
13235#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013236/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 builtin and then its argument prototype would still apply. */
13238char $ac_func ();
13239char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013240
Barry Warsawfe33b792003-01-07 22:42:49 +000013241#ifdef F77_DUMMY_MAIN
13242# ifdef __cplusplus
13243 extern "C"
13244# endif
13245 int F77_DUMMY_MAIN() { return 1; }
13246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013247int
13248main ()
13249{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013250/* The GNU C library defines this for functions which it implements
13251 to always fail with ENOSYS. Some functions are actually named
13252 something starting with __ and the normal name is an alias. */
13253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13254choke me
13255#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013256f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013257#endif
13258
Martin v. Löwis11437992002-04-12 09:54:03 +000013259 ;
13260 return 0;
13261}
13262_ACEOF
13263rm -f conftest.$ac_objext conftest$ac_exeext
13264if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13265 (eval $ac_link) 2>&5
13266 ac_status=$?
13267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13268 (exit $ac_status); } &&
13269 { ac_try='test -s conftest$ac_exeext'
13270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13271 (eval $ac_try) 2>&5
13272 ac_status=$?
13273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13274 (exit $ac_status); }; }; then
13275 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276else
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 echo "$as_me: failed program was:" >&5
13278cat conftest.$ac_ext >&5
13279eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013282fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013283echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13284echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13285if test `eval echo '${'$as_ac_var'}'` = yes; then
13286 cat >>confdefs.h <<_ACEOF
13287#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13288_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013291done
13292
Michael W. Hudson54241132001-12-07 15:38:26 +000013293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295
13296
13297
13298
Martin v. Löwis1142de32002-03-29 16:28:31 +000013299for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013300do
Martin v. Löwis11437992002-04-12 09:54:03 +000013301as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13302echo "$as_me:$LINENO: checking for $ac_func" >&5
13303echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13304if eval "test \"\${$as_ac_var+set}\" = set"; then
13305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 cat >conftest.$ac_ext <<_ACEOF
13308#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013309#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013310/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013312#include <assert.h>
13313/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013314#ifdef __cplusplus
13315extern "C"
13316#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013317/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 builtin and then its argument prototype would still apply. */
13319char $ac_func ();
13320char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013321
Barry Warsawfe33b792003-01-07 22:42:49 +000013322#ifdef F77_DUMMY_MAIN
13323# ifdef __cplusplus
13324 extern "C"
13325# endif
13326 int F77_DUMMY_MAIN() { return 1; }
13327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013328int
13329main ()
13330{
Guido van Rossum627b2d71993-12-24 10:39:16 +000013331/* The GNU C library defines this for functions which it implements
13332 to always fail with ENOSYS. Some functions are actually named
13333 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013334#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013335choke me
13336#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013337f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ;
13341 return 0;
13342}
13343_ACEOF
13344rm -f conftest.$ac_objext conftest$ac_exeext
13345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13346 (eval $ac_link) 2>&5
13347 ac_status=$?
13348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13349 (exit $ac_status); } &&
13350 { ac_try='test -s conftest$ac_exeext'
13351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13352 (eval $ac_try) 2>&5
13353 ac_status=$?
13354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13355 (exit $ac_status); }; }; then
13356 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013357else
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 echo "$as_me: failed program was:" >&5
13359cat conftest.$ac_ext >&5
13360eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013361fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013364echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13365echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13366if test `eval echo '${'$as_ac_var'}'` = yes; then
13367 cat >>confdefs.h <<_ACEOF
13368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13369_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013370
Martin v. Löwis1142de32002-03-29 16:28:31 +000013371else
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013373fi
13374done
13375
13376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Martin v. Löwis1142de32002-03-29 16:28:31 +000013378for ac_func in getpgrp
13379do
Martin v. Löwis11437992002-04-12 09:54:03 +000013380as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13381echo "$as_me:$LINENO: checking for $ac_func" >&5
13382echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13383if eval "test \"\${$as_ac_var+set}\" = set"; then
13384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013385else
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 cat >conftest.$ac_ext <<_ACEOF
13387#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013388#include "confdefs.h"
13389/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013391#include <assert.h>
13392/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013393#ifdef __cplusplus
13394extern "C"
13395#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013396/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 builtin and then its argument prototype would still apply. */
13398char $ac_func ();
13399char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013400
Barry Warsawfe33b792003-01-07 22:42:49 +000013401#ifdef F77_DUMMY_MAIN
13402# ifdef __cplusplus
13403 extern "C"
13404# endif
13405 int F77_DUMMY_MAIN() { return 1; }
13406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013407int
13408main ()
13409{
Martin v. Löwis1142de32002-03-29 16:28:31 +000013410/* The GNU C library defines this for functions which it implements
13411 to always fail with ENOSYS. Some functions are actually named
13412 something starting with __ and the normal name is an alias. */
13413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13414choke me
13415#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013416f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000013417#endif
13418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ;
13420 return 0;
13421}
13422_ACEOF
13423rm -f conftest.$ac_objext conftest$ac_exeext
13424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13425 (eval $ac_link) 2>&5
13426 ac_status=$?
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428 (exit $ac_status); } &&
13429 { ac_try='test -s conftest$ac_exeext'
13430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13431 (eval $ac_try) 2>&5
13432 ac_status=$?
13433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); }; }; then
13435 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013436else
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 echo "$as_me: failed program was:" >&5
13438cat conftest.$ac_ext >&5
13439eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013443echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13444echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13445if test `eval echo '${'$as_ac_var'}'` = yes; then
13446 cat >>confdefs.h <<_ACEOF
13447#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13448_ACEOF
13449 cat >conftest.$ac_ext <<_ACEOF
13450#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013451#include "confdefs.h"
13452#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013453#ifdef F77_DUMMY_MAIN
13454# ifdef __cplusplus
13455 extern "C"
13456# endif
13457 int F77_DUMMY_MAIN() { return 1; }
13458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013462getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
13465}
13466_ACEOF
13467rm -f conftest.$ac_objext
13468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13469 (eval $ac_compile) 2>&5
13470 ac_status=$?
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); } &&
13473 { ac_try='test -s conftest.$ac_objext'
13474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13475 (eval $ac_try) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); }; }; then
13479
13480cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Guido van Rossumf78abae1997-01-21 22:02:36 +000013485else
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 echo "$as_me: failed program was:" >&5
13487cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013489rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013490
Guido van Rossum627b2d71993-12-24 10:39:16 +000013491fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013492done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013493
Jack Jansen150753c2003-03-29 22:07:47 +000013494
13495for ac_func in setpgrp
13496do
13497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13498echo "$as_me:$LINENO: checking for $ac_func" >&5
13499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13500if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013502else
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 cat >conftest.$ac_ext <<_ACEOF
13504#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013505#include "confdefs.h"
Jack Jansen150753c2003-03-29 22:07:47 +000013506/* System header to define __stub macros and hopefully few prototypes,
13507 which can conflict with char $ac_func (); below. */
13508#include <assert.h>
13509/* Override any gcc2 internal prototype to avoid an error. */
13510#ifdef __cplusplus
13511extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000013512#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013513/* We use char because int might match the return type of a gcc2
13514 builtin and then its argument prototype would still apply. */
13515char $ac_func ();
13516char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013517
Barry Warsawfe33b792003-01-07 22:42:49 +000013518#ifdef F77_DUMMY_MAIN
13519# ifdef __cplusplus
13520 extern "C"
13521# endif
13522 int F77_DUMMY_MAIN() { return 1; }
13523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013524int
13525main ()
13526{
Jack Jansen150753c2003-03-29 22:07:47 +000013527/* The GNU C library defines this for functions which it implements
13528 to always fail with ENOSYS. Some functions are actually named
13529 something starting with __ and the normal name is an alias. */
13530#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13531choke me
13532#else
13533f = $ac_func;
13534#endif
13535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013541if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13542 (eval $ac_link) 2>&5
13543 ac_status=$?
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013545 (exit $ac_status); } &&
13546 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13548 (eval $ac_try) 2>&5
13549 ac_status=$?
13550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13551 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013552 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013553else
Jack Jansen150753c2003-03-29 22:07:47 +000013554 echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013555cat conftest.$ac_ext >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013556eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013557fi
Jack Jansen150753c2003-03-29 22:07:47 +000013558rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013559fi
Jack Jansen150753c2003-03-29 22:07:47 +000013560echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13561echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13562if test `eval echo '${'$as_ac_var'}'` = yes; then
13563 cat >>confdefs.h <<_ACEOF
13564#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13565_ACEOF
13566 cat >conftest.$ac_ext <<_ACEOF
13567#line $LINENO "configure"
13568#include "confdefs.h"
13569#include <unistd.h>
13570#ifdef F77_DUMMY_MAIN
13571# ifdef __cplusplus
13572 extern "C"
13573# endif
13574 int F77_DUMMY_MAIN() { return 1; }
13575#endif
13576int
13577main ()
13578{
13579setpgrp(0,0);
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584rm -f conftest.$ac_objext
13585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13586 (eval $ac_compile) 2>&5
13587 ac_status=$?
13588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13589 (exit $ac_status); } &&
13590 { ac_try='test -s conftest.$ac_objext'
13591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13592 (eval $ac_try) 2>&5
13593 ac_status=$?
13594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013596
13597cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013598#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013599_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013600
Jack Jansen150753c2003-03-29 22:07:47 +000013601
13602else
13603 echo "$as_me: failed program was:" >&5
13604cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013605fi
Jack Jansen150753c2003-03-29 22:07:47 +000013606rm -f conftest.$ac_objext conftest.$ac_ext
13607
13608fi
13609done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013610
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
Thomas Wouters3a584202000-08-05 23:28:51 +000013612for ac_func in gettimeofday
13613do
Martin v. Löwis11437992002-04-12 09:54:03 +000013614as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13615echo "$as_me:$LINENO: checking for $ac_func" >&5
13616echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13617if eval "test \"\${$as_ac_var+set}\" = set"; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013619else
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 cat >conftest.$ac_ext <<_ACEOF
13621#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013622#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013623/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013625#include <assert.h>
13626/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013627#ifdef __cplusplus
13628extern "C"
13629#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013630/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 builtin and then its argument prototype would still apply. */
13632char $ac_func ();
13633char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013634
Barry Warsawfe33b792003-01-07 22:42:49 +000013635#ifdef F77_DUMMY_MAIN
13636# ifdef __cplusplus
13637 extern "C"
13638# endif
13639 int F77_DUMMY_MAIN() { return 1; }
13640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013641int
13642main ()
13643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644/* The GNU C library defines this for functions which it implements
13645 to always fail with ENOSYS. Some functions are actually named
13646 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013647#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013648choke me
13649#else
Martin v. Löwis11437992002-04-12 09:54:03 +000013650f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013651#endif
13652
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
13657rm -f conftest.$ac_objext conftest$ac_exeext
13658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13659 (eval $ac_link) 2>&5
13660 ac_status=$?
13661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13662 (exit $ac_status); } &&
13663 { ac_try='test -s conftest$ac_exeext'
13664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13665 (eval $ac_try) 2>&5
13666 ac_status=$?
13667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13668 (exit $ac_status); }; }; then
13669 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013670else
Martin v. Löwis11437992002-04-12 09:54:03 +000013671 echo "$as_me: failed program was:" >&5
13672cat conftest.$ac_ext >&5
13673eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013676fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013677echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13678echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13679if test `eval echo '${'$as_ac_var'}'` = yes; then
13680 cat >>confdefs.h <<_ACEOF
13681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13682_ACEOF
13683 cat >conftest.$ac_ext <<_ACEOF
13684#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013685#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686#include <sys/time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000013687#ifdef F77_DUMMY_MAIN
13688# ifdef __cplusplus
13689 extern "C"
13690# endif
13691 int F77_DUMMY_MAIN() { return 1; }
13692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013693int
13694main ()
13695{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 ;
13698 return 0;
13699}
13700_ACEOF
13701rm -f conftest.$ac_objext
13702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13703 (eval $ac_compile) 2>&5
13704 ac_status=$?
13705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13706 (exit $ac_status); } &&
13707 { ac_try='test -s conftest.$ac_objext'
13708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13709 (eval $ac_try) 2>&5
13710 ac_status=$?
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013713 :
13714else
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 echo "$as_me: failed program was:" >&5
13716cat conftest.$ac_ext >&5
13717
13718cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013719#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013720_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Guido van Rossum627b2d71993-12-24 10:39:16 +000013723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013724rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013726fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013727done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013728
Michael W. Hudson54241132001-12-07 15:38:26 +000013729
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013730echo "$as_me:$LINENO: checking for major" >&5
13731echo $ECHO_N "checking for major... $ECHO_C" >&6
13732cat >conftest.$ac_ext <<_ACEOF
13733#line $LINENO "configure"
13734#include "confdefs.h"
13735
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013736#if defined(MAJOR_IN_MKDEV)
13737#include <sys/mkdev.h>
13738#elif defined(MAJOR_IN_SYSMACROS)
13739#include <sys/sysmacros.h>
13740#else
13741#include <sys/types.h>
13742#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013743
Barry Warsawfe33b792003-01-07 22:42:49 +000013744#ifdef F77_DUMMY_MAIN
13745# ifdef __cplusplus
13746 extern "C"
13747# endif
13748 int F77_DUMMY_MAIN() { return 1; }
13749#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013750int
13751main ()
13752{
13753
13754 makedev(major(0),minor(0));
13755
13756 ;
13757 return 0;
13758}
13759_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000013760rm -f conftest.$ac_objext conftest$ac_exeext
13761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13762 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013763 ac_status=$?
13764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13765 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000013766 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13768 (eval $ac_try) 2>&5
13769 ac_status=$?
13770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771 (exit $ac_status); }; }; then
13772
13773
13774cat >>confdefs.h <<\_ACEOF
13775#define HAVE_DEVICE_MACROS 1
13776_ACEOF
13777
13778 echo "$as_me:$LINENO: result: yes" >&5
13779echo "${ECHO_T}yes" >&6
13780
13781else
13782 echo "$as_me: failed program was:" >&5
13783cat conftest.$ac_ext >&5
13784
13785 echo "$as_me:$LINENO: result: no" >&5
13786echo "${ECHO_T}no" >&6
13787
13788fi
Martin v. Löwise3271202002-11-07 07:42:30 +000013789rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013790
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013791# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013792# for [no]getaddrinfo in netdb.h.
13793echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13794echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
13795cat >conftest.$ac_ext <<_ACEOF
13796#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013797#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013798
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013799#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013800#include <sys/socket.h>
13801#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013802#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013803
Barry Warsawfe33b792003-01-07 22:42:49 +000013804#ifdef F77_DUMMY_MAIN
13805# ifdef __cplusplus
13806 extern "C"
13807# endif
13808 int F77_DUMMY_MAIN() { return 1; }
13809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013810int
13811main ()
13812{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013813
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013814getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 ;
13817 return 0;
13818}
13819_ACEOF
13820rm -f conftest.$ac_objext conftest$ac_exeext
13821if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13822 (eval $ac_link) 2>&5
13823 ac_status=$?
13824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13825 (exit $ac_status); } &&
13826 { ac_try='test -s conftest$ac_exeext'
13827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13828 (eval $ac_try) 2>&5
13829 ac_status=$?
13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831 (exit $ac_status); }; }; then
13832
13833echo "$as_me:$LINENO: result: yes" >&5
13834echo "${ECHO_T}yes" >&6
13835echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
13836echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013837if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 echo "$as_me:$LINENO: result: buggy" >&5
13839echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013840buggygetaddrinfo=yes
13841else
Martin v. Löwis11437992002-04-12 09:54:03 +000013842 cat >conftest.$ac_ext <<_ACEOF
13843#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013844#include "confdefs.h"
13845
13846#include <sys/types.h>
13847#include <netdb.h>
13848#include <string.h>
13849#include <sys/socket.h>
13850#include <netinet/in.h>
13851
13852main()
13853{
13854 int passive, gaierr, inet4 = 0, inet6 = 0;
13855 struct addrinfo hints, *ai, *aitop;
13856 char straddr[INET6_ADDRSTRLEN], strport[16];
13857
13858 for (passive = 0; passive <= 1; passive++) {
13859 memset(&hints, 0, sizeof(hints));
13860 hints.ai_family = AF_UNSPEC;
13861 hints.ai_flags = passive ? AI_PASSIVE : 0;
13862 hints.ai_socktype = SOCK_STREAM;
13863 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13864 (void)gai_strerror(gaierr);
13865 goto bad;
13866 }
13867 for (ai = aitop; ai; ai = ai->ai_next) {
13868 if (ai->ai_addr == NULL ||
13869 ai->ai_addrlen == 0 ||
13870 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13871 straddr, sizeof(straddr), strport, sizeof(strport),
13872 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13873 goto bad;
13874 }
13875 switch (ai->ai_family) {
13876 case AF_INET:
13877 if (strcmp(strport, "54321") != 0) {
13878 goto bad;
13879 }
13880 if (passive) {
13881 if (strcmp(straddr, "0.0.0.0") != 0) {
13882 goto bad;
13883 }
13884 } else {
13885 if (strcmp(straddr, "127.0.0.1") != 0) {
13886 goto bad;
13887 }
13888 }
13889 inet4++;
13890 break;
13891 case AF_INET6:
13892 if (strcmp(strport, "54321") != 0) {
13893 goto bad;
13894 }
13895 if (passive) {
13896 if (strcmp(straddr, "::") != 0) {
13897 goto bad;
13898 }
13899 } else {
13900 if (strcmp(straddr, "::1") != 0) {
13901 goto bad;
13902 }
13903 }
13904 inet6++;
13905 break;
13906 case AF_UNSPEC:
13907 goto bad;
13908 break;
13909 default:
13910 /* another family support? */
13911 break;
13912 }
13913 }
13914 }
13915
13916 if (!(inet4 == 0 || inet4 == 2))
13917 goto bad;
13918 if (!(inet6 == 0 || inet6 == 2))
13919 goto bad;
13920
13921 if (aitop)
13922 freeaddrinfo(aitop);
13923 exit(0);
13924
13925 bad:
13926 if (aitop)
13927 freeaddrinfo(aitop);
13928 exit(1);
13929}
13930
Martin v. Löwis11437992002-04-12 09:54:03 +000013931_ACEOF
13932rm -f conftest$ac_exeext
13933if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13934 (eval $ac_link) 2>&5
13935 ac_status=$?
13936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13939 (eval $ac_try) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); }; }; then
13943 echo "$as_me:$LINENO: result: good" >&5
13944echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013945buggygetaddrinfo=no
13946else
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 echo "$as_me: program exited with status $ac_status" >&5
13948echo "$as_me: failed program was:" >&5
13949cat conftest.$ac_ext >&5
13950( exit $ac_status )
13951echo "$as_me:$LINENO: result: buggy" >&5
13952echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013953buggygetaddrinfo=yes
13954fi
Barry Warsawfe33b792003-01-07 22:42:49 +000013955rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013956fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013957else
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 echo "$as_me: failed program was:" >&5
13959cat conftest.$ac_ext >&5
13960
13961echo "$as_me:$LINENO: result: no" >&5
13962echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013963buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013964
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013967
13968if test "$buggygetaddrinfo" = "yes"; then
13969 if test "$ipv6" = "yes"; then
13970 echo 'Fatal: You must get working getaddrinfo() function.'
13971 echo ' or you can specify "--disable-ipv6"'.
13972 exit 1
13973 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
13976cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013977#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013978_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013979
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013981
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013982for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013983do
Martin v. Löwis11437992002-04-12 09:54:03 +000013984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13985echo "$as_me:$LINENO: checking for $ac_func" >&5
13986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13987if eval "test \"\${$as_ac_var+set}\" = set"; then
13988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013989else
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 cat >conftest.$ac_ext <<_ACEOF
13991#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013992#include "confdefs.h"
13993/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013995#include <assert.h>
13996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013997#ifdef __cplusplus
13998extern "C"
13999#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014000/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 builtin and then its argument prototype would still apply. */
14002char $ac_func ();
14003char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014004
Barry Warsawfe33b792003-01-07 22:42:49 +000014005#ifdef F77_DUMMY_MAIN
14006# ifdef __cplusplus
14007 extern "C"
14008# endif
14009 int F77_DUMMY_MAIN() { return 1; }
14010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014011int
14012main ()
14013{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014014/* The GNU C library defines this for functions which it implements
14015 to always fail with ENOSYS. Some functions are actually named
14016 something starting with __ and the normal name is an alias. */
14017#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14018choke me
14019#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014020f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014021#endif
14022
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 ;
14024 return 0;
14025}
14026_ACEOF
14027rm -f conftest.$ac_objext conftest$ac_exeext
14028if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14029 (eval $ac_link) 2>&5
14030 ac_status=$?
14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032 (exit $ac_status); } &&
14033 { ac_try='test -s conftest$ac_exeext'
14034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14035 (eval $ac_try) 2>&5
14036 ac_status=$?
14037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14038 (exit $ac_status); }; }; then
14039 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014040else
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 echo "$as_me: failed program was:" >&5
14042cat conftest.$ac_ext >&5
14043eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014045rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014047echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14048echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14049if test `eval echo '${'$as_ac_var'}'` = yes; then
14050 cat >>confdefs.h <<_ACEOF
14051#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14052_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014053
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014054fi
14055done
14056
Michael W. Hudson54241132001-12-07 15:38:26 +000014057
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014058# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014059echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14060echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14061if test "${ac_cv_header_time+set}" = set; then
14062 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063else
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 cat >conftest.$ac_ext <<_ACEOF
14065#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014066#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014067#include <sys/types.h>
14068#include <sys/time.h>
14069#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Barry Warsawfe33b792003-01-07 22:42:49 +000014071#ifdef F77_DUMMY_MAIN
14072# ifdef __cplusplus
14073 extern "C"
14074# endif
14075 int F77_DUMMY_MAIN() { return 1; }
14076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014077int
14078main ()
14079{
14080if ((struct tm *) 0)
14081return 0;
14082 ;
14083 return 0;
14084}
14085_ACEOF
14086rm -f conftest.$ac_objext
14087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14088 (eval $ac_compile) 2>&5
14089 ac_status=$?
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); } &&
14092 { ac_try='test -s conftest.$ac_objext'
14093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14094 (eval $ac_try) 2>&5
14095 ac_status=$?
14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014098 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014099else
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 echo "$as_me: failed program was:" >&5
14101cat conftest.$ac_ext >&5
14102ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014104rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014106echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14107echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014108if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
14110cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014111#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014112_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014113
14114fi
14115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14117echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14118if test "${ac_cv_struct_tm+set}" = set; then
14119 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014120else
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 cat >conftest.$ac_ext <<_ACEOF
14122#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123#include "confdefs.h"
14124#include <sys/types.h>
14125#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
Barry Warsawfe33b792003-01-07 22:42:49 +000014127#ifdef F77_DUMMY_MAIN
14128# ifdef __cplusplus
14129 extern "C"
14130# endif
14131 int F77_DUMMY_MAIN() { return 1; }
14132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014133int
14134main ()
14135{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014136struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext
14142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14143 (eval $ac_compile) 2>&5
14144 ac_status=$?
14145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14146 (exit $ac_status); } &&
14147 { ac_try='test -s conftest.$ac_objext'
14148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14149 (eval $ac_try) 2>&5
14150 ac_status=$?
14151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014153 ac_cv_struct_tm=time.h
14154else
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 echo "$as_me: failed program was:" >&5
14156cat conftest.$ac_ext >&5
14157ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014159rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014161echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14162echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014163if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014164
14165cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014166#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168
14169fi
14170
Martin v. Löwis11437992002-04-12 09:54:03 +000014171echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14172echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14173if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014175else
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 cat >conftest.$ac_ext <<_ACEOF
14177#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014178#include "confdefs.h"
14179#include <sys/types.h>
14180#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
14182
Barry Warsawfe33b792003-01-07 22:42:49 +000014183#ifdef F77_DUMMY_MAIN
14184# ifdef __cplusplus
14185 extern "C"
14186# endif
14187 int F77_DUMMY_MAIN() { return 1; }
14188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014189int
14190main ()
14191{
14192static struct tm ac_aggr;
14193if (ac_aggr.tm_zone)
14194return 0;
14195 ;
14196 return 0;
14197}
14198_ACEOF
14199rm -f conftest.$ac_objext
14200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14201 (eval $ac_compile) 2>&5
14202 ac_status=$?
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); } &&
14205 { ac_try='test -s conftest.$ac_objext'
14206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14207 (eval $ac_try) 2>&5
14208 ac_status=$?
14209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210 (exit $ac_status); }; }; then
14211 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014212else
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 echo "$as_me: failed program was:" >&5
14214cat conftest.$ac_ext >&5
14215ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014217rm -f conftest.$ac_objext conftest.$ac_ext
14218fi
14219echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14220echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14221if test $ac_cv_member_struct_tm_tm_zone = yes; then
14222
14223cat >>confdefs.h <<_ACEOF
14224#define HAVE_STRUCT_TM_TM_ZONE 1
14225_ACEOF
14226
14227
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014228fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014229
Martin v. Löwis11437992002-04-12 09:54:03 +000014230if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14231
14232cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014233#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014234_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014235
14236else
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 echo "$as_me:$LINENO: checking for tzname" >&5
14238echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14239if test "${ac_cv_var_tzname+set}" = set; then
14240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014241else
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 cat >conftest.$ac_ext <<_ACEOF
14243#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014244#include "confdefs.h"
14245#include <time.h>
14246#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014247extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
Barry Warsawfe33b792003-01-07 22:42:49 +000014250#ifdef F77_DUMMY_MAIN
14251# ifdef __cplusplus
14252 extern "C"
14253# endif
14254 int F77_DUMMY_MAIN() { return 1; }
14255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014256int
14257main ()
14258{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014259atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 ;
14261 return 0;
14262}
14263_ACEOF
14264rm -f conftest.$ac_objext conftest$ac_exeext
14265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14266 (eval $ac_link) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); } &&
14270 { ac_try='test -s conftest$ac_exeext'
14271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14272 (eval $ac_try) 2>&5
14273 ac_status=$?
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014276 ac_cv_var_tzname=yes
14277else
Martin v. Löwis11437992002-04-12 09:54:03 +000014278 echo "$as_me: failed program was:" >&5
14279cat conftest.$ac_ext >&5
14280ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014282rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014283fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014284echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14285echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014286 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014287
14288cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014289#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014290_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014292 fi
14293fi
14294
Martin v. Löwis11437992002-04-12 09:54:03 +000014295echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14296echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14297if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14298 echo $ECHO_N "(cached) $ECHO_C" >&6
14299else
14300 cat >conftest.$ac_ext <<_ACEOF
14301#line $LINENO "configure"
14302#include "confdefs.h"
14303$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014304#ifdef F77_DUMMY_MAIN
14305# ifdef __cplusplus
14306 extern "C"
14307# endif
14308 int F77_DUMMY_MAIN() { return 1; }
14309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014310int
14311main ()
14312{
14313static struct stat ac_aggr;
14314if (ac_aggr.st_rdev)
14315return 0;
14316 ;
14317 return 0;
14318}
14319_ACEOF
14320rm -f conftest.$ac_objext
14321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14322 (eval $ac_compile) 2>&5
14323 ac_status=$?
14324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325 (exit $ac_status); } &&
14326 { ac_try='test -s conftest.$ac_objext'
14327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14328 (eval $ac_try) 2>&5
14329 ac_status=$?
14330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14331 (exit $ac_status); }; }; then
14332 ac_cv_member_struct_stat_st_rdev=yes
14333else
14334 echo "$as_me: failed program was:" >&5
14335cat conftest.$ac_ext >&5
14336ac_cv_member_struct_stat_st_rdev=no
14337fi
14338rm -f conftest.$ac_objext conftest.$ac_ext
14339fi
14340echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14341echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14342if test $ac_cv_member_struct_stat_st_rdev = yes; then
14343
14344cat >>confdefs.h <<_ACEOF
14345#define HAVE_STRUCT_STAT_ST_RDEV 1
14346_ACEOF
14347
14348
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014349fi
14350
Martin v. Löwis11437992002-04-12 09:54:03 +000014351echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14352echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14353if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014355else
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 cat >conftest.$ac_ext <<_ACEOF
14357#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014358#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014359$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014360#ifdef F77_DUMMY_MAIN
14361# ifdef __cplusplus
14362 extern "C"
14363# endif
14364 int F77_DUMMY_MAIN() { return 1; }
14365#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014366int
14367main ()
14368{
14369static struct stat ac_aggr;
14370if (ac_aggr.st_blksize)
14371return 0;
14372 ;
14373 return 0;
14374}
14375_ACEOF
14376rm -f conftest.$ac_objext
14377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14378 (eval $ac_compile) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); } &&
14382 { ac_try='test -s conftest.$ac_objext'
14383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14385 ac_status=$?
14386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14388 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014389else
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 echo "$as_me: failed program was:" >&5
14391cat conftest.$ac_ext >&5
14392ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014393fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014394rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014395fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014396echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14397echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14398if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400cat >>confdefs.h <<_ACEOF
14401#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14402_ACEOF
14403
14404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014405fi
14406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14408echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14409if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014411else
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 cat >conftest.$ac_ext <<_ACEOF
14413#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014414#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014415$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014416#ifdef F77_DUMMY_MAIN
14417# ifdef __cplusplus
14418 extern "C"
14419# endif
14420 int F77_DUMMY_MAIN() { return 1; }
14421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014422int
14423main ()
14424{
14425static struct stat ac_aggr;
14426if (ac_aggr.st_blocks)
14427return 0;
14428 ;
14429 return 0;
14430}
14431_ACEOF
14432rm -f conftest.$ac_objext
14433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14434 (eval $ac_compile) 2>&5
14435 ac_status=$?
14436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437 (exit $ac_status); } &&
14438 { ac_try='test -s conftest.$ac_objext'
14439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14440 (eval $ac_try) 2>&5
14441 ac_status=$?
14442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14443 (exit $ac_status); }; }; then
14444 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014445else
Martin v. Löwis11437992002-04-12 09:54:03 +000014446 echo "$as_me: failed program was:" >&5
14447cat conftest.$ac_ext >&5
14448ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014449fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014450rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014452echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
14453echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
14454if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014455
Martin v. Löwis11437992002-04-12 09:54:03 +000014456cat >>confdefs.h <<_ACEOF
14457#define HAVE_STRUCT_STAT_ST_BLOCKS 1
14458_ACEOF
14459
14460
14461cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014462#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014464
14465else
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014467fi
14468
Michael W. Hudson54241132001-12-07 15:38:26 +000014469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
14471echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
14472echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
14473if test "${ac_cv_header_time_altzone+set}" = set; then
14474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014475else
Martin v. Löwis11437992002-04-12 09:54:03 +000014476 cat >conftest.$ac_ext <<_ACEOF
14477#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014478#include "confdefs.h"
14479#include <time.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014480#ifdef F77_DUMMY_MAIN
14481# ifdef __cplusplus
14482 extern "C"
14483# endif
14484 int F77_DUMMY_MAIN() { return 1; }
14485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014486int
14487main ()
14488{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014489return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000014490 ;
14491 return 0;
14492}
14493_ACEOF
14494rm -f conftest.$ac_objext
14495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14496 (eval $ac_compile) 2>&5
14497 ac_status=$?
14498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14499 (exit $ac_status); } &&
14500 { ac_try='test -s conftest.$ac_objext'
14501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14502 (eval $ac_try) 2>&5
14503 ac_status=$?
14504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14505 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014506 ac_cv_header_time_altzone=yes
14507else
Martin v. Löwis11437992002-04-12 09:54:03 +000014508 echo "$as_me: failed program was:" >&5
14509cat conftest.$ac_ext >&5
14510ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000014511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014512rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014513fi
14514
Martin v. Löwis11437992002-04-12 09:54:03 +000014515echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
14516echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014517if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014518
14519cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014520#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014522
14523fi
14524
Guido van Rossumda88dad1995-01-26 00:46:29 +000014525was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014526echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
14527echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
14528cat >conftest.$ac_ext <<_ACEOF
14529#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014530#include "confdefs.h"
14531
14532#include <sys/types.h>
14533#include <sys/select.h>
14534#include <sys/time.h>
14535
Barry Warsawfe33b792003-01-07 22:42:49 +000014536#ifdef F77_DUMMY_MAIN
14537# ifdef __cplusplus
14538 extern "C"
14539# endif
14540 int F77_DUMMY_MAIN() { return 1; }
14541#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014542int
14543main ()
14544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545;
Martin v. Löwis11437992002-04-12 09:54:03 +000014546 ;
14547 return 0;
14548}
14549_ACEOF
14550rm -f conftest.$ac_objext
14551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14552 (eval $ac_compile) 2>&5
14553 ac_status=$?
14554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14555 (exit $ac_status); } &&
14556 { ac_try='test -s conftest.$ac_objext'
14557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14558 (eval $ac_try) 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); }; }; then
14562
14563
14564cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014565#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014566_ACEOF
14567
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014568 was_it_defined=yes
14569
Guido van Rossumf78abae1997-01-21 22:02:36 +000014570else
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 echo "$as_me: failed program was:" >&5
14572cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014573fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014574rm -f conftest.$ac_objext conftest.$ac_ext
14575echo "$as_me:$LINENO: result: $was_it_defined" >&5
14576echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000014577
Martin v. Löwis11437992002-04-12 09:54:03 +000014578echo "$as_me:$LINENO: checking for addrinfo" >&5
14579echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
14580if test "${ac_cv_struct_addrinfo+set}" = set; then
14581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 cat >conftest.$ac_ext <<_ACEOF
14584#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014585#include "confdefs.h"
14586
14587# include <netdb.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014588#ifdef F77_DUMMY_MAIN
14589# ifdef __cplusplus
14590 extern "C"
14591# endif
14592 int F77_DUMMY_MAIN() { return 1; }
14593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014594int
14595main ()
14596{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014597struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 ;
14599 return 0;
14600}
14601_ACEOF
14602rm -f conftest.$ac_objext
14603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14604 (eval $ac_compile) 2>&5
14605 ac_status=$?
14606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607 (exit $ac_status); } &&
14608 { ac_try='test -s conftest.$ac_objext'
14609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14610 (eval $ac_try) 2>&5
14611 ac_status=$?
14612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014614 ac_cv_struct_addrinfo=yes
14615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 echo "$as_me: failed program was:" >&5
14617cat conftest.$ac_ext >&5
14618ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014619fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014620rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014621fi
14622
Martin v. Löwis11437992002-04-12 09:54:03 +000014623echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
14624echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014625if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
14627cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014628#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014629_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014630
14631fi
14632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
14634echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
14635if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
14636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014637else
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 cat >conftest.$ac_ext <<_ACEOF
14639#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014640#include "confdefs.h"
14641
14642# include <sys/types.h>
14643# include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000014644#ifdef F77_DUMMY_MAIN
14645# ifdef __cplusplus
14646 extern "C"
14647# endif
14648 int F77_DUMMY_MAIN() { return 1; }
14649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014650int
14651main ()
14652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014653struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000014654 ;
14655 return 0;
14656}
14657_ACEOF
14658rm -f conftest.$ac_objext
14659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14660 (eval $ac_compile) 2>&5
14661 ac_status=$?
14662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14663 (exit $ac_status); } &&
14664 { ac_try='test -s conftest.$ac_objext'
14665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14666 (eval $ac_try) 2>&5
14667 ac_status=$?
14668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14669 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014670 ac_cv_struct_sockaddr_storage=yes
14671else
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 echo "$as_me: failed program was:" >&5
14673cat conftest.$ac_ext >&5
14674ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014676rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014677fi
14678
Martin v. Löwis11437992002-04-12 09:54:03 +000014679echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
14680echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014681if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014682
14683cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014684#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014686
14687fi
14688
Guido van Rossum627b2d71993-12-24 10:39:16 +000014689# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000014690
Michael W. Hudson54241132001-12-07 15:38:26 +000014691
Martin v. Löwis11437992002-04-12 09:54:03 +000014692echo "$as_me:$LINENO: checking whether char is unsigned" >&5
14693echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
14694if test "${ac_cv_c_char_unsigned+set}" = set; then
14695 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000014696else
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 cat >conftest.$ac_ext <<_ACEOF
14698#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000014699#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014700$ac_includes_default
Barry Warsawfe33b792003-01-07 22:42:49 +000014701#ifdef F77_DUMMY_MAIN
14702# ifdef __cplusplus
14703 extern "C"
14704# endif
14705 int F77_DUMMY_MAIN() { return 1; }
14706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014707int
14708main ()
14709{
14710static int test_array [1 - 2 * !(((char) -1) < 0)];
14711test_array [0] = 0
14712
14713 ;
14714 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000014715}
Martin v. Löwis11437992002-04-12 09:54:03 +000014716_ACEOF
14717rm -f conftest.$ac_objext
14718if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14719 (eval $ac_compile) 2>&5
14720 ac_status=$?
14721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14722 (exit $ac_status); } &&
14723 { ac_try='test -s conftest.$ac_objext'
14724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14725 (eval $ac_try) 2>&5
14726 ac_status=$?
14727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000014729 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014730else
14731 echo "$as_me: failed program was:" >&5
14732cat conftest.$ac_ext >&5
14733ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014735rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014736fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014737echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
14738echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014739if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014741#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014742_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014743
14744fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000014745
Barry Warsawfe33b792003-01-07 22:42:49 +000014746echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
14747echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14748if test "${ac_cv_prog_cc_stdc+set}" = set; then
14749 echo $ECHO_N "(cached) $ECHO_C" >&6
14750else
14751 ac_cv_prog_cc_stdc=no
14752ac_save_CC=$CC
14753cat >conftest.$ac_ext <<_ACEOF
14754#line $LINENO "configure"
14755#include "confdefs.h"
14756#include <stdarg.h>
14757#include <stdio.h>
14758#include <sys/types.h>
14759#include <sys/stat.h>
14760/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
14761struct buf { int x; };
14762FILE * (*rcsopen) (struct buf *, struct stat *, int);
14763static char *e (p, i)
14764 char **p;
14765 int i;
14766{
14767 return p[i];
14768}
14769static char *f (char * (*g) (char **, int), char **p, ...)
14770{
14771 char *s;
14772 va_list v;
14773 va_start (v,p);
14774 s = g (p, va_arg (v,int));
14775 va_end (v);
14776 return s;
14777}
14778int test (int i, double x);
14779struct s1 {int (*f) (int a);};
14780struct s2 {int (*f) (double a);};
14781int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14782int argc;
14783char **argv;
14784#ifdef F77_DUMMY_MAIN
14785# ifdef __cplusplus
14786 extern "C"
14787# endif
14788 int F77_DUMMY_MAIN() { return 1; }
14789#endif
14790int
14791main ()
14792{
14793return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
14794 ;
14795 return 0;
14796}
14797_ACEOF
14798# Don't try gcc -ansi; that turns off useful extensions and
14799# breaks some systems' header files.
14800# AIX -qlanglvl=ansi
14801# Ultrix and OSF/1 -std1
14802# HP-UX 10.20 and later -Ae
14803# HP-UX older versions -Aa -D_HPUX_SOURCE
14804# SVR4 -Xc -D__EXTENSIONS__
14805for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14806do
14807 CC="$ac_save_CC $ac_arg"
14808 rm -f conftest.$ac_objext
14809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14810 (eval $ac_compile) 2>&5
14811 ac_status=$?
14812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14813 (exit $ac_status); } &&
14814 { ac_try='test -s conftest.$ac_objext'
14815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14816 (eval $ac_try) 2>&5
14817 ac_status=$?
14818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14819 (exit $ac_status); }; }; then
14820 ac_cv_prog_cc_stdc=$ac_arg
14821break
14822else
14823 echo "$as_me: failed program was:" >&5
14824cat conftest.$ac_ext >&5
14825fi
14826rm -f conftest.$ac_objext
14827done
14828rm -f conftest.$ac_ext conftest.$ac_objext
14829CC=$ac_save_CC
14830
14831fi
14832
14833case "x$ac_cv_prog_cc_stdc" in
14834 x|xno)
14835 echo "$as_me:$LINENO: result: none needed" >&5
14836echo "${ECHO_T}none needed" >&6 ;;
14837 *)
14838 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
14839echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14840 CC="$CC $ac_cv_prog_cc_stdc" ;;
14841esac
14842
Martin v. Löwis11437992002-04-12 09:54:03 +000014843echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
14844echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14845if test "${ac_cv_c_const+set}" = set; then
14846 echo $ECHO_N "(cached) $ECHO_C" >&6
14847else
14848 cat >conftest.$ac_ext <<_ACEOF
14849#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014850#include "confdefs.h"
14851
Barry Warsawfe33b792003-01-07 22:42:49 +000014852#ifdef F77_DUMMY_MAIN
14853# ifdef __cplusplus
14854 extern "C"
14855# endif
14856 int F77_DUMMY_MAIN() { return 1; }
14857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014858int
14859main ()
14860{
14861/* FIXME: Include the comments suggested by Paul. */
14862#ifndef __cplusplus
14863 /* Ultrix mips cc rejects this. */
14864 typedef int charset[2];
14865 const charset x;
14866 /* SunOS 4.1.1 cc rejects this. */
14867 char const *const *ccp;
14868 char **p;
14869 /* NEC SVR4.0.2 mips cc rejects this. */
14870 struct point {int x, y;};
14871 static struct point const zero = {0,0};
14872 /* AIX XL C 1.02.0.0 rejects this.
14873 It does not let you subtract one const X* pointer from another in
14874 an arm of an if-expression whose if-part is not a constant
14875 expression */
14876 const char *g = "string";
14877 ccp = &g + (g ? g-g : 0);
14878 /* HPUX 7.0 cc rejects these. */
14879 ++ccp;
14880 p = (char**) ccp;
14881 ccp = (char const *const *) p;
14882 { /* SCO 3.2v4 cc rejects this. */
14883 char *t;
14884 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014885
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 *t++ = 0;
14887 }
14888 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
14889 int x[] = {25, 17};
14890 const int *foo = &x[0];
14891 ++foo;
14892 }
14893 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14894 typedef const int *iptr;
14895 iptr p = 0;
14896 ++p;
14897 }
14898 { /* AIX XL C 1.02.0.0 rejects this saying
14899 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14900 struct s { int j; const int *ap[3]; };
14901 struct s *b; b->j = 5;
14902 }
14903 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14904 const int foo = 10;
14905 }
14906#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000014907
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 ;
14909 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000014910}
Martin v. Löwis11437992002-04-12 09:54:03 +000014911_ACEOF
14912rm -f conftest.$ac_objext
14913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14914 (eval $ac_compile) 2>&5
14915 ac_status=$?
14916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14917 (exit $ac_status); } &&
14918 { ac_try='test -s conftest.$ac_objext'
14919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14920 (eval $ac_try) 2>&5
14921 ac_status=$?
14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14923 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014924 ac_cv_c_const=yes
14925else
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me: failed program was:" >&5
14927cat conftest.$ac_ext >&5
14928ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014930rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014931fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014932echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
14933echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014934if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014935
14936cat >>confdefs.h <<\_ACEOF
14937#define const
14938_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014939
14940fi
14941
Michael W. Hudson54241132001-12-07 15:38:26 +000014942
Guido van Rossumda88dad1995-01-26 00:46:29 +000014943works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014944echo "$as_me:$LINENO: checking for working volatile" >&5
14945echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
14946cat >conftest.$ac_ext <<_ACEOF
14947#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948#include "confdefs.h"
14949
Barry Warsawfe33b792003-01-07 22:42:49 +000014950#ifdef F77_DUMMY_MAIN
14951# ifdef __cplusplus
14952 extern "C"
14953# endif
14954 int F77_DUMMY_MAIN() { return 1; }
14955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014956int
14957main ()
14958{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext
14965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14966 (eval $ac_compile) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); } &&
14970 { ac_try='test -s conftest.$ac_objext'
14971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000014976 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 echo "$as_me: failed program was:" >&5
14979cat conftest.$ac_ext >&5
14980
14981cat >>confdefs.h <<\_ACEOF
14982#define volatile
14983_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014984
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014985
Guido van Rossum627b2d71993-12-24 10:39:16 +000014986fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014987rm -f conftest.$ac_objext conftest.$ac_ext
14988echo "$as_me:$LINENO: result: $works" >&5
14989echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000014990
Guido van Rossumda88dad1995-01-26 00:46:29 +000014991works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014992echo "$as_me:$LINENO: checking for working signed char" >&5
14993echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
14994cat >conftest.$ac_ext <<_ACEOF
14995#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000014996#include "confdefs.h"
14997
Barry Warsawfe33b792003-01-07 22:42:49 +000014998#ifdef F77_DUMMY_MAIN
14999# ifdef __cplusplus
15000 extern "C"
15001# endif
15002 int F77_DUMMY_MAIN() { return 1; }
15003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015004int
15005main ()
15006{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015007signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ;
15009 return 0;
15010}
15011_ACEOF
15012rm -f conftest.$ac_objext
15013if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15014 (eval $ac_compile) 2>&5
15015 ac_status=$?
15016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15017 (exit $ac_status); } &&
15018 { ac_try='test -s conftest.$ac_objext'
15019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15020 (eval $ac_try) 2>&5
15021 ac_status=$?
15022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15023 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015024 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015025else
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 echo "$as_me: failed program was:" >&5
15027cat conftest.$ac_ext >&5
15028
15029cat >>confdefs.h <<\_ACEOF
15030#define signed
15031_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015032
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015033
Guido van Rossum7f43da71994-08-01 12:15:30 +000015034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015035rm -f conftest.$ac_objext conftest.$ac_ext
15036echo "$as_me:$LINENO: result: $works" >&5
15037echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015038
Guido van Rossumda88dad1995-01-26 00:46:29 +000015039have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015040echo "$as_me:$LINENO: checking for prototypes" >&5
15041echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15042cat >conftest.$ac_ext <<_ACEOF
15043#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015044#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015045int foo(int x) { return 0; }
Barry Warsawfe33b792003-01-07 22:42:49 +000015046#ifdef F77_DUMMY_MAIN
15047# ifdef __cplusplus
15048 extern "C"
15049# endif
15050 int F77_DUMMY_MAIN() { return 1; }
15051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015052int
15053main ()
15054{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015056 ;
15057 return 0;
15058}
15059_ACEOF
15060rm -f conftest.$ac_objext
15061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15062 (eval $ac_compile) 2>&5
15063 ac_status=$?
15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15065 (exit $ac_status); } &&
15066 { ac_try='test -s conftest.$ac_objext'
15067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15068 (eval $ac_try) 2>&5
15069 ac_status=$?
15070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15071 (exit $ac_status); }; }; then
15072
15073
15074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015076_ACEOF
15077
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015078 have_prototypes=yes
15079
Guido van Rossumf78abae1997-01-21 22:02:36 +000015080else
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 echo "$as_me: failed program was:" >&5
15082cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000015083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015084rm -f conftest.$ac_objext conftest.$ac_ext
15085echo "$as_me:$LINENO: result: $have_prototypes" >&5
15086echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015087
Guido van Rossumda88dad1995-01-26 00:46:29 +000015088works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015089echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15090echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15091cat >conftest.$ac_ext <<_ACEOF
15092#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015093#include "confdefs.h"
15094
15095#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015096int foo(int x, ...) {
15097 va_list va;
15098 va_start(va, x);
15099 va_arg(va, int);
15100 va_arg(va, char *);
15101 va_arg(va, double);
15102 return 0;
15103}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015104
Barry Warsawfe33b792003-01-07 22:42:49 +000015105#ifdef F77_DUMMY_MAIN
15106# ifdef __cplusplus
15107 extern "C"
15108# endif
15109 int F77_DUMMY_MAIN() { return 1; }
15110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015111int
15112main ()
15113{
Guido van Rossum90eea071996-08-30 20:58:57 +000015114return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 ;
15116 return 0;
15117}
15118_ACEOF
15119rm -f conftest.$ac_objext
15120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15121 (eval $ac_compile) 2>&5
15122 ac_status=$?
15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15124 (exit $ac_status); } &&
15125 { ac_try='test -s conftest.$ac_objext'
15126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15127 (eval $ac_try) 2>&5
15128 ac_status=$?
15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130 (exit $ac_status); }; }; then
15131
15132
15133cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015134#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015135_ACEOF
15136
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015137 works=yes
15138
Guido van Rossumf78abae1997-01-21 22:02:36 +000015139else
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 echo "$as_me: failed program was:" >&5
15141cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000015142fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015143rm -f conftest.$ac_objext conftest.$ac_ext
15144echo "$as_me:$LINENO: result: $works" >&5
15145echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146
Guido van Rossumda88dad1995-01-26 00:46:29 +000015147if test "$have_prototypes" = yes; then
15148bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015149echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
15150echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
15151cat >conftest.$ac_ext <<_ACEOF
15152#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015153#include "confdefs.h"
15154#include <unistd.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015155#ifdef F77_DUMMY_MAIN
15156# ifdef __cplusplus
15157 extern "C"
15158# endif
15159 int F77_DUMMY_MAIN() { return 1; }
15160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015161int
15162main ()
15163{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015164char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ;
15166 return 0;
15167}
15168_ACEOF
15169rm -f conftest.$ac_objext
15170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15171 (eval $ac_compile) 2>&5
15172 ac_status=$?
15173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15174 (exit $ac_status); } &&
15175 { ac_try='test -s conftest.$ac_objext'
15176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15177 (eval $ac_try) 2>&5
15178 ac_status=$?
15179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15180 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015181 :
15182else
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 echo "$as_me: failed program was:" >&5
15184cat conftest.$ac_ext >&5
15185
15186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015187#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015188_ACEOF
15189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015190 bad_prototypes=yes
15191
Guido van Rossum627b2d71993-12-24 10:39:16 +000015192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015193rm -f conftest.$ac_objext conftest.$ac_ext
15194echo "$as_me:$LINENO: result: $bad_prototypes" >&5
15195echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015196fi
15197
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015198# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015199echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15200echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15201cat >conftest.$ac_ext <<_ACEOF
15202#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015203#include "confdefs.h"
15204#include <sys/types.h>
15205#include <sys/socket.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000015206#ifdef F77_DUMMY_MAIN
15207# ifdef __cplusplus
15208 extern "C"
15209# endif
15210 int F77_DUMMY_MAIN() { return 1; }
15211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015212int
15213main ()
15214{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015215struct sockaddr x;
15216x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 ;
15218 return 0;
15219}
15220_ACEOF
15221rm -f conftest.$ac_objext
15222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15223 (eval $ac_compile) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); } &&
15227 { ac_try='test -s conftest.$ac_objext'
15228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15229 (eval $ac_try) 2>&5
15230 ac_status=$?
15231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15232 (exit $ac_status); }; }; then
15233 echo "$as_me:$LINENO: result: yes" >&5
15234echo "${ECHO_T}yes" >&6
15235
15236cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015237#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015238_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015239
15240else
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 echo "$as_me: failed program was:" >&5
15242cat conftest.$ac_ext >&5
15243echo "$as_me:$LINENO: result: no" >&5
15244echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015246rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015247
Guido van Rossumda88dad1995-01-26 00:46:29 +000015248va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015249echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15250echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15251cat >conftest.$ac_ext <<_ACEOF
15252#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015253#include "confdefs.h"
15254
15255#ifdef HAVE_STDARG_PROTOTYPES
15256#include <stdarg.h>
15257#else
15258#include <varargs.h>
15259#endif
15260
Barry Warsawfe33b792003-01-07 22:42:49 +000015261#ifdef F77_DUMMY_MAIN
15262# ifdef __cplusplus
15263 extern "C"
15264# endif
15265 int F77_DUMMY_MAIN() { return 1; }
15266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015267int
15268main ()
15269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015270va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ;
15272 return 0;
15273}
15274_ACEOF
15275rm -f conftest.$ac_objext
15276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15277 (eval $ac_compile) 2>&5
15278 ac_status=$?
15279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280 (exit $ac_status); } &&
15281 { ac_try='test -s conftest.$ac_objext'
15282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15283 (eval $ac_try) 2>&5
15284 ac_status=$?
15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015287 :
15288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 echo "$as_me: failed program was:" >&5
15290cat conftest.$ac_ext >&5
15291
15292
15293cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015294#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015295_ACEOF
15296
Guido van Rossumda88dad1995-01-26 00:46:29 +000015297 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015300rm -f conftest.$ac_objext conftest.$ac_ext
15301echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15302echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015304# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015305
15306
15307
15308echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15309echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15310if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015312else
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 cat >conftest.$ac_ext <<_ACEOF
15314#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015315#include "confdefs.h"
15316/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015318#include <assert.h>
15319/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015320#ifdef __cplusplus
15321extern "C"
15322#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015323/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015324 builtin and then its argument prototype would still apply. */
15325char gethostbyname_r ();
15326char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015327
Barry Warsawfe33b792003-01-07 22:42:49 +000015328#ifdef F77_DUMMY_MAIN
15329# ifdef __cplusplus
15330 extern "C"
15331# endif
15332 int F77_DUMMY_MAIN() { return 1; }
15333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015334int
15335main ()
15336{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015337/* The GNU C library defines this for functions which it implements
15338 to always fail with ENOSYS. Some functions are actually named
15339 something starting with __ and the normal name is an alias. */
15340#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15341choke me
15342#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015344#endif
15345
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 ;
15347 return 0;
15348}
15349_ACEOF
15350rm -f conftest.$ac_objext conftest$ac_exeext
15351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15352 (eval $ac_link) 2>&5
15353 ac_status=$?
15354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15355 (exit $ac_status); } &&
15356 { ac_try='test -s conftest$ac_exeext'
15357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15358 (eval $ac_try) 2>&5
15359 ac_status=$?
15360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15361 (exit $ac_status); }; }; then
15362 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015363else
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 echo "$as_me: failed program was:" >&5
15365cat conftest.$ac_ext >&5
15366ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015367fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015368rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015370echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15371echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15372if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015373
Martin v. Löwis11437992002-04-12 09:54:03 +000015374 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015375#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015376_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015377
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15379echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015380 OLD_CFLAGS=$CFLAGS
15381 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015382 cat >conftest.$ac_ext <<_ACEOF
15383#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015384#include "confdefs.h"
15385
15386# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Barry Warsawfe33b792003-01-07 22:42:49 +000015388#ifdef F77_DUMMY_MAIN
15389# ifdef __cplusplus
15390 extern "C"
15391# endif
15392 int F77_DUMMY_MAIN() { return 1; }
15393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015394int
15395main ()
15396{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015397
15398 char *name;
15399 struct hostent *he, *res;
15400 char buffer[2048];
15401 int buflen = 2048;
15402 int h_errnop;
15403
15404 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015405
15406 ;
15407 return 0;
15408}
15409_ACEOF
15410rm -f conftest.$ac_objext
15411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15412 (eval $ac_compile) 2>&5
15413 ac_status=$?
15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415 (exit $ac_status); } &&
15416 { ac_try='test -s conftest.$ac_objext'
15417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15418 (eval $ac_try) 2>&5
15419 ac_status=$?
15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15421 (exit $ac_status); }; }; then
15422
15423 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015424#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015425_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015426
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
15428cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015429#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015430_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015431
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 echo "$as_me:$LINENO: result: yes" >&5
15433echo "${ECHO_T}yes" >&6
15434
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015435else
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 echo "$as_me: failed program was:" >&5
15437cat conftest.$ac_ext >&5
15438
15439 echo "$as_me:$LINENO: result: no" >&5
15440echo "${ECHO_T}no" >&6
15441 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15442echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15443 cat >conftest.$ac_ext <<_ACEOF
15444#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015445#include "confdefs.h"
15446
15447# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015448
Barry Warsawfe33b792003-01-07 22:42:49 +000015449#ifdef F77_DUMMY_MAIN
15450# ifdef __cplusplus
15451 extern "C"
15452# endif
15453 int F77_DUMMY_MAIN() { return 1; }
15454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015455int
15456main ()
15457{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015458
15459 char *name;
15460 struct hostent *he;
15461 char buffer[2048];
15462 int buflen = 2048;
15463 int h_errnop;
15464
15465 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015466
15467 ;
15468 return 0;
15469}
15470_ACEOF
15471rm -f conftest.$ac_objext
15472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15473 (eval $ac_compile) 2>&5
15474 ac_status=$?
15475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); } &&
15477 { ac_try='test -s conftest.$ac_objext'
15478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15479 (eval $ac_try) 2>&5
15480 ac_status=$?
15481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15482 (exit $ac_status); }; }; then
15483
15484 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015485#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015486_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015487
Martin v. Löwis11437992002-04-12 09:54:03 +000015488
15489cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015490#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015491_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015492
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 echo "$as_me:$LINENO: result: yes" >&5
15494echo "${ECHO_T}yes" >&6
15495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015496else
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 echo "$as_me: failed program was:" >&5
15498cat conftest.$ac_ext >&5
15499
15500 echo "$as_me:$LINENO: result: no" >&5
15501echo "${ECHO_T}no" >&6
15502 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15503echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15504 cat >conftest.$ac_ext <<_ACEOF
15505#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015506#include "confdefs.h"
15507
15508# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Barry Warsawfe33b792003-01-07 22:42:49 +000015510#ifdef F77_DUMMY_MAIN
15511# ifdef __cplusplus
15512 extern "C"
15513# endif
15514 int F77_DUMMY_MAIN() { return 1; }
15515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015516int
15517main ()
15518{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015519
15520 char *name;
15521 struct hostent *he;
15522 struct hostent_data data;
15523
15524 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
15526 ;
15527 return 0;
15528}
15529_ACEOF
15530rm -f conftest.$ac_objext
15531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15532 (eval $ac_compile) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); } &&
15536 { ac_try='test -s conftest.$ac_objext'
15537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15538 (eval $ac_try) 2>&5
15539 ac_status=$?
15540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15541 (exit $ac_status); }; }; then
15542
15543 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015544#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015546
Martin v. Löwis11437992002-04-12 09:54:03 +000015547
15548cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015549#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015550_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 echo "$as_me:$LINENO: result: yes" >&5
15553echo "${ECHO_T}yes" >&6
15554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015555else
Martin v. Löwis11437992002-04-12 09:54:03 +000015556 echo "$as_me: failed program was:" >&5
15557cat conftest.$ac_ext >&5
15558
15559 echo "$as_me:$LINENO: result: no" >&5
15560echo "${ECHO_T}no" >&6
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
15564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015566rm -f conftest.$ac_objext conftest.$ac_ext
15567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015568fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015569rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015570 CFLAGS=$OLD_CFLAGS
15571
15572else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015573
Martin v. Löwis11437992002-04-12 09:54:03 +000015574
15575for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015576do
Martin v. Löwis11437992002-04-12 09:54:03 +000015577as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15578echo "$as_me:$LINENO: checking for $ac_func" >&5
15579echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15580if eval "test \"\${$as_ac_var+set}\" = set"; then
15581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015582else
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 cat >conftest.$ac_ext <<_ACEOF
15584#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015585#include "confdefs.h"
15586/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015588#include <assert.h>
15589/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015590#ifdef __cplusplus
15591extern "C"
15592#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015593/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015594 builtin and then its argument prototype would still apply. */
15595char $ac_func ();
15596char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015597
Barry Warsawfe33b792003-01-07 22:42:49 +000015598#ifdef F77_DUMMY_MAIN
15599# ifdef __cplusplus
15600 extern "C"
15601# endif
15602 int F77_DUMMY_MAIN() { return 1; }
15603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015604int
15605main ()
15606{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015607/* The GNU C library defines this for functions which it implements
15608 to always fail with ENOSYS. Some functions are actually named
15609 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015610#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015611choke me
15612#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015613f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015614#endif
15615
Martin v. Löwis11437992002-04-12 09:54:03 +000015616 ;
15617 return 0;
15618}
15619_ACEOF
15620rm -f conftest.$ac_objext conftest$ac_exeext
15621if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15622 (eval $ac_link) 2>&5
15623 ac_status=$?
15624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15625 (exit $ac_status); } &&
15626 { ac_try='test -s conftest$ac_exeext'
15627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15628 (eval $ac_try) 2>&5
15629 ac_status=$?
15630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); }; }; then
15632 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015633else
Martin v. Löwis11437992002-04-12 09:54:03 +000015634 echo "$as_me: failed program was:" >&5
15635cat conftest.$ac_ext >&5
15636eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015637fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015638rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015639fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015640echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15641echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15642if test `eval echo '${'$as_ac_var'}'` = yes; then
15643 cat >>confdefs.h <<_ACEOF
15644#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15645_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015646
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015647fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015648done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015649
Michael W. Hudson54241132001-12-07 15:38:26 +000015650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015651fi
15652
Michael W. Hudson54241132001-12-07 15:38:26 +000015653
15654
15655
15656
15657
15658
Guido van Rossum627b2d71993-12-24 10:39:16 +000015659# checks for system services
15660# (none yet)
15661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015662# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000015663echo "$as_me:$LINENO: checking for __fpu_control" >&5
15664echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
15665if test "${ac_cv_func___fpu_control+set}" = set; then
15666 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015667else
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 cat >conftest.$ac_ext <<_ACEOF
15669#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015670#include "confdefs.h"
15671/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015673#include <assert.h>
15674/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015675#ifdef __cplusplus
15676extern "C"
15677#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015678/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 builtin and then its argument prototype would still apply. */
15680char __fpu_control ();
15681char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015682
Barry Warsawfe33b792003-01-07 22:42:49 +000015683#ifdef F77_DUMMY_MAIN
15684# ifdef __cplusplus
15685 extern "C"
15686# endif
15687 int F77_DUMMY_MAIN() { return 1; }
15688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015689int
15690main ()
15691{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015692/* The GNU C library defines this for functions which it implements
15693 to always fail with ENOSYS. Some functions are actually named
15694 something starting with __ and the normal name is an alias. */
15695#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
15696choke me
15697#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015698f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015699#endif
15700
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 ;
15702 return 0;
15703}
15704_ACEOF
15705rm -f conftest.$ac_objext conftest$ac_exeext
15706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15707 (eval $ac_link) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); } &&
15711 { ac_try='test -s conftest$ac_exeext'
15712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15713 (eval $ac_try) 2>&5
15714 ac_status=$?
15715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); }; }; then
15717 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015718else
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 echo "$as_me: failed program was:" >&5
15720cat conftest.$ac_ext >&5
15721ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015722fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015723rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015724fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015725echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
15726echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
15727if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015728 :
15729else
Martin v. Löwis11437992002-04-12 09:54:03 +000015730
15731echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
15732echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
15733if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
15734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015735else
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015737LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015738cat >conftest.$ac_ext <<_ACEOF
15739#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000015740#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015741
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015742/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015743#ifdef __cplusplus
15744extern "C"
15745#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015746/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 builtin and then its argument prototype would still apply. */
15748char __fpu_control ();
Barry Warsawfe33b792003-01-07 22:42:49 +000015749#ifdef F77_DUMMY_MAIN
15750# ifdef __cplusplus
15751 extern "C"
15752# endif
15753 int F77_DUMMY_MAIN() { return 1; }
15754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015755int
15756main ()
15757{
15758__fpu_control ();
15759 ;
15760 return 0;
15761}
15762_ACEOF
15763rm -f conftest.$ac_objext conftest$ac_exeext
15764if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15765 (eval $ac_link) 2>&5
15766 ac_status=$?
15767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768 (exit $ac_status); } &&
15769 { ac_try='test -s conftest$ac_exeext'
15770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15771 (eval $ac_try) 2>&5
15772 ac_status=$?
15773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774 (exit $ac_status); }; }; then
15775 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015776else
Martin v. Löwis11437992002-04-12 09:54:03 +000015777 echo "$as_me: failed program was:" >&5
15778cat conftest.$ac_ext >&5
15779ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015784echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
15785echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
15786if test $ac_cv_lib_ieee___fpu_control = yes; then
15787 cat >>confdefs.h <<_ACEOF
15788#define HAVE_LIBIEEE 1
15789_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015791 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015792
Guido van Rossum627b2d71993-12-24 10:39:16 +000015793fi
15794
Michael W. Hudson54241132001-12-07 15:38:26 +000015795
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000015796fi
15797
Michael W. Hudson54241132001-12-07 15:38:26 +000015798
Guido van Rossum7f253911997-05-09 02:42:48 +000015799# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000015800echo "$as_me:$LINENO: checking for --with-fpectl" >&5
15801echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
15802
Guido van Rossum7f253911997-05-09 02:42:48 +000015803# Check whether --with-fpectl or --without-fpectl was given.
15804if test "${with_fpectl+set}" = set; then
15805 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000015806
Guido van Rossum7f253911997-05-09 02:42:48 +000015807if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015808then
15809
15810cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000015811#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015812_ACEOF
15813
15814 echo "$as_me:$LINENO: result: yes" >&5
15815echo "${ECHO_T}yes" >&6
15816else echo "$as_me:$LINENO: result: no" >&5
15817echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015818fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015819else
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 echo "$as_me:$LINENO: result: no" >&5
15821echo "${ECHO_T}no" >&6
15822fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000015823
Guido van Rossum7f43da71994-08-01 12:15:30 +000015824# check for --with-libm=...
15825
Guido van Rossum563e7081996-09-10 18:20:48 +000015826case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000015827Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015828BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000015829*) LIBM=-lm
15830esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015831echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
15832echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
15833
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015834# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015835if test "${with_libm+set}" = set; then
15836 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
Guido van Rossum7f253911997-05-09 02:42:48 +000015838if test "$withval" = no
15839then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 echo "$as_me:$LINENO: result: force LIBM empty" >&5
15841echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015842elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015843then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
15845echo "${ECHO_T}set LIBM=\"$withval\"" >&6
15846else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
15847echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
15848 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015849fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015850else
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
15852echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
15853fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015854
15855# check for --with-libc=...
15856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
15858echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
15859
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015861if test "${with_libc+set}" = set; then
15862 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000015863
Guido van Rossum7f253911997-05-09 02:42:48 +000015864if test "$withval" = no
15865then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 echo "$as_me:$LINENO: result: force LIBC empty" >&5
15867echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000015868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000015869then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
15871echo "${ECHO_T}set LIBC=\"$withval\"" >&6
15872else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
15873echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
15874 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000015875fi
Guido van Rossum7f253911997-05-09 02:42:48 +000015876else
Martin v. Löwis11437992002-04-12 09:54:03 +000015877 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
15878echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
15879fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015880
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015881# check for hypot() in math library
15882LIBS_SAVE=$LIBS
15883LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000015884
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015885for ac_func in hypot
15886do
Martin v. Löwis11437992002-04-12 09:54:03 +000015887as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15888echo "$as_me:$LINENO: checking for $ac_func" >&5
15889echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15890if eval "test \"\${$as_ac_var+set}\" = set"; then
15891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015892else
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 cat >conftest.$ac_ext <<_ACEOF
15894#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015895#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015896/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015898#include <assert.h>
15899/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015900#ifdef __cplusplus
15901extern "C"
15902#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015903/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015904 builtin and then its argument prototype would still apply. */
15905char $ac_func ();
15906char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015907
Barry Warsawfe33b792003-01-07 22:42:49 +000015908#ifdef F77_DUMMY_MAIN
15909# ifdef __cplusplus
15910 extern "C"
15911# endif
15912 int F77_DUMMY_MAIN() { return 1; }
15913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015914int
15915main ()
15916{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015917/* The GNU C library defines this for functions which it implements
15918 to always fail with ENOSYS. Some functions are actually named
15919 something starting with __ and the normal name is an alias. */
15920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15921choke me
15922#else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015924#endif
15925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926 ;
15927 return 0;
15928}
15929_ACEOF
15930rm -f conftest.$ac_objext conftest$ac_exeext
15931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15932 (eval $ac_link) 2>&5
15933 ac_status=$?
15934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935 (exit $ac_status); } &&
15936 { ac_try='test -s conftest$ac_exeext'
15937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15938 (eval $ac_try) 2>&5
15939 ac_status=$?
15940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); }; }; then
15942 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015943else
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 echo "$as_me: failed program was:" >&5
15945cat conftest.$ac_ext >&5
15946eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015949fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015950echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15951echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15952if test `eval echo '${'$as_ac_var'}'` = yes; then
15953 cat >>confdefs.h <<_ACEOF
15954#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15955_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015956
Michael W. Hudson54241132001-12-07 15:38:26 +000015957else
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015959fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000015960done
15961
Michael W. Hudson54241132001-12-07 15:38:26 +000015962
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000015963LIBS=$LIBS_SAVE
15964
Guido van Rossumef2255b2000-03-10 22:30:29 +000015965# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000015966if test "${ac_cv_header_wchar_h+set}" = set; then
15967 echo "$as_me:$LINENO: checking for wchar.h" >&5
15968echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
15969if test "${ac_cv_header_wchar_h+set}" = set; then
15970 echo $ECHO_N "(cached) $ECHO_C" >&6
15971fi
15972echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
15973echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015974else
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 # Is the header compilable?
15976echo "$as_me:$LINENO: checking wchar.h usability" >&5
15977echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
15978cat >conftest.$ac_ext <<_ACEOF
15979#line $LINENO "configure"
15980#include "confdefs.h"
15981$ac_includes_default
15982#include <wchar.h>
15983_ACEOF
15984rm -f conftest.$ac_objext
15985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15986 (eval $ac_compile) 2>&5
15987 ac_status=$?
15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15989 (exit $ac_status); } &&
15990 { ac_try='test -s conftest.$ac_objext'
15991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15992 (eval $ac_try) 2>&5
15993 ac_status=$?
15994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15995 (exit $ac_status); }; }; then
15996 ac_header_compiler=yes
15997else
15998 echo "$as_me: failed program was:" >&5
15999cat conftest.$ac_ext >&5
16000ac_header_compiler=no
16001fi
16002rm -f conftest.$ac_objext conftest.$ac_ext
16003echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16004echo "${ECHO_T}$ac_header_compiler" >&6
16005
16006# Is the header present?
16007echo "$as_me:$LINENO: checking wchar.h presence" >&5
16008echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16009cat >conftest.$ac_ext <<_ACEOF
16010#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016011#include "confdefs.h"
16012#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016013_ACEOF
16014if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16015 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16016 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016017 egrep -v '^ *\+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 rm -f conftest.er1
16019 cat conftest.err >&5
16020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16021 (exit $ac_status); } >/dev/null; then
16022 if test -s conftest.err; then
16023 ac_cpp_err=$ac_c_preproc_warn_flag
16024 else
16025 ac_cpp_err=
16026 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016027else
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 ac_cpp_err=yes
16029fi
16030if test -z "$ac_cpp_err"; then
16031 ac_header_preproc=yes
16032else
16033 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000016034 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016036fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016037rm -f conftest.err conftest.$ac_ext
16038echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16039echo "${ECHO_T}$ac_header_preproc" >&6
16040
16041# So? What about this header?
16042case $ac_header_compiler:$ac_header_preproc in
16043 yes:no )
16044 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16045echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16046 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16047echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16048 no:yes )
16049 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16050echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16051 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16052echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16053 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16054echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
16055esac
16056echo "$as_me:$LINENO: checking for wchar.h" >&5
16057echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16058if test "${ac_cv_header_wchar_h+set}" = set; then
16059 echo $ECHO_N "(cached) $ECHO_C" >&6
16060else
16061 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016063echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16064echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16065
16066fi
16067if test $ac_cv_header_wchar_h = yes; then
16068
16069
16070cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016071#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016072_ACEOF
16073
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016074 wchar_h="yes"
16075
Guido van Rossumef2255b2000-03-10 22:30:29 +000016076else
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016078
16079fi
16080
Michael W. Hudson54241132001-12-07 15:38:26 +000016081
Martin v. Löwis11437992002-04-12 09:54:03 +000016082
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016083# determine wchar_t size
16084if test "$wchar_h" = yes
16085then
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 echo "$as_me:$LINENO: checking for wchar_t" >&5
16087echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16088if test "${ac_cv_type_wchar_t+set}" = set; then
16089 echo $ECHO_N "(cached) $ECHO_C" >&6
16090else
16091 cat >conftest.$ac_ext <<_ACEOF
16092#line $LINENO "configure"
16093#include "confdefs.h"
16094#include <wchar.h>
16095
Barry Warsawfe33b792003-01-07 22:42:49 +000016096#ifdef F77_DUMMY_MAIN
16097# ifdef __cplusplus
16098 extern "C"
16099# endif
16100 int F77_DUMMY_MAIN() { return 1; }
16101#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016102int
16103main ()
16104{
16105if ((wchar_t *) 0)
16106 return 0;
16107if (sizeof (wchar_t))
16108 return 0;
16109 ;
16110 return 0;
16111}
16112_ACEOF
16113rm -f conftest.$ac_objext
16114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16115 (eval $ac_compile) 2>&5
16116 ac_status=$?
16117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118 (exit $ac_status); } &&
16119 { ac_try='test -s conftest.$ac_objext'
16120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16121 (eval $ac_try) 2>&5
16122 ac_status=$?
16123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16124 (exit $ac_status); }; }; then
16125 ac_cv_type_wchar_t=yes
16126else
16127 echo "$as_me: failed program was:" >&5
16128cat conftest.$ac_ext >&5
16129ac_cv_type_wchar_t=no
16130fi
16131rm -f conftest.$ac_objext conftest.$ac_ext
16132fi
16133echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16134echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16135
16136echo "$as_me:$LINENO: checking size of wchar_t" >&5
16137echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16138if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16139 echo $ECHO_N "(cached) $ECHO_C" >&6
16140else
16141 if test "$ac_cv_type_wchar_t" = yes; then
16142 # The cast to unsigned long works around a bug in the HP C Compiler
16143 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16144 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16145 # This bug is HP SR number 8606223364.
16146 if test "$cross_compiling" = yes; then
16147 # Depending upon the size, compute the lo and hi bounds.
16148cat >conftest.$ac_ext <<_ACEOF
16149#line $LINENO "configure"
16150#include "confdefs.h"
16151#include <wchar.h>
16152
Barry Warsawfe33b792003-01-07 22:42:49 +000016153#ifdef F77_DUMMY_MAIN
16154# ifdef __cplusplus
16155 extern "C"
16156# endif
16157 int F77_DUMMY_MAIN() { return 1; }
16158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016159int
16160main ()
16161{
16162static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16163test_array [0] = 0
16164
16165 ;
16166 return 0;
16167}
16168_ACEOF
16169rm -f conftest.$ac_objext
16170if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16171 (eval $ac_compile) 2>&5
16172 ac_status=$?
16173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16174 (exit $ac_status); } &&
16175 { ac_try='test -s conftest.$ac_objext'
16176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16177 (eval $ac_try) 2>&5
16178 ac_status=$?
16179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180 (exit $ac_status); }; }; then
16181 ac_lo=0 ac_mid=0
16182 while :; do
16183 cat >conftest.$ac_ext <<_ACEOF
16184#line $LINENO "configure"
16185#include "confdefs.h"
16186#include <wchar.h>
16187
Barry Warsawfe33b792003-01-07 22:42:49 +000016188#ifdef F77_DUMMY_MAIN
16189# ifdef __cplusplus
16190 extern "C"
16191# endif
16192 int F77_DUMMY_MAIN() { return 1; }
16193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016194int
16195main ()
16196{
16197static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16198test_array [0] = 0
16199
16200 ;
16201 return 0;
16202}
16203_ACEOF
16204rm -f conftest.$ac_objext
16205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16206 (eval $ac_compile) 2>&5
16207 ac_status=$?
16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16209 (exit $ac_status); } &&
16210 { ac_try='test -s conftest.$ac_objext'
16211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16212 (eval $ac_try) 2>&5
16213 ac_status=$?
16214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16215 (exit $ac_status); }; }; then
16216 ac_hi=$ac_mid; break
16217else
16218 echo "$as_me: failed program was:" >&5
16219cat conftest.$ac_ext >&5
16220ac_lo=`expr $ac_mid + 1`
16221 if test $ac_lo -le $ac_mid; then
16222 ac_lo= ac_hi=
16223 break
16224 fi
16225 ac_mid=`expr 2 '*' $ac_mid + 1`
16226fi
16227rm -f conftest.$ac_objext conftest.$ac_ext
16228 done
16229else
16230 echo "$as_me: failed program was:" >&5
16231cat conftest.$ac_ext >&5
16232cat >conftest.$ac_ext <<_ACEOF
16233#line $LINENO "configure"
16234#include "confdefs.h"
16235#include <wchar.h>
16236
Barry Warsawfe33b792003-01-07 22:42:49 +000016237#ifdef F77_DUMMY_MAIN
16238# ifdef __cplusplus
16239 extern "C"
16240# endif
16241 int F77_DUMMY_MAIN() { return 1; }
16242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016243int
16244main ()
16245{
16246static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16247test_array [0] = 0
16248
16249 ;
16250 return 0;
16251}
16252_ACEOF
16253rm -f conftest.$ac_objext
16254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16255 (eval $ac_compile) 2>&5
16256 ac_status=$?
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); } &&
16259 { ac_try='test -s conftest.$ac_objext'
16260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16261 (eval $ac_try) 2>&5
16262 ac_status=$?
16263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264 (exit $ac_status); }; }; then
16265 ac_hi=-1 ac_mid=-1
16266 while :; do
16267 cat >conftest.$ac_ext <<_ACEOF
16268#line $LINENO "configure"
16269#include "confdefs.h"
16270#include <wchar.h>
16271
Barry Warsawfe33b792003-01-07 22:42:49 +000016272#ifdef F77_DUMMY_MAIN
16273# ifdef __cplusplus
16274 extern "C"
16275# endif
16276 int F77_DUMMY_MAIN() { return 1; }
16277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016278int
16279main ()
16280{
16281static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16282test_array [0] = 0
16283
16284 ;
16285 return 0;
16286}
16287_ACEOF
16288rm -f conftest.$ac_objext
16289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16290 (eval $ac_compile) 2>&5
16291 ac_status=$?
16292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16293 (exit $ac_status); } &&
16294 { ac_try='test -s conftest.$ac_objext'
16295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16297 ac_status=$?
16298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16299 (exit $ac_status); }; }; then
16300 ac_lo=$ac_mid; break
16301else
16302 echo "$as_me: failed program was:" >&5
16303cat conftest.$ac_ext >&5
16304ac_hi=`expr '(' $ac_mid ')' - 1`
16305 if test $ac_mid -le $ac_hi; then
16306 ac_lo= ac_hi=
16307 break
16308 fi
16309 ac_mid=`expr 2 '*' $ac_mid`
16310fi
16311rm -f conftest.$ac_objext conftest.$ac_ext
16312 done
16313else
16314 echo "$as_me: failed program was:" >&5
16315cat conftest.$ac_ext >&5
16316ac_lo= ac_hi=
16317fi
16318rm -f conftest.$ac_objext conftest.$ac_ext
16319fi
16320rm -f conftest.$ac_objext conftest.$ac_ext
16321# Binary search between lo and hi bounds.
16322while test "x$ac_lo" != "x$ac_hi"; do
16323 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16324 cat >conftest.$ac_ext <<_ACEOF
16325#line $LINENO "configure"
16326#include "confdefs.h"
16327#include <wchar.h>
16328
Barry Warsawfe33b792003-01-07 22:42:49 +000016329#ifdef F77_DUMMY_MAIN
16330# ifdef __cplusplus
16331 extern "C"
16332# endif
16333 int F77_DUMMY_MAIN() { return 1; }
16334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016335int
16336main ()
16337{
16338static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16339test_array [0] = 0
16340
16341 ;
16342 return 0;
16343}
16344_ACEOF
16345rm -f conftest.$ac_objext
16346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16347 (eval $ac_compile) 2>&5
16348 ac_status=$?
16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350 (exit $ac_status); } &&
16351 { ac_try='test -s conftest.$ac_objext'
16352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16353 (eval $ac_try) 2>&5
16354 ac_status=$?
16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356 (exit $ac_status); }; }; then
16357 ac_hi=$ac_mid
16358else
16359 echo "$as_me: failed program was:" >&5
16360cat conftest.$ac_ext >&5
16361ac_lo=`expr '(' $ac_mid ')' + 1`
16362fi
16363rm -f conftest.$ac_objext conftest.$ac_ext
16364done
16365case $ac_lo in
16366?*) ac_cv_sizeof_wchar_t=$ac_lo;;
16367'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16368echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16369 { (exit 1); exit 1; }; } ;;
16370esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016371else
16372 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016373 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16374echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16375 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016376else
Martin v. Löwis11437992002-04-12 09:54:03 +000016377 cat >conftest.$ac_ext <<_ACEOF
16378#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016379#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016380#include <wchar.h>
16381
16382long longval () { return (long) (sizeof (wchar_t)); }
16383unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016384#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016385#include <stdlib.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016386#ifdef F77_DUMMY_MAIN
16387# ifdef __cplusplus
16388 extern "C"
16389# endif
16390 int F77_DUMMY_MAIN() { return 1; }
16391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016392int
16393main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016394{
Martin v. Löwis11437992002-04-12 09:54:03 +000016395
16396 FILE *f = fopen ("conftest.val", "w");
16397 if (! f)
16398 exit (1);
16399 if (((long) (sizeof (wchar_t))) < 0)
16400 {
16401 long i = longval ();
16402 if (i != ((long) (sizeof (wchar_t))))
16403 exit (1);
16404 fprintf (f, "%ld\n", i);
16405 }
16406 else
16407 {
16408 unsigned long i = ulongval ();
16409 if (i != ((long) (sizeof (wchar_t))))
16410 exit (1);
16411 fprintf (f, "%lu\n", i);
16412 }
16413 exit (ferror (f) || fclose (f) != 0);
16414
16415 ;
16416 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016417}
Martin v. Löwis11437992002-04-12 09:54:03 +000016418_ACEOF
16419rm -f conftest$ac_exeext
16420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16421 (eval $ac_link) 2>&5
16422 ac_status=$?
16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16426 (eval $ac_try) 2>&5
16427 ac_status=$?
16428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16429 (exit $ac_status); }; }; then
16430 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016431else
Martin v. Löwis11437992002-04-12 09:54:03 +000016432 echo "$as_me: program exited with status $ac_status" >&5
16433echo "$as_me: failed program was:" >&5
16434cat conftest.$ac_ext >&5
16435( exit $ac_status )
16436{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
16437echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
16438 { (exit 1); exit 1; }; }
16439fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016440rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016441fi
16442fi
16443rm -f conftest.val
16444else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016445 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016446fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016448echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16449echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16450cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016451#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016452_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016453
Michael W. Hudson54241132001-12-07 15:38:26 +000016454
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016455fi
16456
Martin v. Löwis11437992002-04-12 09:54:03 +000016457echo "$as_me:$LINENO: checking what type to use for unicode" >&5
16458echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016459# Check whether --enable-unicode or --disable-unicode was given.
16460if test "${enable_unicode+set}" = set; then
16461 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000016462
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016463else
16464 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000016465fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016466
16467if test $enable_unicode = yes
16468then
Martin v. Löwisfd917792001-06-27 20:22:04 +000016469 # Without any arguments, Py_UNICODE defaults to two-byte mode
16470 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016471fi
16472
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016473
16474
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016475case "$enable_unicode" in
16476ucs2) unicode_size="2"
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 2
Martin v. Löwis11437992002-04-12 09:54:03 +000016479_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016480
16481 ;;
16482ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000016483 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016484#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000016485_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016486
16487 ;;
16488esac
16489
Michael W. Hudson54241132001-12-07 15:38:26 +000016490
Martin v. Löwis11437992002-04-12 09:54:03 +000016491
16492
Martin v. Löwis0036cba2002-04-12 09:58:45 +000016493
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016494if test "$enable_unicode" = "no"
16495then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016496 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 echo "$as_me:$LINENO: result: not used" >&5
16498echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016499else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000016500 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000016501
16502cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016503#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016504_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016505
16506 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
16507 then
16508 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016509
Martin v. Löwis11437992002-04-12 09:54:03 +000016510cat >>confdefs.h <<\_ACEOF
16511#define HAVE_USABLE_WCHAR_T 1
16512_ACEOF
16513
16514 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016515#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016516_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016517
16518 elif test "$ac_cv_sizeof_short" = "$unicode_size"
16519 then
16520 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016522#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000016523_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016524
16525 elif test "$ac_cv_sizeof_long" = "$unicode_size"
16526 then
16527 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000016528 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016529#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000016530_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016531
16532 else
16533 PY_UNICODE_TYPE="no type found"
16534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
16536echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016537fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016538
16539# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000016540echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
16541echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
16542if test "${ac_cv_c_bigendian+set}" = set; then
16543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016544else
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 # See if sys/param.h defines the BYTE_ORDER macro.
16546cat >conftest.$ac_ext <<_ACEOF
16547#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016548#include "confdefs.h"
16549#include <sys/types.h>
16550#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016551
Barry Warsawfe33b792003-01-07 22:42:49 +000016552#ifdef F77_DUMMY_MAIN
16553# ifdef __cplusplus
16554 extern "C"
16555# endif
16556 int F77_DUMMY_MAIN() { return 1; }
16557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016558int
16559main ()
16560{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016561#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
16562 bogus endian macros
16563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016564
16565 ;
16566 return 0;
16567}
16568_ACEOF
16569rm -f conftest.$ac_objext
16570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16571 (eval $ac_compile) 2>&5
16572 ac_status=$?
16573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16574 (exit $ac_status); } &&
16575 { ac_try='test -s conftest.$ac_objext'
16576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16577 (eval $ac_try) 2>&5
16578 ac_status=$?
16579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16580 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016581 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000016582cat >conftest.$ac_ext <<_ACEOF
16583#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016584#include "confdefs.h"
16585#include <sys/types.h>
16586#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000016587
Barry Warsawfe33b792003-01-07 22:42:49 +000016588#ifdef F77_DUMMY_MAIN
16589# ifdef __cplusplus
16590 extern "C"
16591# endif
16592 int F77_DUMMY_MAIN() { return 1; }
16593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016594int
16595main ()
16596{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016597#if BYTE_ORDER != BIG_ENDIAN
16598 not big endian
16599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016600
16601 ;
16602 return 0;
16603}
16604_ACEOF
16605rm -f conftest.$ac_objext
16606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16607 (eval $ac_compile) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); } &&
16611 { ac_try='test -s conftest.$ac_objext'
16612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16613 (eval $ac_try) 2>&5
16614 ac_status=$?
16615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16616 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016617 ac_cv_c_bigendian=yes
16618else
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 echo "$as_me: failed program was:" >&5
16620cat conftest.$ac_ext >&5
16621ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016623rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016624else
Martin v. Löwis11437992002-04-12 09:54:03 +000016625 echo "$as_me: failed program was:" >&5
16626cat conftest.$ac_ext >&5
16627# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000016628if test "$cross_compiling" = yes; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016629 # try to guess the endianess by grep'ing values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000016630 ac_cv_c_bigendian=unknown
16631 cat >conftest.$ac_ext <<_ACEOF
16632#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016633#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16635short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16636void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
16637short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16638short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16639void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Barry Warsawfe33b792003-01-07 22:42:49 +000016640#ifdef F77_DUMMY_MAIN
16641# ifdef __cplusplus
16642 extern "C"
16643# endif
16644 int F77_DUMMY_MAIN() { return 1; }
16645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016646int
16647main ()
16648{
16649 _ascii (); _ebcdic ();
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654rm -f conftest.$ac_objext
16655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16656 (eval $ac_compile) 2>&5
16657 ac_status=$?
16658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16659 (exit $ac_status); } &&
16660 { ac_try='test -s conftest.$ac_objext'
16661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16662 (eval $ac_try) 2>&5
16663 ac_status=$?
16664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16665 (exit $ac_status); }; }; then
Barry Warsawfe33b792003-01-07 22:42:49 +000016666 if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 ac_cv_c_bigendian=yes
16668fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016669if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 if test "$ac_cv_c_bigendian" = unknown; then
16671 ac_cv_c_bigendian=no
16672 else
16673 # finding both strings is unlikely to happen, but who knows?
16674 ac_cv_c_bigendian=unknown
16675 fi
16676fi
16677else
16678 echo "$as_me: failed program was:" >&5
16679cat conftest.$ac_ext >&5
16680fi
16681rm -f conftest.$ac_objext conftest.$ac_ext
16682else
16683 cat >conftest.$ac_ext <<_ACEOF
16684#line $LINENO "configure"
16685#include "confdefs.h"
16686int
16687main ()
16688{
Guido van Rossumef2255b2000-03-10 22:30:29 +000016689 /* Are we little or big endian? From Harbison&Steele. */
16690 union
16691 {
16692 long l;
16693 char c[sizeof (long)];
16694 } u;
16695 u.l = 1;
16696 exit (u.c[sizeof (long) - 1] == 1);
16697}
Martin v. Löwis11437992002-04-12 09:54:03 +000016698_ACEOF
16699rm -f conftest$ac_exeext
16700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16701 (eval $ac_link) 2>&5
16702 ac_status=$?
16703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16704 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16706 (eval $ac_try) 2>&5
16707 ac_status=$?
16708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16709 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000016710 ac_cv_c_bigendian=no
16711else
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 echo "$as_me: program exited with status $ac_status" >&5
16713echo "$as_me: failed program was:" >&5
16714cat conftest.$ac_ext >&5
16715( exit $ac_status )
16716ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000016717fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016718rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000016719fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016720fi
16721rm -f conftest.$ac_objext conftest.$ac_ext
16722fi
16723echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
16724echo "${ECHO_T}$ac_cv_c_bigendian" >&6
16725case $ac_cv_c_bigendian in
16726 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000016727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016729#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016730_ACEOF
16731 ;;
16732 no)
16733 ;;
16734 *)
Barry Warsawfe33b792003-01-07 22:42:49 +000016735 { { echo "$as_me:$LINENO: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016736presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Barry Warsawfe33b792003-01-07 22:42:49 +000016737echo "$as_me: error: unknown endianess
Martin v. Löwis11437992002-04-12 09:54:03 +000016738presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
16739 { (exit 1); exit 1; }; } ;;
16740esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000016741
Michael W. Hudson54241132001-12-07 15:38:26 +000016742
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016743# Check whether right shifting a negative integer extends the sign bit
16744# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000016745echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
16746echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
16747if test "${ac_cv_rshift_extends_sign+set}" = set; then
16748 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016749else
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016751if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000016752 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016753else
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 cat >conftest.$ac_ext <<_ACEOF
16755#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016756#include "confdefs.h"
16757
16758int main()
16759{
Vladimir Marangozova6180282000-07-12 05:05:06 +000016760 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016761}
16762
Martin v. Löwis11437992002-04-12 09:54:03 +000016763_ACEOF
16764rm -f conftest$ac_exeext
16765if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16766 (eval $ac_link) 2>&5
16767 ac_status=$?
16768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16769 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16771 (eval $ac_try) 2>&5
16772 ac_status=$?
16773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16774 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000016775 ac_cv_rshift_extends_sign=yes
16776else
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 echo "$as_me: program exited with status $ac_status" >&5
16778echo "$as_me: failed program was:" >&5
16779cat conftest.$ac_ext >&5
16780( exit $ac_status )
16781ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000016782fi
Barry Warsawfe33b792003-01-07 22:42:49 +000016783rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016784fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000016785fi
16786
Martin v. Löwis11437992002-04-12 09:54:03 +000016787echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
16788echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000016789if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016790then
Martin v. Löwis11437992002-04-12 09:54:03 +000016791
16792cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016793#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016794_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016795
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016796fi
16797
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016798# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016799echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
16800echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
16801if test "${ac_cv_have_getc_unlocked+set}" = set; then
16802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016803else
Martin v. Löwis11437992002-04-12 09:54:03 +000016804
16805cat >conftest.$ac_ext <<_ACEOF
16806#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016807#include "confdefs.h"
16808#include <stdio.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000016809#ifdef F77_DUMMY_MAIN
16810# ifdef __cplusplus
16811 extern "C"
16812# endif
16813 int F77_DUMMY_MAIN() { return 1; }
16814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016815int
16816main ()
16817{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016818
16819 FILE *f = fopen("/dev/null", "r");
16820 flockfile(f);
16821 getc_unlocked(f);
16822 funlockfile(f);
16823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 ;
16825 return 0;
16826}
16827_ACEOF
16828rm -f conftest.$ac_objext conftest$ac_exeext
16829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16830 (eval $ac_link) 2>&5
16831 ac_status=$?
16832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16833 (exit $ac_status); } &&
16834 { ac_try='test -s conftest$ac_exeext'
16835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16836 (eval $ac_try) 2>&5
16837 ac_status=$?
16838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016840 ac_cv_have_getc_unlocked=yes
16841else
Martin v. Löwis11437992002-04-12 09:54:03 +000016842 echo "$as_me: failed program was:" >&5
16843cat conftest.$ac_ext >&5
16844ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016847fi
16848
Martin v. Löwis11437992002-04-12 09:54:03 +000016849echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
16850echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016851if test "$ac_cv_have_getc_unlocked" = yes
16852then
Martin v. Löwis11437992002-04-12 09:54:03 +000016853
16854cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016855#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016856_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000016857
16858fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000016859
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016860# check for readline 2.2
16861cat >conftest.$ac_ext <<_ACEOF
16862#line $LINENO "configure"
16863#include "confdefs.h"
16864#include <readline/readline.h>
16865_ACEOF
16866if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16867 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16868 ac_status=$?
Barry Warsawfe33b792003-01-07 22:42:49 +000016869 egrep -v '^ *\+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016870 rm -f conftest.er1
16871 cat conftest.err >&5
16872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16873 (exit $ac_status); } >/dev/null; then
16874 if test -s conftest.err; then
16875 ac_cpp_err=$ac_c_preproc_warn_flag
16876 else
16877 ac_cpp_err=
16878 fi
16879else
16880 ac_cpp_err=yes
16881fi
16882if test -z "$ac_cpp_err"; then
16883 have_readline=yes
16884else
16885 echo "$as_me: failed program was:" >&5
16886 cat conftest.$ac_ext >&5
16887 have_readline=no
16888fi
16889rm -f conftest.err conftest.$ac_ext
16890if test $have_readline = yes
16891then
16892 cat >conftest.$ac_ext <<_ACEOF
16893#line $LINENO "configure"
16894#include "confdefs.h"
16895#include <readline/readline.h>
16896
16897_ACEOF
16898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Barry Warsawfe33b792003-01-07 22:42:49 +000016899 egrep "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000016900
16901cat >>confdefs.h <<\_ACEOF
16902#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
16903_ACEOF
16904
16905fi
16906rm -f conftest*
16907
16908fi
16909
Martin v. Löwis0daad592001-09-30 21:09:59 +000016910# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000016911echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
16912echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
16913if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
16914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000016915else
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000016917LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016918cat >conftest.$ac_ext <<_ACEOF
16919#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000016920#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016921
Guido van Rossum353ae582001-07-10 16:45:32 +000016922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016923#ifdef __cplusplus
16924extern "C"
16925#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000016926/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 builtin and then its argument prototype would still apply. */
16928char rl_pre_input_hook ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016929#ifdef F77_DUMMY_MAIN
16930# ifdef __cplusplus
16931 extern "C"
16932# endif
16933 int F77_DUMMY_MAIN() { return 1; }
16934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016935int
16936main ()
16937{
16938rl_pre_input_hook ();
16939 ;
16940 return 0;
16941}
16942_ACEOF
16943rm -f conftest.$ac_objext conftest$ac_exeext
16944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16945 (eval $ac_link) 2>&5
16946 ac_status=$?
16947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948 (exit $ac_status); } &&
16949 { ac_try='test -s conftest$ac_exeext'
16950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16951 (eval $ac_try) 2>&5
16952 ac_status=$?
16953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954 (exit $ac_status); }; }; then
16955 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000016956else
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 echo "$as_me: failed program was:" >&5
16958cat conftest.$ac_ext >&5
16959ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000016960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16962LIBS=$ac_check_lib_save_LIBS
16963fi
16964echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
16965echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
16966if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016967
Martin v. Löwis11437992002-04-12 09:54:03 +000016968cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016969#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016970_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000016971
Martin v. Löwis0daad592001-09-30 21:09:59 +000016972fi
16973
Michael W. Hudson54241132001-12-07 15:38:26 +000016974
Martin v. Löwis0daad592001-09-30 21:09:59 +000016975# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000016976echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
16977echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
16978if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
16979 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000016980else
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000016982LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016983cat >conftest.$ac_ext <<_ACEOF
16984#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000016985#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
Martin v. Löwis0daad592001-09-30 21:09:59 +000016987/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016988#ifdef __cplusplus
16989extern "C"
16990#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000016991/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 builtin and then its argument prototype would still apply. */
16993char rl_completion_matches ();
Barry Warsawfe33b792003-01-07 22:42:49 +000016994#ifdef F77_DUMMY_MAIN
16995# ifdef __cplusplus
16996 extern "C"
16997# endif
16998 int F77_DUMMY_MAIN() { return 1; }
16999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017000int
17001main ()
17002{
17003rl_completion_matches ();
17004 ;
17005 return 0;
17006}
17007_ACEOF
17008rm -f conftest.$ac_objext conftest$ac_exeext
17009if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17010 (eval $ac_link) 2>&5
17011 ac_status=$?
17012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17013 (exit $ac_status); } &&
17014 { ac_try='test -s conftest$ac_exeext'
17015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17016 (eval $ac_try) 2>&5
17017 ac_status=$?
17018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019 (exit $ac_status); }; }; then
17020 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017021else
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 echo "$as_me: failed program was:" >&5
17023cat conftest.$ac_ext >&5
17024ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017025fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17027LIBS=$ac_check_lib_save_LIBS
17028fi
17029echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17030echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17031if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017032
Martin v. Löwis11437992002-04-12 09:54:03 +000017033cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017034#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017035_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017036
Guido van Rossum353ae582001-07-10 16:45:32 +000017037fi
17038
Jack Jansendd19cf82001-12-06 22:36:17 +000017039
Martin v. Löwis11437992002-04-12 09:54:03 +000017040echo "$as_me:$LINENO: checking for broken nice()" >&5
17041echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17042if test "${ac_cv_broken_nice+set}" = set; then
17043 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017044else
Martin v. Löwis11437992002-04-12 09:54:03 +000017045
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017046if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017047 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017048else
Martin v. Löwis11437992002-04-12 09:54:03 +000017049 cat >conftest.$ac_ext <<_ACEOF
17050#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017051#include "confdefs.h"
17052
17053int main()
17054{
17055 int val1 = nice(1);
17056 if (val1 != -1 && val1 == nice(2))
17057 exit(0);
17058 exit(1);
17059}
17060
Martin v. Löwis11437992002-04-12 09:54:03 +000017061_ACEOF
17062rm -f conftest$ac_exeext
17063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17064 (eval $ac_link) 2>&5
17065 ac_status=$?
17066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17069 (eval $ac_try) 2>&5
17070 ac_status=$?
17071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17072 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017073 ac_cv_broken_nice=yes
17074else
Martin v. Löwis11437992002-04-12 09:54:03 +000017075 echo "$as_me: program exited with status $ac_status" >&5
17076echo "$as_me: failed program was:" >&5
17077cat conftest.$ac_ext >&5
17078( exit $ac_status )
17079ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017080fi
Barry Warsawfe33b792003-01-07 22:42:49 +000017081rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017082fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017083fi
17084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17086echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017087if test "$ac_cv_broken_nice" = yes
17088then
Martin v. Löwis11437992002-04-12 09:54:03 +000017089
17090cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017091#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017092_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017093
17094fi
17095
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017096# tzset(3) exists and works like we expect it to
17097echo "$as_me:$LINENO: checking for working tzset()" >&5
17098echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17099if test "${ac_cv_working_tzset+set}" = set; then
17100 echo $ECHO_N "(cached) $ECHO_C" >&6
17101else
17102
17103if test "$cross_compiling" = yes; then
17104 ac_cv_working_tzset=no
17105else
17106 cat >conftest.$ac_ext <<_ACEOF
17107#line $LINENO "configure"
17108#include "confdefs.h"
17109
17110#include <stdlib.h>
17111#include <time.h>
17112int main()
17113{
17114 int gmt_hour;
17115 int eastern_hour;
17116 time_t now;
17117 now = time((time_t*)NULL);
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017118 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017119 tzset();
17120 gmt_hour = localtime(&now)->tm_hour;
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017121 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017122 tzset();
17123 eastern_hour = localtime(&now)->tm_hour;
17124 if (eastern_hour == gmt_hour)
17125 exit(1);
17126 exit(0);
17127}
17128
17129_ACEOF
17130rm -f conftest$ac_exeext
17131if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17132 (eval $ac_link) 2>&5
17133 ac_status=$?
17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17137 (eval $ac_try) 2>&5
17138 ac_status=$?
17139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17140 (exit $ac_status); }; }; then
17141 ac_cv_working_tzset=yes
17142else
17143 echo "$as_me: program exited with status $ac_status" >&5
17144echo "$as_me: failed program was:" >&5
17145cat conftest.$ac_ext >&5
17146( exit $ac_status )
17147ac_cv_working_tzset=no
17148fi
17149rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17150fi
17151fi
17152
17153echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17154echo "${ECHO_T}$ac_cv_working_tzset" >&6
17155if test "$ac_cv_working_tzset" = yes
17156then
17157
17158cat >>confdefs.h <<\_ACEOF
17159#define HAVE_WORKING_TZSET 1
17160_ACEOF
17161
17162fi
17163
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017164# Look for subsecond timestamps in struct stat
17165echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17166echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17167if test "${ac_cv_stat_tv_nsec+set}" = set; then
17168 echo $ECHO_N "(cached) $ECHO_C" >&6
17169else
17170 cat >conftest.$ac_ext <<_ACEOF
17171#line $LINENO "configure"
17172#include "confdefs.h"
17173#include <sys/stat.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017174#ifdef F77_DUMMY_MAIN
17175# ifdef __cplusplus
17176 extern "C"
17177# endif
17178 int F77_DUMMY_MAIN() { return 1; }
17179#endif
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017180int
17181main ()
17182{
17183
17184struct stat st;
17185st.st_mtim.tv_nsec = 1;
17186
17187 ;
17188 return 0;
17189}
17190_ACEOF
17191rm -f conftest.$ac_objext
17192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17193 (eval $ac_compile) 2>&5
17194 ac_status=$?
17195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196 (exit $ac_status); } &&
17197 { ac_try='test -s conftest.$ac_objext'
17198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17199 (eval $ac_try) 2>&5
17200 ac_status=$?
17201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17202 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000017203 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017204else
17205 echo "$as_me: failed program was:" >&5
17206cat conftest.$ac_ext >&5
17207ac_cv_stat_tv_nsec=no
17208fi
17209rm -f conftest.$ac_objext conftest.$ac_ext
17210fi
17211
17212echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
17213echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
17214if test "$ac_cv_stat_tv_nsec" = yes
17215then
17216
17217cat >>confdefs.h <<\_ACEOF
17218#define HAVE_STAT_TV_NSEC 1
17219_ACEOF
17220
17221fi
17222
Jack Jansen666b1e72001-10-31 12:11:48 +000017223# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000017224echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
17225echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
17226if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
17227 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017228else
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 cat >conftest.$ac_ext <<_ACEOF
17230#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017231#include "confdefs.h"
17232#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017233#ifdef F77_DUMMY_MAIN
17234# ifdef __cplusplus
17235 extern "C"
17236# endif
17237 int F77_DUMMY_MAIN() { return 1; }
17238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017239int
17240main ()
17241{
Jack Jansen666b1e72001-10-31 12:11:48 +000017242
17243 int rtn;
17244 rtn = mvwdelch(0,0,0);
17245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246 ;
17247 return 0;
17248}
17249_ACEOF
17250rm -f conftest.$ac_objext
17251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17252 (eval $ac_compile) 2>&5
17253 ac_status=$?
17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17255 (exit $ac_status); } &&
17256 { ac_try='test -s conftest.$ac_objext'
17257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17258 (eval $ac_try) 2>&5
17259 ac_status=$?
17260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17261 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017262 ac_cv_mvwdelch_is_expression=yes
17263else
Martin v. Löwis11437992002-04-12 09:54:03 +000017264 echo "$as_me: failed program was:" >&5
17265cat conftest.$ac_ext >&5
17266ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017268rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017269fi
17270
Martin v. Löwis11437992002-04-12 09:54:03 +000017271echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
17272echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017273
17274if test "$ac_cv_mvwdelch_is_expression" = yes
17275then
Martin v. Löwis11437992002-04-12 09:54:03 +000017276
17277cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017278#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017279_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017280
17281fi
17282
Martin v. Löwis11437992002-04-12 09:54:03 +000017283echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
17284echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
17285if test "${ac_cv_window_has_flags+set}" = set; then
17286 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000017287else
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 cat >conftest.$ac_ext <<_ACEOF
17289#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000017290#include "confdefs.h"
17291#include <curses.h>
Barry Warsawfe33b792003-01-07 22:42:49 +000017292#ifdef F77_DUMMY_MAIN
17293# ifdef __cplusplus
17294 extern "C"
17295# endif
17296 int F77_DUMMY_MAIN() { return 1; }
17297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017298int
17299main ()
17300{
Jack Jansen666b1e72001-10-31 12:11:48 +000017301
17302 WINDOW *w;
17303 w->_flags = 0;
17304
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 ;
17306 return 0;
17307}
17308_ACEOF
17309rm -f conftest.$ac_objext
17310if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17311 (eval $ac_compile) 2>&5
17312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); } &&
17315 { ac_try='test -s conftest.$ac_objext'
17316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17317 (eval $ac_try) 2>&5
17318 ac_status=$?
17319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17320 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000017321 ac_cv_window_has_flags=yes
17322else
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 echo "$as_me: failed program was:" >&5
17324cat conftest.$ac_ext >&5
17325ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000017326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017327rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000017328fi
17329
Martin v. Löwis11437992002-04-12 09:54:03 +000017330echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
17331echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017332
Jack Jansen666b1e72001-10-31 12:11:48 +000017333
17334if test "$ac_cv_window_has_flags" = yes
17335then
Martin v. Löwis11437992002-04-12 09:54:03 +000017336
17337cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017338#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017339_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000017340
17341fi
17342
Martin v. Löwis24a880b2002-12-31 12:55:15 +000017343echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
17344echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
17345
17346if test -e /dev/ptmx
17347then
17348 echo "$as_me:$LINENO: result: yes" >&5
17349echo "${ECHO_T}yes" >&6
17350
17351cat >>confdefs.h <<\_ACEOF
17352#define HAVE_DEV_PTMX 1
17353_ACEOF
17354
17355else
17356 echo "$as_me:$LINENO: result: no" >&5
17357echo "${ECHO_T}no" >&6
17358fi
17359
Neal Norwitz865400f2003-03-21 01:42:58 +000017360echo "$as_me:$LINENO: checking for /dev/ptc" >&5
17361echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
17362
17363if test -e /dev/ptc
17364then
17365 echo "$as_me:$LINENO: result: yes" >&5
17366echo "${ECHO_T}yes" >&6
17367
17368cat >>confdefs.h <<\_ACEOF
17369#define HAVE_DEV_PTC 1
17370_ACEOF
17371
17372else
17373 echo "$as_me:$LINENO: result: no" >&5
17374echo "${ECHO_T}no" >&6
17375fi
17376
Martin v. Löwis11437992002-04-12 09:54:03 +000017377echo "$as_me:$LINENO: checking for socklen_t" >&5
17378echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
17379if test "${ac_cv_type_socklen_t+set}" = set; then
17380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000017381else
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 cat >conftest.$ac_ext <<_ACEOF
17383#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000017384#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000017385
17386#ifdef HAVE_SYS_TYPES_H
17387#include <sys/types.h>
17388#endif
17389#ifdef HAVE_SYS_SOCKET_H
17390#include <sys/socket.h>
17391#endif
17392
17393
Barry Warsawfe33b792003-01-07 22:42:49 +000017394#ifdef F77_DUMMY_MAIN
17395# ifdef __cplusplus
17396 extern "C"
17397# endif
17398 int F77_DUMMY_MAIN() { return 1; }
17399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017400int
17401main ()
17402{
17403if ((socklen_t *) 0)
17404 return 0;
17405if (sizeof (socklen_t))
17406 return 0;
17407 ;
17408 return 0;
17409}
17410_ACEOF
17411rm -f conftest.$ac_objext
17412if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17413 (eval $ac_compile) 2>&5
17414 ac_status=$?
17415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17416 (exit $ac_status); } &&
17417 { ac_try='test -s conftest.$ac_objext'
17418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000017423 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000017424else
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 echo "$as_me: failed program was:" >&5
17426cat conftest.$ac_ext >&5
17427ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000017428fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017429rm -f conftest.$ac_objext conftest.$ac_ext
17430fi
17431echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
17432echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
17433if test $ac_cv_type_socklen_t = yes; then
17434 :
17435else
Guido van Rossum95713eb2000-05-18 20:53:31 +000017436
Martin v. Löwis01c04012002-11-11 14:58:44 +000017437cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017438#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000017439_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000017440
17441fi
17442
Michael W. Hudson54241132001-12-07 15:38:26 +000017443
Michael W. Hudson54241132001-12-07 15:38:26 +000017444
17445
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000017446for h in `(cd $srcdir;echo Python/thread_*.h)`
17447do
17448 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
17449done
17450
Michael W. Hudson54241132001-12-07 15:38:26 +000017451
Jack Jansen0b06be72002-06-21 14:48:38 +000017452SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000017453echo "$as_me:$LINENO: checking for build directories" >&5
17454echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017455for dir in $SRCDIRS; do
17456 if test ! -d $dir; then
17457 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000017458 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000017459done
Martin v. Löwis11437992002-04-12 09:54:03 +000017460echo "$as_me:$LINENO: result: done" >&5
17461echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000017462
Guido van Rossum627b2d71993-12-24 10:39:16 +000017463# generate output files
Barry Warsawfe33b792003-01-07 22:42:49 +000017464ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017465
Martin v. Löwis11437992002-04-12 09:54:03 +000017466cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017467# This file is a shell script that caches the results of configure
17468# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017469# scripts and configure runs, see configure's option --config-cache.
17470# It is not useful on other systems. If it contains results you don't
17471# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017472#
Martin v. Löwis11437992002-04-12 09:54:03 +000017473# config.status only pays attention to the cache file if you give it
17474# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017475#
Barry Warsawfe33b792003-01-07 22:42:49 +000017476# `ac_cv_env_foo' variables (set or unset) will be overriden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017477# loading this file, other *unset* `ac_cv_foo' will be assigned the
17478# following values.
17479
17480_ACEOF
17481
Guido van Rossumf78abae1997-01-21 22:02:36 +000017482# The following way of writing the cache mishandles newlines in values,
17483# but we know of no workaround that is simple, portable, and efficient.
17484# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017485# Ultrix sh set writes to stderr and can't be redirected directly,
17486# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000017487{
17488 (set) 2>&1 |
17489 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17490 *ac_space=\ *)
17491 # `set' does not quote correctly, so add quotes (double-quote
17492 # substitution turns \\\\ into \\, and sed turns \\ into \).
17493 sed -n \
17494 "s/'/'\\\\''/g;
17495 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17496 ;;
17497 *)
17498 # `set' quotes correctly as required by POSIX, so do not add quotes.
17499 sed -n \
17500 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17501 ;;
17502 esac;
17503} |
17504 sed '
17505 t clear
17506 : clear
17507 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17508 t end
17509 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17510 : end' >>confcache
17511if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017512 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17514 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017515 else
17516 echo "not updating unwritable cache $cache_file"
17517 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017518fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017519rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017520
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017521test "x$prefix" = xNONE && prefix=$ac_default_prefix
17522# Let make expand exec_prefix.
17523test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017524
Martin v. Löwis11437992002-04-12 09:54:03 +000017525# VPATH may cause trouble with some makes, so we remove $(srcdir),
17526# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17527# trailing colons and then remove the whole line if VPATH becomes empty
17528# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000017529if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017530 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17531s/:*\$(srcdir):*/:/;
17532s/:*\${srcdir}:*/:/;
17533s/:*@srcdir@:*/:/;
17534s/^\([^=]*=[ ]*\):*/\1/;
17535s/:*$//;
17536s/^[^=]*=[ ]*$//;
17537}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000017538fi
17539
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017540DEFS=-DHAVE_CONFIG_H
17541
Martin v. Löwis11437992002-04-12 09:54:03 +000017542
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017543: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000017544ac_clean_files_save=$ac_clean_files
17545ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17546{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17547echo "$as_me: creating $CONFIG_STATUS" >&6;}
17548cat >$CONFIG_STATUS <<_ACEOF
17549#! $SHELL
17550# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017551# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017552# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017553# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017554
Martin v. Löwis11437992002-04-12 09:54:03 +000017555debug=false
17556SHELL=\${CONFIG_SHELL-$SHELL}
17557_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000017558
Martin v. Löwis11437992002-04-12 09:54:03 +000017559cat >>$CONFIG_STATUS <<\_ACEOF
Barry Warsawfe33b792003-01-07 22:42:49 +000017560
Martin v. Löwis11437992002-04-12 09:54:03 +000017561## --------------------- ##
17562## M4sh Initialization. ##
17563## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017564
Martin v. Löwis11437992002-04-12 09:54:03 +000017565# Be Bourne compatible
17566if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17567 emulate sh
17568 NULLCMD=:
17569elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17570 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000017571fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017572
Barry Warsawfe33b792003-01-07 22:42:49 +000017573# NLS nuisances.
Martin v. Löwis11437992002-04-12 09:54:03 +000017574# Support unset when possible.
17575if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17576 as_unset=unset
17577else
17578 as_unset=false
17579fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017580
Barry Warsawfe33b792003-01-07 22:42:49 +000017581(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17582 { $as_unset LANG || test "${LANG+set}" != set; } ||
17583 { LANG=C; export LANG; }
17584(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17585 { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17586 { LC_ALL=C; export LC_ALL; }
17587(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17588 { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17589 { LC_TIME=C; export LC_TIME; }
17590(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17591 { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17592 { LC_CTYPE=C; export LC_CTYPE; }
17593(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17594 { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17595 { LANGUAGE=C; export LANGUAGE; }
17596(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17597 { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17598 { LC_COLLATE=C; export LC_COLLATE; }
17599(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17600 { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17601 { LC_NUMERIC=C; export LC_NUMERIC; }
17602(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17603 { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17604 { LC_MESSAGES=C; export LC_MESSAGES; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
17606
17607# Name of the executable.
Barry Warsawfe33b792003-01-07 22:42:49 +000017608as_me=`(basename "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017609$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17610 X"$0" : 'X\(//\)$' \| \
17611 X"$0" : 'X\(/\)$' \| \
17612 . : '\(.\)' 2>/dev/null ||
17613echo X/"$0" |
17614 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17615 /^X\/\(\/\/\)$/{ s//\1/; q; }
17616 /^X\/\(\/\).*/{ s//\1/; q; }
17617 s/.*/./; q'`
17618
17619# PATH needs CR, and LINENO needs CR and PATH.
17620# Avoid depending upon Character Ranges.
17621as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17622as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17623as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17624as_cr_digits='0123456789'
17625as_cr_alnum=$as_cr_Letters$as_cr_digits
17626
17627# The user is always right.
17628if test "${PATH_SEPARATOR+set}" != set; then
17629 echo "#! /bin/sh" >conftest.sh
17630 echo "exit 0" >>conftest.sh
17631 chmod +x conftest.sh
Barry Warsawfe33b792003-01-07 22:42:49 +000017632 if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 PATH_SEPARATOR=';'
17634 else
17635 PATH_SEPARATOR=:
17636 fi
17637 rm -f conftest.sh
17638fi
17639
17640
17641 as_lineno_1=$LINENO
17642 as_lineno_2=$LINENO
17643 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17644 test "x$as_lineno_1" != "x$as_lineno_2" &&
17645 test "x$as_lineno_3" = "x$as_lineno_2" || {
17646 # Find who we are. Look in the path if we contain no path at all
17647 # relative or not.
17648 case $0 in
17649 *[\\/]* ) as_myself=$0 ;;
17650 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17651for as_dir in $PATH
17652do
17653 IFS=$as_save_IFS
17654 test -z "$as_dir" && as_dir=.
17655 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17656done
17657
17658 ;;
17659 esac
17660 # We did not find ourselves, most probably we were run as `sh COMMAND'
17661 # in which case we are not to be found in the path.
17662 if test "x$as_myself" = x; then
17663 as_myself=$0
17664 fi
17665 if test ! -f "$as_myself"; then
17666 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17667echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17668 { (exit 1); exit 1; }; }
17669 fi
17670 case $CONFIG_SHELL in
17671 '')
17672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17673for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17674do
17675 IFS=$as_save_IFS
17676 test -z "$as_dir" && as_dir=.
17677 for as_base in sh bash ksh sh5; do
17678 case $as_dir in
17679 /*)
17680 if ("$as_dir/$as_base" -c '
17681 as_lineno_1=$LINENO
17682 as_lineno_2=$LINENO
17683 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17684 test "x$as_lineno_1" != "x$as_lineno_2" &&
17685 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
17686 CONFIG_SHELL=$as_dir/$as_base
17687 export CONFIG_SHELL
17688 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17689 fi;;
17690 esac
17691 done
17692done
17693;;
Jack Jansendd19cf82001-12-06 22:36:17 +000017694 esac
17695
Martin v. Löwis11437992002-04-12 09:54:03 +000017696 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17697 # uniformly replaced by the line number. The first 'sed' inserts a
17698 # line-number line before each line; the second 'sed' does the real
17699 # work. The second script uses 'N' to pair each line-number line
17700 # with the numbered line, and appends trailing '-' during
17701 # substitution so that $LINENO is not a special case at line end.
17702 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17703 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
17704 sed '=' <$as_myself |
17705 sed '
17706 N
17707 s,$,-,
17708 : loop
17709 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17710 t loop
17711 s,-$,,
17712 s,^['$as_cr_digits']*\n,,
17713 ' >$as_me.lineno &&
17714 chmod +x $as_me.lineno ||
17715 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17716echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17717 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017718
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 # Don't try to exec as it changes $[0], causing all sort of problems
17720 # (the dirname of $[0] is not the place where we might find the
17721 # original and so on. Autoconf is especially sensible to this).
17722 . ./$as_me.lineno
17723 # Exit status is that of the last command.
17724 exit
17725}
17726
17727
17728case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17729 *c*,-n*) ECHO_N= ECHO_C='
17730' ECHO_T=' ' ;;
17731 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17732 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
17733esac
17734
17735if expr a : '\(a\)' >/dev/null 2>&1; then
17736 as_expr=expr
17737else
17738 as_expr=false
17739fi
17740
17741rm -f conf$$ conf$$.exe conf$$.file
17742echo >conf$$.file
17743if ln -s conf$$.file conf$$ 2>/dev/null; then
17744 # We could just check for DJGPP; but this test a) works b) is more generic
17745 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17746 if test -f conf$$.exe; then
17747 # Don't use ln at all; we don't have any links
17748 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017749 else
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 as_ln_s='ln -s'
17751 fi
17752elif ln conf$$.file conf$$ 2>/dev/null; then
17753 as_ln_s=ln
17754else
17755 as_ln_s='cp -p'
17756fi
17757rm -f conf$$ conf$$.exe conf$$.file
17758
17759as_executable_p="test -f"
17760
17761# Sed expression to map a string onto a valid CPP name.
17762as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17763
17764# Sed expression to map a string onto a valid variable name.
17765as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17766
17767
17768# IFS
17769# We need space, tab and new line, in precisely that order.
17770as_nl='
17771'
17772IFS=" $as_nl"
17773
17774# CDPATH.
Barry Warsawfe33b792003-01-07 22:42:49 +000017775$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017776
17777exec 6>&1
17778
17779# Open the log real soon, to keep \$[0] and so on meaningful, and to
17780# report actual input values of CONFIG_FILES etc. instead of their
17781# values after options handling. Logging --version etc. is OK.
17782exec 5>>config.log
17783{
17784 echo
17785 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17786## Running $as_me. ##
17787_ASBOX
17788} >&5
17789cat >&5 <<_CSEOF
17790
Martin v. Löwis88afe662002-10-26 13:47:44 +000017791This file was extended by python $as_me 2.3, which was
Barry Warsawfe33b792003-01-07 22:42:49 +000017792generated by GNU Autoconf 2.53. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
17794 CONFIG_FILES = $CONFIG_FILES
17795 CONFIG_HEADERS = $CONFIG_HEADERS
17796 CONFIG_LINKS = $CONFIG_LINKS
17797 CONFIG_COMMANDS = $CONFIG_COMMANDS
17798 $ $0 $@
17799
17800_CSEOF
17801echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17802echo >&5
17803_ACEOF
17804
17805# Files that config.status was made for.
17806if test -n "$ac_config_files"; then
17807 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17808fi
17809
17810if test -n "$ac_config_headers"; then
17811 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17812fi
17813
17814if test -n "$ac_config_links"; then
17815 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17816fi
17817
17818if test -n "$ac_config_commands"; then
17819 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17820fi
17821
17822cat >>$CONFIG_STATUS <<\_ACEOF
17823
17824ac_cs_usage="\
17825\`$as_me' instantiates files from templates according to the
17826current configuration.
17827
17828Usage: $0 [OPTIONS] [FILE]...
17829
17830 -h, --help print this help, then exit
17831 -V, --version print version number, then exit
17832 -d, --debug don't remove temporary files
17833 --recheck update $as_me by reconfiguring in the same conditions
17834 --file=FILE[:TEMPLATE]
17835 instantiate the configuration file FILE
17836 --header=FILE[:TEMPLATE]
17837 instantiate the configuration header FILE
17838
17839Configuration files:
17840$config_files
17841
17842Configuration headers:
17843$config_headers
17844
17845Report bugs to <bug-autoconf@gnu.org>."
17846_ACEOF
17847
17848cat >>$CONFIG_STATUS <<_ACEOF
17849ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000017850python config.status 2.3
Barry Warsawfe33b792003-01-07 22:42:49 +000017851configured by $0, generated by GNU Autoconf 2.53,
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17853
17854Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17855Free Software Foundation, Inc.
17856This config.status script is free software; the Free Software Foundation
17857gives unlimited permission to copy, distribute and modify it."
17858srcdir=$srcdir
17859INSTALL="$INSTALL"
17860_ACEOF
17861
17862cat >>$CONFIG_STATUS <<\_ACEOF
17863# If no file are specified by the user, then we need to provide default
17864# value. By we need to know if files were specified by the user.
17865ac_need_defaults=:
17866while test $# != 0
17867do
17868 case $1 in
17869 --*=*)
17870 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17871 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Barry Warsawfe33b792003-01-07 22:42:49 +000017872 shift
17873 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17874 shift
Martin v. Löwis11437992002-04-12 09:54:03 +000017875 ;;
Barry Warsawfe33b792003-01-07 22:42:49 +000017876 -*);;
Martin v. Löwis11437992002-04-12 09:54:03 +000017877 *) # This is not an option, so the user has probably given explicit
17878 # arguments.
17879 ac_need_defaults=false;;
17880 esac
17881
Barry Warsawfe33b792003-01-07 22:42:49 +000017882 case $1 in
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 # Handling of the options.
17884_ACEOF
17885cat >>$CONFIG_STATUS <<_ACEOF
17886 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17887 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17888 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17889_ACEOF
17890cat >>$CONFIG_STATUS <<\_ACEOF
17891 --version | --vers* | -V )
17892 echo "$ac_cs_version"; exit 0 ;;
17893 --he | --h)
17894 # Conflict between --help and --header
17895 { { echo "$as_me:$LINENO: error: ambiguous option: $1
17896Try \`$0 --help' for more information." >&5
17897echo "$as_me: error: ambiguous option: $1
17898Try \`$0 --help' for more information." >&2;}
17899 { (exit 1); exit 1; }; };;
17900 --help | --hel | -h )
17901 echo "$ac_cs_usage"; exit 0 ;;
17902 --debug | --d* | -d )
17903 debug=: ;;
17904 --file | --fil | --fi | --f )
Barry Warsawfe33b792003-01-07 22:42:49 +000017905 shift
17906 CONFIG_FILES="$CONFIG_FILES $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017907 ac_need_defaults=false;;
17908 --header | --heade | --head | --hea )
Barry Warsawfe33b792003-01-07 22:42:49 +000017909 shift
17910 CONFIG_HEADERS="$CONFIG_HEADERS $1"
Martin v. Löwis11437992002-04-12 09:54:03 +000017911 ac_need_defaults=false;;
17912
17913 # This is an error.
17914 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
17915Try \`$0 --help' for more information." >&5
17916echo "$as_me: error: unrecognized option: $1
17917Try \`$0 --help' for more information." >&2;}
17918 { (exit 1); exit 1; }; } ;;
17919
17920 *) ac_config_targets="$ac_config_targets $1" ;;
17921
17922 esac
17923 shift
17924done
17925
17926_ACEOF
17927
17928
17929
17930
17931
17932cat >>$CONFIG_STATUS <<\_ACEOF
17933for ac_config_target in $ac_config_targets
17934do
17935 case "$ac_config_target" in
17936 # Handling of arguments.
17937 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17938 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
17939 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17940 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17941echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17942 { (exit 1); exit 1; }; };;
17943 esac
17944done
17945
17946# If the user did not use the arguments to specify the items to instantiate,
17947# then the envvar interface is used. Set only those that are not.
17948# We use the long form for the default assignment because of an extremely
17949# bizarre bug on SunOS 4.1.3.
17950if $ac_need_defaults; then
17951 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17952 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17953fi
17954
17955# Create a temporary directory, and hook for its removal unless debugging.
17956$debug ||
17957{
17958 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17959 trap '{ (exit 1); exit 1; }' 1 2 13 15
17960}
17961
17962# Create a (secure) tmp directory for tmp files.
17963: ${TMPDIR=/tmp}
17964{
17965 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17966 test -n "$tmp" && test -d "$tmp"
17967} ||
17968{
17969 tmp=$TMPDIR/cs$$-$RANDOM
17970 (umask 077 && mkdir $tmp)
17971} ||
17972{
17973 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17974 { (exit 1); exit 1; }
17975}
17976
17977_ACEOF
17978
17979cat >>$CONFIG_STATUS <<_ACEOF
17980
17981#
17982# CONFIG_FILES section.
17983#
17984
17985# No need to generate the scripts if there are no CONFIG_FILES.
17986# This happens for instance when ./config.status config.h
17987if test -n "\$CONFIG_FILES"; then
17988 # Protect against being on the right side of a sed subst in config.status.
17989 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17990 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17991s,@SHELL@,$SHELL,;t t
17992s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17993s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17994s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17995s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17996s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17997s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17998s,@exec_prefix@,$exec_prefix,;t t
17999s,@prefix@,$prefix,;t t
18000s,@program_transform_name@,$program_transform_name,;t t
18001s,@bindir@,$bindir,;t t
18002s,@sbindir@,$sbindir,;t t
18003s,@libexecdir@,$libexecdir,;t t
18004s,@datadir@,$datadir,;t t
18005s,@sysconfdir@,$sysconfdir,;t t
18006s,@sharedstatedir@,$sharedstatedir,;t t
18007s,@localstatedir@,$localstatedir,;t t
18008s,@libdir@,$libdir,;t t
18009s,@includedir@,$includedir,;t t
18010s,@oldincludedir@,$oldincludedir,;t t
18011s,@infodir@,$infodir,;t t
18012s,@mandir@,$mandir,;t t
18013s,@build_alias@,$build_alias,;t t
18014s,@host_alias@,$host_alias,;t t
18015s,@target_alias@,$target_alias,;t t
18016s,@DEFS@,$DEFS,;t t
18017s,@ECHO_C@,$ECHO_C,;t t
18018s,@ECHO_N@,$ECHO_N,;t t
18019s,@ECHO_T@,$ECHO_T,;t t
18020s,@LIBS@,$LIBS,;t t
18021s,@VERSION@,$VERSION,;t t
18022s,@SOVERSION@,$SOVERSION,;t t
18023s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18024s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18025s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18026s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18027s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18028s,@MACHDEP@,$MACHDEP,;t t
18029s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018030s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018031s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018032s,@CXX@,$CXX,;t t
18033s,@MAINOBJ@,$MAINOBJ,;t t
18034s,@EXEEXT@,$EXEEXT,;t t
18035s,@CC@,$CC,;t t
18036s,@CFLAGS@,$CFLAGS,;t t
18037s,@LDFLAGS@,$LDFLAGS,;t t
18038s,@CPPFLAGS@,$CPPFLAGS,;t t
18039s,@ac_ct_CC@,$ac_ct_CC,;t t
18040s,@OBJEXT@,$OBJEXT,;t t
18041s,@CPP@,$CPP,;t t
18042s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18043s,@LIBRARY@,$LIBRARY,;t t
18044s,@LDLIBRARY@,$LDLIBRARY,;t t
18045s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18046s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18047s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18048s,@INSTSONAME@,$INSTSONAME,;t t
18049s,@RUNSHARED@,$RUNSHARED,;t t
18050s,@LINKCC@,$LINKCC,;t t
18051s,@RANLIB@,$RANLIB,;t t
18052s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18053s,@AR@,$AR,;t t
18054s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18055s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18056s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18057s,@LN@,$LN,;t t
18058s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018059s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018060s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18061s,@SO@,$SO,;t t
18062s,@LDSHARED@,$LDSHARED,;t t
18063s,@BLDSHARED@,$BLDSHARED,;t t
18064s,@CCSHARED@,$CCSHARED,;t t
18065s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18066s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018067s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018068s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18069s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18070s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18071s,@LDLAST@,$LDLAST,;t t
18072s,@THREADOBJ@,$THREADOBJ,;t t
18073s,@DLINCLDIR@,$DLINCLDIR,;t t
18074s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18075s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
18076s,@LIBOBJS@,$LIBOBJS,;t t
18077s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18078s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18079s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18080s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18081s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18082s,@LIBM@,$LIBM,;t t
18083s,@LIBC@,$LIBC,;t t
18084s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18085s,@THREADHEADERS@,$THREADHEADERS,;t t
18086s,@SRCDIRS@,$SRCDIRS,;t t
18087CEOF
18088
18089_ACEOF
18090
18091 cat >>$CONFIG_STATUS <<\_ACEOF
18092 # Split the substitutions into bite-sized pieces for seds with
18093 # small command number limits, like on Digital OSF/1 and HP-UX.
18094 ac_max_sed_lines=48
18095 ac_sed_frag=1 # Number of current file.
18096 ac_beg=1 # First line for current file.
18097 ac_end=$ac_max_sed_lines # Line after last line for current file.
18098 ac_more_lines=:
18099 ac_sed_cmds=
18100 while $ac_more_lines; do
18101 if test $ac_beg -gt 1; then
18102 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18103 else
18104 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18105 fi
18106 if test ! -s $tmp/subs.frag; then
18107 ac_more_lines=false
18108 else
18109 # The purpose of the label and of the branching condition is to
18110 # speed up the sed processing (if there are no `@' at all, there
18111 # is no need to browse any of the substitutions).
18112 # These are the two extra sed commands mentioned above.
18113 (echo ':t
18114 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18115 if test -z "$ac_sed_cmds"; then
18116 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18117 else
18118 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18119 fi
18120 ac_sed_frag=`expr $ac_sed_frag + 1`
18121 ac_beg=$ac_end
18122 ac_end=`expr $ac_end + $ac_max_sed_lines`
18123 fi
18124 done
18125 if test -z "$ac_sed_cmds"; then
18126 ac_sed_cmds=cat
18127 fi
18128fi # test -n "$CONFIG_FILES"
18129
18130_ACEOF
18131cat >>$CONFIG_STATUS <<\_ACEOF
18132for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18133 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18134 case $ac_file in
18135 - | *:- | *:-:* ) # input from stdin
18136 cat >$tmp/stdin
18137 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18138 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18139 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18140 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18141 * ) ac_file_in=$ac_file.in ;;
18142 esac
18143
18144 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18145 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18146$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18147 X"$ac_file" : 'X\(//\)[^/]' \| \
18148 X"$ac_file" : 'X\(//\)$' \| \
18149 X"$ac_file" : 'X\(/\)' \| \
18150 . : '\(.\)' 2>/dev/null ||
18151echo X"$ac_file" |
18152 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18153 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18154 /^X\(\/\/\)$/{ s//\1/; q; }
18155 /^X\(\/\).*/{ s//\1/; q; }
18156 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018157 { case "$ac_dir" in
18158 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18159 *) as_incr_dir=.;;
18160esac
18161as_dummy="$ac_dir"
18162for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18163 case $as_mkdir_dir in
18164 # Skip DOS drivespec
18165 ?:) as_incr_dir=$as_mkdir_dir ;;
18166 *)
18167 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18168 test -d "$as_incr_dir" ||
18169 mkdir "$as_incr_dir" ||
18170 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18171echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18172 { (exit 1); exit 1; }; }
18173 ;;
18174 esac
18175done; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177 ac_builddir=.
18178
18179if test "$ac_dir" != .; then
18180 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18181 # A "../" for each directory in $ac_dir_suffix.
18182 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18183else
18184 ac_dir_suffix= ac_top_builddir=
18185fi
18186
18187case $srcdir in
18188 .) # No --srcdir option. We are building in place.
18189 ac_srcdir=.
18190 if test -z "$ac_top_builddir"; then
18191 ac_top_srcdir=.
18192 else
18193 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18194 fi ;;
18195 [\\/]* | ?:[\\/]* ) # Absolute path.
18196 ac_srcdir=$srcdir$ac_dir_suffix;
18197 ac_top_srcdir=$srcdir ;;
18198 *) # Relative path.
18199 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18200 ac_top_srcdir=$ac_top_builddir$srcdir ;;
18201esac
18202# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18203# absolute.
18204ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Neal Norwitz82251032003-05-23 14:35:24 +000018205ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000018206ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18207ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18208
18209
18210 case $INSTALL in
18211 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18212 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
18213 esac
18214
18215 if test x"$ac_file" != x-; then
18216 { echo "$as_me:$LINENO: creating $ac_file" >&5
18217echo "$as_me: creating $ac_file" >&6;}
18218 rm -f "$ac_file"
18219 fi
18220 # Let's still pretend it is `configure' which instantiates (i.e., don't
18221 # use $as_me), people would be surprised to read:
18222 # /* config.h. Generated by config.status. */
18223 if test x"$ac_file" = x-; then
18224 configure_input=
18225 else
18226 configure_input="$ac_file. "
18227 fi
18228 configure_input=$configure_input"Generated from `echo $ac_file_in |
18229 sed 's,.*/,,'` by configure."
18230
18231 # First look for the input files in the build tree, otherwise in the
18232 # src tree.
18233 ac_file_inputs=`IFS=:
18234 for f in $ac_file_in; do
18235 case $f in
18236 -) echo $tmp/stdin ;;
18237 [\\/$]*)
18238 # Absolute (can't be DOS-style, as IFS=:)
18239 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18240echo "$as_me: error: cannot find input file: $f" >&2;}
18241 { (exit 1); exit 1; }; }
18242 echo $f;;
18243 *) # Relative
18244 if test -f "$f"; then
18245 # Build tree
18246 echo $f
18247 elif test -f "$srcdir/$f"; then
18248 # Source tree
18249 echo $srcdir/$f
18250 else
18251 # /dev/null tree
18252 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18253echo "$as_me: error: cannot find input file: $f" >&2;}
18254 { (exit 1); exit 1; }; }
18255 fi;;
18256 esac
18257 done` || { (exit 1); exit 1; }
18258_ACEOF
18259cat >>$CONFIG_STATUS <<_ACEOF
18260 sed "$ac_vpsub
18261$extrasub
18262_ACEOF
18263cat >>$CONFIG_STATUS <<\_ACEOF
18264:t
18265/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18266s,@configure_input@,$configure_input,;t t
18267s,@srcdir@,$ac_srcdir,;t t
18268s,@abs_srcdir@,$ac_abs_srcdir,;t t
18269s,@top_srcdir@,$ac_top_srcdir,;t t
18270s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18271s,@builddir@,$ac_builddir,;t t
18272s,@abs_builddir@,$ac_abs_builddir,;t t
18273s,@top_builddir@,$ac_top_builddir,;t t
18274s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18275s,@INSTALL@,$ac_INSTALL,;t t
18276" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18277 rm -f $tmp/stdin
18278 if test x"$ac_file" != x-; then
18279 mv $tmp/out $ac_file
18280 else
18281 cat $tmp/out
18282 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018283 fi
18284
Martin v. Löwis11437992002-04-12 09:54:03 +000018285done
18286_ACEOF
18287cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018288
Martin v. Löwis11437992002-04-12 09:54:03 +000018289#
18290# CONFIG_HEADER section.
18291#
Guido van Rossum627b2d71993-12-24 10:39:16 +000018292
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018293# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18294# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018295#
18296# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000018297ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18298ac_dB='[ ].*$,\1#\2'
18299ac_dC=' '
18300ac_dD=',;t'
18301# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18302ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18303ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018304ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000018305ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018306
Martin v. Löwis11437992002-04-12 09:54:03 +000018307for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000018308 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000018309 case $ac_file in
18310 - | *:- | *:-:* ) # input from stdin
18311 cat >$tmp/stdin
18312 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18313 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18314 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18315 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18316 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018317 esac
18318
Martin v. Löwis11437992002-04-12 09:54:03 +000018319 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18320echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018321
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 # First look for the input files in the build tree, otherwise in the
18323 # src tree.
18324 ac_file_inputs=`IFS=:
18325 for f in $ac_file_in; do
18326 case $f in
18327 -) echo $tmp/stdin ;;
18328 [\\/$]*)
18329 # Absolute (can't be DOS-style, as IFS=:)
18330 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18331echo "$as_me: error: cannot find input file: $f" >&2;}
18332 { (exit 1); exit 1; }; }
18333 echo $f;;
18334 *) # Relative
18335 if test -f "$f"; then
18336 # Build tree
18337 echo $f
18338 elif test -f "$srcdir/$f"; then
18339 # Source tree
18340 echo $srcdir/$f
18341 else
18342 # /dev/null tree
18343 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18344echo "$as_me: error: cannot find input file: $f" >&2;}
18345 { (exit 1); exit 1; }; }
18346 fi;;
18347 esac
18348 done` || { (exit 1); exit 1; }
18349 # Remove the trailing spaces.
18350 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018351
Martin v. Löwis11437992002-04-12 09:54:03 +000018352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018353
Martin v. Löwis11437992002-04-12 09:54:03 +000018354# Transform confdefs.h into two sed scripts, `conftest.defines' and
18355# `conftest.undefs', that substitutes the proper values into
18356# config.h.in to produce config.h. The first handles `#define'
18357# templates, and the second `#undef' templates.
18358# And first: Protect against being on the right side of a sed subst in
18359# config.status. Protect against being in an unquoted here document
18360# in config.status.
18361rm -f conftest.defines conftest.undefs
18362# Using a here document instead of a string reduces the quoting nightmare.
18363# Putting comments in sed scripts is not portable.
18364#
18365# `end' is used to avoid that the second main sed command (meant for
18366# 0-ary CPP macros) applies to n-ary macro definitions.
18367# See the Autoconf documentation for `clear'.
18368cat >confdef2sed.sed <<\_ACEOF
18369s/[\\&,]/\\&/g
18370s,[\\$`],\\&,g
18371t clear
18372: clear
18373s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18374t end
18375s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18376: end
18377_ACEOF
18378# If some macros were called several times there might be several times
18379# the same #defines, which is useless. Nevertheless, we may not want to
18380# sort them, since we want the *last* AC-DEFINE to be honored.
18381uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18382sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18383rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018384
18385# This sed command replaces #undef with comments. This is necessary, for
18386# example, in the case of _POSIX_SOURCE, which is predefined and required
18387# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018388cat >>conftest.undefs <<\_ACEOF
18389s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18390_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018391
Martin v. Löwis11437992002-04-12 09:54:03 +000018392# Break up conftest.defines because some shells have a limit on the size
18393# of here documents, and old seds have small limits too (100 cmds).
18394echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Barry Warsawfe33b792003-01-07 22:42:49 +000018395echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018396echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18397echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018398rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000018399while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000018400do
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 # Write a limited-size here document to $tmp/defines.sed.
18402 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18403 # Speed up: don't consider the non `#define' lines.
18404 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
18405 # Work around the forget-to-reset-the-flag bug.
18406 echo 't clr' >>$CONFIG_STATUS
18407 echo ': clr' >>$CONFIG_STATUS
18408 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018409 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018410 sed -f $tmp/defines.sed $tmp/in >$tmp/out
18411 rm -f $tmp/in
18412 mv $tmp/out $tmp/in
18413' >>$CONFIG_STATUS
18414 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18415 rm -f conftest.defines
18416 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000018417done
Martin v. Löwis11437992002-04-12 09:54:03 +000018418rm -f conftest.defines
Barry Warsawfe33b792003-01-07 22:42:49 +000018419echo ' fi # egrep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018420echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000018421
Martin v. Löwis11437992002-04-12 09:54:03 +000018422# Break up conftest.undefs because some shells have a limit on the size
18423# of here documents, and old seds have small limits too (100 cmds).
18424echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
18425rm -f conftest.tail
18426while grep . conftest.undefs >/dev/null
18427do
18428 # Write a limited-size here document to $tmp/undefs.sed.
18429 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18430 # Speed up: don't consider the non `#undef'
18431 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
18432 # Work around the forget-to-reset-the-flag bug.
18433 echo 't clr' >>$CONFIG_STATUS
18434 echo ': clr' >>$CONFIG_STATUS
18435 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18436 echo 'CEOF
18437 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18438 rm -f $tmp/in
18439 mv $tmp/out $tmp/in
18440' >>$CONFIG_STATUS
18441 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18442 rm -f conftest.undefs
18443 mv conftest.tail conftest.undefs
18444done
18445rm -f conftest.undefs
18446
18447cat >>$CONFIG_STATUS <<\_ACEOF
18448 # Let's still pretend it is `configure' which instantiates (i.e., don't
18449 # use $as_me), people would be surprised to read:
18450 # /* config.h. Generated by config.status. */
18451 if test x"$ac_file" = x-; then
18452 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000018453 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018454 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000018455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018456 cat $tmp/in >>$tmp/config.h
18457 rm -f $tmp/in
18458 if test x"$ac_file" != x-; then
18459 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18460 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18461echo "$as_me: $ac_file is unchanged" >&6;}
18462 else
18463 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18464$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18465 X"$ac_file" : 'X\(//\)[^/]' \| \
18466 X"$ac_file" : 'X\(//\)$' \| \
18467 X"$ac_file" : 'X\(/\)' \| \
18468 . : '\(.\)' 2>/dev/null ||
18469echo X"$ac_file" |
18470 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18471 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18472 /^X\(\/\/\)$/{ s//\1/; q; }
18473 /^X\(\/\).*/{ s//\1/; q; }
18474 s/.*/./; q'`
Barry Warsawfe33b792003-01-07 22:42:49 +000018475 { case "$ac_dir" in
18476 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18477 *) as_incr_dir=.;;
18478esac
18479as_dummy="$ac_dir"
18480for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18481 case $as_mkdir_dir in
18482 # Skip DOS drivespec
18483 ?:) as_incr_dir=$as_mkdir_dir ;;
18484 *)
18485 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18486 test -d "$as_incr_dir" ||
18487 mkdir "$as_incr_dir" ||
18488 { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18489echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18490 { (exit 1); exit 1; }; }
18491 ;;
18492 esac
18493done; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018494
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 rm -f $ac_file
18496 mv $tmp/config.h $ac_file
18497 fi
18498 else
18499 cat $tmp/config.h
18500 rm -f $tmp/config.h
18501 fi
18502done
18503_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018504
Martin v. Löwis11437992002-04-12 09:54:03 +000018505cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018506
Martin v. Löwis11437992002-04-12 09:54:03 +000018507{ (exit 0); exit 0; }
18508_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018509chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000018510ac_clean_files=$ac_clean_files_save
18511
18512
18513# configure is writing to config.log, and then calls config.status.
18514# config.status does its own redirection, appending to config.log.
18515# Unfortunately, on DOS this fails, as config.log is still kept open
18516# by configure, so config.status won't be able to write to it; its
18517# output is simply discarded. So we exec the FD to /dev/null,
18518# effectively closing config.log, so it can be properly (re)opened and
18519# appended to by config.status. When coming back to configure, we
18520# need to make the FD available again.
18521if test "$no_create" != yes; then
18522 ac_cs_success=:
18523 exec 5>/dev/null
18524 $SHELL $CONFIG_STATUS || ac_cs_success=false
18525 exec 5>>config.log
18526 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18527 # would make configure fail if this is the last instruction.
18528 $ac_cs_success || { (exit 1); exit 1; }
18529fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018530
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018531
18532echo "creating Setup"
18533if test ! -f Modules/Setup
18534then
18535 cp $srcdir/Modules/Setup.dist Modules/Setup
18536fi
18537
18538echo "creating Setup.local"
18539if test ! -f Modules/Setup.local
18540then
18541 echo "# Edit this file for local setup changes" >Modules/Setup.local
18542fi
18543
18544echo "creating Makefile"
18545$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
18546 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018547 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018548mv config.c Modules