blob: 3d050a7ef53e6a3f0384758bc4ac6844e3dfd0e1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanarodecc6a42003-01-01 20:07:49 +00002# From configure.in Revision: 1.383 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanarodecc6a42003-01-01 20:07:49 +00004# Generated by GNU Autoconf 2.54 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.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanarodecc6a42003-01-01 20:07:49 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
26if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
27 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanarodecc6a42003-01-01 20:07:49 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
41do
42 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
43 eval $as_var=C; export $as_var
44 else
45 $as_unset $as_var
46 fi
47done
48
49# Required to use basename.
50if expr a : '\(a\)' >/dev/null 2>&1; then
51 as_expr=expr
52else
53 as_expr=false
54fi
55
56if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
57 as_basename=basename
58else
59 as_basename=false
60fi
Martin v. Löwis11437992002-04-12 09:54:03 +000061
62
63# Name of the executable.
Skip Montanarodecc6a42003-01-01 20:07:49 +000064as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000065$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66 X"$0" : 'X\(//\)$' \| \
67 X"$0" : 'X\(/\)$' \| \
68 . : '\(.\)' 2>/dev/null ||
69echo X/"$0" |
70 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
71 /^X\/\(\/\/\)$/{ s//\1/; q; }
72 /^X\/\(\/\).*/{ s//\1/; q; }
73 s/.*/./; q'`
74
Skip Montanarodecc6a42003-01-01 20:07:49 +000075
Martin v. Löwis11437992002-04-12 09:54:03 +000076# 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
Skip Montanarodecc6a42003-01-01 20:07:49 +000089 if (PATH="/nonexistent;."; 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
Skip Montanarodecc6a42003-01-01 20:07:49 +0000142 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
143 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000144 CONFIG_SHELL=$as_dir/$as_base
145 export CONFIG_SHELL
146 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
147 fi;;
148 esac
149 done
150done
151;;
152 esac
153
154 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
155 # uniformly replaced by the line number. The first 'sed' inserts a
156 # line-number line before each line; the second 'sed' does the real
157 # work. The second script uses 'N' to pair each line-number line
158 # with the numbered line, and appends trailing '-' during
159 # substitution so that $LINENO is not a special case at line end.
160 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
161 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
162 sed '=' <$as_myself |
163 sed '
164 N
165 s,$,-,
166 : loop
167 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
168 t loop
169 s,-$,,
170 s,^['$as_cr_digits']*\n,,
171 ' >$as_me.lineno &&
172 chmod +x $as_me.lineno ||
173 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
174 { (exit 1); exit 1; }; }
175
176 # Don't try to exec as it changes $[0], causing all sort of problems
177 # (the dirname of $[0] is not the place where we might find the
178 # original and so on. Autoconf is especially sensible to this).
179 . ./$as_me.lineno
180 # Exit status is that of the last command.
181 exit
182}
183
184
185case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
186 *c*,-n*) ECHO_N= ECHO_C='
187' ECHO_T=' ' ;;
188 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
189 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
190esac
191
192if expr a : '\(a\)' >/dev/null 2>&1; then
193 as_expr=expr
194else
195 as_expr=false
196fi
197
198rm -f conf$$ conf$$.exe conf$$.file
199echo >conf$$.file
200if ln -s conf$$.file conf$$ 2>/dev/null; then
201 # We could just check for DJGPP; but this test a) works b) is more generic
202 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
203 if test -f conf$$.exe; then
204 # Don't use ln at all; we don't have any links
205 as_ln_s='cp -p'
206 else
207 as_ln_s='ln -s'
208 fi
209elif ln conf$$.file conf$$ 2>/dev/null; then
210 as_ln_s=ln
211else
212 as_ln_s='cp -p'
213fi
214rm -f conf$$ conf$$.exe conf$$.file
215
Skip Montanarodecc6a42003-01-01 20:07:49 +0000216if mkdir -p . 2>/dev/null; then
217 as_mkdir_p=:
218else
219 as_mkdir_p=false
220fi
221
Martin v. Löwis11437992002-04-12 09:54:03 +0000222as_executable_p="test -f"
223
224# Sed expression to map a string onto a valid CPP name.
225as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
226
227# Sed expression to map a string onto a valid variable name.
228as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
229
230
231# IFS
232# We need space, tab and new line, in precisely that order.
233as_nl='
234'
235IFS=" $as_nl"
236
237# CDPATH.
Skip Montanarodecc6a42003-01-01 20:07:49 +0000238$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000239
240
241# Name of the host.
242# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
243# so uname gets run too.
244ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
245
246exec 6>&1
247
248#
249# Initializations.
250#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000251ac_default_prefix=/usr/local
Skip Montanarodecc6a42003-01-01 20:07:49 +0000252ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000253cross_compiling=no
254subdirs=
255MFLAGS=
256MAKEFLAGS=
257SHELL=${CONFIG_SHELL-/bin/sh}
258
259# Maximum number of lines to put in a shell here document.
260# This variable seems obsolete. It should probably be removed, and
261# only ac_max_sed_lines should be used.
262: ${ac_max_here_lines=38}
263
264# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000265PACKAGE_NAME='python'
266PACKAGE_TARNAME='python'
267PACKAGE_VERSION='2.3'
268PACKAGE_STRING='python 2.3'
269PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000270
271ac_unique_file="Include/object.h"
272# Factoring default headers for most tests.
273ac_includes_default="\
274#include <stdio.h>
275#if HAVE_SYS_TYPES_H
276# include <sys/types.h>
277#endif
278#if HAVE_SYS_STAT_H
279# include <sys/stat.h>
280#endif
281#if STDC_HEADERS
282# include <stdlib.h>
283# include <stddef.h>
284#else
285# if HAVE_STDLIB_H
286# include <stdlib.h>
287# endif
288#endif
289#if HAVE_STRING_H
290# if !STDC_HEADERS && HAVE_MEMORY_H
291# include <memory.h>
292# endif
293# include <string.h>
294#endif
295#if HAVE_STRINGS_H
296# include <strings.h>
297#endif
298#if HAVE_INTTYPES_H
299# include <inttypes.h>
300#else
301# if HAVE_STDINT_H
302# include <stdint.h>
303# endif
304#endif
305#if HAVE_UNISTD_H
306# include <unistd.h>
307#endif"
308
Skip Montanarodecc6a42003-01-01 20:07:49 +0000309ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
310ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000311
Guido van Rossum7f43da71994-08-01 12:15:30 +0000312# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000313ac_init_help=
314ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# The variables have the same names as the options, with
316# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000317cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000318exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000319no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000320no_recursion=
321prefix=NONE
322program_prefix=NONE
323program_suffix=NONE
324program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000327srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329x_includes=NONE
330x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000331
332# Installation directory options.
333# These are left unexpanded so users can "make install exec_prefix=/foo"
334# and all the variables that are supposed to be based on exec_prefix
335# by default will actually change.
336# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000337bindir='${exec_prefix}/bin'
338sbindir='${exec_prefix}/sbin'
339libexecdir='${exec_prefix}/libexec'
340datadir='${prefix}/share'
341sysconfdir='${prefix}/etc'
342sharedstatedir='${prefix}/com'
343localstatedir='${prefix}/var'
344libdir='${exec_prefix}/lib'
345includedir='${prefix}/include'
346oldincludedir='/usr/include'
347infodir='${prefix}/info'
348mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000349
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350ac_prev=
351for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000352do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353 # If the previous option needs an argument, assign it.
354 if test -n "$ac_prev"; then
355 eval "$ac_prev=\$ac_option"
356 ac_prev=
357 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000358 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359
Martin v. Löwis11437992002-04-12 09:54:03 +0000360 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000362 # Accept the important Cygnus configure options, so we can diagnose typos.
363
Martin v. Löwis11437992002-04-12 09:54:03 +0000364 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000366 -bindir | --bindir | --bindi | --bind | --bin | --bi)
367 ac_prev=bindir ;;
368 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000369 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000370
371 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000374 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000375
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000376 -cache-file | --cache-file | --cache-fil | --cache-fi \
377 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
378 ac_prev=cache_file ;;
379 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
380 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000381 cache_file=$ac_optarg ;;
382
383 --config-cache | -C)
384 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000386 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
387 ac_prev=datadir ;;
388 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
389 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000390 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000391
Guido van Rossum7f43da71994-08-01 12:15:30 +0000392 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000394 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000395 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
396 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
397 { (exit 1); exit 1; }; }
398 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
399 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000400
401 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000402 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000404 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
406 { (exit 1); exit 1; }; }
407 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
408 case $ac_option in
409 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410 *) ac_optarg=yes ;;
411 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000412 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
415 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
416 | --exec | --exe | --ex)
417 ac_prev=exec_prefix ;;
418 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
419 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
420 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000421 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422
423 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000424 # Obsolete; use --with-gas.
425 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426
Martin v. Löwis11437992002-04-12 09:54:03 +0000427 -help | --help | --hel | --he | -h)
428 ac_init_help=long ;;
429 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
430 ac_init_help=recursive ;;
431 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
432 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000433
434 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000435 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000437 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000438
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000439 -includedir | --includedir | --includedi | --included | --include \
440 | --includ | --inclu | --incl | --inc)
441 ac_prev=includedir ;;
442 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
443 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000445
446 -infodir | --infodir | --infodi | --infod | --info | --inf)
447 ac_prev=infodir ;;
448 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000450
451 -libdir | --libdir | --libdi | --libd)
452 ac_prev=libdir ;;
453 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000454 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000455
456 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
457 | --libexe | --libex | --libe)
458 ac_prev=libexecdir ;;
459 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
460 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000461 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000462
463 -localstatedir | --localstatedir | --localstatedi | --localstated \
464 | --localstate | --localstat | --localsta | --localst \
465 | --locals | --local | --loca | --loc | --lo)
466 ac_prev=localstatedir ;;
467 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
468 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
469 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000470 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000471
472 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
473 ac_prev=mandir ;;
474 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000475 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000476
Guido van Rossum7f43da71994-08-01 12:15:30 +0000477 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478 # Obsolete; use --without-fp.
479 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 no_create=yes ;;
484
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000485 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
487 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000488
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000489 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
490 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
491 | --oldin | --oldi | --old | --ol | --o)
492 ac_prev=oldincludedir ;;
493 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
494 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
495 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000497
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
499 ac_prev=prefix ;;
500 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000501 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502
503 -program-prefix | --program-prefix | --program-prefi | --program-pref \
504 | --program-pre | --program-pr | --program-p)
505 ac_prev=program_prefix ;;
506 -program-prefix=* | --program-prefix=* | --program-prefi=* \
507 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509
510 -program-suffix | --program-suffix | --program-suffi | --program-suff \
511 | --program-suf | --program-su | --program-s)
512 ac_prev=program_suffix ;;
513 -program-suffix=* | --program-suffix=* | --program-suffi=* \
514 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000515 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516
517 -program-transform-name | --program-transform-name \
518 | --program-transform-nam | --program-transform-na \
519 | --program-transform-n | --program-transform- \
520 | --program-transform | --program-transfor \
521 | --program-transfo | --program-transf \
522 | --program-trans | --program-tran \
523 | --progr-tra | --program-tr | --program-t)
524 ac_prev=program_transform_name ;;
525 -program-transform-name=* | --program-transform-name=* \
526 | --program-transform-nam=* | --program-transform-na=* \
527 | --program-transform-n=* | --program-transform-=* \
528 | --program-transform=* | --program-transfor=* \
529 | --program-transfo=* | --program-transf=* \
530 | --program-trans=* | --program-tran=* \
531 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000532 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000533
534 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
535 | -silent | --silent | --silen | --sile | --sil)
536 silent=yes ;;
537
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000538 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
539 ac_prev=sbindir ;;
540 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
541 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000542 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543
544 -sharedstatedir | --sharedstatedir | --sharedstatedi \
545 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
546 | --sharedst | --shareds | --shared | --share | --shar \
547 | --sha | --sh)
548 ac_prev=sharedstatedir ;;
549 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
550 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
551 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
552 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000553 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555 -site | --site | --sit)
556 ac_prev=site ;;
557 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000558 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000559
Guido van Rossum7f43da71994-08-01 12:15:30 +0000560 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
561 ac_prev=srcdir ;;
562 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000563 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000564
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000565 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
566 | --syscon | --sysco | --sysc | --sys | --sy)
567 ac_prev=sysconfdir ;;
568 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
569 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000570 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000571
Guido van Rossum7f43da71994-08-01 12:15:30 +0000572 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000574 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000575 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000576
577 -v | -verbose | --verbose | --verbos | --verbo | --verb)
578 verbose=yes ;;
579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580 -version | --version | --versio | --versi | --vers | -V)
581 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582
583 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000584 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000585 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
587 { echo "$as_me: error: invalid package name: $ac_package" >&2
588 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000589 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 case $ac_option in
591 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 *) ac_optarg=yes ;;
593 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000594 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595
596 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000598 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000599 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
600 { echo "$as_me: error: invalid package name: $ac_package" >&2
601 { (exit 1); exit 1; }; }
602 ac_package=`echo $ac_package | sed 's/-/_/g'`
603 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000604
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000605 --x)
606 # Obsolete; use --with-x.
607 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000608
609 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
610 | --x-incl | --x-inc | --x-in | --x-i)
611 ac_prev=x_includes ;;
612 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
613 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000614 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000615
616 -x-libraries | --x-libraries | --x-librarie | --x-librari \
617 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
618 ac_prev=x_libraries ;;
619 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
620 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000621 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000622
Martin v. Löwis11437992002-04-12 09:54:03 +0000623 -*) { echo "$as_me: error: unrecognized option: $ac_option
624Try \`$0 --help' for more information." >&2
625 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000626 ;;
627
Martin v. Löwis11437992002-04-12 09:54:03 +0000628 *=*)
629 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
630 # Reject names that are not valid shell variable names.
631 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
632 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
633 { (exit 1); exit 1; }; }
634 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
635 eval "$ac_envvar='$ac_optarg'"
636 export $ac_envvar ;;
637
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000638 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000639 # FIXME: should be removed in autoconf 3.0.
640 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
641 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
642 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
643 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000644 ;;
645
646 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000647done
648
Guido van Rossum7f43da71994-08-01 12:15:30 +0000649if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000650 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
651 { echo "$as_me: error: missing argument to $ac_option" >&2
652 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653fi
654
Martin v. Löwis11437992002-04-12 09:54:03 +0000655# Be sure to have absolute paths.
656for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000657do
Martin v. Löwis11437992002-04-12 09:54:03 +0000658 eval ac_val=$`echo $ac_var`
659 case $ac_val in
660 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
661 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
662 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000663 esac
664done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000665
Martin v. Löwis11437992002-04-12 09:54:03 +0000666# Be sure to have absolute paths.
667for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
668 localstatedir libdir includedir oldincludedir infodir mandir
669do
670 eval ac_val=$`echo $ac_var`
671 case $ac_val in
672 [\\/$]* | ?:[\\/]* ) ;;
673 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
674 { (exit 1); exit 1; }; };;
675 esac
676done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000677
Martin v. Löwis11437992002-04-12 09:54:03 +0000678# There might be people who depend on the old broken behavior: `$host'
679# used to hold the argument of --host etc.
680# FIXME: To remove some day.
681build=$build_alias
682host=$host_alias
683target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000684
Martin v. Löwis11437992002-04-12 09:54:03 +0000685# FIXME: To remove some day.
686if test "x$host_alias" != x; then
687 if test "x$build_alias" = x; then
688 cross_compiling=maybe
689 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
690 If a cross compiler is detected then cross compile mode will be used." >&2
691 elif test "x$build_alias" != "x$host_alias"; then
692 cross_compiling=yes
693 fi
694fi
695
696ac_tool_prefix=
697test -n "$host_alias" && ac_tool_prefix=$host_alias-
698
699test "$silent" = yes && exec 6>/dev/null
700
Guido van Rossum627b2d71993-12-24 10:39:16 +0000701
702# Find the source files, if location was not specified.
703if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000704 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000705 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000706 ac_confdir=`(dirname "$0") 2>/dev/null ||
707$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
708 X"$0" : 'X\(//\)[^/]' \| \
709 X"$0" : 'X\(//\)$' \| \
710 X"$0" : 'X\(/\)' \| \
711 . : '\(.\)' 2>/dev/null ||
712echo X"$0" |
713 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
714 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
715 /^X\(\/\/\)$/{ s//\1/; q; }
716 /^X\(\/\).*/{ s//\1/; q; }
717 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000718 srcdir=$ac_confdir
719 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000720 srcdir=..
721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000722else
723 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000724fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000725if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000726 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000727 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
728 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000729 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000733fi
Skip Montanarodecc6a42003-01-01 20:07:49 +0000734(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
735 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
736 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000737srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
738ac_env_build_alias_set=${build_alias+set}
739ac_env_build_alias_value=$build_alias
740ac_cv_env_build_alias_set=${build_alias+set}
741ac_cv_env_build_alias_value=$build_alias
742ac_env_host_alias_set=${host_alias+set}
743ac_env_host_alias_value=$host_alias
744ac_cv_env_host_alias_set=${host_alias+set}
745ac_cv_env_host_alias_value=$host_alias
746ac_env_target_alias_set=${target_alias+set}
747ac_env_target_alias_value=$target_alias
748ac_cv_env_target_alias_set=${target_alias+set}
749ac_cv_env_target_alias_value=$target_alias
750ac_env_CC_set=${CC+set}
751ac_env_CC_value=$CC
752ac_cv_env_CC_set=${CC+set}
753ac_cv_env_CC_value=$CC
754ac_env_CFLAGS_set=${CFLAGS+set}
755ac_env_CFLAGS_value=$CFLAGS
756ac_cv_env_CFLAGS_set=${CFLAGS+set}
757ac_cv_env_CFLAGS_value=$CFLAGS
758ac_env_LDFLAGS_set=${LDFLAGS+set}
759ac_env_LDFLAGS_value=$LDFLAGS
760ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
761ac_cv_env_LDFLAGS_value=$LDFLAGS
762ac_env_CPPFLAGS_set=${CPPFLAGS+set}
763ac_env_CPPFLAGS_value=$CPPFLAGS
764ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
765ac_cv_env_CPPFLAGS_value=$CPPFLAGS
766ac_env_CPP_set=${CPP+set}
767ac_env_CPP_value=$CPP
768ac_cv_env_CPP_set=${CPP+set}
769ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770
Martin v. Löwis11437992002-04-12 09:54:03 +0000771#
772# Report the --help message.
773#
774if test "$ac_init_help" = "long"; then
775 # Omit some internal or obsolete options to make the list less imposing.
776 # This message is too long to be a string in the A/UX 3.1 sh.
777 cat <<_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000778\`configure' configures python 2.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000779
780Usage: $0 [OPTION]... [VAR=VALUE]...
781
782To assign environment variables (e.g., CC, CFLAGS...), specify them as
783VAR=VALUE. See below for descriptions of some of the useful variables.
784
785Defaults for the options are specified in brackets.
786
787Configuration:
788 -h, --help display this help and exit
789 --help=short display options specific to this package
790 --help=recursive display the short help of all the included packages
791 -V, --version display version information and exit
792 -q, --quiet, --silent do not print \`checking...' messages
793 --cache-file=FILE cache test results in FILE [disabled]
794 -C, --config-cache alias for \`--cache-file=config.cache'
795 -n, --no-create do not create output files
796 --srcdir=DIR find the sources in DIR [configure dir or \`..']
797
798_ACEOF
799
800 cat <<_ACEOF
801Installation directories:
802 --prefix=PREFIX install architecture-independent files in PREFIX
803 [$ac_default_prefix]
804 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
805 [PREFIX]
806
807By default, \`make install' will install all the files in
808\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
809an installation prefix other than \`$ac_default_prefix' using \`--prefix',
810for instance \`--prefix=\$HOME'.
811
812For better control, use the options below.
813
814Fine tuning of the installation directories:
815 --bindir=DIR user executables [EPREFIX/bin]
816 --sbindir=DIR system admin executables [EPREFIX/sbin]
817 --libexecdir=DIR program executables [EPREFIX/libexec]
818 --datadir=DIR read-only architecture-independent data [PREFIX/share]
819 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
820 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
821 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
822 --libdir=DIR object code libraries [EPREFIX/lib]
823 --includedir=DIR C header files [PREFIX/include]
824 --oldincludedir=DIR C header files for non-gcc [/usr/include]
825 --infodir=DIR info documentation [PREFIX/info]
826 --mandir=DIR man documentation [PREFIX/man]
827_ACEOF
828
829 cat <<\_ACEOF
830_ACEOF
831fi
832
833if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000834 case $ac_init_help in
835 short | recursive ) echo "Configuration of python 2.3:";;
836 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000837 cat <<\_ACEOF
838
839Optional Features:
840 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
841 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000842 --enable-framework[=INSTALLDIR]
843 Build (MacOSX|Darwin) framework
844 --enable-shared disable/enable building shared python library
845 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
846 --enable-ipv6 Enable ipv6 (with ipv4) support
847 --disable-ipv6 Disable ipv6 support
848 --enable-unicode[=ucs[24]]
849 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851Optional Packages:
852 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
853 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000854 --without-gcc never use gcc
855 --with-cxx=<compiler> enable C++ support
856 --with-suffix=.exe set executable suffix
857 --with-pydebug build with Py_DEBUG defined
858 --with-libs='lib1 ...' link against additional libs
859 --with-signal-module disable/enable signal module
860 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
861 --with(out)-threads[=DIRECTORY]
862 disable/enable thread support
863 --with(out)-thread[=DIRECTORY]
864 deprecated; use --with(out)-threads
865 --with-pth use GNU pth threading libraries
866 --with(out)-universal-newlines
867 disable/enable foreign newlines
868 --with(out)-doc-strings disable/enable documentation strings
869 --with(out)-pymalloc disable/enable specialized mallocs
870 --with-wctype-functions use wctype.h functions
871 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking
872 --with-dl-dld=DL_DIR GNU dynamic linking
873 --with-fpectl enable SIGFPE catching
874 --with-libm=STRING math library
875 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877Some influential environment variables:
878 CC C compiler command
879 CFLAGS C compiler flags
880 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
881 nonstandard directory <lib dir>
882 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
883 headers in a nonstandard directory <include dir>
884 CPP C preprocessor
885
886Use these variables to override the choices made by `configure' or to help
887it to find libraries and programs with nonstandard names/locations.
888
889_ACEOF
890fi
891
892if test "$ac_init_help" = "recursive"; then
893 # If there are subdirs, report their specific --help.
894 ac_popdir=`pwd`
895 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
896 test -d $ac_dir || continue
897 ac_builddir=.
898
899if test "$ac_dir" != .; then
900 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
901 # A "../" for each directory in $ac_dir_suffix.
902 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
903else
904 ac_dir_suffix= ac_top_builddir=
905fi
906
907case $srcdir in
908 .) # No --srcdir option. We are building in place.
909 ac_srcdir=.
910 if test -z "$ac_top_builddir"; then
911 ac_top_srcdir=.
912 else
913 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
914 fi ;;
915 [\\/]* | ?:[\\/]* ) # Absolute path.
916 ac_srcdir=$srcdir$ac_dir_suffix;
917 ac_top_srcdir=$srcdir ;;
918 *) # Relative path.
919 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
920 ac_top_srcdir=$ac_top_builddir$srcdir ;;
921esac
922# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
923# absolute.
924ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis24a880b2002-12-31 12:55:15 +0000925ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000926ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
927ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
928
929 cd $ac_dir
930 # Check for guested configure; otherwise get Cygnus style configure.
931 if test -f $ac_srcdir/configure.gnu; then
932 echo
933 $SHELL $ac_srcdir/configure.gnu --help=recursive
934 elif test -f $ac_srcdir/configure; then
935 echo
936 $SHELL $ac_srcdir/configure --help=recursive
937 elif test -f $ac_srcdir/configure.ac ||
938 test -f $ac_srcdir/configure.in; then
939 echo
940 $ac_configure --help
941 else
942 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
943 fi
944 cd $ac_popdir
945 done
946fi
947
948test -n "$ac_init_help" && exit 0
949if $ac_init_version; then
950 cat <<\_ACEOF
Martin v. Löwis88afe662002-10-26 13:47:44 +0000951python configure 2.3
Skip Montanarodecc6a42003-01-01 20:07:49 +0000952generated by GNU Autoconf 2.54
Martin v. Löwis11437992002-04-12 09:54:03 +0000953
954Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
955Free Software Foundation, Inc.
956This configure script is free software; the Free Software Foundation
957gives unlimited permission to copy, distribute and modify it.
958_ACEOF
959 exit 0
960fi
961exec 5>config.log
962cat >&5 <<_ACEOF
963This file contains any messages produced by compilers while
964running configure, to aid debugging if configure makes a mistake.
965
Martin v. Löwis88afe662002-10-26 13:47:44 +0000966It was created by python $as_me 2.3, which was
Skip Montanarodecc6a42003-01-01 20:07:49 +0000967generated by GNU Autoconf 2.54. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000968
969 $ $0 $@
970
971_ACEOF
972{
973cat <<_ASUNAME
974## --------- ##
975## Platform. ##
976## --------- ##
977
978hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
979uname -m = `(uname -m) 2>/dev/null || echo unknown`
980uname -r = `(uname -r) 2>/dev/null || echo unknown`
981uname -s = `(uname -s) 2>/dev/null || echo unknown`
982uname -v = `(uname -v) 2>/dev/null || echo unknown`
983
984/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
985/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
986
987/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
988/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
989/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
990hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
991/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
992/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
993/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
994
995_ASUNAME
996
997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
998for as_dir in $PATH
999do
1000 IFS=$as_save_IFS
1001 test -z "$as_dir" && as_dir=.
1002 echo "PATH: $as_dir"
1003done
1004
1005} >&5
1006
1007cat >&5 <<_ACEOF
1008
1009
1010## ----------- ##
1011## Core tests. ##
1012## ----------- ##
1013
1014_ACEOF
1015
1016
1017# Keep a trace of the command line.
1018# Strip out --no-create and --no-recursion so they do not pile up.
1019# Also quote any args containing shell meta-characters.
1020ac_configure_args=
1021ac_sep=
1022for ac_arg
1023do
1024 case $ac_arg in
1025 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1026 | --no-cr | --no-c | -n ) continue ;;
1027 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1028 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1029 continue ;;
1030 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1031 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1032 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00001033 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 # Get rid of the leading space.
Skip Montanarodecc6a42003-01-01 20:07:49 +00001035 ac_sep=" "
Martin v. Löwis11437992002-04-12 09:54:03 +00001036done
1037
1038# When interrupted or exit'd, cleanup temporary files, and complete
1039# config.log. We remove comments because anyway the quotes in there
1040# would cause problems or look ugly.
1041# WARNING: Be sure not to use single quotes in there, as some shells,
1042# such as our DU 5.0 friend, will then `close' the trap.
1043trap 'exit_status=$?
1044 # Save into config.log some information that might help in debugging.
1045 {
1046 echo
Skip Montanarodecc6a42003-01-01 20:07:49 +00001047
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 cat <<\_ASBOX
1049## ---------------- ##
1050## Cache variables. ##
1051## ---------------- ##
1052_ASBOX
1053 echo
1054 # The following way of writing the cache mishandles newlines in values,
1055{
1056 (set) 2>&1 |
1057 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1058 *ac_space=\ *)
1059 sed -n \
1060 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1061 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1062 ;;
1063 *)
1064 sed -n \
1065 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1066 ;;
1067 esac;
1068}
1069 echo
Skip Montanarodecc6a42003-01-01 20:07:49 +00001070
1071 cat <<\_ASBOX
1072## ----------------- ##
1073## Output variables. ##
1074## ----------------- ##
1075_ASBOX
1076 echo
1077 for ac_var in $ac_subst_vars
1078 do
1079 eval ac_val=$`echo $ac_var`
1080 echo "$ac_var='"'"'$ac_val'"'"'"
1081 done | sort
1082 echo
1083
1084 if test -n "$ac_subst_files"; then
1085 cat <<\_ASBOX
1086## ------------- ##
1087## Output files. ##
1088## ------------- ##
1089_ASBOX
1090 echo
1091 for ac_var in $ac_subst_files
1092 do
1093 eval ac_val=$`echo $ac_var`
1094 echo "$ac_var='"'"'$ac_val'"'"'"
1095 done | sort
1096 echo
1097 fi
1098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 if test -s confdefs.h; then
1100 cat <<\_ASBOX
1101## ----------- ##
1102## confdefs.h. ##
1103## ----------- ##
1104_ASBOX
1105 echo
Skip Montanarodecc6a42003-01-01 20:07:49 +00001106 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 echo
1108 fi
1109 test "$ac_signal" != 0 &&
1110 echo "$as_me: caught signal $ac_signal"
1111 echo "$as_me: exit $exit_status"
1112 } >&5
1113 rm -f core core.* *.core &&
1114 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1115 exit $exit_status
1116 ' 0
1117for ac_signal in 1 2 13 15; do
1118 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1119done
1120ac_signal=0
1121
1122# confdefs.h avoids OS command line length limits that DEFS can exceed.
1123rm -rf conftest* confdefs.h
1124# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1125echo >confdefs.h
1126
1127# Predefined preprocessor variables.
1128
1129cat >>confdefs.h <<_ACEOF
1130#define PACKAGE_NAME "$PACKAGE_NAME"
1131_ACEOF
1132
1133
1134cat >>confdefs.h <<_ACEOF
1135#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1136_ACEOF
1137
1138
1139cat >>confdefs.h <<_ACEOF
1140#define PACKAGE_VERSION "$PACKAGE_VERSION"
1141_ACEOF
1142
1143
1144cat >>confdefs.h <<_ACEOF
1145#define PACKAGE_STRING "$PACKAGE_STRING"
1146_ACEOF
1147
1148
1149cat >>confdefs.h <<_ACEOF
1150#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1151_ACEOF
1152
1153
1154# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155# Prefer explicitly selected file to automatically selected ones.
1156if test -z "$CONFIG_SITE"; then
1157 if test "x$prefix" != xNONE; then
1158 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1159 else
1160 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1161 fi
1162fi
1163for ac_site_file in $CONFIG_SITE; do
1164 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1166echo "$as_me: loading site script $ac_site_file" >&6;}
1167 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 . "$ac_site_file"
1169 fi
1170done
1171
1172if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # Some versions of bash will fail to source /dev/null (special
1174 # files actually), so we avoid doing that.
1175 if test -f "$cache_file"; then
1176 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1177echo "$as_me: loading cache $cache_file" >&6;}
1178 case $cache_file in
1179 [\\/]* | ?:[\\/]* ) . $cache_file;;
1180 *) . ./$cache_file;;
1181 esac
1182 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183else
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1185echo "$as_me: creating cache $cache_file" >&6;}
1186 >$cache_file
1187fi
1188
1189# Check that the precious variables saved in the cache have kept the same
1190# value.
1191ac_cache_corrupted=false
1192for ac_var in `(set) 2>&1 |
1193 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1194 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1195 eval ac_new_set=\$ac_env_${ac_var}_set
1196 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1197 eval ac_new_val="\$ac_env_${ac_var}_value"
1198 case $ac_old_set,$ac_new_set in
1199 set,)
1200 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1201echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1202 ac_cache_corrupted=: ;;
1203 ,set)
1204 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1205echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1206 ac_cache_corrupted=: ;;
1207 ,);;
1208 *)
1209 if test "x$ac_old_val" != "x$ac_new_val"; then
1210 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1211echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1212 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1213echo "$as_me: former value: $ac_old_val" >&2;}
1214 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1215echo "$as_me: current value: $ac_new_val" >&2;}
1216 ac_cache_corrupted=:
1217 fi;;
1218 esac
1219 # Pass precious variables to config.status.
1220 if test "$ac_new_set" = set; then
1221 case $ac_new_val in
1222 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1223 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1224 *) ac_arg=$ac_var=$ac_new_val ;;
1225 esac
1226 case " $ac_configure_args " in
1227 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1228 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1229 esac
1230 fi
1231done
1232if $ac_cache_corrupted; then
1233 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1234echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1235 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1236echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1237 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238fi
1239
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1244ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001245
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246
Michael W. Hudson54241132001-12-07 15:38:26 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
Martin v. Löwis88afe662002-10-26 13:47:44 +00001263
1264
1265
1266
1267
1268
1269
1270
1271
Skip Montanarodecc6a42003-01-01 20:07:49 +00001272
1273 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275
1276# This is for stuff that absolutely must end up in pyconfig.h.
1277# Please use pyport.h instead, if possible.
1278
1279
1280
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001281
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001282
1283
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00001284VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001285
Martin v. Löwis1142de32002-03-29 16:28:31 +00001286
1287SOVERSION=1.0
1288
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001289# The later defininition of _XOPEN_SOURCE disables certain features
1290# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1291
1292cat >>confdefs.h <<\_ACEOF
1293#define _GNU_SOURCE 1
1294_ACEOF
1295
1296
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001297define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001298
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001299# Arguments passed to configure.
1300
1301CONFIG_ARGS="$ac_configure_args"
1302
Jack Jansene578a632001-08-15 01:27:14 +00001303# Check whether --enable-framework or --disable-framework was given.
1304if test "${enable_framework+set}" = set; then
1305 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306
Jack Jansene578a632001-08-15 01:27:14 +00001307 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001309 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001310 esac
1311 case $enableval in
1312 no)
1313 PYTHONFRAMEWORK=
1314 PYTHONFRAMEWORKDIR=no-framework
1315 PYTHONFRAMEWORKPREFIX=
1316 PYTHONFRAMEWORKINSTALLDIR=
1317 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001318 ;;
1319 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001320 PYTHONFRAMEWORK=Python
1321 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001322 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001323 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1324 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001325 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
Guido van Rossum563e7081996-09-10 18:20:48 +00001327else
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
Jack Jansene578a632001-08-15 01:27:14 +00001329 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001330 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001331 PYTHONFRAMEWORKPREFIX=
1332 PYTHONFRAMEWORKINSTALLDIR=
1333 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001336
1337
1338
1339
Jack Jansene578a632001-08-15 01:27:14 +00001340
1341##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342## AC_HELP_STRING(--with-dyld,
1343## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001344##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001345# Set name for machine-dependent library files
1346
Martin v. Löwis11437992002-04-12 09:54:03 +00001347echo "$as_me:$LINENO: checking MACHDEP" >&5
1348echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001349if test -z "$MACHDEP"
1350then
Guido van Rossum563e7081996-09-10 18:20:48 +00001351 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001352 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1353 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001354 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001355 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001356 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001357 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001358 ac_md_system=`echo $ac_sys_system |
1359 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1360 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001361 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001362 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001363
Guido van Rossum07397971997-04-29 21:49:50 +00001364 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001365 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001366 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001367 atheos*) MACHDEP="atheos";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001368 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001369 esac
1370fi
Guido van Rossum91922671997-10-09 20:24:13 +00001371
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001372# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1373# disable features if it is defined, without any means to access these
1374# features as extensions. For these systems, we skip the definition of
1375# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1376# some feature, make sure there is no alternative way to access this
1377# feature. Also, when using wildcards, make sure you have verified the
1378# need for not defining _XOPEN_SOURCE on all systems matching the
1379# wildcard, and that the wildcard does not include future systems
1380# (which may remove their limitations).
1381case $ac_sys_system/$ac_sys_release in
1382 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1383 # even though select is a POSIX function. Reported by J. Ribbens.
1384 OpenBSD/2.* | OpenBSD/3.[012])
1385 define_xopen_source=no;;
1386esac
1387
1388if test $define_xopen_source = yes
1389then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001390
1391cat >>confdefs.h <<\_ACEOF
1392#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001393_ACEOF
1394
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001395
1396 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1397 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1398 # several APIs are not declared. Since this is also needed in some
1399 # cases for HP-UX, we define it globally.
1400
1401
1402cat >>confdefs.h <<\_ACEOF
1403#define _XOPEN_SOURCE_EXTENDED 1
1404_ACEOF
1405
1406
1407cat >>confdefs.h <<\_ACEOF
1408#define _POSIX_C_SOURCE 200112L
1409_ACEOF
1410
1411
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001412fi
1413
Guido van Rossum91922671997-10-09 20:24:13 +00001414#
1415# SGI compilers allow the specification of the both the ABI and the
1416# ISA on the command line. Depending on the values of these switches,
1417# different and often incompatable code will be generated.
1418#
1419# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1420# thus supply support for various ABI/ISA combinations. The MACHDEP
1421# variable is also adjusted.
1422#
1423
1424if test ! -z "$SGI_ABI"
1425then
1426 CC="cc $SGI_ABI"
1427 LDFLAGS="$SGI_ABI $LDFLAGS"
1428 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1429fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001430echo "$as_me:$LINENO: result: $MACHDEP" >&5
1431echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001432
Jack Jansen83f898c2002-12-30 22:23:40 +00001433# And add extra plat-mac for darwin
1434
1435echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1436echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1437if test -z "$EXTRAPLATDIR"
1438then
1439 case $MACHDEP in
1440 darwin) EXTRAPLATDIR="\$(PLATMACDIRS)";;
1441 *) EXTRAPLATDIR="";;
1442 esac
1443fi
1444echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1445echo "${ECHO_T}$EXTRAPLATDIR" >&6
1446
Guido van Rossum627b2d71993-12-24 10:39:16 +00001447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001448
1449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1450# for debug/optimization stuff. BASECFLAGS is for flags that are required
1451# just to get things to compile and link. Users are free to override OPT
1452# when running configure or make. The build should not break if they do.
1453# BASECFLAGS should generally not be messed with, however.
1454
1455# XXX shouldn't some/most/all of this code be merged with the stuff later
1456# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001457echo "$as_me:$LINENO: checking for --without-gcc" >&5
1458echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001461if test "${with_gcc+set}" = set; then
1462 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
Guido van Rossum7f43da71994-08-01 12:15:30 +00001464 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001465 no) CC=cc
1466 without_gcc=yes;;
1467 yes) CC=gcc
1468 without_gcc=no;;
1469 *) CC=$withval
1470 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001471 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001472else
Martin v. Löwis11437992002-04-12 09:54:03 +00001473
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001474 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001475 AIX*) CC=cc_r
1476 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001477 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001478 case $BE_HOST_CPU in
1479 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001480 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001481 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001482 BASECFLAGS="$BASECFLAGS -export pragma"
1483 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001484 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001485 ;;
1486 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001487 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001488 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001489 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001490 ;;
1491 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1493echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1494 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001495 ;;
1496 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001497 AR="\$(srcdir)/Modules/ar_beos"
1498 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001499 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001500 Monterey*)
1501 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001502 without_gcc=;;
1503 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001504 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001505fi;
1506echo "$as_me:$LINENO: result: $without_gcc" >&5
1507echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001508
1509
Guido van Rossum95012191999-12-16 17:50:52 +00001510
Fred Drakea1a84e72001-03-06 05:52:16 +00001511MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001512echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1513echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1514
Guido van Rossum95012191999-12-16 17:50:52 +00001515# Check whether --with-cxx or --without-cxx was given.
1516if test "${with_cxx+set}" = set; then
1517 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001518
Martin v. Löwis22352952000-12-13 17:37:02 +00001519 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001520 case $withval in
1521 no) CXX=
1522 with_cxx=no;;
1523 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001524 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001525 with_cxx=$withval;;
1526 esac
1527else
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
Guido van Rossum95012191999-12-16 17:50:52 +00001529 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001530 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001531
Martin v. Löwis11437992002-04-12 09:54:03 +00001532fi;
1533echo "$as_me:$LINENO: result: $with_cxx" >&5
1534echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001535
1536if test "$with_cxx" = "yes"
1537then
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1539echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1540 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001541fi
1542
1543
1544
1545
Martin v. Löwis11437992002-04-12 09:54:03 +00001546if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001547then
1548 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1549do
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 # 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 +00001551set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001552echo "$as_me:$LINENO: checking for $ac_word" >&5
1553echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1554if test "${ac_cv_prog_CXX+set}" = set; then
1555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001556else
1557 if test -n "$CXX"; then
1558 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1559else
Martin v. Löwis11437992002-04-12 09:54:03 +00001560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1561for as_dir in $PATH
1562do
1563 IFS=$as_save_IFS
1564 test -z "$as_dir" && as_dir=.
1565 for ac_exec_ext in '' $ac_executable_extensions; do
1566 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1567 ac_cv_prog_CXX="$ac_prog"
1568 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1569 break 2
1570 fi
1571done
1572done
1573
Martin v. Löwis22352952000-12-13 17:37:02 +00001574fi
1575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001576CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001577if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 echo "$as_me:$LINENO: result: $CXX" >&5
1579echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001580else
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 echo "$as_me:$LINENO: result: no" >&5
1582echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001583fi
1584
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001586done
1587test -n "$CXX" || CXX="notfound"
1588
1589 if test "$CXX" = "notfound"
1590 then
1591 CXX=
1592 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001594ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1598 cat >conftest.$ac_ext <<_ACEOF
1599#line $LINENO "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +00001600#include "confdefs.h"
1601
Martin v. Löwis11437992002-04-12 09:54:03 +00001602int
1603main ()
1604{
Michael W. Hudson54241132001-12-07 15:38:26 +00001605
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ;
1607 return 0;
1608}
1609_ACEOF
1610ac_clean_files_save=$ac_clean_files
1611ac_clean_files="$ac_clean_files a.out a.exe"
1612# Try to create an executable without -o first, disregard a.out.
1613# It will help us diagnose broken compilers, and finding out an intuition
1614# of exeext.
1615echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1616echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1617ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1618if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1619 (eval $ac_link_default) 2>&5
1620 ac_status=$?
1621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1622 (exit $ac_status); }; then
1623 # Find the output, starting from the most likely. This scheme is
1624# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1625# resort.
1626
1627# Be careful to initialize this variable, since it used to be cached.
1628# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1629ac_cv_exeext=
Skip Montanarodecc6a42003-01-01 20:07:49 +00001630for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
1631 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 case $ac_file in
Skip Montanarodecc6a42003-01-01 20:07:49 +00001633 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001634 a.out ) # We found the default executable, but exeext='' is most
1635 # certainly right.
1636 break;;
1637 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1638 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1639 export ac_cv_exeext
1640 break;;
1641 * ) break;;
1642 esac
1643done
1644else
1645 echo "$as_me: failed program was:" >&5
1646cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +00001647{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1648check \`config.log' for details." >&5
1649echo "$as_me: error: C++ compiler cannot create executables
1650check \`config.log' for details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001651 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001653
1654ac_exeext=$ac_cv_exeext
1655echo "$as_me:$LINENO: result: $ac_file" >&5
1656echo "${ECHO_T}$ac_file" >&6
1657
1658# Check the compiler produces executables we can run. If not, either
1659# the compiler is broken, or we cross compile.
1660echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1661echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1662# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1663# If not cross compiling, check that we can run a simple program.
1664if test "$cross_compiling" != yes; then
1665 if { ac_try='./$ac_file'
1666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1667 (eval $ac_try) 2>&5
1668 ac_status=$?
1669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1670 (exit $ac_status); }; }; then
1671 cross_compiling=no
1672 else
1673 if test "$cross_compiling" = maybe; then
1674 cross_compiling=yes
1675 else
1676 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1677If you meant to cross compile, use \`--host'." >&5
1678echo "$as_me: error: cannot run C++ compiled programs.
1679If you meant to cross compile, use \`--host'." >&2;}
1680 { (exit 1); exit 1; }; }
1681 fi
1682 fi
1683fi
1684echo "$as_me:$LINENO: result: yes" >&5
1685echo "${ECHO_T}yes" >&6
1686
1687rm -f a.out a.exe conftest$ac_cv_exeext
1688ac_clean_files=$ac_clean_files_save
1689# Check the compiler produces executables we can run. If not, either
1690# the compiler is broken, or we cross compile.
1691echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1692echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1693echo "$as_me:$LINENO: result: $cross_compiling" >&5
1694echo "${ECHO_T}$cross_compiling" >&6
1695
1696echo "$as_me:$LINENO: checking for suffix of executables" >&5
1697echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1699 (eval $ac_link) 2>&5
1700 ac_status=$?
1701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1702 (exit $ac_status); }; then
1703 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1704# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1705# work properly (i.e., refer to `conftest.exe'), while it won't with
1706# `rm'.
Skip Montanarodecc6a42003-01-01 20:07:49 +00001707for ac_file in conftest.exe conftest conftest.*; do
1708 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 case $ac_file in
Skip Montanarodecc6a42003-01-01 20:07:49 +00001710 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1712 export ac_cv_exeext
1713 break;;
1714 * ) break;;
1715 esac
1716done
1717else
1718 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
1719echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
1720 { (exit 1); exit 1; }; }
1721fi
1722
1723rm -f conftest$ac_cv_exeext
1724echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1725echo "${ECHO_T}$ac_cv_exeext" >&6
1726
1727rm -f conftest.$ac_ext
1728EXEEXT=$ac_cv_exeext
1729ac_exeext=$EXEEXT
1730
1731 ac_ext=c
1732ac_cpp='$CPP $CPPFLAGS'
1733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1735ac_compiler_gnu=$ac_cv_c_compiler_gnu
1736
1737
Martin v. Löwis22352952000-12-13 17:37:02 +00001738
1739 fi
1740fi
1741
Guido van Rossum8b131c51995-03-09 14:10:13 +00001742# If the user switches compilers, we can't believe the cache
1743if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1744then
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1746(it is also a good idea to do 'make clean' before compiling)" >&5
1747echo "$as_me: error: cached CC is different -- throw away $cache_file
1748(it is also a good idea to do 'make clean' before compiling)" >&2;}
1749 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001750fi
1751
Martin v. Löwis11437992002-04-12 09:54:03 +00001752ac_ext=c
1753ac_cpp='$CPP $CPPFLAGS'
1754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1756ac_compiler_gnu=$ac_cv_c_compiler_gnu
1757if test -n "$ac_tool_prefix"; then
1758 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1759set dummy ${ac_tool_prefix}gcc; ac_word=$2
1760echo "$as_me:$LINENO: checking for $ac_word" >&5
1761echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1762if test "${ac_cv_prog_CC+set}" = set; then
1763 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001764else
1765 if test -n "$CC"; then
1766 ac_cv_prog_CC="$CC" # Let the user override the test.
1767else
Martin v. Löwis11437992002-04-12 09:54:03 +00001768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1769for as_dir in $PATH
1770do
1771 IFS=$as_save_IFS
1772 test -z "$as_dir" && as_dir=.
1773 for ac_exec_ext in '' $ac_executable_extensions; do
1774 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1775 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1776 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1777 break 2
1778 fi
1779done
1780done
1781
Jack Jansendd19cf82001-12-06 22:36:17 +00001782fi
1783fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001784CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001785if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001786 echo "$as_me:$LINENO: result: $CC" >&5
1787echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001788else
Martin v. Löwis11437992002-04-12 09:54:03 +00001789 echo "$as_me:$LINENO: result: no" >&5
1790echo "${ECHO_T}no" >&6
1791fi
1792
1793fi
1794if test -z "$ac_cv_prog_CC"; then
1795 ac_ct_CC=$CC
1796 # Extract the first word of "gcc", so it can be a program name with args.
1797set dummy gcc; ac_word=$2
1798echo "$as_me:$LINENO: checking for $ac_word" >&5
1799echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1800if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1801 echo $ECHO_N "(cached) $ECHO_C" >&6
1802else
1803 if test -n "$ac_ct_CC"; then
1804 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1805else
1806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1807for as_dir in $PATH
1808do
1809 IFS=$as_save_IFS
1810 test -z "$as_dir" && as_dir=.
1811 for ac_exec_ext in '' $ac_executable_extensions; do
1812 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1813 ac_cv_prog_ac_ct_CC="gcc"
1814 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1815 break 2
1816 fi
1817done
1818done
1819
1820fi
1821fi
1822ac_ct_CC=$ac_cv_prog_ac_ct_CC
1823if test -n "$ac_ct_CC"; then
1824 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1825echo "${ECHO_T}$ac_ct_CC" >&6
1826else
1827 echo "$as_me:$LINENO: result: no" >&5
1828echo "${ECHO_T}no" >&6
1829fi
1830
1831 CC=$ac_ct_CC
1832else
1833 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001834fi
1835
Jack Jansendd19cf82001-12-06 22:36:17 +00001836if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001837 if test -n "$ac_tool_prefix"; then
1838 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1839set dummy ${ac_tool_prefix}cc; ac_word=$2
1840echo "$as_me:$LINENO: checking for $ac_word" >&5
1841echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1842if test "${ac_cv_prog_CC+set}" = set; then
1843 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001844else
1845 if test -n "$CC"; then
1846 ac_cv_prog_CC="$CC" # Let the user override the test.
1847else
Martin v. Löwis11437992002-04-12 09:54:03 +00001848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1849for as_dir in $PATH
1850do
1851 IFS=$as_save_IFS
1852 test -z "$as_dir" && as_dir=.
1853 for ac_exec_ext in '' $ac_executable_extensions; do
1854 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1855 ac_cv_prog_CC="${ac_tool_prefix}cc"
1856 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1857 break 2
1858 fi
1859done
1860done
1861
1862fi
1863fi
1864CC=$ac_cv_prog_CC
1865if test -n "$CC"; then
1866 echo "$as_me:$LINENO: result: $CC" >&5
1867echo "${ECHO_T}$CC" >&6
1868else
1869 echo "$as_me:$LINENO: result: no" >&5
1870echo "${ECHO_T}no" >&6
1871fi
1872
1873fi
1874if test -z "$ac_cv_prog_CC"; then
1875 ac_ct_CC=$CC
1876 # Extract the first word of "cc", so it can be a program name with args.
1877set dummy cc; ac_word=$2
1878echo "$as_me:$LINENO: checking for $ac_word" >&5
1879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1881 echo $ECHO_N "(cached) $ECHO_C" >&6
1882else
1883 if test -n "$ac_ct_CC"; then
1884 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1885else
1886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1887for as_dir in $PATH
1888do
1889 IFS=$as_save_IFS
1890 test -z "$as_dir" && as_dir=.
1891 for ac_exec_ext in '' $ac_executable_extensions; do
1892 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1893 ac_cv_prog_ac_ct_CC="cc"
1894 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1895 break 2
1896 fi
1897done
1898done
1899
1900fi
1901fi
1902ac_ct_CC=$ac_cv_prog_ac_ct_CC
1903if test -n "$ac_ct_CC"; then
1904 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1905echo "${ECHO_T}$ac_ct_CC" >&6
1906else
1907 echo "$as_me:$LINENO: result: no" >&5
1908echo "${ECHO_T}no" >&6
1909fi
1910
1911 CC=$ac_ct_CC
1912else
1913 CC="$ac_cv_prog_CC"
1914fi
1915
1916fi
1917if test -z "$CC"; then
1918 # Extract the first word of "cc", so it can be a program name with args.
1919set dummy cc; ac_word=$2
1920echo "$as_me:$LINENO: checking for $ac_word" >&5
1921echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1922if test "${ac_cv_prog_CC+set}" = set; then
1923 echo $ECHO_N "(cached) $ECHO_C" >&6
1924else
1925 if test -n "$CC"; then
1926 ac_cv_prog_CC="$CC" # Let the user override the test.
1927else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001928 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1930for as_dir in $PATH
1931do
1932 IFS=$as_save_IFS
1933 test -z "$as_dir" && as_dir=.
1934 for ac_exec_ext in '' $ac_executable_extensions; do
1935 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1936 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1937 ac_prog_rejected=yes
1938 continue
1939 fi
1940 ac_cv_prog_CC="cc"
1941 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1942 break 2
1943 fi
1944done
1945done
1946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001947if test $ac_prog_rejected = yes; then
1948 # We found a bogon in the path, so make sure we never use it.
1949 set dummy $ac_cv_prog_CC
1950 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001951 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001952 # We chose a different compiler from the bogus one.
1953 # However, it has the same basename, so the bogon will be chosen
1954 # first if we set CC to just the basename; use the full file name.
1955 shift
Skip Montanarodecc6a42003-01-01 20:07:49 +00001956 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957 fi
1958fi
1959fi
1960fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001961CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001962if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001963 echo "$as_me:$LINENO: result: $CC" >&5
1964echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965else
Martin v. Löwis11437992002-04-12 09:54:03 +00001966 echo "$as_me:$LINENO: result: no" >&5
1967echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001968fi
1969
Martin v. Löwis11437992002-04-12 09:54:03 +00001970fi
1971if test -z "$CC"; then
1972 if test -n "$ac_tool_prefix"; then
1973 for ac_prog in cl
1974 do
1975 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1976set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1977echo "$as_me:$LINENO: checking for $ac_word" >&5
1978echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1979if test "${ac_cv_prog_CC+set}" = set; then
1980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001981else
1982 if test -n "$CC"; then
1983 ac_cv_prog_CC="$CC" # Let the user override the test.
1984else
Martin v. Löwis11437992002-04-12 09:54:03 +00001985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1986for as_dir in $PATH
1987do
1988 IFS=$as_save_IFS
1989 test -z "$as_dir" && as_dir=.
1990 for ac_exec_ext in '' $ac_executable_extensions; do
1991 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1992 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1994 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001996done
1997done
1998
1999fi
2000fi
2001CC=$ac_cv_prog_CC
2002if test -n "$CC"; then
2003 echo "$as_me:$LINENO: result: $CC" >&5
2004echo "${ECHO_T}$CC" >&6
2005else
2006 echo "$as_me:$LINENO: result: no" >&5
2007echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002008fi
2009
Martin v. Löwis11437992002-04-12 09:54:03 +00002010 test -n "$CC" && break
2011 done
2012fi
2013if test -z "$CC"; then
2014 ac_ct_CC=$CC
2015 for ac_prog in cl
2016do
2017 # Extract the first word of "$ac_prog", so it can be a program name with args.
2018set dummy $ac_prog; ac_word=$2
2019echo "$as_me:$LINENO: checking for $ac_word" >&5
2020echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2021if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2022 echo $ECHO_N "(cached) $ECHO_C" >&6
2023else
2024 if test -n "$ac_ct_CC"; then
2025 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2026else
2027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2028for as_dir in $PATH
2029do
2030 IFS=$as_save_IFS
2031 test -z "$as_dir" && as_dir=.
2032 for ac_exec_ext in '' $ac_executable_extensions; do
2033 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2034 ac_cv_prog_ac_ct_CC="$ac_prog"
2035 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2036 break 2
2037 fi
2038done
2039done
Jack Jansendd19cf82001-12-06 22:36:17 +00002040
Martin v. Löwis11437992002-04-12 09:54:03 +00002041fi
2042fi
2043ac_ct_CC=$ac_cv_prog_ac_ct_CC
2044if test -n "$ac_ct_CC"; then
2045 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2046echo "${ECHO_T}$ac_ct_CC" >&6
2047else
2048 echo "$as_me:$LINENO: result: no" >&5
2049echo "${ECHO_T}no" >&6
2050fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
Martin v. Löwis11437992002-04-12 09:54:03 +00002052 test -n "$ac_ct_CC" && break
2053done
Michael W. Hudson54241132001-12-07 15:38:26 +00002054
Martin v. Löwis11437992002-04-12 09:54:03 +00002055 CC=$ac_ct_CC
2056fi
2057
2058fi
2059
2060
2061test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2062echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2063 { (exit 1); exit 1; }; }
2064
2065# Provide some information about the compiler.
2066echo "$as_me:$LINENO:" \
2067 "checking for C compiler version" >&5
2068ac_compiler=`set X $ac_compile; echo $2`
2069{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2070 (eval $ac_compiler --version </dev/null >&5) 2>&5
2071 ac_status=$?
2072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2073 (exit $ac_status); }
2074{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2075 (eval $ac_compiler -v </dev/null >&5) 2>&5
2076 ac_status=$?
2077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2078 (exit $ac_status); }
2079{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2080 (eval $ac_compiler -V </dev/null >&5) 2>&5
2081 ac_status=$?
2082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2083 (exit $ac_status); }
2084
2085cat >conftest.$ac_ext <<_ACEOF
2086#line $LINENO "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00002087#include "confdefs.h"
2088
Martin v. Löwis11437992002-04-12 09:54:03 +00002089int
2090main ()
2091{
2092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097ac_clean_files_save=$ac_clean_files
2098ac_clean_files="$ac_clean_files a.out a.exe"
2099# Try to create an executable without -o first, disregard a.out.
2100# It will help us diagnose broken compilers, and finding out an intuition
2101# of exeext.
2102echo "$as_me:$LINENO: checking for C compiler default output" >&5
2103echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2104ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2105if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2106 (eval $ac_link_default) 2>&5
2107 ac_status=$?
2108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2109 (exit $ac_status); }; then
2110 # Find the output, starting from the most likely. This scheme is
2111# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2112# resort.
2113
2114# Be careful to initialize this variable, since it used to be cached.
2115# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2116ac_cv_exeext=
Skip Montanarodecc6a42003-01-01 20:07:49 +00002117for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
2118 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002119 case $ac_file in
Skip Montanarodecc6a42003-01-01 20:07:49 +00002120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 a.out ) # We found the default executable, but exeext='' is most
2122 # certainly right.
2123 break;;
2124 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2125 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2126 export ac_cv_exeext
2127 break;;
2128 * ) break;;
2129 esac
2130done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002131else
Martin v. Löwis11437992002-04-12 09:54:03 +00002132 echo "$as_me: failed program was:" >&5
2133cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +00002134{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2135check \`config.log' for details." >&5
2136echo "$as_me: error: C compiler cannot create executables
2137check \`config.log' for details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002138 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002139fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002140
Martin v. Löwis11437992002-04-12 09:54:03 +00002141ac_exeext=$ac_cv_exeext
2142echo "$as_me:$LINENO: result: $ac_file" >&5
2143echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002144
Martin v. Löwis11437992002-04-12 09:54:03 +00002145# Check the compiler produces executables we can run. If not, either
2146# the compiler is broken, or we cross compile.
2147echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2148echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2149# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2150# If not cross compiling, check that we can run a simple program.
2151if test "$cross_compiling" != yes; then
2152 if { ac_try='./$ac_file'
2153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2154 (eval $ac_try) 2>&5
2155 ac_status=$?
2156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2157 (exit $ac_status); }; }; then
2158 cross_compiling=no
2159 else
2160 if test "$cross_compiling" = maybe; then
2161 cross_compiling=yes
2162 else
2163 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2164If you meant to cross compile, use \`--host'." >&5
2165echo "$as_me: error: cannot run C compiled programs.
2166If you meant to cross compile, use \`--host'." >&2;}
2167 { (exit 1); exit 1; }; }
2168 fi
2169 fi
2170fi
2171echo "$as_me:$LINENO: result: yes" >&5
2172echo "${ECHO_T}yes" >&6
2173
2174rm -f a.out a.exe conftest$ac_cv_exeext
2175ac_clean_files=$ac_clean_files_save
2176# Check the compiler produces executables we can run. If not, either
2177# the compiler is broken, or we cross compile.
2178echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2179echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2180echo "$as_me:$LINENO: result: $cross_compiling" >&5
2181echo "${ECHO_T}$cross_compiling" >&6
2182
2183echo "$as_me:$LINENO: checking for suffix of executables" >&5
2184echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2186 (eval $ac_link) 2>&5
2187 ac_status=$?
2188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2189 (exit $ac_status); }; then
2190 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2191# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2192# work properly (i.e., refer to `conftest.exe'), while it won't with
2193# `rm'.
Skip Montanarodecc6a42003-01-01 20:07:49 +00002194for ac_file in conftest.exe conftest conftest.*; do
2195 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002196 case $ac_file in
Skip Montanarodecc6a42003-01-01 20:07:49 +00002197 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002198 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2199 export ac_cv_exeext
2200 break;;
2201 * ) break;;
2202 esac
2203done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204else
Martin v. Löwis11437992002-04-12 09:54:03 +00002205 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2206echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2207 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002208fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002209
Martin v. Löwis11437992002-04-12 09:54:03 +00002210rm -f conftest$ac_cv_exeext
2211echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2212echo "${ECHO_T}$ac_cv_exeext" >&6
2213
2214rm -f conftest.$ac_ext
2215EXEEXT=$ac_cv_exeext
2216ac_exeext=$EXEEXT
2217echo "$as_me:$LINENO: checking for suffix of object files" >&5
2218echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2219if test "${ac_cv_objext+set}" = set; then
2220 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002221else
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 cat >conftest.$ac_ext <<_ACEOF
2223#line $LINENO "configure"
2224#include "confdefs.h"
2225
Martin v. Löwis11437992002-04-12 09:54:03 +00002226int
2227main ()
2228{
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234rm -f conftest.o conftest.obj
2235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2236 (eval $ac_compile) 2>&5
2237 ac_status=$?
2238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2239 (exit $ac_status); }; then
2240 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2241 case $ac_file in
Skip Montanarodecc6a42003-01-01 20:07:49 +00002242 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002243 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2244 break;;
2245 esac
2246done
2247else
2248 echo "$as_me: failed program was:" >&5
2249cat conftest.$ac_ext >&5
2250{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2251echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2252 { (exit 1); exit 1; }; }
2253fi
2254
2255rm -f conftest.$ac_cv_objext conftest.$ac_ext
2256fi
2257echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2258echo "${ECHO_T}$ac_cv_objext" >&6
2259OBJEXT=$ac_cv_objext
2260ac_objext=$OBJEXT
2261echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2262echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2263if test "${ac_cv_c_compiler_gnu+set}" = set; then
2264 echo $ECHO_N "(cached) $ECHO_C" >&6
2265else
2266 cat >conftest.$ac_ext <<_ACEOF
2267#line $LINENO "configure"
2268#include "confdefs.h"
2269
Martin v. Löwis11437992002-04-12 09:54:03 +00002270int
2271main ()
2272{
2273#ifndef __GNUC__
2274 choke me
2275#endif
2276
2277 ;
2278 return 0;
2279}
2280_ACEOF
2281rm -f conftest.$ac_objext
2282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2283 (eval $ac_compile) 2>&5
2284 ac_status=$?
2285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2286 (exit $ac_status); } &&
2287 { ac_try='test -s conftest.$ac_objext'
2288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2289 (eval $ac_try) 2>&5
2290 ac_status=$?
2291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2292 (exit $ac_status); }; }; then
2293 ac_compiler_gnu=yes
2294else
2295 echo "$as_me: failed program was:" >&5
2296cat conftest.$ac_ext >&5
2297ac_compiler_gnu=no
2298fi
2299rm -f conftest.$ac_objext conftest.$ac_ext
2300ac_cv_c_compiler_gnu=$ac_compiler_gnu
2301
2302fi
2303echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2304echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2305GCC=`test $ac_compiler_gnu = yes && echo yes`
2306ac_test_CFLAGS=${CFLAGS+set}
2307ac_save_CFLAGS=$CFLAGS
2308CFLAGS="-g"
2309echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2310echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2311if test "${ac_cv_prog_cc_g+set}" = set; then
2312 echo $ECHO_N "(cached) $ECHO_C" >&6
2313else
2314 cat >conftest.$ac_ext <<_ACEOF
2315#line $LINENO "configure"
2316#include "confdefs.h"
2317
Martin v. Löwis11437992002-04-12 09:54:03 +00002318int
2319main ()
2320{
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326rm -f conftest.$ac_objext
2327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2328 (eval $ac_compile) 2>&5
2329 ac_status=$?
2330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2331 (exit $ac_status); } &&
2332 { ac_try='test -s conftest.$ac_objext'
2333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2334 (eval $ac_try) 2>&5
2335 ac_status=$?
2336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2337 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002338 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002339else
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 echo "$as_me: failed program was:" >&5
2341cat conftest.$ac_ext >&5
2342ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002343fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002344rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002346echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2347echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002348if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002350elif test $ac_cv_prog_cc_g = yes; then
2351 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002352 CFLAGS="-g -O2"
2353 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002354 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355 fi
2356else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002357 if test "$GCC" = yes; then
2358 CFLAGS="-O2"
2359 else
2360 CFLAGS=
2361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002362fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00002363echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2364echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2365if test "${ac_cv_prog_cc_stdc+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368 ac_cv_prog_cc_stdc=no
2369ac_save_CC=$CC
2370cat >conftest.$ac_ext <<_ACEOF
2371#line $LINENO "configure"
2372#include "confdefs.h"
2373#include <stdarg.h>
2374#include <stdio.h>
2375#include <sys/types.h>
2376#include <sys/stat.h>
2377/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2378struct buf { int x; };
2379FILE * (*rcsopen) (struct buf *, struct stat *, int);
2380static char *e (p, i)
2381 char **p;
2382 int i;
2383{
2384 return p[i];
2385}
2386static char *f (char * (*g) (char **, int), char **p, ...)
2387{
2388 char *s;
2389 va_list v;
2390 va_start (v,p);
2391 s = g (p, va_arg (v,int));
2392 va_end (v);
2393 return s;
2394}
2395int test (int i, double x);
2396struct s1 {int (*f) (int a);};
2397struct s2 {int (*f) (double a);};
2398int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2399int argc;
2400char **argv;
2401int
2402main ()
2403{
2404return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2405 ;
2406 return 0;
2407}
2408_ACEOF
2409# Don't try gcc -ansi; that turns off useful extensions and
2410# breaks some systems' header files.
2411# AIX -qlanglvl=ansi
2412# Ultrix and OSF/1 -std1
2413# HP-UX 10.20 and later -Ae
2414# HP-UX older versions -Aa -D_HPUX_SOURCE
2415# SVR4 -Xc -D__EXTENSIONS__
2416for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2417do
2418 CC="$ac_save_CC $ac_arg"
2419 rm -f conftest.$ac_objext
2420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2422 ac_status=$?
2423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424 (exit $ac_status); } &&
2425 { ac_try='test -s conftest.$ac_objext'
2426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427 (eval $ac_try) 2>&5
2428 ac_status=$?
2429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430 (exit $ac_status); }; }; then
2431 ac_cv_prog_cc_stdc=$ac_arg
2432break
2433else
2434 echo "$as_me: failed program was:" >&5
2435cat conftest.$ac_ext >&5
2436fi
2437rm -f conftest.$ac_objext
2438done
2439rm -f conftest.$ac_ext conftest.$ac_objext
2440CC=$ac_save_CC
2441
2442fi
2443
2444case "x$ac_cv_prog_cc_stdc" in
2445 x|xno)
2446 echo "$as_me:$LINENO: result: none needed" >&5
2447echo "${ECHO_T}none needed" >&6 ;;
2448 *)
2449 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2450echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2451 CC="$CC $ac_cv_prog_cc_stdc" ;;
2452esac
2453
Martin v. Löwis11437992002-04-12 09:54:03 +00002454# Some people use a C++ compiler to compile C. Since we use `exit',
2455# in C++ we need to declare it. In case someone uses the same compiler
2456# for both compiling C and C++ we need to have the C++ compiler decide
2457# the declaration of exit, since it's the most demanding environment.
2458cat >conftest.$ac_ext <<_ACEOF
2459#ifndef __cplusplus
2460 choke me
2461#endif
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 for ac_declaration in \
2476 ''\
2477 '#include <stdlib.h>' \
2478 'extern "C" void std::exit (int) throw (); using std::exit;' \
2479 'extern "C" void std::exit (int); using std::exit;' \
2480 'extern "C" void exit (int) throw ();' \
2481 'extern "C" void exit (int);' \
2482 'void exit (int);'
2483do
2484 cat >conftest.$ac_ext <<_ACEOF
2485#line $LINENO "configure"
2486#include "confdefs.h"
2487#include <stdlib.h>
2488$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002489int
2490main ()
2491{
2492exit (42);
2493 ;
2494 return 0;
2495}
2496_ACEOF
2497rm -f conftest.$ac_objext
2498if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2499 (eval $ac_compile) 2>&5
2500 ac_status=$?
2501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502 (exit $ac_status); } &&
2503 { ac_try='test -s conftest.$ac_objext'
2504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2505 (eval $ac_try) 2>&5
2506 ac_status=$?
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); }; }; then
2509 :
2510else
2511 echo "$as_me: failed program was:" >&5
2512cat conftest.$ac_ext >&5
2513continue
2514fi
2515rm -f conftest.$ac_objext conftest.$ac_ext
2516 cat >conftest.$ac_ext <<_ACEOF
2517#line $LINENO "configure"
2518#include "confdefs.h"
2519$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002520int
2521main ()
2522{
2523exit (42);
2524 ;
2525 return 0;
2526}
2527_ACEOF
2528rm -f conftest.$ac_objext
2529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2530 (eval $ac_compile) 2>&5
2531 ac_status=$?
2532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2533 (exit $ac_status); } &&
2534 { ac_try='test -s conftest.$ac_objext'
2535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2536 (eval $ac_try) 2>&5
2537 ac_status=$?
2538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2539 (exit $ac_status); }; }; then
2540 break
2541else
2542 echo "$as_me: failed program was:" >&5
2543cat conftest.$ac_ext >&5
2544fi
2545rm -f conftest.$ac_objext conftest.$ac_ext
2546done
2547rm -f conftest*
2548if test -n "$ac_declaration"; then
2549 echo '#ifdef __cplusplus' >>confdefs.h
2550 echo $ac_declaration >>confdefs.h
2551 echo '#endif' >>confdefs.h
2552fi
2553
2554else
2555 echo "$as_me: failed program was:" >&5
2556cat conftest.$ac_ext >&5
2557fi
2558rm -f conftest.$ac_objext conftest.$ac_ext
2559ac_ext=c
2560ac_cpp='$CPP $CPPFLAGS'
2561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2563ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002564
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002565
2566# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568ac_ext=c
2569ac_cpp='$CPP $CPPFLAGS'
2570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2572ac_compiler_gnu=$ac_cv_c_compiler_gnu
2573echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2574echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002575# On Suns, sometimes $CPP names a directory.
2576if test -n "$CPP" && test -d "$CPP"; then
2577 CPP=
2578fi
2579if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 if test "${ac_cv_prog_CPP+set}" = set; then
2581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002582else
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 # Double quotes because CPP needs to be expanded
2584 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2585 do
2586 ac_preproc_ok=false
2587for ac_c_preproc_warn_flag in '' yes
2588do
2589 # Use a header file that comes with gcc, so configuring glibc
2590 # with a fresh cross-compiler works.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002591 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 # not just through cpp. "Syntax error" is here to catch this case.
2593 cat >conftest.$ac_ext <<_ACEOF
2594#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002595#include "confdefs.h"
2596#include <assert.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 Syntax error
2598_ACEOF
2599if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2600 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2601 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00002602 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 rm -f conftest.er1
2604 cat conftest.err >&5
2605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2606 (exit $ac_status); } >/dev/null; then
2607 if test -s conftest.err; then
2608 ac_cpp_err=$ac_c_preproc_warn_flag
2609 else
2610 ac_cpp_err=
2611 fi
2612else
2613 ac_cpp_err=yes
2614fi
2615if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002616 :
2617else
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002619 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 # Broken: fails on valid input.
2621continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002623rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 # OK, works on sane cases. Now check whether non-existent headers
2626 # can be detected and how.
2627 cat >conftest.$ac_ext <<_ACEOF
2628#line $LINENO "configure"
2629#include "confdefs.h"
2630#include <ac_nonexistent.h>
2631_ACEOF
2632if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2633 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2634 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00002635 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 rm -f conftest.er1
2637 cat conftest.err >&5
2638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2639 (exit $ac_status); } >/dev/null; then
2640 if test -s conftest.err; then
2641 ac_cpp_err=$ac_c_preproc_warn_flag
2642 else
2643 ac_cpp_err=
2644 fi
2645else
2646 ac_cpp_err=yes
2647fi
2648if test -z "$ac_cpp_err"; then
2649 # Broken: success on invalid input.
2650continue
2651else
2652 echo "$as_me: failed program was:" >&5
2653 cat conftest.$ac_ext >&5
2654 # Passes both tests.
2655ac_preproc_ok=:
2656break
2657fi
2658rm -f conftest.err conftest.$ac_ext
2659
2660done
2661# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2662rm -f conftest.err conftest.$ac_ext
2663if $ac_preproc_ok; then
2664 break
2665fi
2666
2667 done
2668 ac_cv_prog_CPP=$CPP
2669
2670fi
2671 CPP=$ac_cv_prog_CPP
2672else
2673 ac_cv_prog_CPP=$CPP
2674fi
2675echo "$as_me:$LINENO: result: $CPP" >&5
2676echo "${ECHO_T}$CPP" >&6
2677ac_preproc_ok=false
2678for ac_c_preproc_warn_flag in '' yes
2679do
2680 # Use a header file that comes with gcc, so configuring glibc
2681 # with a fresh cross-compiler works.
2682 # On the NeXT, cc -E runs the code through the compiler's parser,
2683 # not just through cpp. "Syntax error" is here to catch this case.
2684 cat >conftest.$ac_ext <<_ACEOF
2685#line $LINENO "configure"
2686#include "confdefs.h"
2687#include <assert.h>
2688 Syntax error
2689_ACEOF
2690if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2691 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2692 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00002693 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 rm -f conftest.er1
2695 cat conftest.err >&5
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); } >/dev/null; then
2698 if test -s conftest.err; then
2699 ac_cpp_err=$ac_c_preproc_warn_flag
2700 else
2701 ac_cpp_err=
2702 fi
2703else
2704 ac_cpp_err=yes
2705fi
2706if test -z "$ac_cpp_err"; then
2707 :
2708else
2709 echo "$as_me: failed program was:" >&5
2710 cat conftest.$ac_ext >&5
2711 # Broken: fails on valid input.
2712continue
2713fi
2714rm -f conftest.err conftest.$ac_ext
2715
2716 # OK, works on sane cases. Now check whether non-existent headers
2717 # can be detected and how.
2718 cat >conftest.$ac_ext <<_ACEOF
2719#line $LINENO "configure"
2720#include "confdefs.h"
2721#include <ac_nonexistent.h>
2722_ACEOF
2723if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2724 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2725 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00002726 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 rm -f conftest.er1
2728 cat conftest.err >&5
2729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730 (exit $ac_status); } >/dev/null; then
2731 if test -s conftest.err; then
2732 ac_cpp_err=$ac_c_preproc_warn_flag
2733 else
2734 ac_cpp_err=
2735 fi
2736else
2737 ac_cpp_err=yes
2738fi
2739if test -z "$ac_cpp_err"; then
2740 # Broken: success on invalid input.
2741continue
2742else
2743 echo "$as_me: failed program was:" >&5
2744 cat conftest.$ac_ext >&5
2745 # Passes both tests.
2746ac_preproc_ok=:
2747break
2748fi
2749rm -f conftest.err conftest.$ac_ext
2750
2751done
2752# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2753rm -f conftest.err conftest.$ac_ext
2754if $ac_preproc_ok; then
2755 :
2756else
2757 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2758echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2759 { (exit 1); exit 1; }; }
2760fi
2761
2762ac_ext=c
2763ac_cpp='$CPP $CPPFLAGS'
2764ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767
2768
Skip Montanarodecc6a42003-01-01 20:07:49 +00002769echo "$as_me:$LINENO: checking for egrep" >&5
2770echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2771if test "${ac_cv_prog_egrep+set}" = set; then
2772 echo $ECHO_N "(cached) $ECHO_C" >&6
2773else
2774 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2775 then ac_cv_prog_egrep='grep -E'
2776 else ac_cv_prog_egrep='egrep'
2777 fi
2778fi
2779echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2780echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2781 EGREP=$ac_cv_prog_egrep
2782
2783
Martin v. Löwis11437992002-04-12 09:54:03 +00002784
2785echo "$as_me:$LINENO: checking for AIX" >&5
2786echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2787cat >conftest.$ac_ext <<_ACEOF
2788#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002789#include "confdefs.h"
2790#ifdef _AIX
2791 yes
2792#endif
2793
Martin v. Löwis11437992002-04-12 09:54:03 +00002794_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00002796 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 echo "$as_me:$LINENO: result: yes" >&5
2798echo "${ECHO_T}yes" >&6
2799cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002800#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00002801_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002802
2803else
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 echo "$as_me:$LINENO: result: no" >&5
2805echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002806fi
2807rm -f conftest*
2808
Michael W. Hudson54241132001-12-07 15:38:26 +00002809
Martin v. Löwis11437992002-04-12 09:54:03 +00002810echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2811echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2812if test "${ac_cv_header_stdc+set}" = set; then
2813 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002814else
Martin v. Löwis11437992002-04-12 09:54:03 +00002815 cat >conftest.$ac_ext <<_ACEOF
2816#line $LINENO "configure"
2817#include "confdefs.h"
2818#include <stdlib.h>
2819#include <stdarg.h>
2820#include <string.h>
2821#include <float.h>
2822
2823_ACEOF
2824if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2825 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2826 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00002827 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 rm -f conftest.er1
2829 cat conftest.err >&5
2830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2831 (exit $ac_status); } >/dev/null; then
2832 if test -s conftest.err; then
2833 ac_cpp_err=$ac_c_preproc_warn_flag
2834 else
2835 ac_cpp_err=
2836 fi
2837else
2838 ac_cpp_err=yes
2839fi
2840if test -z "$ac_cpp_err"; then
2841 ac_cv_header_stdc=yes
2842else
2843 echo "$as_me: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 ac_cv_header_stdc=no
2846fi
2847rm -f conftest.err conftest.$ac_ext
2848
2849if test $ac_cv_header_stdc = yes; then
2850 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2851 cat >conftest.$ac_ext <<_ACEOF
2852#line $LINENO "configure"
2853#include "confdefs.h"
2854#include <string.h>
2855
2856_ACEOF
2857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00002858 $EGREP "memchr" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 :
2860else
2861 ac_cv_header_stdc=no
2862fi
2863rm -f conftest*
2864
2865fi
2866
2867if test $ac_cv_header_stdc = yes; then
2868 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2869 cat >conftest.$ac_ext <<_ACEOF
2870#line $LINENO "configure"
2871#include "confdefs.h"
2872#include <stdlib.h>
2873
2874_ACEOF
2875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00002876 $EGREP "free" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 :
2878else
2879 ac_cv_header_stdc=no
2880fi
2881rm -f conftest*
2882
2883fi
2884
2885if test $ac_cv_header_stdc = yes; then
2886 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2887 if test "$cross_compiling" = yes; then
2888 :
2889else
2890 cat >conftest.$ac_ext <<_ACEOF
2891#line $LINENO "configure"
2892#include "confdefs.h"
2893#include <ctype.h>
2894#if ((' ' & 0x0FF) == 0x020)
2895# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2896# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2897#else
2898# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
2899 || ('j' <= (c) && (c) <= 'r') \
2900 || ('s' <= (c) && (c) <= 'z'))
2901# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2902#endif
2903
2904#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2905int
2906main ()
2907{
2908 int i;
2909 for (i = 0; i < 256; i++)
2910 if (XOR (islower (i), ISLOWER (i))
2911 || toupper (i) != TOUPPER (i))
2912 exit(2);
2913 exit (0);
2914}
2915_ACEOF
2916rm -f conftest$ac_exeext
2917if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2918 (eval $ac_link) 2>&5
2919 ac_status=$?
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2923 (eval $ac_try) 2>&5
2924 ac_status=$?
2925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2926 (exit $ac_status); }; }; then
2927 :
2928else
2929 echo "$as_me: program exited with status $ac_status" >&5
2930echo "$as_me: failed program was:" >&5
2931cat conftest.$ac_ext >&5
2932( exit $ac_status )
2933ac_cv_header_stdc=no
2934fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00002935rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002936fi
2937fi
2938fi
2939echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
2940echo "${ECHO_T}$ac_cv_header_stdc" >&6
2941if test $ac_cv_header_stdc = yes; then
2942
2943cat >>confdefs.h <<\_ACEOF
2944#define STDC_HEADERS 1
2945_ACEOF
2946
2947fi
2948
2949# On IRIX 5.3, sys/types and inttypes.h are conflicting.
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
2960 inttypes.h stdint.h unistd.h
2961do
2962as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
2963echo "$as_me:$LINENO: checking for $ac_header" >&5
2964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
2965if eval "test \"\${$as_ac_Header+set}\" = set"; then
2966 echo $ECHO_N "(cached) $ECHO_C" >&6
2967else
2968 cat >conftest.$ac_ext <<_ACEOF
2969#line $LINENO "configure"
2970#include "confdefs.h"
2971$ac_includes_default
2972
2973#include <$ac_header>
2974_ACEOF
2975rm -f conftest.$ac_objext
2976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2977 (eval $ac_compile) 2>&5
2978 ac_status=$?
2979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2980 (exit $ac_status); } &&
2981 { ac_try='test -s conftest.$ac_objext'
2982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2983 (eval $ac_try) 2>&5
2984 ac_status=$?
2985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2986 (exit $ac_status); }; }; then
2987 eval "$as_ac_Header=yes"
2988else
2989 echo "$as_me: failed program was:" >&5
2990cat conftest.$ac_ext >&5
2991eval "$as_ac_Header=no"
2992fi
2993rm -f conftest.$ac_objext conftest.$ac_ext
2994fi
2995echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
2996echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
2997if test `eval echo '${'$as_ac_Header'}'` = yes; then
2998 cat >>confdefs.h <<_ACEOF
2999#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3000_ACEOF
3001
3002fi
3003
3004done
3005
3006
3007if test "${ac_cv_header_minix_config_h+set}" = set; then
3008 echo "$as_me:$LINENO: checking for minix/config.h" >&5
3009echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3010if test "${ac_cv_header_minix_config_h+set}" = set; then
3011 echo $ECHO_N "(cached) $ECHO_C" >&6
3012fi
3013echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3014echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3015else
3016 # Is the header compilable?
3017echo "$as_me:$LINENO: checking minix/config.h usability" >&5
3018echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
3019cat >conftest.$ac_ext <<_ACEOF
3020#line $LINENO "configure"
3021#include "confdefs.h"
3022$ac_includes_default
3023#include <minix/config.h>
3024_ACEOF
3025rm -f conftest.$ac_objext
3026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3027 (eval $ac_compile) 2>&5
3028 ac_status=$?
3029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3030 (exit $ac_status); } &&
3031 { ac_try='test -s conftest.$ac_objext'
3032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3033 (eval $ac_try) 2>&5
3034 ac_status=$?
3035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3036 (exit $ac_status); }; }; then
3037 ac_header_compiler=yes
3038else
3039 echo "$as_me: failed program was:" >&5
3040cat conftest.$ac_ext >&5
3041ac_header_compiler=no
3042fi
3043rm -f conftest.$ac_objext conftest.$ac_ext
3044echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3045echo "${ECHO_T}$ac_header_compiler" >&6
3046
3047# Is the header present?
3048echo "$as_me:$LINENO: checking minix/config.h presence" >&5
3049echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
3050cat >conftest.$ac_ext <<_ACEOF
3051#line $LINENO "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003052#include "confdefs.h"
3053#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003054_ACEOF
3055if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3056 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3057 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00003058 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 rm -f conftest.er1
3060 cat conftest.err >&5
3061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3062 (exit $ac_status); } >/dev/null; then
3063 if test -s conftest.err; then
3064 ac_cpp_err=$ac_c_preproc_warn_flag
3065 else
3066 ac_cpp_err=
3067 fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003068else
Martin v. Löwis11437992002-04-12 09:54:03 +00003069 ac_cpp_err=yes
3070fi
3071if test -z "$ac_cpp_err"; then
3072 ac_header_preproc=yes
3073else
3074 echo "$as_me: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003075 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003076 ac_header_preproc=no
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003077fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003078rm -f conftest.err conftest.$ac_ext
3079echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3080echo "${ECHO_T}$ac_header_preproc" >&6
3081
3082# So? What about this header?
3083case $ac_header_compiler:$ac_header_preproc in
3084 yes:no )
3085 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
3086echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
3087 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3088echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3089 no:yes )
3090 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
3091echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
3092 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
3093echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
3094 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
3095echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};;
3096esac
3097echo "$as_me:$LINENO: checking for minix/config.h" >&5
3098echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
3099if test "${ac_cv_header_minix_config_h+set}" = set; then
3100 echo $ECHO_N "(cached) $ECHO_C" >&6
3101else
3102 ac_cv_header_minix_config_h=$ac_header_preproc
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003103fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003104echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
3105echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
3106
3107fi
3108if test $ac_cv_header_minix_config_h = yes; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003109 MINIX=yes
3110else
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003112fi
3113
Martin v. Löwis11437992002-04-12 09:54:03 +00003114
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003115if test "$MINIX" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003116
3117cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003118#define _POSIX_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003119_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003120
Martin v. Löwis11437992002-04-12 09:54:03 +00003121
3122cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003123#define _POSIX_1_SOURCE 2
Martin v. Löwis11437992002-04-12 09:54:03 +00003124_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003125
Martin v. Löwis11437992002-04-12 09:54:03 +00003126
3127cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003128#define _MINIX 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003129_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003130
3131fi
3132
3133
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003134# Check for unsupported systems
3135case $ac_sys_system/$ac_sys_release in
3136SunOS/4*|DYNIX/*|dgux*/*|IRIX/4*|Linux*/1*)
3137 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3138 echo See README for details.
3139 exit 1;;
3140esac
3141
3142if test "$MINIX" = yes; then
3143 echo This system \(MINIX\) is no longer supported.
3144 echo Read README for details.
3145 exit 1
3146fi
3147
Michael W. Hudson54241132001-12-07 15:38:26 +00003148
Martin v. Löwis11437992002-04-12 09:54:03 +00003149echo "$as_me:$LINENO: checking for --with-suffix" >&5
3150echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003151
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003152# Check whether --with-suffix or --without-suffix was given.
3153if test "${with_suffix+set}" = set; then
3154 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003155
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003156 case $withval in
3157 no) EXEEXT=;;
3158 yes) EXEEXT=.exe;;
3159 *) EXEEXT=$withval;;
3160 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003161fi;
3162echo "$as_me:$LINENO: result: $EXEEXT" >&5
3163echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003164
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003165# Test whether we're running on a non-case-sensitive system, in which
3166# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003167
Martin v. Löwis11437992002-04-12 09:54:03 +00003168echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3169echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003170if test ! -d CaseSensitiveTestDir; then
3171mkdir CaseSensitiveTestDir
3172fi
3173
3174if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003175then
Martin v. Löwis11437992002-04-12 09:54:03 +00003176 echo "$as_me:$LINENO: result: yes" >&5
3177echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003178 BUILDEXEEXT=.exe
3179else
Martin v. Löwis11437992002-04-12 09:54:03 +00003180 echo "$as_me:$LINENO: result: no" >&5
3181echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003182 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003183fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003184rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003185
Guido van Rossumdd997f71998-10-07 19:58:26 +00003186case $MACHDEP in
3187bsdos*)
3188 case $CC in
3189 gcc) CC="$CC -D_HAVE_BSDI";;
3190 esac;;
3191esac
3192
Guido van Rossum24b1e751997-08-21 02:29:16 +00003193case $ac_sys_system in
3194hp*|HP*)
3195 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003196 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003197 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003198Monterey*)
3199 case $CC in
3200 cc) CC="$CC -Wl,-Bexport";;
3201 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003202SunOS*)
3203 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
3205cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003206#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003207_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003208
3209 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003210esac
3211
Michael W. Hudson54241132001-12-07 15:38:26 +00003212
3213
Martin v. Löwis11437992002-04-12 09:54:03 +00003214echo "$as_me:$LINENO: checking LIBRARY" >&5
3215echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003216if test -z "$LIBRARY"
3217then
3218 LIBRARY='libpython$(VERSION).a'
3219fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003220echo "$as_me:$LINENO: result: $LIBRARY" >&5
3221echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003222
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003223# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003224# name of the library into which to insert object files). BLDLIBRARY is also
3225# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3226# is blank as the main program is not linked directly against LDLIBRARY.
3227# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3228# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3229# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3230# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003231#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003232# RUNSHARED is used to run shared python without installed libraries
3233#
3234# INSTSONAME is the name of the shared library that will be use to install
3235# on the system - some systems like version suffix, others don't
3236
3237
Michael W. Hudson54241132001-12-07 15:38:26 +00003238
3239
3240
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003241
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003242LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003243BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003244INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003245DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003246LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003247RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003248
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003249# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003250# If CXX is set, and if it is needed to link a main function that was
3251# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3252# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003253# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003254# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003255
Martin v. Löwis11437992002-04-12 09:54:03 +00003256echo "$as_me:$LINENO: checking LINKCC" >&5
3257echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003258if test -z "$LINKCC"
3259then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003260 if test -z "$CXX"; then
3261 LINKCC="\$(PURIFY) \$(CC)"
3262 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003263 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003264 $CXX -c conftest.$ac_ext 2>&5
3265 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3266 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3267 then
3268 LINKCC="\$(PURIFY) \$(CC)"
3269 else
3270 LINKCC="\$(PURIFY) \$(CXX)"
3271 fi
3272 rm -fr conftest*
3273 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003274 case $ac_sys_system in
3275 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00003276 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003277 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003278 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003279 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003280 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003281 esac
3282fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283echo "$as_me:$LINENO: result: $LINKCC" >&5
3284echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003285
Martin v. Löwis11437992002-04-12 09:54:03 +00003286echo "$as_me:$LINENO: checking for --enable-shared" >&5
3287echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003288# Check whether --enable-shared or --disable-shared was given.
3289if test "${enable_shared+set}" = set; then
3290 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003291
Martin v. Löwis11437992002-04-12 09:54:03 +00003292fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003293
3294if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003295then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003296 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003297 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003298 enable_shared="yes";;
3299 *)
3300 enable_shared="no";;
3301 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003302fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003303echo "$as_me:$LINENO: result: $enable_shared" >&5
3304echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003305
3306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3308echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003309
Guido van Rossumb8552162001-09-05 14:58:11 +00003310# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3311# library that we build, but we do not want to link against it (we
3312# will find it with a -framework option). For this reason there is an
3313# extra variable BLDLIBRARY against which Python and the extension
3314# modules are linked, BLDLIBRARY. This is normally the same as
3315# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003316if test "$enable_framework"
3317then
3318 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
3319 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
3320 BLDLIBRARY=''
3321else
3322 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003323fi
Jack Jansene578a632001-08-15 01:27:14 +00003324
Martin v. Löwis1142de32002-03-29 16:28:31 +00003325# Other platforms follow
3326if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003327
3328cat >>confdefs.h <<\_ACEOF
3329#define Py_ENABLE_SHARED 1
3330_ACEOF
3331
Martin v. Löwis1142de32002-03-29 16:28:31 +00003332 case $ac_sys_system in
3333 BeOS*)
3334 LDLIBRARY='libpython$(VERSION).so'
3335 ;;
3336 CYGWIN*)
3337 LDLIBRARY='libpython$(VERSION).dll.a'
3338 DLLLIBRARY='libpython$(VERSION).dll'
3339 ;;
3340 SunOS*)
3341 LDLIBRARY='libpython$(VERSION).so'
3342 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
3343 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3344 ;;
Martin v. Löwis1bc894b2002-07-30 20:19:58 +00003345 Linux*|GNU*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003346 LDLIBRARY='libpython$(VERSION).so'
3347 BLDLIBRARY='-L. -lpython$(VERSION)'
3348 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3349 INSTSONAME="$LDLIBRARY".$SOVERSION
3350 ;;
3351 hp*|HP*)
3352 LDLIBRARY='libpython$(VERSION).sl'
3353 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
3354 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
3355 ;;
3356 OSF*)
3357 LDLIBRARY='libpython$(VERSION).so'
3358 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
3359 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
3360 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003361 atheos*)
3362 LDLIBRARY='libpython$(VERSION).so'
3363 BLDLIBRARY='-L. -lpython$(VERSION)'
3364 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3365 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003366 esac
3367 # DG/UX requires some fancy ld contortions to produce a .so from an .a
3368 case $MACHDEP in
3369 dguxR4)
3370 LDLIBRARY='libpython$(VERSION).so'
Skip Montanarodecc6a42003-01-01 20:07:49 +00003371 BASECFLAGS="$BASECFLAGS -pic"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003372 ;;
3373 esac
3374fi
3375
Martin v. Löwis11437992002-04-12 09:54:03 +00003376echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3377echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003378
Martin v. Löwis11437992002-04-12 09:54:03 +00003379if test -n "$ac_tool_prefix"; then
3380 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3381set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3382echo "$as_me:$LINENO: checking for $ac_word" >&5
3383echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3384if test "${ac_cv_prog_RANLIB+set}" = set; then
3385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003386else
3387 if test -n "$RANLIB"; then
3388 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3389else
Martin v. Löwis11437992002-04-12 09:54:03 +00003390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
3395 for ac_exec_ext in '' $ac_executable_extensions; do
3396 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3397 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3398 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3399 break 2
3400 fi
3401done
3402done
3403
Guido van Rossum627b2d71993-12-24 10:39:16 +00003404fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003405fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003406RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 echo "$as_me:$LINENO: result: $RANLIB" >&5
3409echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003410else
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 echo "$as_me:$LINENO: result: no" >&5
3412echo "${ECHO_T}no" >&6
3413fi
3414
3415fi
3416if test -z "$ac_cv_prog_RANLIB"; then
3417 ac_ct_RANLIB=$RANLIB
3418 # Extract the first word of "ranlib", so it can be a program name with args.
3419set dummy ranlib; ac_word=$2
3420echo "$as_me:$LINENO: checking for $ac_word" >&5
3421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3422if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3423 echo $ECHO_N "(cached) $ECHO_C" >&6
3424else
3425 if test -n "$ac_ct_RANLIB"; then
3426 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3427else
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
3433 for ac_exec_ext in '' $ac_executable_extensions; do
3434 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3435 ac_cv_prog_ac_ct_RANLIB="ranlib"
3436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3437 break 2
3438 fi
3439done
3440done
3441
3442 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3443fi
3444fi
3445ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3446if test -n "$ac_ct_RANLIB"; then
3447 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3448echo "${ECHO_T}$ac_ct_RANLIB" >&6
3449else
3450 echo "$as_me:$LINENO: result: no" >&5
3451echo "${ECHO_T}no" >&6
3452fi
3453
3454 RANLIB=$ac_ct_RANLIB
3455else
3456 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003457fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458
3459
Guido van Rossum7f43da71994-08-01 12:15:30 +00003460for ac_prog in ar aal
3461do
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003463set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003464echo "$as_me:$LINENO: checking for $ac_word" >&5
3465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3466if test "${ac_cv_prog_AR+set}" = set; then
3467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003468else
3469 if test -n "$AR"; then
3470 ac_cv_prog_AR="$AR" # Let the user override the test.
3471else
Martin v. Löwis11437992002-04-12 09:54:03 +00003472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3473for as_dir in $PATH
3474do
3475 IFS=$as_save_IFS
3476 test -z "$as_dir" && as_dir=.
3477 for ac_exec_ext in '' $ac_executable_extensions; do
3478 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3479 ac_cv_prog_AR="$ac_prog"
3480 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3481 break 2
3482 fi
3483done
3484done
3485
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003487fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003488AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003489if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 echo "$as_me:$LINENO: result: $AR" >&5
3491echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 echo "$as_me:$LINENO: result: no" >&5
3494echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003495fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003496
Martin v. Löwis11437992002-04-12 09:54:03 +00003497 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003498done
3499test -n "$AR" || AR="ar"
3500
Michael W. Hudson54241132001-12-07 15:38:26 +00003501
Neil Schemenauera42c8272001-03-31 00:01:55 +00003502case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003503bsdos*|hp*|HP*)
3504 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003505 if test -z "$INSTALL"
3506 then
3507 INSTALL="${srcdir}/install-sh -c"
3508 fi
3509esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003510ac_aux_dir=
3511for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3512 if test -f $ac_dir/install-sh; then
3513 ac_aux_dir=$ac_dir
3514 ac_install_sh="$ac_aux_dir/install-sh -c"
3515 break
3516 elif test -f $ac_dir/install.sh; then
3517 ac_aux_dir=$ac_dir
3518 ac_install_sh="$ac_aux_dir/install.sh -c"
3519 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 elif test -f $ac_dir/shtool; then
3521 ac_aux_dir=$ac_dir
3522 ac_install_sh="$ac_aux_dir/shtool install -c"
3523 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003524 fi
3525done
3526if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3528echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3529 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3532ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3533ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003534
3535# Find a good install program. We prefer a C program (faster),
3536# so one script is as good as another. But avoid the broken or
3537# incompatible versions:
3538# SysV /etc/install, /usr/sbin/install
3539# SunOS /usr/etc/install
3540# IRIX /sbin/install
3541# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003542# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003543# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3544# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3545# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3546# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003547echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3548echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003549if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003550if test "${ac_cv_path_install+set}" = set; then
3551 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003552else
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3554for as_dir in $PATH
3555do
3556 IFS=$as_save_IFS
3557 test -z "$as_dir" && as_dir=.
3558 # Account for people who put trailing slashes in PATH elements.
3559case $as_dir/ in
3560 ./ | .// | /cC/* | \
3561 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3562 /usr/ucb/* ) ;;
3563 *)
3564 # OSF1 and SCO ODT 3.0 have their own names for install.
3565 # Don't use installbsd from OSF since it installs stuff as root
3566 # by default.
3567 for ac_prog in ginstall scoinst install; do
3568 for ac_exec_ext in '' $ac_executable_extensions; do
3569 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3570 if test $ac_prog = install &&
3571 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3572 # AIX install. It has an incompatible calling convention.
3573 :
3574 elif test $ac_prog = install &&
3575 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3576 # program-specific install script used by HP pwplus--don't use.
3577 :
3578 else
3579 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3580 break 3
3581 fi
3582 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003583 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 done
3585 ;;
3586esac
3587done
3588
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589
3590fi
3591 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003593 else
3594 # As a last resort, use the slow shell script. We don't cache a
3595 # path for INSTALL within a source directory, because that will
3596 # break other packages using the cache if that directory is
3597 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003599 fi
3600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601echo "$as_me:$LINENO: result: $INSTALL" >&5
3602echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003603
3604# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3605# It thinks the first close brace ends the variable substitution.
3606test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3607
Martin v. Löwis11437992002-04-12 09:54:03 +00003608test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003609
3610test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3611
Michael W. Hudson54241132001-12-07 15:38:26 +00003612
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003613# Not every filesystem supports hard links
3614
3615if test -z "$LN" ; then
3616 case $ac_sys_system in
3617 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003618 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003619 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003620 *) LN=ln;;
3621 esac
3622fi
3623
Fred Drake109d9862001-07-11 06:27:56 +00003624# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003625echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3626echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3627
Fred Drake109d9862001-07-11 06:27:56 +00003628# Check whether --with-pydebug or --without-pydebug was given.
3629if test "${with_pydebug+set}" = set; then
3630 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
Fred Drake109d9862001-07-11 06:27:56 +00003632if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003633then
3634
3635cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003636#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003637_ACEOF
3638
3639 echo "$as_me:$LINENO: result: yes" >&5
3640echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003641 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else echo "$as_me:$LINENO: result: no" >&5
3643echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003644fi
3645else
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 echo "$as_me:$LINENO: result: no" >&5
3647echo "${ECHO_T}no" >&6
3648fi;
Fred Drake109d9862001-07-11 06:27:56 +00003649
Skip Montanarodecc6a42003-01-01 20:07:49 +00003650# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3651# merged with this chunk of code?
3652
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003653# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003654# ------------------------
3655# (The following bit of code is complicated enough - please keep things
3656# indented properly. Just pretend you're editing Python code. ;-)
3657
3658# There are two parallel sets of case statements below, one that checks to
3659# see if OPT was set and one that does BASECFLAGS setting based upon
3660# compiler and platform. BASECFLAGS tweaks need to be made even if the
3661# user set OPT.
3662
3663# tweak OPT based on compiler and platform, only if the user didn't set
3664# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003665
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003666if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003667then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003668 case $GCC in
3669 yes)
3670 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003671 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003672 if test "$Py_DEBUG" = 'true' ; then
3673 # Optimization messes up debuggers, so turn it off for
3674 # debug builds.
3675 OPT="-g -Wall -Wstrict-prototypes"
3676 else
3677 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003678 fi
3679 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003680 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003681 OPT="-O3 -Wall -Wstrict-prototypes"
3682 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003683 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003684 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003685 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3686 ;;
3687 esac
Fred Drake109d9862001-07-11 06:27:56 +00003688 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003689
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003690 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003691 OPT="-O"
3692 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003693 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003694
3695 # The current (beta) Monterey compiler dies with optimizations
3696 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003697 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003698 Monterey*)
3699 OPT=""
3700 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003701 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003702
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003703fi
3704
Skip Montanarodecc6a42003-01-01 20:07:49 +00003705
3706# tweak BASECFLAGS based on compiler and platform
3707case $GCC in
3708yes)
3709 case $ac_sys_system in
3710 SCO_SV*)
3711 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3712 ;;
3713 # is there any other compiler on Darwin besides gcc?
3714 Darwin*)
3715 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp"
3716 ;;
3717 esac
3718 ;;
3719
3720*)
3721 case $ac_sys_system in
3722 OpenUNIX*|UnixWare*)
3723 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3724 ;;
3725 SCO_SV*)
3726 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3727 ;;
3728 esac
3729 ;;
3730esac
3731
Fred Drakee1ceaa02001-12-04 20:55:47 +00003732if test "$Py_DEBUG" = 'true'; then
3733 :
3734else
3735 OPT="-DNDEBUG $OPT"
3736fi
3737
Guido van Rossum563e7081996-09-10 18:20:48 +00003738if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003739then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003740 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003741fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003742
Martin v. Löwis11437992002-04-12 09:54:03 +00003743echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3744echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3745if test "${ac_cv_opt_olimit_ok+set}" = set; then
3746 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003747else
3748 ac_save_cc="$CC"
3749CC="$CC -OPT:Olimit=0"
3750if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003751 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003752else
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 cat >conftest.$ac_ext <<_ACEOF
3754#line $LINENO "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00003755#include "confdefs.h"
3756int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757_ACEOF
3758rm -f conftest$ac_exeext
3759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3760 (eval $ac_link) 2>&5
3761 ac_status=$?
3762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3765 (eval $ac_try) 2>&5
3766 ac_status=$?
3767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003769 ac_cv_opt_olimit_ok=yes
3770else
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 echo "$as_me: program exited with status $ac_status" >&5
3772echo "$as_me: failed program was:" >&5
3773cat conftest.$ac_ext >&5
3774( exit $ac_status )
3775ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003776fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003777rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003778fi
Guido van Rossum91922671997-10-09 20:24:13 +00003779CC="$ac_save_cc"
3780fi
3781
Martin v. Löwis11437992002-04-12 09:54:03 +00003782echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3783echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003784if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003785 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003786 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3787 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3788 # environment?
3789 Darwin*)
3790 ;;
3791 *)
3792 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3793 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003794 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003795else
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3797echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3798 if test "${ac_cv_olimit_ok+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003800else
3801 ac_save_cc="$CC"
3802 CC="$CC -Olimit 1500"
3803 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003804 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003805else
Martin v. Löwis11437992002-04-12 09:54:03 +00003806 cat >conftest.$ac_ext <<_ACEOF
3807#line $LINENO "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003808#include "confdefs.h"
3809int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810_ACEOF
3811rm -f conftest$ac_exeext
3812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3813 (eval $ac_link) 2>&5
3814 ac_status=$?
3815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3818 (eval $ac_try) 2>&5
3819 ac_status=$?
3820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3821 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003822 ac_cv_olimit_ok=yes
3823else
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 echo "$as_me: program exited with status $ac_status" >&5
3825echo "$as_me: failed program was:" >&5
3826cat conftest.$ac_ext >&5
3827( exit $ac_status )
3828ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003829fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003830rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003831fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003832 CC="$ac_save_cc"
3833fi
3834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3836echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003837 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003838 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003839 fi
3840fi
3841
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003842# On some compilers, pthreads are available without further options
3843# (e.g. MacOS X). On some of these systems, the compiler will not
3844# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3845# So we have to see first whether pthreads are available without
3846# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003847echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3848echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3849if test "${ac_cv_pthread_is_default+set}" = set; then
3850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003851else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003852 if test "$cross_compiling" = yes; then
3853 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003854else
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 cat >conftest.$ac_ext <<_ACEOF
3856#line $LINENO "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003857#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003858
Martin v. Löwis130fb172001-07-19 11:00:41 +00003859#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003860
3861void* routine(void* p){return NULL;}
3862
3863int main(){
3864 pthread_t p;
3865 if(pthread_create(&p,NULL,routine,NULL)!=0)
3866 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003867 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003868 return 0;
3869}
3870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871_ACEOF
3872rm -f conftest$ac_exeext
3873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3874 (eval $ac_link) 2>&5
3875 ac_status=$?
3876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3879 (eval $ac_try) 2>&5
3880 ac_status=$?
3881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3882 (exit $ac_status); }; }; then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003883 ac_cv_pthread_is_default=yes
3884else
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 echo "$as_me: program exited with status $ac_status" >&5
3886echo "$as_me: failed program was:" >&5
3887cat conftest.$ac_ext >&5
3888( exit $ac_status )
3889ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003890fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003891rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003892fi
3893
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003894fi
3895
Martin v. Löwis11437992002-04-12 09:54:03 +00003896echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3897echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003898
Michael W. Hudson54241132001-12-07 15:38:26 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003901then
3902 ac_cv_kpthread=no
3903else
3904# -Kpthread, if available, provides the right #defines
3905# and linker options to make pthread_create available
3906# Some compilers won't report that they do not support -Kpthread,
3907# so we need to run a program to see whether it really made the
3908# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003909echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3910echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3911if test "${ac_cv_kpthread+set}" = set; then
3912 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003913else
3914 ac_save_cc="$CC"
3915CC="$CC -Kpthread"
3916if test "$cross_compiling" = yes; then
3917 ac_cv_kpthread=no
3918else
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 cat >conftest.$ac_ext <<_ACEOF
3920#line $LINENO "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003921#include "confdefs.h"
3922
3923#include <pthread.h>
3924
3925void* routine(void* p){return NULL;}
3926
3927int main(){
3928 pthread_t p;
3929 if(pthread_create(&p,NULL,routine,NULL)!=0)
3930 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003931 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003932 return 0;
3933}
3934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935_ACEOF
3936rm -f conftest$ac_exeext
3937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3938 (eval $ac_link) 2>&5
3939 ac_status=$?
3940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
3944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003947 ac_cv_kpthread=yes
3948else
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 echo "$as_me: program exited with status $ac_status" >&5
3950echo "$as_me: failed program was:" >&5
3951cat conftest.$ac_ext >&5
3952( exit $ac_status )
3953ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003954fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003955rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003956fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003957CC="$ac_save_cc"
3958fi
3959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3961echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003962fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003963
Michael W. Hudson54241132001-12-07 15:38:26 +00003964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003965# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00003966echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3967echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3968if test "${ac_cv_header_stdc+set}" = set; then
3969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970else
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 cat >conftest.$ac_ext <<_ACEOF
3972#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003973#include "confdefs.h"
3974#include <stdlib.h>
3975#include <stdarg.h>
3976#include <string.h>
3977#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003978
3979_ACEOF
3980if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3981 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3982 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00003983 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 rm -f conftest.er1
3985 cat conftest.err >&5
3986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3987 (exit $ac_status); } >/dev/null; then
3988 if test -s conftest.err; then
3989 ac_cpp_err=$ac_c_preproc_warn_flag
3990 else
3991 ac_cpp_err=
3992 fi
3993else
3994 ac_cpp_err=yes
3995fi
3996if test -z "$ac_cpp_err"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997 ac_cv_header_stdc=yes
3998else
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004000 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001 ac_cv_header_stdc=no
4002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004003rm -f conftest.err conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004
4005if test $ac_cv_header_stdc = yes; then
4006 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 cat >conftest.$ac_ext <<_ACEOF
4008#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004009#include "confdefs.h"
4010#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004011
4012_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00004014 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004015 :
4016else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017 ac_cv_header_stdc=no
4018fi
4019rm -f conftest*
4020
4021fi
4022
4023if test $ac_cv_header_stdc = yes; then
4024 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 cat >conftest.$ac_ext <<_ACEOF
4026#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027#include "confdefs.h"
4028#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004029
4030_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00004032 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033 :
4034else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035 ac_cv_header_stdc=no
4036fi
4037rm -f conftest*
4038
4039fi
4040
4041if test $ac_cv_header_stdc = yes; then
4042 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004044 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Martin v. Löwis11437992002-04-12 09:54:03 +00004046 cat >conftest.$ac_ext <<_ACEOF
4047#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004048#include "confdefs.h"
4049#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004050#if ((' ' & 0x0FF) == 0x020)
4051# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4052# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4053#else
4054# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4055 || ('j' <= (c) && (c) <= 'r') \
4056 || ('s' <= (c) && (c) <= 'z'))
4057# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4058#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004059
Martin v. Löwis11437992002-04-12 09:54:03 +00004060#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4061int
4062main ()
4063{
4064 int i;
4065 for (i = 0; i < 256; i++)
4066 if (XOR (islower (i), ISLOWER (i))
4067 || toupper (i) != TOUPPER (i))
4068 exit(2);
4069 exit (0);
4070}
4071_ACEOF
4072rm -f conftest$ac_exeext
4073if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4074 (eval $ac_link) 2>&5
4075 ac_status=$?
4076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4079 (eval $ac_try) 2>&5
4080 ac_status=$?
4081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4082 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004083 :
4084else
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 echo "$as_me: program exited with status $ac_status" >&5
4086echo "$as_me: failed program was:" >&5
4087cat conftest.$ac_ext >&5
4088( exit $ac_status )
4089ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004090fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004091rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004092fi
4093fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004094fi
4095echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4096echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004097if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004098
4099cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004101_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004102
4103fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004142
Martin v. Löwis11437992002-04-12 09:54:03 +00004143for ac_header in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004144libintl.h locale.h ncurses.h poll.h pthread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004145signal.h stdarg.h stddef.h stdlib.h stropts.h termios.h thread.h \
4146unistd.h utime.h \
Skip Montanaro57454e52002-06-14 20:30:31 +00004147sys/audioio.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004148sys/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 +00004149sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Skip Montanaro8345f712002-06-25 05:53:48 +00004150sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004151do
Martin v. Löwis11437992002-04-12 09:54:03 +00004152as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4153if eval "test \"\${$as_ac_Header+set}\" = set"; then
4154 echo "$as_me:$LINENO: checking for $ac_header" >&5
4155echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4156if eval "test \"\${$as_ac_Header+set}\" = set"; then
4157 echo $ECHO_N "(cached) $ECHO_C" >&6
4158fi
4159echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4160echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161else
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 # Is the header compilable?
4163echo "$as_me:$LINENO: checking $ac_header usability" >&5
4164echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4165cat >conftest.$ac_ext <<_ACEOF
4166#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004167#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004168$ac_includes_default
4169#include <$ac_header>
4170_ACEOF
4171rm -f conftest.$ac_objext
4172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4173 (eval $ac_compile) 2>&5
4174 ac_status=$?
4175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4176 (exit $ac_status); } &&
4177 { ac_try='test -s conftest.$ac_objext'
4178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4179 (eval $ac_try) 2>&5
4180 ac_status=$?
4181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4182 (exit $ac_status); }; }; then
4183 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004184else
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 echo "$as_me: failed program was:" >&5
4186cat conftest.$ac_ext >&5
4187ac_header_compiler=no
4188fi
4189rm -f conftest.$ac_objext conftest.$ac_ext
4190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4191echo "${ECHO_T}$ac_header_compiler" >&6
4192
4193# Is the header present?
4194echo "$as_me:$LINENO: checking $ac_header presence" >&5
4195echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4196cat >conftest.$ac_ext <<_ACEOF
4197#line $LINENO "configure"
4198#include "confdefs.h"
4199#include <$ac_header>
4200_ACEOF
4201if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4202 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4203 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00004204 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 rm -f conftest.er1
4206 cat conftest.err >&5
4207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4208 (exit $ac_status); } >/dev/null; then
4209 if test -s conftest.err; then
4210 ac_cpp_err=$ac_c_preproc_warn_flag
4211 else
4212 ac_cpp_err=
4213 fi
4214else
4215 ac_cpp_err=yes
4216fi
4217if test -z "$ac_cpp_err"; then
4218 ac_header_preproc=yes
4219else
4220 echo "$as_me: failed program was:" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004221 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004224rm -f conftest.err conftest.$ac_ext
4225echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4226echo "${ECHO_T}$ac_header_preproc" >&6
4227
4228# So? What about this header?
4229case $ac_header_compiler:$ac_header_preproc in
4230 yes:no )
4231 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4232echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4233 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4234echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4235 no:yes )
4236 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4237echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4238 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4239echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4240 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4241echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
4242esac
4243echo "$as_me:$LINENO: checking for $ac_header" >&5
4244echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4245if eval "test \"\${$as_ac_Header+set}\" = set"; then
4246 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004247else
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004250echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4251echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4252
4253fi
4254if test `eval echo '${'$as_ac_Header'}'` = yes; then
4255 cat >>confdefs.h <<_ACEOF
4256#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4257_ACEOF
4258
4259fi
4260
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261done
4262
Martin v. Löwis11437992002-04-12 09:54:03 +00004263
4264
4265
4266
4267
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004269for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4270 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4271echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4272echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4273if eval "test \"\${$as_ac_Header+set}\" = set"; then
4274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 cat >conftest.$ac_ext <<_ACEOF
4277#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278#include "confdefs.h"
4279#include <sys/types.h>
4280#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
Martin v. Löwis11437992002-04-12 09:54:03 +00004282int
4283main ()
4284{
4285if ((DIR *) 0)
4286return 0;
4287 ;
4288 return 0;
4289}
4290_ACEOF
4291rm -f conftest.$ac_objext
4292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4293 (eval $ac_compile) 2>&5
4294 ac_status=$?
4295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4296 (exit $ac_status); } &&
4297 { ac_try='test -s conftest.$ac_objext'
4298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4299 (eval $ac_try) 2>&5
4300 ac_status=$?
4301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4302 (exit $ac_status); }; }; then
4303 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004304else
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 echo "$as_me: failed program was:" >&5
4306cat conftest.$ac_ext >&5
4307eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004309rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004311echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4312echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4313if test `eval echo '${'$as_ac_Header'}'` = yes; then
4314 cat >>confdefs.h <<_ACEOF
4315#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4316_ACEOF
4317
4318ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321done
4322# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4323if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4325echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4326if test "${ac_cv_search_opendir+set}" = set; then
4327 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328else
Martin v. Löwis11437992002-04-12 09:54:03 +00004329 ac_func_search_save_LIBS=$LIBS
4330ac_cv_search_opendir=no
4331cat >conftest.$ac_ext <<_ACEOF
4332#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004335/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004336#ifdef __cplusplus
4337extern "C"
4338#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004339/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004340 builtin and then its argument prototype would still apply. */
4341char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004342int
4343main ()
4344{
4345opendir ();
4346 ;
4347 return 0;
4348}
4349_ACEOF
4350rm -f conftest.$ac_objext conftest$ac_exeext
4351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4352 (eval $ac_link) 2>&5
4353 ac_status=$?
4354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4355 (exit $ac_status); } &&
4356 { ac_try='test -s conftest$ac_exeext'
4357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4358 (eval $ac_try) 2>&5
4359 ac_status=$?
4360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4361 (exit $ac_status); }; }; then
4362 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363else
Martin v. Löwis11437992002-04-12 09:54:03 +00004364 echo "$as_me: failed program was:" >&5
4365cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004366fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4368if test "$ac_cv_search_opendir" = no; then
4369 for ac_lib in dir; do
4370 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4371 cat >conftest.$ac_ext <<_ACEOF
4372#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004374
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004376#ifdef __cplusplus
4377extern "C"
4378#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004379/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 builtin and then its argument prototype would still apply. */
4381char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004382int
4383main ()
4384{
4385opendir ();
4386 ;
4387 return 0;
4388}
4389_ACEOF
4390rm -f conftest.$ac_objext conftest$ac_exeext
4391if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4392 (eval $ac_link) 2>&5
4393 ac_status=$?
4394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395 (exit $ac_status); } &&
4396 { ac_try='test -s conftest$ac_exeext'
4397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4398 (eval $ac_try) 2>&5
4399 ac_status=$?
4400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4401 (exit $ac_status); }; }; then
4402 ac_cv_search_opendir="-l$ac_lib"
4403break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404else
Martin v. Löwis11437992002-04-12 09:54:03 +00004405 echo "$as_me: failed program was:" >&5
4406cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004408rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4409 done
4410fi
4411LIBS=$ac_func_search_save_LIBS
4412fi
4413echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4414echo "${ECHO_T}$ac_cv_search_opendir" >&6
4415if test "$ac_cv_search_opendir" != no; then
4416 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004417
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004419
Michael W. Hudson54241132001-12-07 15:38:26 +00004420else
Martin v. Löwis11437992002-04-12 09:54:03 +00004421 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4422echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4423if test "${ac_cv_search_opendir+set}" = set; then
4424 echo $ECHO_N "(cached) $ECHO_C" >&6
4425else
4426 ac_func_search_save_LIBS=$LIBS
4427ac_cv_search_opendir=no
4428cat >conftest.$ac_ext <<_ACEOF
4429#line $LINENO "configure"
4430#include "confdefs.h"
4431
4432/* Override any gcc2 internal prototype to avoid an error. */
4433#ifdef __cplusplus
4434extern "C"
4435#endif
4436/* We use char because int might match the return type of a gcc2
4437 builtin and then its argument prototype would still apply. */
4438char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004439int
4440main ()
4441{
4442opendir ();
4443 ;
4444 return 0;
4445}
4446_ACEOF
4447rm -f conftest.$ac_objext conftest$ac_exeext
4448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4449 (eval $ac_link) 2>&5
4450 ac_status=$?
4451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4452 (exit $ac_status); } &&
4453 { ac_try='test -s conftest$ac_exeext'
4454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4455 (eval $ac_try) 2>&5
4456 ac_status=$?
4457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4458 (exit $ac_status); }; }; then
4459 ac_cv_search_opendir="none required"
4460else
4461 echo "$as_me: failed program was:" >&5
4462cat conftest.$ac_ext >&5
4463fi
4464rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4465if test "$ac_cv_search_opendir" = no; then
4466 for ac_lib in x; do
4467 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4468 cat >conftest.$ac_ext <<_ACEOF
4469#line $LINENO "configure"
4470#include "confdefs.h"
4471
4472/* Override any gcc2 internal prototype to avoid an error. */
4473#ifdef __cplusplus
4474extern "C"
4475#endif
4476/* We use char because int might match the return type of a gcc2
4477 builtin and then its argument prototype would still apply. */
4478char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004479int
4480main ()
4481{
4482opendir ();
4483 ;
4484 return 0;
4485}
4486_ACEOF
4487rm -f conftest.$ac_objext conftest$ac_exeext
4488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4489 (eval $ac_link) 2>&5
4490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); } &&
4493 { ac_try='test -s conftest$ac_exeext'
4494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4495 (eval $ac_try) 2>&5
4496 ac_status=$?
4497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4498 (exit $ac_status); }; }; then
4499 ac_cv_search_opendir="-l$ac_lib"
4500break
4501else
4502 echo "$as_me: failed program was:" >&5
4503cat conftest.$ac_ext >&5
4504fi
4505rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4506 done
4507fi
4508LIBS=$ac_func_search_save_LIBS
4509fi
4510echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4511echo "${ECHO_T}$ac_cv_search_opendir" >&6
4512if test "$ac_cv_search_opendir" != no; then
4513 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515fi
4516
4517fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004518
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004519echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4520echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4521if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
4523else
4524 cat >conftest.$ac_ext <<_ACEOF
4525#line $LINENO "configure"
4526#include "confdefs.h"
4527#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004528int
4529main ()
4530{
4531return makedev(0, 0);
4532 ;
4533 return 0;
4534}
4535_ACEOF
4536rm -f conftest.$ac_objext conftest$ac_exeext
4537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4538 (eval $ac_link) 2>&5
4539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); } &&
4542 { ac_try='test -s conftest$ac_exeext'
4543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4544 (eval $ac_try) 2>&5
4545 ac_status=$?
4546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547 (exit $ac_status); }; }; then
4548 ac_cv_header_sys_types_h_makedev=yes
4549else
4550 echo "$as_me: failed program was:" >&5
4551cat conftest.$ac_ext >&5
4552ac_cv_header_sys_types_h_makedev=no
4553fi
4554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4555
4556fi
4557echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4558echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4559
4560if test $ac_cv_header_sys_types_h_makedev = no; then
4561if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4562 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4563echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4564if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4565 echo $ECHO_N "(cached) $ECHO_C" >&6
4566fi
4567echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4568echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4569else
4570 # Is the header compilable?
4571echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4572echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4573cat >conftest.$ac_ext <<_ACEOF
4574#line $LINENO "configure"
4575#include "confdefs.h"
4576$ac_includes_default
4577#include <sys/mkdev.h>
4578_ACEOF
4579rm -f conftest.$ac_objext
4580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4581 (eval $ac_compile) 2>&5
4582 ac_status=$?
4583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4584 (exit $ac_status); } &&
4585 { ac_try='test -s conftest.$ac_objext'
4586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4587 (eval $ac_try) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); }; }; then
4591 ac_header_compiler=yes
4592else
4593 echo "$as_me: failed program was:" >&5
4594cat conftest.$ac_ext >&5
4595ac_header_compiler=no
4596fi
4597rm -f conftest.$ac_objext conftest.$ac_ext
4598echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4599echo "${ECHO_T}$ac_header_compiler" >&6
4600
4601# Is the header present?
4602echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4603echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4604cat >conftest.$ac_ext <<_ACEOF
4605#line $LINENO "configure"
4606#include "confdefs.h"
4607#include <sys/mkdev.h>
4608_ACEOF
4609if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4610 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4611 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00004612 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004613 rm -f conftest.er1
4614 cat conftest.err >&5
4615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616 (exit $ac_status); } >/dev/null; then
4617 if test -s conftest.err; then
4618 ac_cpp_err=$ac_c_preproc_warn_flag
4619 else
4620 ac_cpp_err=
4621 fi
4622else
4623 ac_cpp_err=yes
4624fi
4625if test -z "$ac_cpp_err"; then
4626 ac_header_preproc=yes
4627else
4628 echo "$as_me: failed program was:" >&5
4629 cat conftest.$ac_ext >&5
4630 ac_header_preproc=no
4631fi
4632rm -f conftest.err conftest.$ac_ext
4633echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4634echo "${ECHO_T}$ac_header_preproc" >&6
4635
4636# So? What about this header?
4637case $ac_header_compiler:$ac_header_preproc in
4638 yes:no )
4639 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4640echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4641 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4642echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4643 no:yes )
4644 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4645echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4646 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4647echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4648 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4649echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;};;
4650esac
4651echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4652echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4653if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4654 echo $ECHO_N "(cached) $ECHO_C" >&6
4655else
4656 ac_cv_header_sys_mkdev_h=$ac_header_preproc
4657fi
4658echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4659echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4660
4661fi
4662if test $ac_cv_header_sys_mkdev_h = yes; then
4663
4664cat >>confdefs.h <<\_ACEOF
4665#define MAJOR_IN_MKDEV 1
4666_ACEOF
4667
4668fi
4669
4670
4671
4672 if test $ac_cv_header_sys_mkdev_h = no; then
4673 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4674 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4675echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4676if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4677 echo $ECHO_N "(cached) $ECHO_C" >&6
4678fi
4679echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4680echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4681else
4682 # Is the header compilable?
4683echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
4684echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
4685cat >conftest.$ac_ext <<_ACEOF
4686#line $LINENO "configure"
4687#include "confdefs.h"
4688$ac_includes_default
4689#include <sys/sysmacros.h>
4690_ACEOF
4691rm -f conftest.$ac_objext
4692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4693 (eval $ac_compile) 2>&5
4694 ac_status=$?
4695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696 (exit $ac_status); } &&
4697 { ac_try='test -s conftest.$ac_objext'
4698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4699 (eval $ac_try) 2>&5
4700 ac_status=$?
4701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4702 (exit $ac_status); }; }; then
4703 ac_header_compiler=yes
4704else
4705 echo "$as_me: failed program was:" >&5
4706cat conftest.$ac_ext >&5
4707ac_header_compiler=no
4708fi
4709rm -f conftest.$ac_objext conftest.$ac_ext
4710echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4711echo "${ECHO_T}$ac_header_compiler" >&6
4712
4713# Is the header present?
4714echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
4715echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
4716cat >conftest.$ac_ext <<_ACEOF
4717#line $LINENO "configure"
4718#include "confdefs.h"
4719#include <sys/sysmacros.h>
4720_ACEOF
4721if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4722 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4723 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00004724 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004725 rm -f conftest.er1
4726 cat conftest.err >&5
4727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4728 (exit $ac_status); } >/dev/null; then
4729 if test -s conftest.err; then
4730 ac_cpp_err=$ac_c_preproc_warn_flag
4731 else
4732 ac_cpp_err=
4733 fi
4734else
4735 ac_cpp_err=yes
4736fi
4737if test -z "$ac_cpp_err"; then
4738 ac_header_preproc=yes
4739else
4740 echo "$as_me: failed program was:" >&5
4741 cat conftest.$ac_ext >&5
4742 ac_header_preproc=no
4743fi
4744rm -f conftest.err conftest.$ac_ext
4745echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4746echo "${ECHO_T}$ac_header_preproc" >&6
4747
4748# So? What about this header?
4749case $ac_header_compiler:$ac_header_preproc in
4750 yes:no )
4751 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
4752echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4753 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4754echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4755 no:yes )
4756 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
4757echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
4758 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
4759echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
4760 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
4761echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;};;
4762esac
4763echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
4764echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
4765if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
4766 echo $ECHO_N "(cached) $ECHO_C" >&6
4767else
4768 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
4769fi
4770echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
4771echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
4772
4773fi
4774if test $ac_cv_header_sys_sysmacros_h = yes; then
4775
4776cat >>confdefs.h <<\_ACEOF
4777#define MAJOR_IN_SYSMACROS 1
4778_ACEOF
4779
4780fi
4781
4782
4783 fi
4784fi
4785
Michael W. Hudson54241132001-12-07 15:38:26 +00004786
Guido van Rossum627b2d71993-12-24 10:39:16 +00004787# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00004788was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004789echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
4790echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
4791cat >conftest.$ac_ext <<_ACEOF
4792#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004793#include "confdefs.h"
4794#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004795
4796_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00004798 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004799 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004800else
Martin v. Löwis11437992002-04-12 09:54:03 +00004801
4802
4803cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004804#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00004805_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004806
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004807
Guido van Rossum627b2d71993-12-24 10:39:16 +00004808fi
4809rm -f conftest*
4810
Martin v. Löwis11437992002-04-12 09:54:03 +00004811echo "$as_me:$LINENO: result: $was_it_defined" >&5
4812echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00004813
Neal Norwitz11690112002-07-30 01:08:28 +00004814# Check whether using makedev requires defining _OSF_SOURCE
4815echo "$as_me:$LINENO: checking for makedev" >&5
4816echo $ECHO_N "checking for makedev... $ECHO_C" >&6
4817cat >conftest.$ac_ext <<_ACEOF
4818#line $LINENO "configure"
4819#include "confdefs.h"
4820 #include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00004821int
4822main ()
4823{
4824 makedev(0, 0)
4825 ;
4826 return 0;
4827}
4828_ACEOF
4829rm -f conftest.$ac_objext conftest$ac_exeext
4830if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4831 (eval $ac_link) 2>&5
4832 ac_status=$?
4833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4834 (exit $ac_status); } &&
4835 { ac_try='test -s conftest$ac_exeext'
4836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4837 (eval $ac_try) 2>&5
4838 ac_status=$?
4839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4840 (exit $ac_status); }; }; then
4841 ac_cv_has_makedev=yes
4842else
4843 echo "$as_me: failed program was:" >&5
4844cat conftest.$ac_ext >&5
4845ac_cv_has_makedev=no
4846fi
4847rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4848if test "$ac_cv_has_makedev" = "no"; then
4849 # we didn't link, try if _OSF_SOURCE will allow us to link
4850 cat >conftest.$ac_ext <<_ACEOF
4851#line $LINENO "configure"
4852#include "confdefs.h"
4853
4854 #define _OSF_SOURCE 1
4855 #include <sys/types.h>
4856
Neal Norwitz11690112002-07-30 01:08:28 +00004857int
4858main ()
4859{
4860 makedev(0, 0)
4861 ;
4862 return 0;
4863}
4864_ACEOF
4865rm -f conftest.$ac_objext conftest$ac_exeext
4866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4867 (eval $ac_link) 2>&5
4868 ac_status=$?
4869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4870 (exit $ac_status); } &&
4871 { ac_try='test -s conftest$ac_exeext'
4872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4873 (eval $ac_try) 2>&5
4874 ac_status=$?
4875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4876 (exit $ac_status); }; }; then
4877 ac_cv_has_makedev=yes
4878else
4879 echo "$as_me: failed program was:" >&5
4880cat conftest.$ac_ext >&5
4881ac_cv_has_makedev=no
4882fi
4883rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4884 if test "$ac_cv_has_makedev" = "yes"; then
4885
4886cat >>confdefs.h <<\_ACEOF
4887#define _OSF_SOURCE 1
4888_ACEOF
4889
4890 fi
4891fi
4892echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
4893echo "${ECHO_T}$ac_cv_has_makedev" >&6
4894if test "$ac_cv_has_makedev" = "yes"; then
4895
4896cat >>confdefs.h <<\_ACEOF
4897#define HAVE_MAKEDEV 1
4898_ACEOF
4899
4900fi
4901
Martin v. Löwis399a6892002-10-04 10:22:02 +00004902# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
4903# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
4904# defined, but the compiler does not support pragma redefine_extname,
4905# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
4906# structures (such as rlimit64) without declaring them. As a
4907# work-around, disable LFS on such configurations
4908
4909use_lfs=yes
4910echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
4911echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
4912cat >conftest.$ac_ext <<_ACEOF
4913#line $LINENO "configure"
4914#include "confdefs.h"
4915
4916#define _LARGEFILE_SOURCE 1
4917#define _FILE_OFFSET_BITS 64
4918#include <sys/resource.h>
4919
Martin v. Löwis399a6892002-10-04 10:22:02 +00004920int
4921main ()
4922{
4923struct rlimit foo;
4924 ;
4925 return 0;
4926}
4927_ACEOF
4928rm -f conftest.$ac_objext
4929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4930 (eval $ac_compile) 2>&5
4931 ac_status=$?
4932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933 (exit $ac_status); } &&
4934 { ac_try='test -s conftest.$ac_objext'
4935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4936 (eval $ac_try) 2>&5
4937 ac_status=$?
4938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); }; }; then
4940 sol_lfs_bug=no
4941else
4942 echo "$as_me: failed program was:" >&5
4943cat conftest.$ac_ext >&5
4944sol_lfs_bug=yes
4945fi
4946rm -f conftest.$ac_objext conftest.$ac_ext
4947echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
4948echo "${ECHO_T}$sol_lfs_bug" >&6
4949if test "$sol_lfs_bug" = "yes"; then
4950 use_lfs=no
4951fi
4952
4953if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00004954# Two defines needed to enable largefile support on various platforms
4955# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00004956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957cat >>confdefs.h <<\_ACEOF
4958#define _LARGEFILE_SOURCE 1
4959_ACEOF
4960
4961
4962cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004963#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00004964_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00004965
Martin v. Löwis399a6892002-10-04 10:22:02 +00004966fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004967
Guido van Rossum84e7b241996-08-19 21:59:00 +00004968# Add some code to confdefs.h so that the test for off_t works on SCO
4969cat >> confdefs.h <<\EOF
4970#if defined(SCO_DS)
4971#undef _OFF_T
4972#endif
4973EOF
4974
Guido van Rossumef2255b2000-03-10 22:30:29 +00004975# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00004976echo "$as_me:$LINENO: checking for mode_t" >&5
4977echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4978if test "${ac_cv_type_mode_t+set}" = set; then
4979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980else
Martin v. Löwis11437992002-04-12 09:54:03 +00004981 cat >conftest.$ac_ext <<_ACEOF
4982#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004983#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00004984$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00004985int
4986main ()
4987{
4988if ((mode_t *) 0)
4989 return 0;
4990if (sizeof (mode_t))
4991 return 0;
4992 ;
4993 return 0;
4994}
4995_ACEOF
4996rm -f conftest.$ac_objext
4997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4998 (eval $ac_compile) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); } &&
5002 { ac_try='test -s conftest.$ac_objext'
5003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004 (eval $ac_try) 2>&5
5005 ac_status=$?
5006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005008 ac_cv_type_mode_t=yes
5009else
Martin v. Löwis11437992002-04-12 09:54:03 +00005010 echo "$as_me: failed program was:" >&5
5011cat conftest.$ac_ext >&5
5012ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005014rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005015fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005016echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5017echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5018if test $ac_cv_type_mode_t = yes; then
5019 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020else
Martin v. Löwis11437992002-04-12 09:54:03 +00005021
5022cat >>confdefs.h <<_ACEOF
5023#define mode_t int
5024_ACEOF
5025
5026fi
5027
5028echo "$as_me:$LINENO: checking for off_t" >&5
5029echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5030if test "${ac_cv_type_off_t+set}" = set; then
5031 echo $ECHO_N "(cached) $ECHO_C" >&6
5032else
5033 cat >conftest.$ac_ext <<_ACEOF
5034#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005036$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005037int
5038main ()
5039{
5040if ((off_t *) 0)
5041 return 0;
5042if (sizeof (off_t))
5043 return 0;
5044 ;
5045 return 0;
5046}
5047_ACEOF
5048rm -f conftest.$ac_objext
5049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5050 (eval $ac_compile) 2>&5
5051 ac_status=$?
5052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053 (exit $ac_status); } &&
5054 { ac_try='test -s conftest.$ac_objext'
5055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5056 (eval $ac_try) 2>&5
5057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005060 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005061else
Martin v. Löwis11437992002-04-12 09:54:03 +00005062 echo "$as_me: failed program was:" >&5
5063cat conftest.$ac_ext >&5
5064ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005066rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005067fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005068echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5069echo "${ECHO_T}$ac_cv_type_off_t" >&6
5070if test $ac_cv_type_off_t = yes; then
5071 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005072else
Martin v. Löwis11437992002-04-12 09:54:03 +00005073
5074cat >>confdefs.h <<_ACEOF
5075#define off_t long
5076_ACEOF
5077
5078fi
5079
5080echo "$as_me:$LINENO: checking for pid_t" >&5
5081echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5082if test "${ac_cv_type_pid_t+set}" = set; then
5083 echo $ECHO_N "(cached) $ECHO_C" >&6
5084else
5085 cat >conftest.$ac_ext <<_ACEOF
5086#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005088$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005089int
5090main ()
5091{
5092if ((pid_t *) 0)
5093 return 0;
5094if (sizeof (pid_t))
5095 return 0;
5096 ;
5097 return 0;
5098}
5099_ACEOF
5100rm -f conftest.$ac_objext
5101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5102 (eval $ac_compile) 2>&5
5103 ac_status=$?
5104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5105 (exit $ac_status); } &&
5106 { ac_try='test -s conftest.$ac_objext'
5107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5108 (eval $ac_try) 2>&5
5109 ac_status=$?
5110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5111 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005112 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005113else
Martin v. Löwis11437992002-04-12 09:54:03 +00005114 echo "$as_me: failed program was:" >&5
5115cat conftest.$ac_ext >&5
5116ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005117fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005118rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005119fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005120echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5121echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5122if test $ac_cv_type_pid_t = yes; then
5123 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124else
Martin v. Löwis11437992002-04-12 09:54:03 +00005125
5126cat >>confdefs.h <<_ACEOF
5127#define pid_t int
5128_ACEOF
5129
5130fi
5131
5132echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5133echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5134if test "${ac_cv_type_signal+set}" = set; then
5135 echo $ECHO_N "(cached) $ECHO_C" >&6
5136else
5137 cat >conftest.$ac_ext <<_ACEOF
5138#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005139#include "confdefs.h"
5140#include <sys/types.h>
5141#include <signal.h>
5142#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005143# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005144#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005145#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005146extern "C" void (*signal (int, void (*)(int)))(int);
5147#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005148void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005149#endif
5150
Martin v. Löwis11437992002-04-12 09:54:03 +00005151int
5152main ()
5153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005155 ;
5156 return 0;
5157}
5158_ACEOF
5159rm -f conftest.$ac_objext
5160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5161 (eval $ac_compile) 2>&5
5162 ac_status=$?
5163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5164 (exit $ac_status); } &&
5165 { ac_try='test -s conftest.$ac_objext'
5166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5167 (eval $ac_try) 2>&5
5168 ac_status=$?
5169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5170 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005171 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005172else
Martin v. Löwis11437992002-04-12 09:54:03 +00005173 echo "$as_me: failed program was:" >&5
5174cat conftest.$ac_ext >&5
5175ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005176fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005177rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005179echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5180echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005181
Martin v. Löwis11437992002-04-12 09:54:03 +00005182cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005183#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005184_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005185
Michael W. Hudson54241132001-12-07 15:38:26 +00005186
Martin v. Löwis11437992002-04-12 09:54:03 +00005187echo "$as_me:$LINENO: checking for size_t" >&5
5188echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5189if test "${ac_cv_type_size_t+set}" = set; then
5190 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191else
Martin v. Löwis11437992002-04-12 09:54:03 +00005192 cat >conftest.$ac_ext <<_ACEOF
5193#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005194#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005195$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005196int
5197main ()
5198{
5199if ((size_t *) 0)
5200 return 0;
5201if (sizeof (size_t))
5202 return 0;
5203 ;
5204 return 0;
5205}
5206_ACEOF
5207rm -f conftest.$ac_objext
5208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5209 (eval $ac_compile) 2>&5
5210 ac_status=$?
5211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212 (exit $ac_status); } &&
5213 { ac_try='test -s conftest.$ac_objext'
5214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5215 (eval $ac_try) 2>&5
5216 ac_status=$?
5217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5218 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005219 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005220else
Martin v. Löwis11437992002-04-12 09:54:03 +00005221 echo "$as_me: failed program was:" >&5
5222cat conftest.$ac_ext >&5
5223ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005225rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005226fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005227echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5228echo "${ECHO_T}$ac_cv_type_size_t" >&6
5229if test $ac_cv_type_size_t = yes; then
5230 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005231else
Martin v. Löwis11437992002-04-12 09:54:03 +00005232
5233cat >>confdefs.h <<_ACEOF
5234#define size_t unsigned
5235_ACEOF
5236
5237fi
5238
5239echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5240echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5241if test "${ac_cv_type_uid_t+set}" = set; then
5242 echo $ECHO_N "(cached) $ECHO_C" >&6
5243else
5244 cat >conftest.$ac_ext <<_ACEOF
5245#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005246#include "confdefs.h"
5247#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005248
5249_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00005251 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252 ac_cv_type_uid_t=yes
5253else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005254 ac_cv_type_uid_t=no
5255fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005256rm -f conftest*
5257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005258fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005259echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5260echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005261if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262
Martin v. Löwis11437992002-04-12 09:54:03 +00005263cat >>confdefs.h <<\_ACEOF
5264#define uid_t int
5265_ACEOF
5266
5267
5268cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005269#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005271
5272fi
5273
Jack Jansendd19cf82001-12-06 22:36:17 +00005274
Michael W. Hudson54241132001-12-07 15:38:26 +00005275# Sizes of various common basic types
Martin v. Löwis11437992002-04-12 09:54:03 +00005276echo "$as_me:$LINENO: checking for int" >&5
5277echo $ECHO_N "checking for int... $ECHO_C" >&6
5278if test "${ac_cv_type_int+set}" = set; then
5279 echo $ECHO_N "(cached) $ECHO_C" >&6
5280else
5281 cat >conftest.$ac_ext <<_ACEOF
5282#line $LINENO "configure"
5283#include "confdefs.h"
5284$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005285int
5286main ()
5287{
5288if ((int *) 0)
5289 return 0;
5290if (sizeof (int))
5291 return 0;
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
5297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5298 (eval $ac_compile) 2>&5
5299 ac_status=$?
5300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5301 (exit $ac_status); } &&
5302 { ac_try='test -s conftest.$ac_objext'
5303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5304 (eval $ac_try) 2>&5
5305 ac_status=$?
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); }; }; then
5308 ac_cv_type_int=yes
5309else
5310 echo "$as_me: failed program was:" >&5
5311cat conftest.$ac_ext >&5
5312ac_cv_type_int=no
5313fi
5314rm -f conftest.$ac_objext conftest.$ac_ext
5315fi
5316echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5317echo "${ECHO_T}$ac_cv_type_int" >&6
5318
5319echo "$as_me:$LINENO: checking size of int" >&5
5320echo $ECHO_N "checking size of int... $ECHO_C" >&6
5321if test "${ac_cv_sizeof_int+set}" = set; then
5322 echo $ECHO_N "(cached) $ECHO_C" >&6
5323else
5324 if test "$ac_cv_type_int" = yes; then
5325 # The cast to unsigned long works around a bug in the HP C Compiler
5326 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5327 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5328 # This bug is HP SR number 8606223364.
5329 if test "$cross_compiling" = yes; then
5330 # Depending upon the size, compute the lo and hi bounds.
5331cat >conftest.$ac_ext <<_ACEOF
5332#line $LINENO "configure"
5333#include "confdefs.h"
5334$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005335int
5336main ()
5337{
5338static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5339test_array [0] = 0
5340
5341 ;
5342 return 0;
5343}
5344_ACEOF
5345rm -f conftest.$ac_objext
5346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5347 (eval $ac_compile) 2>&5
5348 ac_status=$?
5349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350 (exit $ac_status); } &&
5351 { ac_try='test -s conftest.$ac_objext'
5352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5353 (eval $ac_try) 2>&5
5354 ac_status=$?
5355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5356 (exit $ac_status); }; }; then
5357 ac_lo=0 ac_mid=0
5358 while :; do
5359 cat >conftest.$ac_ext <<_ACEOF
5360#line $LINENO "configure"
5361#include "confdefs.h"
5362$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005363int
5364main ()
5365{
5366static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5367test_array [0] = 0
5368
5369 ;
5370 return 0;
5371}
5372_ACEOF
5373rm -f conftest.$ac_objext
5374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5375 (eval $ac_compile) 2>&5
5376 ac_status=$?
5377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5378 (exit $ac_status); } &&
5379 { ac_try='test -s conftest.$ac_objext'
5380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5381 (eval $ac_try) 2>&5
5382 ac_status=$?
5383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384 (exit $ac_status); }; }; then
5385 ac_hi=$ac_mid; break
5386else
5387 echo "$as_me: failed program was:" >&5
5388cat conftest.$ac_ext >&5
5389ac_lo=`expr $ac_mid + 1`
5390 if test $ac_lo -le $ac_mid; then
5391 ac_lo= ac_hi=
5392 break
5393 fi
5394 ac_mid=`expr 2 '*' $ac_mid + 1`
5395fi
5396rm -f conftest.$ac_objext conftest.$ac_ext
5397 done
5398else
5399 echo "$as_me: failed program was:" >&5
5400cat conftest.$ac_ext >&5
5401cat >conftest.$ac_ext <<_ACEOF
5402#line $LINENO "configure"
5403#include "confdefs.h"
5404$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005405int
5406main ()
5407{
5408static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5409test_array [0] = 0
5410
5411 ;
5412 return 0;
5413}
5414_ACEOF
5415rm -f conftest.$ac_objext
5416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5417 (eval $ac_compile) 2>&5
5418 ac_status=$?
5419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5420 (exit $ac_status); } &&
5421 { ac_try='test -s conftest.$ac_objext'
5422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5423 (eval $ac_try) 2>&5
5424 ac_status=$?
5425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5426 (exit $ac_status); }; }; then
5427 ac_hi=-1 ac_mid=-1
5428 while :; do
5429 cat >conftest.$ac_ext <<_ACEOF
5430#line $LINENO "configure"
5431#include "confdefs.h"
5432$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005433int
5434main ()
5435{
5436static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5437test_array [0] = 0
5438
5439 ;
5440 return 0;
5441}
5442_ACEOF
5443rm -f conftest.$ac_objext
5444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5445 (eval $ac_compile) 2>&5
5446 ac_status=$?
5447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448 (exit $ac_status); } &&
5449 { ac_try='test -s conftest.$ac_objext'
5450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5451 (eval $ac_try) 2>&5
5452 ac_status=$?
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); }; }; then
5455 ac_lo=$ac_mid; break
5456else
5457 echo "$as_me: failed program was:" >&5
5458cat conftest.$ac_ext >&5
5459ac_hi=`expr '(' $ac_mid ')' - 1`
5460 if test $ac_mid -le $ac_hi; then
5461 ac_lo= ac_hi=
5462 break
5463 fi
5464 ac_mid=`expr 2 '*' $ac_mid`
5465fi
5466rm -f conftest.$ac_objext conftest.$ac_ext
5467 done
5468else
5469 echo "$as_me: failed program was:" >&5
5470cat conftest.$ac_ext >&5
5471ac_lo= ac_hi=
5472fi
5473rm -f conftest.$ac_objext conftest.$ac_ext
5474fi
5475rm -f conftest.$ac_objext conftest.$ac_ext
5476# Binary search between lo and hi bounds.
5477while test "x$ac_lo" != "x$ac_hi"; do
5478 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5479 cat >conftest.$ac_ext <<_ACEOF
5480#line $LINENO "configure"
5481#include "confdefs.h"
5482$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005483int
5484main ()
5485{
5486static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5487test_array [0] = 0
5488
5489 ;
5490 return 0;
5491}
5492_ACEOF
5493rm -f conftest.$ac_objext
5494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5495 (eval $ac_compile) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); } &&
5499 { ac_try='test -s conftest.$ac_objext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
5505 ac_hi=$ac_mid
5506else
5507 echo "$as_me: failed program was:" >&5
5508cat conftest.$ac_ext >&5
5509ac_lo=`expr '(' $ac_mid ')' + 1`
5510fi
5511rm -f conftest.$ac_objext conftest.$ac_ext
5512done
5513case $ac_lo in
5514?*) ac_cv_sizeof_int=$ac_lo;;
5515'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5516echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5517 { (exit 1); exit 1; }; } ;;
5518esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005519else
5520 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005521 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5522echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5523 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005524else
Martin v. Löwis11437992002-04-12 09:54:03 +00005525 cat >conftest.$ac_ext <<_ACEOF
5526#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005527#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005528$ac_includes_default
5529long longval () { return (long) (sizeof (int)); }
5530unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005531#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005532#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005533int
5534main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005535{
Martin v. Löwis11437992002-04-12 09:54:03 +00005536
5537 FILE *f = fopen ("conftest.val", "w");
5538 if (! f)
5539 exit (1);
5540 if (((long) (sizeof (int))) < 0)
5541 {
5542 long i = longval ();
5543 if (i != ((long) (sizeof (int))))
5544 exit (1);
5545 fprintf (f, "%ld\n", i);
5546 }
5547 else
5548 {
5549 unsigned long i = ulongval ();
5550 if (i != ((long) (sizeof (int))))
5551 exit (1);
5552 fprintf (f, "%lu\n", i);
5553 }
5554 exit (ferror (f) || fclose (f) != 0);
5555
5556 ;
5557 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005558}
Martin v. Löwis11437992002-04-12 09:54:03 +00005559_ACEOF
5560rm -f conftest$ac_exeext
5561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5562 (eval $ac_link) 2>&5
5563 ac_status=$?
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5567 (eval $ac_try) 2>&5
5568 ac_status=$?
5569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5570 (exit $ac_status); }; }; then
5571 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005572else
Martin v. Löwis11437992002-04-12 09:54:03 +00005573 echo "$as_me: program exited with status $ac_status" >&5
5574echo "$as_me: failed program was:" >&5
5575cat conftest.$ac_ext >&5
5576( exit $ac_status )
5577{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
5578echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
5579 { (exit 1); exit 1; }; }
5580fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00005581rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005582fi
5583fi
5584rm -f conftest.val
5585else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005586 ac_cv_sizeof_int=0
5587fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005589echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
5590echo "${ECHO_T}$ac_cv_sizeof_int" >&6
5591cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005592#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00005593_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005594
5595
Martin v. Löwis11437992002-04-12 09:54:03 +00005596echo "$as_me:$LINENO: checking for long" >&5
5597echo $ECHO_N "checking for long... $ECHO_C" >&6
5598if test "${ac_cv_type_long+set}" = set; then
5599 echo $ECHO_N "(cached) $ECHO_C" >&6
5600else
5601 cat >conftest.$ac_ext <<_ACEOF
5602#line $LINENO "configure"
5603#include "confdefs.h"
5604$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005605int
5606main ()
5607{
5608if ((long *) 0)
5609 return 0;
5610if (sizeof (long))
5611 return 0;
5612 ;
5613 return 0;
5614}
5615_ACEOF
5616rm -f conftest.$ac_objext
5617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5618 (eval $ac_compile) 2>&5
5619 ac_status=$?
5620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621 (exit $ac_status); } &&
5622 { ac_try='test -s conftest.$ac_objext'
5623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624 (eval $ac_try) 2>&5
5625 ac_status=$?
5626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); }; }; then
5628 ac_cv_type_long=yes
5629else
5630 echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632ac_cv_type_long=no
5633fi
5634rm -f conftest.$ac_objext conftest.$ac_ext
5635fi
5636echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
5637echo "${ECHO_T}$ac_cv_type_long" >&6
5638
5639echo "$as_me:$LINENO: checking size of long" >&5
5640echo $ECHO_N "checking size of long... $ECHO_C" >&6
5641if test "${ac_cv_sizeof_long+set}" = set; then
5642 echo $ECHO_N "(cached) $ECHO_C" >&6
5643else
5644 if test "$ac_cv_type_long" = yes; then
5645 # The cast to unsigned long works around a bug in the HP C Compiler
5646 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5647 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5648 # This bug is HP SR number 8606223364.
5649 if test "$cross_compiling" = yes; then
5650 # Depending upon the size, compute the lo and hi bounds.
5651cat >conftest.$ac_ext <<_ACEOF
5652#line $LINENO "configure"
5653#include "confdefs.h"
5654$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005655int
5656main ()
5657{
5658static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
5659test_array [0] = 0
5660
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665rm -f conftest.$ac_objext
5666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5667 (eval $ac_compile) 2>&5
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); } &&
5671 { ac_try='test -s conftest.$ac_objext'
5672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5673 (eval $ac_try) 2>&5
5674 ac_status=$?
5675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676 (exit $ac_status); }; }; then
5677 ac_lo=0 ac_mid=0
5678 while :; do
5679 cat >conftest.$ac_ext <<_ACEOF
5680#line $LINENO "configure"
5681#include "confdefs.h"
5682$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005683int
5684main ()
5685{
5686static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5687test_array [0] = 0
5688
5689 ;
5690 return 0;
5691}
5692_ACEOF
5693rm -f conftest.$ac_objext
5694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5695 (eval $ac_compile) 2>&5
5696 ac_status=$?
5697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5698 (exit $ac_status); } &&
5699 { ac_try='test -s conftest.$ac_objext'
5700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5701 (eval $ac_try) 2>&5
5702 ac_status=$?
5703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5704 (exit $ac_status); }; }; then
5705 ac_hi=$ac_mid; break
5706else
5707 echo "$as_me: failed program was:" >&5
5708cat conftest.$ac_ext >&5
5709ac_lo=`expr $ac_mid + 1`
5710 if test $ac_lo -le $ac_mid; then
5711 ac_lo= ac_hi=
5712 break
5713 fi
5714 ac_mid=`expr 2 '*' $ac_mid + 1`
5715fi
5716rm -f conftest.$ac_objext conftest.$ac_ext
5717 done
5718else
5719 echo "$as_me: failed program was:" >&5
5720cat conftest.$ac_ext >&5
5721cat >conftest.$ac_ext <<_ACEOF
5722#line $LINENO "configure"
5723#include "confdefs.h"
5724$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005725int
5726main ()
5727{
5728static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
5729test_array [0] = 0
5730
5731 ;
5732 return 0;
5733}
5734_ACEOF
5735rm -f conftest.$ac_objext
5736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5737 (eval $ac_compile) 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); } &&
5741 { ac_try='test -s conftest.$ac_objext'
5742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5743 (eval $ac_try) 2>&5
5744 ac_status=$?
5745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5746 (exit $ac_status); }; }; then
5747 ac_hi=-1 ac_mid=-1
5748 while :; do
5749 cat >conftest.$ac_ext <<_ACEOF
5750#line $LINENO "configure"
5751#include "confdefs.h"
5752$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005753int
5754main ()
5755{
5756static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
5757test_array [0] = 0
5758
5759 ;
5760 return 0;
5761}
5762_ACEOF
5763rm -f conftest.$ac_objext
5764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5765 (eval $ac_compile) 2>&5
5766 ac_status=$?
5767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5768 (exit $ac_status); } &&
5769 { ac_try='test -s conftest.$ac_objext'
5770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5771 (eval $ac_try) 2>&5
5772 ac_status=$?
5773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5774 (exit $ac_status); }; }; then
5775 ac_lo=$ac_mid; break
5776else
5777 echo "$as_me: failed program was:" >&5
5778cat conftest.$ac_ext >&5
5779ac_hi=`expr '(' $ac_mid ')' - 1`
5780 if test $ac_mid -le $ac_hi; then
5781 ac_lo= ac_hi=
5782 break
5783 fi
5784 ac_mid=`expr 2 '*' $ac_mid`
5785fi
5786rm -f conftest.$ac_objext conftest.$ac_ext
5787 done
5788else
5789 echo "$as_me: failed program was:" >&5
5790cat conftest.$ac_ext >&5
5791ac_lo= ac_hi=
5792fi
5793rm -f conftest.$ac_objext conftest.$ac_ext
5794fi
5795rm -f conftest.$ac_objext conftest.$ac_ext
5796# Binary search between lo and hi bounds.
5797while test "x$ac_lo" != "x$ac_hi"; do
5798 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5799 cat >conftest.$ac_ext <<_ACEOF
5800#line $LINENO "configure"
5801#include "confdefs.h"
5802$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005803int
5804main ()
5805{
5806static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
5807test_array [0] = 0
5808
5809 ;
5810 return 0;
5811}
5812_ACEOF
5813rm -f conftest.$ac_objext
5814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5815 (eval $ac_compile) 2>&5
5816 ac_status=$?
5817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5818 (exit $ac_status); } &&
5819 { ac_try='test -s conftest.$ac_objext'
5820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5824 (exit $ac_status); }; }; then
5825 ac_hi=$ac_mid
5826else
5827 echo "$as_me: failed program was:" >&5
5828cat conftest.$ac_ext >&5
5829ac_lo=`expr '(' $ac_mid ')' + 1`
5830fi
5831rm -f conftest.$ac_objext conftest.$ac_ext
5832done
5833case $ac_lo in
5834?*) ac_cv_sizeof_long=$ac_lo;;
5835'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5836echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5837 { (exit 1); exit 1; }; } ;;
5838esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005839else
5840 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
5842echo "$as_me: error: cannot run test program while cross compiling" >&2;}
5843 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005844else
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 cat >conftest.$ac_ext <<_ACEOF
5846#line $LINENO "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005847#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00005848$ac_includes_default
5849long longval () { return (long) (sizeof (long)); }
5850unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005852#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005853int
5854main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005855{
Martin v. Löwis11437992002-04-12 09:54:03 +00005856
5857 FILE *f = fopen ("conftest.val", "w");
5858 if (! f)
5859 exit (1);
5860 if (((long) (sizeof (long))) < 0)
5861 {
5862 long i = longval ();
5863 if (i != ((long) (sizeof (long))))
5864 exit (1);
5865 fprintf (f, "%ld\n", i);
5866 }
5867 else
5868 {
5869 unsigned long i = ulongval ();
5870 if (i != ((long) (sizeof (long))))
5871 exit (1);
5872 fprintf (f, "%lu\n", i);
5873 }
5874 exit (ferror (f) || fclose (f) != 0);
5875
5876 ;
5877 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005878}
Martin v. Löwis11437992002-04-12 09:54:03 +00005879_ACEOF
5880rm -f conftest$ac_exeext
5881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5882 (eval $ac_link) 2>&5
5883 ac_status=$?
5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5887 (eval $ac_try) 2>&5
5888 ac_status=$?
5889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5890 (exit $ac_status); }; }; then
5891 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005892else
Martin v. Löwis11437992002-04-12 09:54:03 +00005893 echo "$as_me: program exited with status $ac_status" >&5
5894echo "$as_me: failed program was:" >&5
5895cat conftest.$ac_ext >&5
5896( exit $ac_status )
5897{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
5898echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
5899 { (exit 1); exit 1; }; }
5900fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00005901rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005902fi
5903fi
5904rm -f conftest.val
5905else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005906 ac_cv_sizeof_long=0
5907fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005908fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005909echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5910echo "${ECHO_T}$ac_cv_sizeof_long" >&6
5911cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005912#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00005913_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005914
5915
Martin v. Löwis11437992002-04-12 09:54:03 +00005916echo "$as_me:$LINENO: checking for void *" >&5
5917echo $ECHO_N "checking for void *... $ECHO_C" >&6
5918if test "${ac_cv_type_void_p+set}" = set; then
5919 echo $ECHO_N "(cached) $ECHO_C" >&6
5920else
5921 cat >conftest.$ac_ext <<_ACEOF
5922#line $LINENO "configure"
5923#include "confdefs.h"
5924$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005925int
5926main ()
5927{
5928if ((void * *) 0)
5929 return 0;
5930if (sizeof (void *))
5931 return 0;
5932 ;
5933 return 0;
5934}
5935_ACEOF
5936rm -f conftest.$ac_objext
5937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5938 (eval $ac_compile) 2>&5
5939 ac_status=$?
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); } &&
5942 { ac_try='test -s conftest.$ac_objext'
5943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5944 (eval $ac_try) 2>&5
5945 ac_status=$?
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5947 (exit $ac_status); }; }; then
5948 ac_cv_type_void_p=yes
5949else
5950 echo "$as_me: failed program was:" >&5
5951cat conftest.$ac_ext >&5
5952ac_cv_type_void_p=no
5953fi
5954rm -f conftest.$ac_objext conftest.$ac_ext
5955fi
5956echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
5957echo "${ECHO_T}$ac_cv_type_void_p" >&6
5958
5959echo "$as_me:$LINENO: checking size of void *" >&5
5960echo $ECHO_N "checking size of void *... $ECHO_C" >&6
5961if test "${ac_cv_sizeof_void_p+set}" = set; then
5962 echo $ECHO_N "(cached) $ECHO_C" >&6
5963else
5964 if test "$ac_cv_type_void_p" = yes; then
5965 # The cast to unsigned long works around a bug in the HP C Compiler
5966 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5967 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5968 # This bug is HP SR number 8606223364.
5969 if test "$cross_compiling" = yes; then
5970 # Depending upon the size, compute the lo and hi bounds.
5971cat >conftest.$ac_ext <<_ACEOF
5972#line $LINENO "configure"
5973#include "confdefs.h"
5974$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005975int
5976main ()
5977{
5978static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
5979test_array [0] = 0
5980
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext
5986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5987 (eval $ac_compile) 2>&5
5988 ac_status=$?
5989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5990 (exit $ac_status); } &&
5991 { ac_try='test -s conftest.$ac_objext'
5992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); }; }; then
5997 ac_lo=0 ac_mid=0
5998 while :; do
5999 cat >conftest.$ac_ext <<_ACEOF
6000#line $LINENO "configure"
6001#include "confdefs.h"
6002$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006003int
6004main ()
6005{
6006static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6007test_array [0] = 0
6008
6009 ;
6010 return 0;
6011}
6012_ACEOF
6013rm -f conftest.$ac_objext
6014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6015 (eval $ac_compile) 2>&5
6016 ac_status=$?
6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018 (exit $ac_status); } &&
6019 { ac_try='test -s conftest.$ac_objext'
6020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6021 (eval $ac_try) 2>&5
6022 ac_status=$?
6023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6024 (exit $ac_status); }; }; then
6025 ac_hi=$ac_mid; break
6026else
6027 echo "$as_me: failed program was:" >&5
6028cat conftest.$ac_ext >&5
6029ac_lo=`expr $ac_mid + 1`
6030 if test $ac_lo -le $ac_mid; then
6031 ac_lo= ac_hi=
6032 break
6033 fi
6034 ac_mid=`expr 2 '*' $ac_mid + 1`
6035fi
6036rm -f conftest.$ac_objext conftest.$ac_ext
6037 done
6038else
6039 echo "$as_me: failed program was:" >&5
6040cat conftest.$ac_ext >&5
6041cat >conftest.$ac_ext <<_ACEOF
6042#line $LINENO "configure"
6043#include "confdefs.h"
6044$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006045int
6046main ()
6047{
6048static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6049test_array [0] = 0
6050
6051 ;
6052 return 0;
6053}
6054_ACEOF
6055rm -f conftest.$ac_objext
6056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6057 (eval $ac_compile) 2>&5
6058 ac_status=$?
6059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060 (exit $ac_status); } &&
6061 { ac_try='test -s conftest.$ac_objext'
6062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063 (eval $ac_try) 2>&5
6064 ac_status=$?
6065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066 (exit $ac_status); }; }; then
6067 ac_hi=-1 ac_mid=-1
6068 while :; do
6069 cat >conftest.$ac_ext <<_ACEOF
6070#line $LINENO "configure"
6071#include "confdefs.h"
6072$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006073int
6074main ()
6075{
6076static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6077test_array [0] = 0
6078
6079 ;
6080 return 0;
6081}
6082_ACEOF
6083rm -f conftest.$ac_objext
6084if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6085 (eval $ac_compile) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); } &&
6089 { ac_try='test -s conftest.$ac_objext'
6090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_lo=$ac_mid; break
6096else
6097 echo "$as_me: failed program was:" >&5
6098cat conftest.$ac_ext >&5
6099ac_hi=`expr '(' $ac_mid ')' - 1`
6100 if test $ac_mid -le $ac_hi; then
6101 ac_lo= ac_hi=
6102 break
6103 fi
6104 ac_mid=`expr 2 '*' $ac_mid`
6105fi
6106rm -f conftest.$ac_objext conftest.$ac_ext
6107 done
6108else
6109 echo "$as_me: failed program was:" >&5
6110cat conftest.$ac_ext >&5
6111ac_lo= ac_hi=
6112fi
6113rm -f conftest.$ac_objext conftest.$ac_ext
6114fi
6115rm -f conftest.$ac_objext conftest.$ac_ext
6116# Binary search between lo and hi bounds.
6117while test "x$ac_lo" != "x$ac_hi"; do
6118 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6119 cat >conftest.$ac_ext <<_ACEOF
6120#line $LINENO "configure"
6121#include "confdefs.h"
6122$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006123int
6124main ()
6125{
6126static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6127test_array [0] = 0
6128
6129 ;
6130 return 0;
6131}
6132_ACEOF
6133rm -f conftest.$ac_objext
6134if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6135 (eval $ac_compile) 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); } &&
6139 { ac_try='test -s conftest.$ac_objext'
6140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6141 (eval $ac_try) 2>&5
6142 ac_status=$?
6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144 (exit $ac_status); }; }; then
6145 ac_hi=$ac_mid
6146else
6147 echo "$as_me: failed program was:" >&5
6148cat conftest.$ac_ext >&5
6149ac_lo=`expr '(' $ac_mid ')' + 1`
6150fi
6151rm -f conftest.$ac_objext conftest.$ac_ext
6152done
6153case $ac_lo in
6154?*) ac_cv_sizeof_void_p=$ac_lo;;
6155'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6156echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6157 { (exit 1); exit 1; }; } ;;
6158esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006159else
6160 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006161 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6162echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6163 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006164else
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 cat >conftest.$ac_ext <<_ACEOF
6166#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00006167#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006168$ac_includes_default
6169long longval () { return (long) (sizeof (void *)); }
6170unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006171#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006172#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006173int
6174main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006175{
Martin v. Löwis11437992002-04-12 09:54:03 +00006176
6177 FILE *f = fopen ("conftest.val", "w");
6178 if (! f)
6179 exit (1);
6180 if (((long) (sizeof (void *))) < 0)
6181 {
6182 long i = longval ();
6183 if (i != ((long) (sizeof (void *))))
6184 exit (1);
6185 fprintf (f, "%ld\n", i);
6186 }
6187 else
6188 {
6189 unsigned long i = ulongval ();
6190 if (i != ((long) (sizeof (void *))))
6191 exit (1);
6192 fprintf (f, "%lu\n", i);
6193 }
6194 exit (ferror (f) || fclose (f) != 0);
6195
6196 ;
6197 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006198}
Martin v. Löwis11437992002-04-12 09:54:03 +00006199_ACEOF
6200rm -f conftest$ac_exeext
6201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6202 (eval $ac_link) 2>&5
6203 ac_status=$?
6204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006212else
Martin v. Löwis11437992002-04-12 09:54:03 +00006213 echo "$as_me: program exited with status $ac_status" >&5
6214echo "$as_me: failed program was:" >&5
6215cat conftest.$ac_ext >&5
6216( exit $ac_status )
6217{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77" >&5
6218echo "$as_me: error: cannot compute sizeof (void *), 77" >&2;}
6219 { (exit 1); exit 1; }; }
6220fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00006221rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006222fi
6223fi
6224rm -f conftest.val
6225else
Guido van Rossumad678af1998-10-02 14:42:15 +00006226 ac_cv_sizeof_void_p=0
6227fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006228fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006229echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6230echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6231cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006232#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006233_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006234
6235
Martin v. Löwis11437992002-04-12 09:54:03 +00006236echo "$as_me:$LINENO: checking for char" >&5
6237echo $ECHO_N "checking for char... $ECHO_C" >&6
6238if test "${ac_cv_type_char+set}" = set; then
6239 echo $ECHO_N "(cached) $ECHO_C" >&6
6240else
6241 cat >conftest.$ac_ext <<_ACEOF
6242#line $LINENO "configure"
6243#include "confdefs.h"
6244$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006245int
6246main ()
6247{
6248if ((char *) 0)
6249 return 0;
6250if (sizeof (char))
6251 return 0;
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
6257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6258 (eval $ac_compile) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); } &&
6262 { ac_try='test -s conftest.$ac_objext'
6263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
6268 ac_cv_type_char=yes
6269else
6270 echo "$as_me: failed program was:" >&5
6271cat conftest.$ac_ext >&5
6272ac_cv_type_char=no
6273fi
6274rm -f conftest.$ac_objext conftest.$ac_ext
6275fi
6276echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
6277echo "${ECHO_T}$ac_cv_type_char" >&6
6278
6279echo "$as_me:$LINENO: checking size of char" >&5
6280echo $ECHO_N "checking size of char... $ECHO_C" >&6
6281if test "${ac_cv_sizeof_char+set}" = set; then
6282 echo $ECHO_N "(cached) $ECHO_C" >&6
6283else
6284 if test "$ac_cv_type_char" = yes; then
6285 # The cast to unsigned long works around a bug in the HP C Compiler
6286 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6287 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6288 # This bug is HP SR number 8606223364.
6289 if test "$cross_compiling" = yes; then
6290 # Depending upon the size, compute the lo and hi bounds.
6291cat >conftest.$ac_ext <<_ACEOF
6292#line $LINENO "configure"
6293#include "confdefs.h"
6294$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006295int
6296main ()
6297{
6298static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
6299test_array [0] = 0
6300
6301 ;
6302 return 0;
6303}
6304_ACEOF
6305rm -f conftest.$ac_objext
6306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6307 (eval $ac_compile) 2>&5
6308 ac_status=$?
6309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310 (exit $ac_status); } &&
6311 { ac_try='test -s conftest.$ac_objext'
6312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313 (eval $ac_try) 2>&5
6314 ac_status=$?
6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316 (exit $ac_status); }; }; then
6317 ac_lo=0 ac_mid=0
6318 while :; do
6319 cat >conftest.$ac_ext <<_ACEOF
6320#line $LINENO "configure"
6321#include "confdefs.h"
6322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006323int
6324main ()
6325{
6326static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6327test_array [0] = 0
6328
6329 ;
6330 return 0;
6331}
6332_ACEOF
6333rm -f conftest.$ac_objext
6334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6335 (eval $ac_compile) 2>&5
6336 ac_status=$?
6337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6338 (exit $ac_status); } &&
6339 { ac_try='test -s conftest.$ac_objext'
6340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6341 (eval $ac_try) 2>&5
6342 ac_status=$?
6343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6344 (exit $ac_status); }; }; then
6345 ac_hi=$ac_mid; break
6346else
6347 echo "$as_me: failed program was:" >&5
6348cat conftest.$ac_ext >&5
6349ac_lo=`expr $ac_mid + 1`
6350 if test $ac_lo -le $ac_mid; then
6351 ac_lo= ac_hi=
6352 break
6353 fi
6354 ac_mid=`expr 2 '*' $ac_mid + 1`
6355fi
6356rm -f conftest.$ac_objext conftest.$ac_ext
6357 done
6358else
6359 echo "$as_me: failed program was:" >&5
6360cat conftest.$ac_ext >&5
6361cat >conftest.$ac_ext <<_ACEOF
6362#line $LINENO "configure"
6363#include "confdefs.h"
6364$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006365int
6366main ()
6367{
6368static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
6369test_array [0] = 0
6370
6371 ;
6372 return 0;
6373}
6374_ACEOF
6375rm -f conftest.$ac_objext
6376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6377 (eval $ac_compile) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); } &&
6381 { ac_try='test -s conftest.$ac_objext'
6382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6383 (eval $ac_try) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
6387 ac_hi=-1 ac_mid=-1
6388 while :; do
6389 cat >conftest.$ac_ext <<_ACEOF
6390#line $LINENO "configure"
6391#include "confdefs.h"
6392$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006393int
6394main ()
6395{
6396static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
6397test_array [0] = 0
6398
6399 ;
6400 return 0;
6401}
6402_ACEOF
6403rm -f conftest.$ac_objext
6404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6405 (eval $ac_compile) 2>&5
6406 ac_status=$?
6407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6408 (exit $ac_status); } &&
6409 { ac_try='test -s conftest.$ac_objext'
6410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6411 (eval $ac_try) 2>&5
6412 ac_status=$?
6413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414 (exit $ac_status); }; }; then
6415 ac_lo=$ac_mid; break
6416else
6417 echo "$as_me: failed program was:" >&5
6418cat conftest.$ac_ext >&5
6419ac_hi=`expr '(' $ac_mid ')' - 1`
6420 if test $ac_mid -le $ac_hi; then
6421 ac_lo= ac_hi=
6422 break
6423 fi
6424 ac_mid=`expr 2 '*' $ac_mid`
6425fi
6426rm -f conftest.$ac_objext conftest.$ac_ext
6427 done
6428else
6429 echo "$as_me: failed program was:" >&5
6430cat conftest.$ac_ext >&5
6431ac_lo= ac_hi=
6432fi
6433rm -f conftest.$ac_objext conftest.$ac_ext
6434fi
6435rm -f conftest.$ac_objext conftest.$ac_ext
6436# Binary search between lo and hi bounds.
6437while test "x$ac_lo" != "x$ac_hi"; do
6438 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6439 cat >conftest.$ac_ext <<_ACEOF
6440#line $LINENO "configure"
6441#include "confdefs.h"
6442$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006443int
6444main ()
6445{
6446static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
6447test_array [0] = 0
6448
6449 ;
6450 return 0;
6451}
6452_ACEOF
6453rm -f conftest.$ac_objext
6454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6455 (eval $ac_compile) 2>&5
6456 ac_status=$?
6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458 (exit $ac_status); } &&
6459 { ac_try='test -s conftest.$ac_objext'
6460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6461 (eval $ac_try) 2>&5
6462 ac_status=$?
6463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464 (exit $ac_status); }; }; then
6465 ac_hi=$ac_mid
6466else
6467 echo "$as_me: failed program was:" >&5
6468cat conftest.$ac_ext >&5
6469ac_lo=`expr '(' $ac_mid ')' + 1`
6470fi
6471rm -f conftest.$ac_objext conftest.$ac_ext
6472done
6473case $ac_lo in
6474?*) ac_cv_sizeof_char=$ac_lo;;
6475'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6476echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6477 { (exit 1); exit 1; }; } ;;
6478esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006479else
6480 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006481 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6482echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6483 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006484else
Martin v. Löwis11437992002-04-12 09:54:03 +00006485 cat >conftest.$ac_ext <<_ACEOF
6486#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006487#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006488$ac_includes_default
6489long longval () { return (long) (sizeof (char)); }
6490unsigned long ulongval () { return (long) (sizeof (char)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006491#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006492#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006493int
6494main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006495{
Martin v. Löwis11437992002-04-12 09:54:03 +00006496
6497 FILE *f = fopen ("conftest.val", "w");
6498 if (! f)
6499 exit (1);
6500 if (((long) (sizeof (char))) < 0)
6501 {
6502 long i = longval ();
6503 if (i != ((long) (sizeof (char))))
6504 exit (1);
6505 fprintf (f, "%ld\n", i);
6506 }
6507 else
6508 {
6509 unsigned long i = ulongval ();
6510 if (i != ((long) (sizeof (char))))
6511 exit (1);
6512 fprintf (f, "%lu\n", i);
6513 }
6514 exit (ferror (f) || fclose (f) != 0);
6515
6516 ;
6517 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006518}
Martin v. Löwis11437992002-04-12 09:54:03 +00006519_ACEOF
6520rm -f conftest$ac_exeext
6521if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6522 (eval $ac_link) 2>&5
6523 ac_status=$?
6524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6525 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6527 (eval $ac_try) 2>&5
6528 ac_status=$?
6529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6530 (exit $ac_status); }; }; then
6531 ac_cv_sizeof_char=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006532else
Martin v. Löwis11437992002-04-12 09:54:03 +00006533 echo "$as_me: program exited with status $ac_status" >&5
6534echo "$as_me: failed program was:" >&5
6535cat conftest.$ac_ext >&5
6536( exit $ac_status )
6537{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
6538echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
6539 { (exit 1); exit 1; }; }
6540fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00006541rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006542fi
6543fi
6544rm -f conftest.val
6545else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006546 ac_cv_sizeof_char=0
6547fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006549echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
6550echo "${ECHO_T}$ac_cv_sizeof_char" >&6
6551cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006552#define SIZEOF_CHAR $ac_cv_sizeof_char
Martin v. Löwis11437992002-04-12 09:54:03 +00006553_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006554
6555
Martin v. Löwis11437992002-04-12 09:54:03 +00006556echo "$as_me:$LINENO: checking for short" >&5
6557echo $ECHO_N "checking for short... $ECHO_C" >&6
6558if test "${ac_cv_type_short+set}" = set; then
6559 echo $ECHO_N "(cached) $ECHO_C" >&6
6560else
6561 cat >conftest.$ac_ext <<_ACEOF
6562#line $LINENO "configure"
6563#include "confdefs.h"
6564$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006565int
6566main ()
6567{
6568if ((short *) 0)
6569 return 0;
6570if (sizeof (short))
6571 return 0;
6572 ;
6573 return 0;
6574}
6575_ACEOF
6576rm -f conftest.$ac_objext
6577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6578 (eval $ac_compile) 2>&5
6579 ac_status=$?
6580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6581 (exit $ac_status); } &&
6582 { ac_try='test -s conftest.$ac_objext'
6583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6584 (eval $ac_try) 2>&5
6585 ac_status=$?
6586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587 (exit $ac_status); }; }; then
6588 ac_cv_type_short=yes
6589else
6590 echo "$as_me: failed program was:" >&5
6591cat conftest.$ac_ext >&5
6592ac_cv_type_short=no
6593fi
6594rm -f conftest.$ac_objext conftest.$ac_ext
6595fi
6596echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6597echo "${ECHO_T}$ac_cv_type_short" >&6
6598
6599echo "$as_me:$LINENO: checking size of short" >&5
6600echo $ECHO_N "checking size of short... $ECHO_C" >&6
6601if test "${ac_cv_sizeof_short+set}" = set; then
6602 echo $ECHO_N "(cached) $ECHO_C" >&6
6603else
6604 if test "$ac_cv_type_short" = yes; then
6605 # The cast to unsigned long works around a bug in the HP C Compiler
6606 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6607 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6608 # This bug is HP SR number 8606223364.
6609 if test "$cross_compiling" = yes; then
6610 # Depending upon the size, compute the lo and hi bounds.
6611cat >conftest.$ac_ext <<_ACEOF
6612#line $LINENO "configure"
6613#include "confdefs.h"
6614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006615int
6616main ()
6617{
6618static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6619test_array [0] = 0
6620
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext
6626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6627 (eval $ac_compile) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); } &&
6631 { ac_try='test -s conftest.$ac_objext'
6632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 ac_lo=0 ac_mid=0
6638 while :; do
6639 cat >conftest.$ac_ext <<_ACEOF
6640#line $LINENO "configure"
6641#include "confdefs.h"
6642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006643int
6644main ()
6645{
6646static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6647test_array [0] = 0
6648
6649 ;
6650 return 0;
6651}
6652_ACEOF
6653rm -f conftest.$ac_objext
6654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6655 (eval $ac_compile) 2>&5
6656 ac_status=$?
6657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6658 (exit $ac_status); } &&
6659 { ac_try='test -s conftest.$ac_objext'
6660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6661 (eval $ac_try) 2>&5
6662 ac_status=$?
6663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6664 (exit $ac_status); }; }; then
6665 ac_hi=$ac_mid; break
6666else
6667 echo "$as_me: failed program was:" >&5
6668cat conftest.$ac_ext >&5
6669ac_lo=`expr $ac_mid + 1`
6670 if test $ac_lo -le $ac_mid; then
6671 ac_lo= ac_hi=
6672 break
6673 fi
6674 ac_mid=`expr 2 '*' $ac_mid + 1`
6675fi
6676rm -f conftest.$ac_objext conftest.$ac_ext
6677 done
6678else
6679 echo "$as_me: failed program was:" >&5
6680cat conftest.$ac_ext >&5
6681cat >conftest.$ac_ext <<_ACEOF
6682#line $LINENO "configure"
6683#include "confdefs.h"
6684$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006685int
6686main ()
6687{
6688static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6689test_array [0] = 0
6690
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext
6696if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6697 (eval $ac_compile) 2>&5
6698 ac_status=$?
6699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6700 (exit $ac_status); } &&
6701 { ac_try='test -s conftest.$ac_objext'
6702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6703 (eval $ac_try) 2>&5
6704 ac_status=$?
6705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 (exit $ac_status); }; }; then
6707 ac_hi=-1 ac_mid=-1
6708 while :; do
6709 cat >conftest.$ac_ext <<_ACEOF
6710#line $LINENO "configure"
6711#include "confdefs.h"
6712$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006713int
6714main ()
6715{
6716static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6717test_array [0] = 0
6718
6719 ;
6720 return 0;
6721}
6722_ACEOF
6723rm -f conftest.$ac_objext
6724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6725 (eval $ac_compile) 2>&5
6726 ac_status=$?
6727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6728 (exit $ac_status); } &&
6729 { ac_try='test -s conftest.$ac_objext'
6730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6731 (eval $ac_try) 2>&5
6732 ac_status=$?
6733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6734 (exit $ac_status); }; }; then
6735 ac_lo=$ac_mid; break
6736else
6737 echo "$as_me: failed program was:" >&5
6738cat conftest.$ac_ext >&5
6739ac_hi=`expr '(' $ac_mid ')' - 1`
6740 if test $ac_mid -le $ac_hi; then
6741 ac_lo= ac_hi=
6742 break
6743 fi
6744 ac_mid=`expr 2 '*' $ac_mid`
6745fi
6746rm -f conftest.$ac_objext conftest.$ac_ext
6747 done
6748else
6749 echo "$as_me: failed program was:" >&5
6750cat conftest.$ac_ext >&5
6751ac_lo= ac_hi=
6752fi
6753rm -f conftest.$ac_objext conftest.$ac_ext
6754fi
6755rm -f conftest.$ac_objext conftest.$ac_ext
6756# Binary search between lo and hi bounds.
6757while test "x$ac_lo" != "x$ac_hi"; do
6758 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6759 cat >conftest.$ac_ext <<_ACEOF
6760#line $LINENO "configure"
6761#include "confdefs.h"
6762$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006763int
6764main ()
6765{
6766static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6767test_array [0] = 0
6768
6769 ;
6770 return 0;
6771}
6772_ACEOF
6773rm -f conftest.$ac_objext
6774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6775 (eval $ac_compile) 2>&5
6776 ac_status=$?
6777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); } &&
6779 { ac_try='test -s conftest.$ac_objext'
6780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6781 (eval $ac_try) 2>&5
6782 ac_status=$?
6783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); }; }; then
6785 ac_hi=$ac_mid
6786else
6787 echo "$as_me: failed program was:" >&5
6788cat conftest.$ac_ext >&5
6789ac_lo=`expr '(' $ac_mid ')' + 1`
6790fi
6791rm -f conftest.$ac_objext conftest.$ac_ext
6792done
6793case $ac_lo in
6794?*) ac_cv_sizeof_short=$ac_lo;;
6795'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6796echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6797 { (exit 1); exit 1; }; } ;;
6798esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00006799else
6800 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
6802echo "$as_me: error: cannot run test program while cross compiling" >&2;}
6803 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006804else
Martin v. Löwis11437992002-04-12 09:54:03 +00006805 cat >conftest.$ac_ext <<_ACEOF
6806#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006807#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00006808$ac_includes_default
6809long longval () { return (long) (sizeof (short)); }
6810unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006811#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006812#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006813int
6814main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815{
Martin v. Löwis11437992002-04-12 09:54:03 +00006816
6817 FILE *f = fopen ("conftest.val", "w");
6818 if (! f)
6819 exit (1);
6820 if (((long) (sizeof (short))) < 0)
6821 {
6822 long i = longval ();
6823 if (i != ((long) (sizeof (short))))
6824 exit (1);
6825 fprintf (f, "%ld\n", i);
6826 }
6827 else
6828 {
6829 unsigned long i = ulongval ();
6830 if (i != ((long) (sizeof (short))))
6831 exit (1);
6832 fprintf (f, "%lu\n", i);
6833 }
6834 exit (ferror (f) || fclose (f) != 0);
6835
6836 ;
6837 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00006838}
Martin v. Löwis11437992002-04-12 09:54:03 +00006839_ACEOF
6840rm -f conftest$ac_exeext
6841if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6842 (eval $ac_link) 2>&5
6843 ac_status=$?
6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6847 (eval $ac_try) 2>&5
6848 ac_status=$?
6849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6850 (exit $ac_status); }; }; then
6851 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006852else
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 echo "$as_me: program exited with status $ac_status" >&5
6854echo "$as_me: failed program was:" >&5
6855cat conftest.$ac_ext >&5
6856( exit $ac_status )
6857{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
6858echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
6859 { (exit 1); exit 1; }; }
6860fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00006861rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006862fi
6863fi
6864rm -f conftest.val
6865else
Guido van Rossumef2255b2000-03-10 22:30:29 +00006866 ac_cv_sizeof_short=0
6867fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006868fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006869echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
6870echo "${ECHO_T}$ac_cv_sizeof_short" >&6
6871cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006872#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006873_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876echo "$as_me:$LINENO: checking for float" >&5
6877echo $ECHO_N "checking for float... $ECHO_C" >&6
6878if test "${ac_cv_type_float+set}" = set; then
6879 echo $ECHO_N "(cached) $ECHO_C" >&6
6880else
6881 cat >conftest.$ac_ext <<_ACEOF
6882#line $LINENO "configure"
6883#include "confdefs.h"
6884$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006885int
6886main ()
6887{
6888if ((float *) 0)
6889 return 0;
6890if (sizeof (float))
6891 return 0;
6892 ;
6893 return 0;
6894}
6895_ACEOF
6896rm -f conftest.$ac_objext
6897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6898 (eval $ac_compile) 2>&5
6899 ac_status=$?
6900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6901 (exit $ac_status); } &&
6902 { ac_try='test -s conftest.$ac_objext'
6903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6904 (eval $ac_try) 2>&5
6905 ac_status=$?
6906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907 (exit $ac_status); }; }; then
6908 ac_cv_type_float=yes
6909else
6910 echo "$as_me: failed program was:" >&5
6911cat conftest.$ac_ext >&5
6912ac_cv_type_float=no
6913fi
6914rm -f conftest.$ac_objext conftest.$ac_ext
6915fi
6916echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
6917echo "${ECHO_T}$ac_cv_type_float" >&6
6918
6919echo "$as_me:$LINENO: checking size of float" >&5
6920echo $ECHO_N "checking size of float... $ECHO_C" >&6
6921if test "${ac_cv_sizeof_float+set}" = set; then
6922 echo $ECHO_N "(cached) $ECHO_C" >&6
6923else
6924 if test "$ac_cv_type_float" = yes; then
6925 # The cast to unsigned long works around a bug in the HP C Compiler
6926 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6927 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6928 # This bug is HP SR number 8606223364.
6929 if test "$cross_compiling" = yes; then
6930 # Depending upon the size, compute the lo and hi bounds.
6931cat >conftest.$ac_ext <<_ACEOF
6932#line $LINENO "configure"
6933#include "confdefs.h"
6934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
6938static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
6939test_array [0] = 0
6940
6941 ;
6942 return 0;
6943}
6944_ACEOF
6945rm -f conftest.$ac_objext
6946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6947 (eval $ac_compile) 2>&5
6948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); } &&
6951 { ac_try='test -s conftest.$ac_objext'
6952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953 (eval $ac_try) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); }; }; then
6957 ac_lo=0 ac_mid=0
6958 while :; do
6959 cat >conftest.$ac_ext <<_ACEOF
6960#line $LINENO "configure"
6961#include "confdefs.h"
6962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006963int
6964main ()
6965{
6966static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
6967test_array [0] = 0
6968
6969 ;
6970 return 0;
6971}
6972_ACEOF
6973rm -f conftest.$ac_objext
6974if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6975 (eval $ac_compile) 2>&5
6976 ac_status=$?
6977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978 (exit $ac_status); } &&
6979 { ac_try='test -s conftest.$ac_objext'
6980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6981 (eval $ac_try) 2>&5
6982 ac_status=$?
6983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); }; }; then
6985 ac_hi=$ac_mid; break
6986else
6987 echo "$as_me: failed program was:" >&5
6988cat conftest.$ac_ext >&5
6989ac_lo=`expr $ac_mid + 1`
6990 if test $ac_lo -le $ac_mid; then
6991 ac_lo= ac_hi=
6992 break
6993 fi
6994 ac_mid=`expr 2 '*' $ac_mid + 1`
6995fi
6996rm -f conftest.$ac_objext conftest.$ac_ext
6997 done
6998else
6999 echo "$as_me: failed program was:" >&5
7000cat conftest.$ac_ext >&5
7001cat >conftest.$ac_ext <<_ACEOF
7002#line $LINENO "configure"
7003#include "confdefs.h"
7004$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007005int
7006main ()
7007{
7008static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7009test_array [0] = 0
7010
7011 ;
7012 return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext
7016if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7017 (eval $ac_compile) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); } &&
7021 { ac_try='test -s conftest.$ac_objext'
7022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
7025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7026 (exit $ac_status); }; }; then
7027 ac_hi=-1 ac_mid=-1
7028 while :; do
7029 cat >conftest.$ac_ext <<_ACEOF
7030#line $LINENO "configure"
7031#include "confdefs.h"
7032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007033int
7034main ()
7035{
7036static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7037test_array [0] = 0
7038
7039 ;
7040 return 0;
7041}
7042_ACEOF
7043rm -f conftest.$ac_objext
7044if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7045 (eval $ac_compile) 2>&5
7046 ac_status=$?
7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); } &&
7049 { ac_try='test -s conftest.$ac_objext'
7050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7051 (eval $ac_try) 2>&5
7052 ac_status=$?
7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054 (exit $ac_status); }; }; then
7055 ac_lo=$ac_mid; break
7056else
7057 echo "$as_me: failed program was:" >&5
7058cat conftest.$ac_ext >&5
7059ac_hi=`expr '(' $ac_mid ')' - 1`
7060 if test $ac_mid -le $ac_hi; then
7061 ac_lo= ac_hi=
7062 break
7063 fi
7064 ac_mid=`expr 2 '*' $ac_mid`
7065fi
7066rm -f conftest.$ac_objext conftest.$ac_ext
7067 done
7068else
7069 echo "$as_me: failed program was:" >&5
7070cat conftest.$ac_ext >&5
7071ac_lo= ac_hi=
7072fi
7073rm -f conftest.$ac_objext conftest.$ac_ext
7074fi
7075rm -f conftest.$ac_objext conftest.$ac_ext
7076# Binary search between lo and hi bounds.
7077while test "x$ac_lo" != "x$ac_hi"; do
7078 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7079 cat >conftest.$ac_ext <<_ACEOF
7080#line $LINENO "configure"
7081#include "confdefs.h"
7082$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007083int
7084main ()
7085{
7086static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7087test_array [0] = 0
7088
7089 ;
7090 return 0;
7091}
7092_ACEOF
7093rm -f conftest.$ac_objext
7094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7095 (eval $ac_compile) 2>&5
7096 ac_status=$?
7097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7098 (exit $ac_status); } &&
7099 { ac_try='test -s conftest.$ac_objext'
7100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7101 (eval $ac_try) 2>&5
7102 ac_status=$?
7103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7104 (exit $ac_status); }; }; then
7105 ac_hi=$ac_mid
7106else
7107 echo "$as_me: failed program was:" >&5
7108cat conftest.$ac_ext >&5
7109ac_lo=`expr '(' $ac_mid ')' + 1`
7110fi
7111rm -f conftest.$ac_objext conftest.$ac_ext
7112done
7113case $ac_lo in
7114?*) ac_cv_sizeof_float=$ac_lo;;
7115'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7116echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7117 { (exit 1); exit 1; }; } ;;
7118esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007119else
7120 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007121 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7122echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7123 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007124else
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 cat >conftest.$ac_ext <<_ACEOF
7126#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007127#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007128$ac_includes_default
7129long longval () { return (long) (sizeof (float)); }
7130unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007131#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007132#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007133int
7134main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007135{
Martin v. Löwis11437992002-04-12 09:54:03 +00007136
7137 FILE *f = fopen ("conftest.val", "w");
7138 if (! f)
7139 exit (1);
7140 if (((long) (sizeof (float))) < 0)
7141 {
7142 long i = longval ();
7143 if (i != ((long) (sizeof (float))))
7144 exit (1);
7145 fprintf (f, "%ld\n", i);
7146 }
7147 else
7148 {
7149 unsigned long i = ulongval ();
7150 if (i != ((long) (sizeof (float))))
7151 exit (1);
7152 fprintf (f, "%lu\n", i);
7153 }
7154 exit (ferror (f) || fclose (f) != 0);
7155
7156 ;
7157 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158}
Martin v. Löwis11437992002-04-12 09:54:03 +00007159_ACEOF
7160rm -f conftest$ac_exeext
7161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7162 (eval $ac_link) 2>&5
7163 ac_status=$?
7164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7167 (eval $ac_try) 2>&5
7168 ac_status=$?
7169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7170 (exit $ac_status); }; }; then
7171 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007172else
Martin v. Löwis11437992002-04-12 09:54:03 +00007173 echo "$as_me: program exited with status $ac_status" >&5
7174echo "$as_me: failed program was:" >&5
7175cat conftest.$ac_ext >&5
7176( exit $ac_status )
7177{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77" >&5
7178echo "$as_me: error: cannot compute sizeof (float), 77" >&2;}
7179 { (exit 1); exit 1; }; }
7180fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00007181rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007182fi
7183fi
7184rm -f conftest.val
7185else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007186 ac_cv_sizeof_float=0
7187fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007189echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7190echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7191cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007192#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007193_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194
7195
Martin v. Löwis11437992002-04-12 09:54:03 +00007196echo "$as_me:$LINENO: checking for double" >&5
7197echo $ECHO_N "checking for double... $ECHO_C" >&6
7198if test "${ac_cv_type_double+set}" = set; then
7199 echo $ECHO_N "(cached) $ECHO_C" >&6
7200else
7201 cat >conftest.$ac_ext <<_ACEOF
7202#line $LINENO "configure"
7203#include "confdefs.h"
7204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007205int
7206main ()
7207{
7208if ((double *) 0)
7209 return 0;
7210if (sizeof (double))
7211 return 0;
7212 ;
7213 return 0;
7214}
7215_ACEOF
7216rm -f conftest.$ac_objext
7217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7218 (eval $ac_compile) 2>&5
7219 ac_status=$?
7220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7221 (exit $ac_status); } &&
7222 { ac_try='test -s conftest.$ac_objext'
7223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7224 (eval $ac_try) 2>&5
7225 ac_status=$?
7226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227 (exit $ac_status); }; }; then
7228 ac_cv_type_double=yes
7229else
7230 echo "$as_me: failed program was:" >&5
7231cat conftest.$ac_ext >&5
7232ac_cv_type_double=no
7233fi
7234rm -f conftest.$ac_objext conftest.$ac_ext
7235fi
7236echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7237echo "${ECHO_T}$ac_cv_type_double" >&6
7238
7239echo "$as_me:$LINENO: checking size of double" >&5
7240echo $ECHO_N "checking size of double... $ECHO_C" >&6
7241if test "${ac_cv_sizeof_double+set}" = set; then
7242 echo $ECHO_N "(cached) $ECHO_C" >&6
7243else
7244 if test "$ac_cv_type_double" = yes; then
7245 # The cast to unsigned long works around a bug in the HP C Compiler
7246 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7247 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7248 # This bug is HP SR number 8606223364.
7249 if test "$cross_compiling" = yes; then
7250 # Depending upon the size, compute the lo and hi bounds.
7251cat >conftest.$ac_ext <<_ACEOF
7252#line $LINENO "configure"
7253#include "confdefs.h"
7254$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007255int
7256main ()
7257{
7258static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7259test_array [0] = 0
7260
7261 ;
7262 return 0;
7263}
7264_ACEOF
7265rm -f conftest.$ac_objext
7266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7267 (eval $ac_compile) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); } &&
7271 { ac_try='test -s conftest.$ac_objext'
7272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7273 (eval $ac_try) 2>&5
7274 ac_status=$?
7275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276 (exit $ac_status); }; }; then
7277 ac_lo=0 ac_mid=0
7278 while :; do
7279 cat >conftest.$ac_ext <<_ACEOF
7280#line $LINENO "configure"
7281#include "confdefs.h"
7282$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007283int
7284main ()
7285{
7286static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7287test_array [0] = 0
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293rm -f conftest.$ac_objext
7294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7295 (eval $ac_compile) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); } &&
7299 { ac_try='test -s conftest.$ac_objext'
7300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
7305 ac_hi=$ac_mid; break
7306else
7307 echo "$as_me: failed program was:" >&5
7308cat conftest.$ac_ext >&5
7309ac_lo=`expr $ac_mid + 1`
7310 if test $ac_lo -le $ac_mid; then
7311 ac_lo= ac_hi=
7312 break
7313 fi
7314 ac_mid=`expr 2 '*' $ac_mid + 1`
7315fi
7316rm -f conftest.$ac_objext conftest.$ac_ext
7317 done
7318else
7319 echo "$as_me: failed program was:" >&5
7320cat conftest.$ac_ext >&5
7321cat >conftest.$ac_ext <<_ACEOF
7322#line $LINENO "configure"
7323#include "confdefs.h"
7324$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007325int
7326main ()
7327{
7328static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7329test_array [0] = 0
7330
7331 ;
7332 return 0;
7333}
7334_ACEOF
7335rm -f conftest.$ac_objext
7336if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7337 (eval $ac_compile) 2>&5
7338 ac_status=$?
7339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7340 (exit $ac_status); } &&
7341 { ac_try='test -s conftest.$ac_objext'
7342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7343 (eval $ac_try) 2>&5
7344 ac_status=$?
7345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7346 (exit $ac_status); }; }; then
7347 ac_hi=-1 ac_mid=-1
7348 while :; do
7349 cat >conftest.$ac_ext <<_ACEOF
7350#line $LINENO "configure"
7351#include "confdefs.h"
7352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007353int
7354main ()
7355{
7356static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7357test_array [0] = 0
7358
7359 ;
7360 return 0;
7361}
7362_ACEOF
7363rm -f conftest.$ac_objext
7364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7365 (eval $ac_compile) 2>&5
7366 ac_status=$?
7367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7368 (exit $ac_status); } &&
7369 { ac_try='test -s conftest.$ac_objext'
7370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7371 (eval $ac_try) 2>&5
7372 ac_status=$?
7373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7374 (exit $ac_status); }; }; then
7375 ac_lo=$ac_mid; break
7376else
7377 echo "$as_me: failed program was:" >&5
7378cat conftest.$ac_ext >&5
7379ac_hi=`expr '(' $ac_mid ')' - 1`
7380 if test $ac_mid -le $ac_hi; then
7381 ac_lo= ac_hi=
7382 break
7383 fi
7384 ac_mid=`expr 2 '*' $ac_mid`
7385fi
7386rm -f conftest.$ac_objext conftest.$ac_ext
7387 done
7388else
7389 echo "$as_me: failed program was:" >&5
7390cat conftest.$ac_ext >&5
7391ac_lo= ac_hi=
7392fi
7393rm -f conftest.$ac_objext conftest.$ac_ext
7394fi
7395rm -f conftest.$ac_objext conftest.$ac_ext
7396# Binary search between lo and hi bounds.
7397while test "x$ac_lo" != "x$ac_hi"; do
7398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7399 cat >conftest.$ac_ext <<_ACEOF
7400#line $LINENO "configure"
7401#include "confdefs.h"
7402$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007403int
7404main ()
7405{
7406static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7407test_array [0] = 0
7408
7409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7415 (eval $ac_compile) 2>&5
7416 ac_status=$?
7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418 (exit $ac_status); } &&
7419 { ac_try='test -s conftest.$ac_objext'
7420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7421 (eval $ac_try) 2>&5
7422 ac_status=$?
7423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 ac_hi=$ac_mid
7426else
7427 echo "$as_me: failed program was:" >&5
7428cat conftest.$ac_ext >&5
7429ac_lo=`expr '(' $ac_mid ')' + 1`
7430fi
7431rm -f conftest.$ac_objext conftest.$ac_ext
7432done
7433case $ac_lo in
7434?*) ac_cv_sizeof_double=$ac_lo;;
7435'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7436echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7437 { (exit 1); exit 1; }; } ;;
7438esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007439else
7440 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007441 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7442echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7443 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444else
Martin v. Löwis11437992002-04-12 09:54:03 +00007445 cat >conftest.$ac_ext <<_ACEOF
7446#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007447#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007448$ac_includes_default
7449long longval () { return (long) (sizeof (double)); }
7450unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007451#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007452#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007453int
7454main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007455{
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457 FILE *f = fopen ("conftest.val", "w");
7458 if (! f)
7459 exit (1);
7460 if (((long) (sizeof (double))) < 0)
7461 {
7462 long i = longval ();
7463 if (i != ((long) (sizeof (double))))
7464 exit (1);
7465 fprintf (f, "%ld\n", i);
7466 }
7467 else
7468 {
7469 unsigned long i = ulongval ();
7470 if (i != ((long) (sizeof (double))))
7471 exit (1);
7472 fprintf (f, "%lu\n", i);
7473 }
7474 exit (ferror (f) || fclose (f) != 0);
7475
7476 ;
7477 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007478}
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
7480rm -f conftest$ac_exeext
7481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7482 (eval $ac_link) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007492else
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 echo "$as_me: program exited with status $ac_status" >&5
7494echo "$as_me: failed program was:" >&5
7495cat conftest.$ac_ext >&5
7496( exit $ac_status )
7497{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5
7498echo "$as_me: error: cannot compute sizeof (double), 77" >&2;}
7499 { (exit 1); exit 1; }; }
7500fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00007501rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007502fi
7503fi
7504rm -f conftest.val
7505else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007506 ac_cv_sizeof_double=0
7507fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007509echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7510echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7511cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007512#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007514
7515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516echo "$as_me:$LINENO: checking for fpos_t" >&5
7517echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7518if test "${ac_cv_type_fpos_t+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521 cat >conftest.$ac_ext <<_ACEOF
7522#line $LINENO "configure"
7523#include "confdefs.h"
7524$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007525int
7526main ()
7527{
7528if ((fpos_t *) 0)
7529 return 0;
7530if (sizeof (fpos_t))
7531 return 0;
7532 ;
7533 return 0;
7534}
7535_ACEOF
7536rm -f conftest.$ac_objext
7537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7538 (eval $ac_compile) 2>&5
7539 ac_status=$?
7540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7541 (exit $ac_status); } &&
7542 { ac_try='test -s conftest.$ac_objext'
7543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7544 (eval $ac_try) 2>&5
7545 ac_status=$?
7546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); }; }; then
7548 ac_cv_type_fpos_t=yes
7549else
7550 echo "$as_me: failed program was:" >&5
7551cat conftest.$ac_ext >&5
7552ac_cv_type_fpos_t=no
7553fi
7554rm -f conftest.$ac_objext conftest.$ac_ext
7555fi
7556echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7557echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7558
7559echo "$as_me:$LINENO: checking size of fpos_t" >&5
7560echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7561if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7562 echo $ECHO_N "(cached) $ECHO_C" >&6
7563else
7564 if test "$ac_cv_type_fpos_t" = yes; then
7565 # The cast to unsigned long works around a bug in the HP C Compiler
7566 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7567 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7568 # This bug is HP SR number 8606223364.
7569 if test "$cross_compiling" = yes; then
7570 # Depending upon the size, compute the lo and hi bounds.
7571cat >conftest.$ac_ext <<_ACEOF
7572#line $LINENO "configure"
7573#include "confdefs.h"
7574$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007575int
7576main ()
7577{
7578static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7579test_array [0] = 0
7580
7581 ;
7582 return 0;
7583}
7584_ACEOF
7585rm -f conftest.$ac_objext
7586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7587 (eval $ac_compile) 2>&5
7588 ac_status=$?
7589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7590 (exit $ac_status); } &&
7591 { ac_try='test -s conftest.$ac_objext'
7592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7593 (eval $ac_try) 2>&5
7594 ac_status=$?
7595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7596 (exit $ac_status); }; }; then
7597 ac_lo=0 ac_mid=0
7598 while :; do
7599 cat >conftest.$ac_ext <<_ACEOF
7600#line $LINENO "configure"
7601#include "confdefs.h"
7602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007603int
7604main ()
7605{
7606static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7607test_array [0] = 0
7608
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613rm -f conftest.$ac_objext
7614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7615 (eval $ac_compile) 2>&5
7616 ac_status=$?
7617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7618 (exit $ac_status); } &&
7619 { ac_try='test -s conftest.$ac_objext'
7620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7621 (eval $ac_try) 2>&5
7622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); }; }; then
7625 ac_hi=$ac_mid; break
7626else
7627 echo "$as_me: failed program was:" >&5
7628cat conftest.$ac_ext >&5
7629ac_lo=`expr $ac_mid + 1`
7630 if test $ac_lo -le $ac_mid; then
7631 ac_lo= ac_hi=
7632 break
7633 fi
7634 ac_mid=`expr 2 '*' $ac_mid + 1`
7635fi
7636rm -f conftest.$ac_objext conftest.$ac_ext
7637 done
7638else
7639 echo "$as_me: failed program was:" >&5
7640cat conftest.$ac_ext >&5
7641cat >conftest.$ac_ext <<_ACEOF
7642#line $LINENO "configure"
7643#include "confdefs.h"
7644$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007645int
7646main ()
7647{
7648static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
7649test_array [0] = 0
7650
7651 ;
7652 return 0;
7653}
7654_ACEOF
7655rm -f conftest.$ac_objext
7656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7657 (eval $ac_compile) 2>&5
7658 ac_status=$?
7659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7660 (exit $ac_status); } &&
7661 { ac_try='test -s conftest.$ac_objext'
7662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7663 (eval $ac_try) 2>&5
7664 ac_status=$?
7665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7666 (exit $ac_status); }; }; then
7667 ac_hi=-1 ac_mid=-1
7668 while :; do
7669 cat >conftest.$ac_ext <<_ACEOF
7670#line $LINENO "configure"
7671#include "confdefs.h"
7672$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007673int
7674main ()
7675{
7676static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
7677test_array [0] = 0
7678
7679 ;
7680 return 0;
7681}
7682_ACEOF
7683rm -f conftest.$ac_objext
7684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7685 (eval $ac_compile) 2>&5
7686 ac_status=$?
7687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688 (exit $ac_status); } &&
7689 { ac_try='test -s conftest.$ac_objext'
7690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7691 (eval $ac_try) 2>&5
7692 ac_status=$?
7693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7694 (exit $ac_status); }; }; then
7695 ac_lo=$ac_mid; break
7696else
7697 echo "$as_me: failed program was:" >&5
7698cat conftest.$ac_ext >&5
7699ac_hi=`expr '(' $ac_mid ')' - 1`
7700 if test $ac_mid -le $ac_hi; then
7701 ac_lo= ac_hi=
7702 break
7703 fi
7704 ac_mid=`expr 2 '*' $ac_mid`
7705fi
7706rm -f conftest.$ac_objext conftest.$ac_ext
7707 done
7708else
7709 echo "$as_me: failed program was:" >&5
7710cat conftest.$ac_ext >&5
7711ac_lo= ac_hi=
7712fi
7713rm -f conftest.$ac_objext conftest.$ac_ext
7714fi
7715rm -f conftest.$ac_objext conftest.$ac_ext
7716# Binary search between lo and hi bounds.
7717while test "x$ac_lo" != "x$ac_hi"; do
7718 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7719 cat >conftest.$ac_ext <<_ACEOF
7720#line $LINENO "configure"
7721#include "confdefs.h"
7722$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
7726static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7727test_array [0] = 0
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext
7734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7735 (eval $ac_compile) 2>&5
7736 ac_status=$?
7737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738 (exit $ac_status); } &&
7739 { ac_try='test -s conftest.$ac_objext'
7740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7741 (eval $ac_try) 2>&5
7742 ac_status=$?
7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744 (exit $ac_status); }; }; then
7745 ac_hi=$ac_mid
7746else
7747 echo "$as_me: failed program was:" >&5
7748cat conftest.$ac_ext >&5
7749ac_lo=`expr '(' $ac_mid ')' + 1`
7750fi
7751rm -f conftest.$ac_objext conftest.$ac_ext
7752done
7753case $ac_lo in
7754?*) ac_cv_sizeof_fpos_t=$ac_lo;;
7755'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7756echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7757 { (exit 1); exit 1; }; } ;;
7758esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007759else
7760 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
7762echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7763 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007764else
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 cat >conftest.$ac_ext <<_ACEOF
7766#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007767#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007768$ac_includes_default
7769long longval () { return (long) (sizeof (fpos_t)); }
7770unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007772#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007773int
7774main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007775{
Martin v. Löwis11437992002-04-12 09:54:03 +00007776
7777 FILE *f = fopen ("conftest.val", "w");
7778 if (! f)
7779 exit (1);
7780 if (((long) (sizeof (fpos_t))) < 0)
7781 {
7782 long i = longval ();
7783 if (i != ((long) (sizeof (fpos_t))))
7784 exit (1);
7785 fprintf (f, "%ld\n", i);
7786 }
7787 else
7788 {
7789 unsigned long i = ulongval ();
7790 if (i != ((long) (sizeof (fpos_t))))
7791 exit (1);
7792 fprintf (f, "%lu\n", i);
7793 }
7794 exit (ferror (f) || fclose (f) != 0);
7795
7796 ;
7797 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007798}
Martin v. Löwis11437992002-04-12 09:54:03 +00007799_ACEOF
7800rm -f conftest$ac_exeext
7801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7802 (eval $ac_link) 2>&5
7803 ac_status=$?
7804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7807 (eval $ac_try) 2>&5
7808 ac_status=$?
7809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7810 (exit $ac_status); }; }; then
7811 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007812else
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 echo "$as_me: program exited with status $ac_status" >&5
7814echo "$as_me: failed program was:" >&5
7815cat conftest.$ac_ext >&5
7816( exit $ac_status )
7817{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77" >&5
7818echo "$as_me: error: cannot compute sizeof (fpos_t), 77" >&2;}
7819 { (exit 1); exit 1; }; }
7820fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00007821rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
7823fi
7824rm -f conftest.val
7825else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007826 ac_cv_sizeof_fpos_t=0
7827fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007829echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
7830echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
7831cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007832#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007834
Michael W. Hudson54241132001-12-07 15:38:26 +00007835
7836
Martin v. Löwis11437992002-04-12 09:54:03 +00007837echo "$as_me:$LINENO: checking for long long support" >&5
7838echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007839have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007840cat >conftest.$ac_ext <<_ACEOF
7841#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007842#include "confdefs.h"
7843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844int
7845main ()
7846{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007847long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ;
7849 return 0;
7850}
7851_ACEOF
7852rm -f conftest.$ac_objext
7853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7854 (eval $ac_compile) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); } &&
7858 { ac_try='test -s conftest.$ac_objext'
7859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7860 (eval $ac_try) 2>&5
7861 ac_status=$?
7862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); }; }; then
7864
7865
7866cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007867#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007868_ACEOF
7869
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007870 have_long_long=yes
7871
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007872else
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 echo "$as_me: failed program was:" >&5
7874cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007876rm -f conftest.$ac_objext conftest.$ac_ext
7877echo "$as_me:$LINENO: result: $have_long_long" >&5
7878echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007879if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007880echo "$as_me:$LINENO: checking for long long" >&5
7881echo $ECHO_N "checking for long long... $ECHO_C" >&6
7882if test "${ac_cv_type_long_long+set}" = set; then
7883 echo $ECHO_N "(cached) $ECHO_C" >&6
7884else
7885 cat >conftest.$ac_ext <<_ACEOF
7886#line $LINENO "configure"
7887#include "confdefs.h"
7888$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007889int
7890main ()
7891{
7892if ((long long *) 0)
7893 return 0;
7894if (sizeof (long long))
7895 return 0;
7896 ;
7897 return 0;
7898}
7899_ACEOF
7900rm -f conftest.$ac_objext
7901if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7902 (eval $ac_compile) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); } &&
7906 { ac_try='test -s conftest.$ac_objext'
7907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7908 (eval $ac_try) 2>&5
7909 ac_status=$?
7910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7911 (exit $ac_status); }; }; then
7912 ac_cv_type_long_long=yes
7913else
7914 echo "$as_me: failed program was:" >&5
7915cat conftest.$ac_ext >&5
7916ac_cv_type_long_long=no
7917fi
7918rm -f conftest.$ac_objext conftest.$ac_ext
7919fi
7920echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
7921echo "${ECHO_T}$ac_cv_type_long_long" >&6
7922
7923echo "$as_me:$LINENO: checking size of long long" >&5
7924echo $ECHO_N "checking size of long long... $ECHO_C" >&6
7925if test "${ac_cv_sizeof_long_long+set}" = set; then
7926 echo $ECHO_N "(cached) $ECHO_C" >&6
7927else
7928 if test "$ac_cv_type_long_long" = yes; then
7929 # The cast to unsigned long works around a bug in the HP C Compiler
7930 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7931 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7932 # This bug is HP SR number 8606223364.
7933 if test "$cross_compiling" = yes; then
7934 # Depending upon the size, compute the lo and hi bounds.
7935cat >conftest.$ac_ext <<_ACEOF
7936#line $LINENO "configure"
7937#include "confdefs.h"
7938$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
7942static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
7943test_array [0] = 0
7944
7945 ;
7946 return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext
7950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7951 (eval $ac_compile) 2>&5
7952 ac_status=$?
7953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); } &&
7955 { ac_try='test -s conftest.$ac_objext'
7956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7957 (eval $ac_try) 2>&5
7958 ac_status=$?
7959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7960 (exit $ac_status); }; }; then
7961 ac_lo=0 ac_mid=0
7962 while :; do
7963 cat >conftest.$ac_ext <<_ACEOF
7964#line $LINENO "configure"
7965#include "confdefs.h"
7966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007967int
7968main ()
7969{
7970static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
7971test_array [0] = 0
7972
7973 ;
7974 return 0;
7975}
7976_ACEOF
7977rm -f conftest.$ac_objext
7978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7979 (eval $ac_compile) 2>&5
7980 ac_status=$?
7981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7982 (exit $ac_status); } &&
7983 { ac_try='test -s conftest.$ac_objext'
7984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7985 (eval $ac_try) 2>&5
7986 ac_status=$?
7987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7988 (exit $ac_status); }; }; then
7989 ac_hi=$ac_mid; break
7990else
7991 echo "$as_me: failed program was:" >&5
7992cat conftest.$ac_ext >&5
7993ac_lo=`expr $ac_mid + 1`
7994 if test $ac_lo -le $ac_mid; then
7995 ac_lo= ac_hi=
7996 break
7997 fi
7998 ac_mid=`expr 2 '*' $ac_mid + 1`
7999fi
8000rm -f conftest.$ac_objext conftest.$ac_ext
8001 done
8002else
8003 echo "$as_me: failed program was:" >&5
8004cat conftest.$ac_ext >&5
8005cat >conftest.$ac_ext <<_ACEOF
8006#line $LINENO "configure"
8007#include "confdefs.h"
8008$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008009int
8010main ()
8011{
8012static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8013test_array [0] = 0
8014
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext
8020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8021 (eval $ac_compile) 2>&5
8022 ac_status=$?
8023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8024 (exit $ac_status); } &&
8025 { ac_try='test -s conftest.$ac_objext'
8026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8027 (eval $ac_try) 2>&5
8028 ac_status=$?
8029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8030 (exit $ac_status); }; }; then
8031 ac_hi=-1 ac_mid=-1
8032 while :; do
8033 cat >conftest.$ac_ext <<_ACEOF
8034#line $LINENO "configure"
8035#include "confdefs.h"
8036$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
8040static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
8048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8049 (eval $ac_compile) 2>&5
8050 ac_status=$?
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); } &&
8053 { ac_try='test -s conftest.$ac_objext'
8054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8055 (eval $ac_try) 2>&5
8056 ac_status=$?
8057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058 (exit $ac_status); }; }; then
8059 ac_lo=$ac_mid; break
8060else
8061 echo "$as_me: failed program was:" >&5
8062cat conftest.$ac_ext >&5
8063ac_hi=`expr '(' $ac_mid ')' - 1`
8064 if test $ac_mid -le $ac_hi; then
8065 ac_lo= ac_hi=
8066 break
8067 fi
8068 ac_mid=`expr 2 '*' $ac_mid`
8069fi
8070rm -f conftest.$ac_objext conftest.$ac_ext
8071 done
8072else
8073 echo "$as_me: failed program was:" >&5
8074cat conftest.$ac_ext >&5
8075ac_lo= ac_hi=
8076fi
8077rm -f conftest.$ac_objext conftest.$ac_ext
8078fi
8079rm -f conftest.$ac_objext conftest.$ac_ext
8080# Binary search between lo and hi bounds.
8081while test "x$ac_lo" != "x$ac_hi"; do
8082 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8083 cat >conftest.$ac_ext <<_ACEOF
8084#line $LINENO "configure"
8085#include "confdefs.h"
8086$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008087int
8088main ()
8089{
8090static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8091test_array [0] = 0
8092
8093 ;
8094 return 0;
8095}
8096_ACEOF
8097rm -f conftest.$ac_objext
8098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8099 (eval $ac_compile) 2>&5
8100 ac_status=$?
8101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8102 (exit $ac_status); } &&
8103 { ac_try='test -s conftest.$ac_objext'
8104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8105 (eval $ac_try) 2>&5
8106 ac_status=$?
8107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8108 (exit $ac_status); }; }; then
8109 ac_hi=$ac_mid
8110else
8111 echo "$as_me: failed program was:" >&5
8112cat conftest.$ac_ext >&5
8113ac_lo=`expr '(' $ac_mid ')' + 1`
8114fi
8115rm -f conftest.$ac_objext conftest.$ac_ext
8116done
8117case $ac_lo in
8118?*) ac_cv_sizeof_long_long=$ac_lo;;
8119'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8120echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8121 { (exit 1); exit 1; }; } ;;
8122esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123else
8124 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8126echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8127 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008128else
Martin v. Löwis11437992002-04-12 09:54:03 +00008129 cat >conftest.$ac_ext <<_ACEOF
8130#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008131#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
8133long longval () { return (long) (sizeof (long long)); }
8134unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008135#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008136#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008137int
8138main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008139{
Martin v. Löwis11437992002-04-12 09:54:03 +00008140
8141 FILE *f = fopen ("conftest.val", "w");
8142 if (! f)
8143 exit (1);
8144 if (((long) (sizeof (long long))) < 0)
8145 {
8146 long i = longval ();
8147 if (i != ((long) (sizeof (long long))))
8148 exit (1);
8149 fprintf (f, "%ld\n", i);
8150 }
8151 else
8152 {
8153 unsigned long i = ulongval ();
8154 if (i != ((long) (sizeof (long long))))
8155 exit (1);
8156 fprintf (f, "%lu\n", i);
8157 }
8158 exit (ferror (f) || fclose (f) != 0);
8159
8160 ;
8161 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008162}
Martin v. Löwis11437992002-04-12 09:54:03 +00008163_ACEOF
8164rm -f conftest$ac_exeext
8165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8166 (eval $ac_link) 2>&5
8167 ac_status=$?
8168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8169 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8171 (eval $ac_try) 2>&5
8172 ac_status=$?
8173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8174 (exit $ac_status); }; }; then
8175 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008176else
Martin v. Löwis11437992002-04-12 09:54:03 +00008177 echo "$as_me: program exited with status $ac_status" >&5
8178echo "$as_me: failed program was:" >&5
8179cat conftest.$ac_ext >&5
8180( exit $ac_status )
8181{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5
8182echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
8183 { (exit 1); exit 1; }; }
8184fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00008185rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186fi
8187fi
8188rm -f conftest.val
8189else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008190 ac_cv_sizeof_long_long=0
8191fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008193echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8194echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8195cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008196#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008197_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008198
Michael W. Hudson54241132001-12-07 15:38:26 +00008199
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008200fi
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8203echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008204have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008205cat >conftest.$ac_ext <<_ACEOF
8206#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008207#include "confdefs.h"
8208
Martin v. Löwis11437992002-04-12 09:54:03 +00008209int
8210main ()
8211{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008212uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
8218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8219 (eval $ac_compile) 2>&5
8220 ac_status=$?
8221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8222 (exit $ac_status); } &&
8223 { ac_try='test -s conftest.$ac_objext'
8224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8225 (eval $ac_try) 2>&5
8226 ac_status=$?
8227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); }; }; then
8229
8230
8231cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008232#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008233_ACEOF
8234
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008235 have_uintptr_t=yes
8236
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008237else
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 echo "$as_me: failed program was:" >&5
8239cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008240fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008241rm -f conftest.$ac_objext conftest.$ac_ext
8242echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8243echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008244if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008245echo "$as_me:$LINENO: checking for uintptr_t" >&5
8246echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8247if test "${ac_cv_type_uintptr_t+set}" = set; then
8248 echo $ECHO_N "(cached) $ECHO_C" >&6
8249else
8250 cat >conftest.$ac_ext <<_ACEOF
8251#line $LINENO "configure"
8252#include "confdefs.h"
8253$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
8256{
8257if ((uintptr_t *) 0)
8258 return 0;
8259if (sizeof (uintptr_t))
8260 return 0;
8261 ;
8262 return 0;
8263}
8264_ACEOF
8265rm -f conftest.$ac_objext
8266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8267 (eval $ac_compile) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); } &&
8271 { ac_try='test -s conftest.$ac_objext'
8272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8273 (eval $ac_try) 2>&5
8274 ac_status=$?
8275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8276 (exit $ac_status); }; }; then
8277 ac_cv_type_uintptr_t=yes
8278else
8279 echo "$as_me: failed program was:" >&5
8280cat conftest.$ac_ext >&5
8281ac_cv_type_uintptr_t=no
8282fi
8283rm -f conftest.$ac_objext conftest.$ac_ext
8284fi
8285echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8286echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8287
8288echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8289echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8290if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8291 echo $ECHO_N "(cached) $ECHO_C" >&6
8292else
8293 if test "$ac_cv_type_uintptr_t" = yes; then
8294 # The cast to unsigned long works around a bug in the HP C Compiler
8295 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8296 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8297 # This bug is HP SR number 8606223364.
8298 if test "$cross_compiling" = yes; then
8299 # Depending upon the size, compute the lo and hi bounds.
8300cat >conftest.$ac_ext <<_ACEOF
8301#line $LINENO "configure"
8302#include "confdefs.h"
8303$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008304int
8305main ()
8306{
8307static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8308test_array [0] = 0
8309
8310 ;
8311 return 0;
8312}
8313_ACEOF
8314rm -f conftest.$ac_objext
8315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8316 (eval $ac_compile) 2>&5
8317 ac_status=$?
8318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8319 (exit $ac_status); } &&
8320 { ac_try='test -s conftest.$ac_objext'
8321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8322 (eval $ac_try) 2>&5
8323 ac_status=$?
8324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8325 (exit $ac_status); }; }; then
8326 ac_lo=0 ac_mid=0
8327 while :; do
8328 cat >conftest.$ac_ext <<_ACEOF
8329#line $LINENO "configure"
8330#include "confdefs.h"
8331$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008332int
8333main ()
8334{
8335static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8336test_array [0] = 0
8337
8338 ;
8339 return 0;
8340}
8341_ACEOF
8342rm -f conftest.$ac_objext
8343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8344 (eval $ac_compile) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); } &&
8348 { ac_try='test -s conftest.$ac_objext'
8349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8350 (eval $ac_try) 2>&5
8351 ac_status=$?
8352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8353 (exit $ac_status); }; }; then
8354 ac_hi=$ac_mid; break
8355else
8356 echo "$as_me: failed program was:" >&5
8357cat conftest.$ac_ext >&5
8358ac_lo=`expr $ac_mid + 1`
8359 if test $ac_lo -le $ac_mid; then
8360 ac_lo= ac_hi=
8361 break
8362 fi
8363 ac_mid=`expr 2 '*' $ac_mid + 1`
8364fi
8365rm -f conftest.$ac_objext conftest.$ac_ext
8366 done
8367else
8368 echo "$as_me: failed program was:" >&5
8369cat conftest.$ac_ext >&5
8370cat >conftest.$ac_ext <<_ACEOF
8371#line $LINENO "configure"
8372#include "confdefs.h"
8373$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008374int
8375main ()
8376{
8377static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8378test_array [0] = 0
8379
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384rm -f conftest.$ac_objext
8385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8386 (eval $ac_compile) 2>&5
8387 ac_status=$?
8388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest.$ac_objext'
8391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8392 (eval $ac_try) 2>&5
8393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_hi=-1 ac_mid=-1
8397 while :; do
8398 cat >conftest.$ac_ext <<_ACEOF
8399#line $LINENO "configure"
8400#include "confdefs.h"
8401$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008402int
8403main ()
8404{
8405static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8406test_array [0] = 0
8407
8408 ;
8409 return 0;
8410}
8411_ACEOF
8412rm -f conftest.$ac_objext
8413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8414 (eval $ac_compile) 2>&5
8415 ac_status=$?
8416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8417 (exit $ac_status); } &&
8418 { ac_try='test -s conftest.$ac_objext'
8419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8420 (eval $ac_try) 2>&5
8421 ac_status=$?
8422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8423 (exit $ac_status); }; }; then
8424 ac_lo=$ac_mid; break
8425else
8426 echo "$as_me: failed program was:" >&5
8427cat conftest.$ac_ext >&5
8428ac_hi=`expr '(' $ac_mid ')' - 1`
8429 if test $ac_mid -le $ac_hi; then
8430 ac_lo= ac_hi=
8431 break
8432 fi
8433 ac_mid=`expr 2 '*' $ac_mid`
8434fi
8435rm -f conftest.$ac_objext conftest.$ac_ext
8436 done
8437else
8438 echo "$as_me: failed program was:" >&5
8439cat conftest.$ac_ext >&5
8440ac_lo= ac_hi=
8441fi
8442rm -f conftest.$ac_objext conftest.$ac_ext
8443fi
8444rm -f conftest.$ac_objext conftest.$ac_ext
8445# Binary search between lo and hi bounds.
8446while test "x$ac_lo" != "x$ac_hi"; do
8447 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8448 cat >conftest.$ac_ext <<_ACEOF
8449#line $LINENO "configure"
8450#include "confdefs.h"
8451$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008452int
8453main ()
8454{
8455static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8456test_array [0] = 0
8457
8458 ;
8459 return 0;
8460}
8461_ACEOF
8462rm -f conftest.$ac_objext
8463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8464 (eval $ac_compile) 2>&5
8465 ac_status=$?
8466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8467 (exit $ac_status); } &&
8468 { ac_try='test -s conftest.$ac_objext'
8469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8470 (eval $ac_try) 2>&5
8471 ac_status=$?
8472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8473 (exit $ac_status); }; }; then
8474 ac_hi=$ac_mid
8475else
8476 echo "$as_me: failed program was:" >&5
8477cat conftest.$ac_ext >&5
8478ac_lo=`expr '(' $ac_mid ')' + 1`
8479fi
8480rm -f conftest.$ac_objext conftest.$ac_ext
8481done
8482case $ac_lo in
8483?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
8484'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8485echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8486 { (exit 1); exit 1; }; } ;;
8487esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008488else
8489 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
8491echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8492 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 cat >conftest.$ac_ext <<_ACEOF
8495#line $LINENO "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008496#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00008497$ac_includes_default
8498long longval () { return (long) (sizeof (uintptr_t)); }
8499unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008500#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008501#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008502int
8503main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008504{
Martin v. Löwis11437992002-04-12 09:54:03 +00008505
8506 FILE *f = fopen ("conftest.val", "w");
8507 if (! f)
8508 exit (1);
8509 if (((long) (sizeof (uintptr_t))) < 0)
8510 {
8511 long i = longval ();
8512 if (i != ((long) (sizeof (uintptr_t))))
8513 exit (1);
8514 fprintf (f, "%ld\n", i);
8515 }
8516 else
8517 {
8518 unsigned long i = ulongval ();
8519 if (i != ((long) (sizeof (uintptr_t))))
8520 exit (1);
8521 fprintf (f, "%lu\n", i);
8522 }
8523 exit (ferror (f) || fclose (f) != 0);
8524
8525 ;
8526 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008527}
Martin v. Löwis11437992002-04-12 09:54:03 +00008528_ACEOF
8529rm -f conftest$ac_exeext
8530if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8531 (eval $ac_link) 2>&5
8532 ac_status=$?
8533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; }; then
8540 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 echo "$as_me: program exited with status $ac_status" >&5
8543echo "$as_me: failed program was:" >&5
8544cat conftest.$ac_ext >&5
8545( exit $ac_status )
8546{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77" >&5
8547echo "$as_me: error: cannot compute sizeof (uintptr_t), 77" >&2;}
8548 { (exit 1); exit 1; }; }
8549fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00008550rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008551fi
8552fi
8553rm -f conftest.val
8554else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008555 ac_cv_sizeof_uintptr_t=0
8556fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008558echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
8559echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
8560cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008561#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008562_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008563
Michael W. Hudson54241132001-12-07 15:38:26 +00008564
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008565fi
8566
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008567# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008568echo "$as_me:$LINENO: checking size of off_t" >&5
8569echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
8570if test "${ac_cv_sizeof_off_t+set}" = set; then
8571 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008572else
8573 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008574 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 cat >conftest.$ac_ext <<_ACEOF
8577#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008578#include "confdefs.h"
8579#include <stdio.h>
8580#include <sys/types.h>
8581main()
8582{
8583 FILE *f=fopen("conftestval", "w");
8584 if (!f) exit(1);
8585 fprintf(f, "%d\n", sizeof(off_t));
8586 exit(0);
8587}
Martin v. Löwis11437992002-04-12 09:54:03 +00008588_ACEOF
8589rm -f conftest$ac_exeext
8590if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8591 (eval $ac_link) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8596 (eval $ac_try) 2>&5
8597 ac_status=$?
8598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8599 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008600 ac_cv_sizeof_off_t=`cat conftestval`
8601else
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 echo "$as_me: program exited with status $ac_status" >&5
8603echo "$as_me: failed program was:" >&5
8604cat conftest.$ac_ext >&5
8605( exit $ac_status )
8606ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008607fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00008608rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008609fi
8610
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008611fi
8612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
8614echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
8615
8616cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008617#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008619
Michael W. Hudson54241132001-12-07 15:38:26 +00008620
Martin v. Löwis11437992002-04-12 09:54:03 +00008621echo "$as_me:$LINENO: checking whether to enable large file support" >&5
8622echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008623if test "$have_long_long" = yes -a \
8624 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
8625 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627cat >>confdefs.h <<\_ACEOF
8628#define HAVE_LARGEFILE_SUPPORT 1
8629_ACEOF
8630
8631 echo "$as_me:$LINENO: result: yes" >&5
8632echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008633else
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 echo "$as_me:$LINENO: result: no" >&5
8635echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008636fi
8637
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008638# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008639echo "$as_me:$LINENO: checking size of time_t" >&5
8640echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
8641if test "${ac_cv_sizeof_time_t+set}" = set; then
8642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008643else
8644 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008645 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 cat >conftest.$ac_ext <<_ACEOF
8648#line $LINENO "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008649#include "confdefs.h"
8650#include <stdio.h>
8651#include <time.h>
8652main()
8653{
8654 FILE *f=fopen("conftestval", "w");
8655 if (!f) exit(1);
8656 fprintf(f, "%d\n", sizeof(time_t));
8657 exit(0);
8658}
Martin v. Löwis11437992002-04-12 09:54:03 +00008659_ACEOF
8660rm -f conftest$ac_exeext
8661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8662 (eval $ac_link) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8667 (eval $ac_try) 2>&5
8668 ac_status=$?
8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008671 ac_cv_sizeof_time_t=`cat conftestval`
8672else
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 echo "$as_me: program exited with status $ac_status" >&5
8674echo "$as_me: failed program was:" >&5
8675cat conftest.$ac_ext >&5
8676( exit $ac_status )
8677ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008678fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00008679rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008680fi
8681
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008682fi
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
8685echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
8686
8687cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008688#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008689_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008690
Michael W. Hudson54241132001-12-07 15:38:26 +00008691
8692
Trent Mick635f6fb2000-08-23 21:33:05 +00008693# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008694ac_save_cc="$CC"
8695if test "$ac_cv_kpthread" = "yes"
8696then CC="$CC -Kpthread"
8697fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008698echo "$as_me:$LINENO: checking for pthread_t" >&5
8699echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008700have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008701cat >conftest.$ac_ext <<_ACEOF
8702#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008703#include "confdefs.h"
8704#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008705int
8706main ()
8707{
Guido van Rossum12580492000-09-24 16:47:19 +00008708pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ;
8710 return 0;
8711}
8712_ACEOF
8713rm -f conftest.$ac_objext
8714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8715 (eval $ac_compile) 2>&5
8716 ac_status=$?
8717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8718 (exit $ac_status); } &&
8719 { ac_try='test -s conftest.$ac_objext'
8720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8721 (eval $ac_try) 2>&5
8722 ac_status=$?
8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008725 have_pthread_t=yes
8726else
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 echo "$as_me: failed program was:" >&5
8728cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00008729fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008730rm -f conftest.$ac_objext conftest.$ac_ext
8731echo "$as_me:$LINENO: result: $have_pthread_t" >&5
8732echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008733if test "$have_pthread_t" = yes ; then
8734 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 echo "$as_me:$LINENO: checking size of pthread_t" >&5
8736echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
8737 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
8738 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00008739else
8740 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00008741 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00008742else
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 cat >conftest.$ac_ext <<_ACEOF
8744#line $LINENO "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00008745#include "confdefs.h"
8746#include <stdio.h>
8747 #include <pthread.h>
8748 main()
8749 {
8750 FILE *f=fopen("conftestval", "w");
8751 if (!f) exit(1);
8752 fprintf(f, "%d\n", sizeof(pthread_t));
8753 exit(0);
8754 }
Martin v. Löwis11437992002-04-12 09:54:03 +00008755_ACEOF
8756rm -f conftest$ac_exeext
8757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8758 (eval $ac_link) 2>&5
8759 ac_status=$?
8760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8763 (eval $ac_try) 2>&5
8764 ac_status=$?
8765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8766 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00008767 ac_cv_sizeof_pthread_t=`cat conftestval`
8768else
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 echo "$as_me: program exited with status $ac_status" >&5
8770echo "$as_me: failed program was:" >&5
8771cat conftest.$ac_ext >&5
8772( exit $ac_status )
8773ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00008774fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00008775rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00008776fi
8777
Trent Mick635f6fb2000-08-23 21:33:05 +00008778fi
8779
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
8781echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
8782
8783cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008784#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008785_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008786
8787fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008788CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008789
Martin v. Löwis11437992002-04-12 09:54:03 +00008790echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
8791echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008792# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
8793if test "${enable_toolbox_glue+set}" = set; then
8794 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00008795
Martin v. Löwis11437992002-04-12 09:54:03 +00008796fi;
Jack Jansene578a632001-08-15 01:27:14 +00008797
8798if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008799then
Jack Jansene578a632001-08-15 01:27:14 +00008800 case $ac_sys_system/$ac_sys_release in
8801 Darwin/*)
8802 enable_toolbox_glue="yes";;
8803 *)
8804 enable_toolbox_glue="no";;
8805 esac
8806fi
8807case "$enable_toolbox_glue" in
8808yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00008809 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00008810 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00008811 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008812
8813cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008814#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008815_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00008816
8817 ;;
8818*)
8819 extra_frameworks=""
8820 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008821 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008822 ;;
8823esac
Martin v. Löwis11437992002-04-12 09:54:03 +00008824echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
8825echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00008826
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008827
8828case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00008829 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008830 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008831 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00008832 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8833 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008834 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00008835 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00008836 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00008837 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
8838 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008839esac
8840
Martin v. Löwis11437992002-04-12 09:54:03 +00008841echo "$as_me:$LINENO: checking for --enable-framework" >&5
8842echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008843if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008844then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008845 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008847 # in the build location.
Jack Jansenea0c3822002-08-01 21:57:49 +00008848 LDFLAGS="$LDFLAGS -Wl,-F."
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850cat >>confdefs.h <<\_ACEOF
8851#define WITH_NEXT_FRAMEWORK 1
8852_ACEOF
8853
8854 echo "$as_me:$LINENO: result: yes" >&5
8855echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008856else
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 echo "$as_me:$LINENO: result: no" >&5
8858echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008859fi
8860
Martin v. Löwis11437992002-04-12 09:54:03 +00008861echo "$as_me:$LINENO: checking for dyld" >&5
8862echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008863case $ac_sys_system/$ac_sys_release in
8864 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008865
Martin v. Löwis11437992002-04-12 09:54:03 +00008866cat >>confdefs.h <<\_ACEOF
8867#define WITH_DYLD 1
8868_ACEOF
8869
8870 echo "$as_me:$LINENO: result: always on for Darwin" >&5
8871echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008872 ;;
8873 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 echo "$as_me:$LINENO: result: no" >&5
8875echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00008876 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008877esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008878
Guido van Rossum0a516c91994-09-12 10:58:40 +00008879# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008880
Michael W. Hudson54241132001-12-07 15:38:26 +00008881
8882
8883
8884
Guido van Rossum0a516c91994-09-12 10:58:40 +00008885# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008886# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00008887echo "$as_me:$LINENO: checking SO" >&5
8888echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008889if test -z "$SO"
8890then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00008892 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008893 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008894 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008895 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008896fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008897echo "$as_me:$LINENO: result: $SO" >&5
8898echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008899# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00008900# -- "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 +00008901# (Shared libraries in this instance are shared modules to be loaded into
8902# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00008903echo "$as_me:$LINENO: checking LDSHARED" >&5
8904echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008905if test -z "$LDSHARED"
8906then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008907 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008908 AIX*)
8909 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008910 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008911 ;;
8912 BeOS*)
8913 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008914 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008915 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008916 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008917 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008918 SunOS/4*) LDSHARED="ld";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00008920 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00008921 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00008922 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +00008923 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008924 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008925 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
8926 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008927 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00008928 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8929 if test "$enable_framework" ; then
8930 # Link against the framework. All externals should be defined.
8931 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8932 else
8933 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008934 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008935 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00008936 Darwin/*)
8937 LDSHARED='$(CC) $(LDFLAGS) -bundle'
8938 if test "$enable_framework" ; then
8939 # Link against the framework. All externals should be defined.
8940 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
8941 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008942 # No framework, use the Python app as bundle-loader
8943 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8944 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008945 fi ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00008946 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00008947 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00008948 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008949 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008950 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008951 then
8952 LDSHARED="cc -shared ${LDFLAGS}"
8953 else
8954 LDSHARED="ld -Bshareable ${LDFLAGS}"
8955 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00008956 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008957 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008958 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00008959 then LDSHARED='$(CC) -shared'
8960 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008961 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00008962 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00008963 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008964 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008965 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966 *) LDSHARED="ld";;
8967 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008969echo "$as_me:$LINENO: result: $LDSHARED" >&5
8970echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008971BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008972# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008973# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00008974echo "$as_me:$LINENO: checking CCSHARED" >&5
8975echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00008976if test -z "$CCSHARED"
8977then
Guido van Rossum07397971997-04-29 21:49:50 +00008978 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008979 SunOS*) if test "$GCC" = yes;
8980 then CCSHARED="-fPIC";
8981 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008982 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008983 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008984 else CCSHARED="+z";
8985 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008986 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008987 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00008988 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008989 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008990 if test "$GCC" = "yes"
8991 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008992 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008993 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008994 SCO_SV*)
8995 if test "$GCC" = "yes"
8996 then CCSHARED="-fPIC"
8997 else CCSHARED="-Kpic -belf"
8998 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00008999 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009000 IRIX*/6*) case $CC in
9001 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009002 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009003 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009004 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009005 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009006fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009007echo "$as_me:$LINENO: result: $CCSHARED" >&5
9008echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009009# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009010# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009011echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9012echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009013if test -z "$LINKFORSHARED"
9014then
Guido van Rossum07397971997-04-29 21:49:50 +00009015 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009016 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009017 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009018 LINKFORSHARED="-Wl,-E -Wl,+s";;
9019# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009020 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009021 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009024 # -u __dummy makes the linker aware of the objc runtime
9025 # in System.framework; otherwise, __objcInit (referenced in
9026 # crt1.o) gets erroneously defined as common, which breaks dynamic
9027 # loading of any modules which reference it in System.framework.
9028 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9029 # not used by the core itself but which needs to be in the core so
9030 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00009031 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009032 if test "$enable_framework"
9033 then
9034 LINKFORSHARED="$LINKFORSHARED -framework Python"
9035 fi
9036 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009037 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009038 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009039 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009041 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9042 then
9043 LINKFORSHARED="-Wl,--export-dynamic"
9044 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009045 SunOS/5*) case $CC in
9046 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009047 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009048 then
9049 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009050 fi;;
9051 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009052 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009054echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9055echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009056
Michael W. Hudson54241132001-12-07 15:38:26 +00009057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9059echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009060if test ! "$LIBRARY" = "$LDLIBRARY"
9061then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009062 case $ac_sys_system in
9063 CYGWIN*)
9064 # Cygwin needs CCSHARED when building extension DLLs
9065 # but not when building the interpreter DLL.
9066 CFLAGSFORSHARED='';;
9067 *)
9068 CFLAGSFORSHARED='$(CCSHARED)'
9069 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009071echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9072echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009073
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009074# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9075# library (with --enable-shared).
9076# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009077# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9078# if it is not required, since it creates a dependency of the shared library
9079# to LIBS. This, in turn, means that applications linking the shared libpython
9080# don't need to link LIBS explicitly. The default should be only changed
9081# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009082
9083echo "$as_me:$LINENO: checking SHLIBS" >&5
9084echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9085case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009086 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009087 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009088esac
9089echo "$as_me:$LINENO: result: $SHLIBS" >&5
9090echo "${ECHO_T}$SHLIBS" >&6
9091
9092
Guido van Rossum627b2d71993-12-24 10:39:16 +00009093# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009094
9095echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9096echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9097if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9098 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009099else
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009101LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009102cat >conftest.$ac_ext <<_ACEOF
9103#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009104#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009106/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009107#ifdef __cplusplus
9108extern "C"
9109#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009110/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 builtin and then its argument prototype would still apply. */
9112char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
9116dlopen ();
9117 ;
9118 return 0;
9119}
9120_ACEOF
9121rm -f conftest.$ac_objext conftest$ac_exeext
9122if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9123 (eval $ac_link) 2>&5
9124 ac_status=$?
9125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126 (exit $ac_status); } &&
9127 { ac_try='test -s conftest$ac_exeext'
9128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9129 (eval $ac_try) 2>&5
9130 ac_status=$?
9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9132 (exit $ac_status); }; }; then
9133 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009134else
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 echo "$as_me: failed program was:" >&5
9136cat conftest.$ac_ext >&5
9137ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009138fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9140LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009142echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9143echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9144if test $ac_cv_lib_dl_dlopen = yes; then
9145 cat >>confdefs.h <<_ACEOF
9146#define HAVE_LIBDL 1
9147_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009149 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009151fi
9152 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009153
9154echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9155echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9156if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009158else
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009160LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009161cat >conftest.$ac_ext <<_ACEOF
9162#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00009163#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009165/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009166#ifdef __cplusplus
9167extern "C"
9168#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009169/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 builtin and then its argument prototype would still apply. */
9171char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009172int
9173main ()
9174{
9175shl_load ();
9176 ;
9177 return 0;
9178}
9179_ACEOF
9180rm -f conftest.$ac_objext conftest$ac_exeext
9181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9182 (eval $ac_link) 2>&5
9183 ac_status=$?
9184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } &&
9186 { ac_try='test -s conftest$ac_exeext'
9187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9188 (eval $ac_try) 2>&5
9189 ac_status=$?
9190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9191 (exit $ac_status); }; }; then
9192 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009193else
Martin v. Löwis11437992002-04-12 09:54:03 +00009194 echo "$as_me: failed program was:" >&5
9195cat conftest.$ac_ext >&5
9196ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009197fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009198rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9199LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009200fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009201echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9202echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9203if test $ac_cv_lib_dld_shl_load = yes; then
9204 cat >>confdefs.h <<_ACEOF
9205#define HAVE_LIBDLD 1
9206_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009207
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009208 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009209
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009210fi
9211 # Dynamic linking for HP-UX
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009212echo "$as_me:$LINENO: checking for library containing sem_init" >&5
9213echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9214if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009216else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009217 ac_func_search_save_LIBS=$LIBS
9218ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009219cat >conftest.$ac_ext <<_ACEOF
9220#line $LINENO "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009221#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009222
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009223/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009224#ifdef __cplusplus
9225extern "C"
9226#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009227/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 builtin and then its argument prototype would still apply. */
9229char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009230int
9231main ()
9232{
9233sem_init ();
9234 ;
9235 return 0;
9236}
9237_ACEOF
9238rm -f conftest.$ac_objext conftest$ac_exeext
9239if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9240 (eval $ac_link) 2>&5
9241 ac_status=$?
9242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9243 (exit $ac_status); } &&
9244 { ac_try='test -s conftest$ac_exeext'
9245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9246 (eval $ac_try) 2>&5
9247 ac_status=$?
9248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9249 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009250 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009251else
Martin v. Löwis11437992002-04-12 09:54:03 +00009252 echo "$as_me: failed program was:" >&5
9253cat conftest.$ac_ext >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009254fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009255rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009256if test "$ac_cv_search_sem_init" = no; then
9257 for ac_lib in rt posix4; do
9258 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9259 cat >conftest.$ac_ext <<_ACEOF
9260#line $LINENO "configure"
9261#include "confdefs.h"
9262
9263/* Override any gcc2 internal prototype to avoid an error. */
9264#ifdef __cplusplus
9265extern "C"
9266#endif
9267/* We use char because int might match the return type of a gcc2
9268 builtin and then its argument prototype would still apply. */
9269char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009270int
9271main ()
9272{
9273sem_init ();
9274 ;
9275 return 0;
9276}
Martin v. Löwis11437992002-04-12 09:54:03 +00009277_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009278rm -f conftest.$ac_objext conftest$ac_exeext
9279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9280 (eval $ac_link) 2>&5
9281 ac_status=$?
9282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9283 (exit $ac_status); } &&
9284 { ac_try='test -s conftest$ac_exeext'
9285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9286 (eval $ac_try) 2>&5
9287 ac_status=$?
9288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9289 (exit $ac_status); }; }; then
9290 ac_cv_search_sem_init="-l$ac_lib"
9291break
9292else
9293 echo "$as_me: failed program was:" >&5
9294cat conftest.$ac_ext >&5
9295fi
9296rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9297 done
9298fi
9299LIBS=$ac_func_search_save_LIBS
9300fi
9301echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9302echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9303if test "$ac_cv_search_sem_init" != no; then
9304 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009305
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009306fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009307 # 'Real Time' functions on Solaris,
9308 # posix4 on Solaris 2.6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009309
9310# checks for system dependent C++ extensions support
9311case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9313echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9314 cat >conftest.$ac_ext <<_ACEOF
9315#line $LINENO "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009316#include "confdefs.h"
9317#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009318int
9319main ()
9320{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009321loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext conftest$ac_exeext
9327if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9328 (eval $ac_link) 2>&5
9329 ac_status=$?
9330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9331 (exit $ac_status); } &&
9332 { ac_try='test -s conftest$ac_exeext'
9333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9334 (eval $ac_try) 2>&5
9335 ac_status=$?
9336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009338
Martin v. Löwis11437992002-04-12 09:54:03 +00009339cat >>confdefs.h <<\_ACEOF
9340#define AIX_GENUINE_CPLUSPLUS 1
9341_ACEOF
9342
9343 echo "$as_me:$LINENO: result: yes" >&5
9344echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009345else
Martin v. Löwis11437992002-04-12 09:54:03 +00009346 echo "$as_me: failed program was:" >&5
9347cat conftest.$ac_ext >&5
9348echo "$as_me:$LINENO: result: no" >&5
9349echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009350fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009351rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009352 *) ;;
9353esac
9354
Guido van Rossum70c7f481998-03-26 18:44:10 +00009355# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Martin v. Löwise1172582002-11-13 08:51:19 +00009356# However on SGI IRIX 4, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009357# BeOS' sockets are stashed in libnet.
9358case "$ac_sys_system" in
9359IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00009360*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009361echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
9362echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
9363if test "${ac_cv_lib_nsl_t_open+set}" = set; then
9364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009365else
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009367LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009368cat >conftest.$ac_ext <<_ACEOF
9369#line $LINENO "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009370#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009373#ifdef __cplusplus
9374extern "C"
9375#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009376/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 builtin and then its argument prototype would still apply. */
9378char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009379int
9380main ()
9381{
9382t_open ();
9383 ;
9384 return 0;
9385}
9386_ACEOF
9387rm -f conftest.$ac_objext conftest$ac_exeext
9388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9389 (eval $ac_link) 2>&5
9390 ac_status=$?
9391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392 (exit $ac_status); } &&
9393 { ac_try='test -s conftest$ac_exeext'
9394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9395 (eval $ac_try) 2>&5
9396 ac_status=$?
9397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9398 (exit $ac_status); }; }; then
9399 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009400else
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 echo "$as_me: failed program was:" >&5
9402cat conftest.$ac_ext >&5
9403ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009405rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9406LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009407fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009408echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
9409echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
9410if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009411 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009412fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009413 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +00009414echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
9415echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9416if test "${ac_cv_lib_socket_socket+set}" = set; then
9417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009420LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009421cat >conftest.$ac_ext <<_ACEOF
9422#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009423#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009425/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009426#ifdef __cplusplus
9427extern "C"
9428#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009429/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 builtin and then its argument prototype would still apply. */
9431char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009432int
9433main ()
9434{
9435socket ();
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440rm -f conftest.$ac_objext conftest$ac_exeext
9441if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9442 (eval $ac_link) 2>&5
9443 ac_status=$?
9444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9445 (exit $ac_status); } &&
9446 { ac_try='test -s conftest$ac_exeext'
9447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9448 (eval $ac_try) 2>&5
9449 ac_status=$?
9450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9451 (exit $ac_status); }; }; then
9452 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009453else
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 echo "$as_me: failed program was:" >&5
9455cat conftest.$ac_ext >&5
9456ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009457fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009458rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9459LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
9462echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9463if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +00009464 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009465fi
9466 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009467;;
9468esac
9469case "$ac_sys_system" in
9470BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +00009471echo "$as_me:$LINENO: checking for socket in -lnet" >&5
9472echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
9473if test "${ac_cv_lib_net_socket+set}" = set; then
9474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009475else
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009477LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009478cat >conftest.$ac_ext <<_ACEOF
9479#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00009480#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Guido van Rossumad678af1998-10-02 14:42:15 +00009482/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009483#ifdef __cplusplus
9484extern "C"
9485#endif
Guido van Rossumad678af1998-10-02 14:42:15 +00009486/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 builtin and then its argument prototype would still apply. */
9488char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
9492socket ();
9493 ;
9494 return 0;
9495}
9496_ACEOF
9497rm -f conftest.$ac_objext conftest$ac_exeext
9498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9499 (eval $ac_link) 2>&5
9500 ac_status=$?
9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502 (exit $ac_status); } &&
9503 { ac_try='test -s conftest$ac_exeext'
9504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9505 (eval $ac_try) 2>&5
9506 ac_status=$?
9507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9508 (exit $ac_status); }; }; then
9509 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009510else
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 echo "$as_me: failed program was:" >&5
9512cat conftest.$ac_ext >&5
9513ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009514fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9516LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009518echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
9519echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
9520if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009521 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009522fi
9523 # BeOS
9524;;
9525esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009526
Martin v. Löwis11437992002-04-12 09:54:03 +00009527echo "$as_me:$LINENO: checking for --with-libs" >&5
9528echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
9529
Guido van Rossuma68acba1996-07-31 17:36:39 +00009530# Check whether --with-libs or --without-libs was given.
9531if test "${with_libs+set}" = set; then
9532 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +00009533
9534echo "$as_me:$LINENO: result: $withval" >&5
9535echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00009536LIBS="$withval $LIBS"
9537
9538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 echo "$as_me:$LINENO: result: no" >&5
9540echo "${ECHO_T}no" >&6
9541fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +00009542
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009543# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009544
9545
Martin v. Löwis11437992002-04-12 09:54:03 +00009546echo "$as_me:$LINENO: checking for --with-signal-module" >&5
9547echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
9548
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009549# Check whether --with-signal-module or --without-signal-module was given.
9550if test "${with_signal_module+set}" = set; then
9551 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009552
Martin v. Löwis11437992002-04-12 09:54:03 +00009553fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009554
9555if test -z "$with_signal_module"
9556then with_signal_module="yes"
9557fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009558echo "$as_me:$LINENO: result: $with_signal_module" >&5
9559echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009560
9561if test "${with_signal_module}" = "yes"; then
9562 USE_SIGNAL_MODULE=""
9563 SIGNAL_OBJS=""
9564else
9565 USE_SIGNAL_MODULE="#"
9566 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9567fi
9568
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009569# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009570
Barry Warsawc0d24d82000-06-29 16:12:00 +00009571USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009572
Martin v. Löwis11437992002-04-12 09:54:03 +00009573echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
9574echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
9575
Guido van Rossumec2f0731997-01-22 20:54:01 +00009576
9577# Check whether --with-dec-threads or --without-dec-threads was given.
9578if test "${with_dec_threads+set}" = set; then
9579 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +00009580
9581echo "$as_me:$LINENO: result: $withval" >&5
9582echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00009583LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009584if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009585 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009586fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009587else
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 echo "$as_me:$LINENO: result: no" >&5
9589echo "${ECHO_T}no" >&6
9590fi;
9591
9592# Templates for things AC_DEFINEd more than once.
9593# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009594
9595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
9597
9598
9599
9600
9601echo "$as_me:$LINENO: checking for --with-threads" >&5
9602echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
9603
Guido van Rossumec2f0731997-01-22 20:54:01 +00009604# Check whether --with-threads or --without-threads was given.
9605if test "${with_threads+set}" = set; then
9606 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +00009607
Martin v. Löwis11437992002-04-12 09:54:03 +00009608fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +00009609
Barry Warsawc0d24d82000-06-29 16:12:00 +00009610# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009612# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009613if test "${with_thread+set}" = set; then
9614 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009615 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +00009616fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +00009617
9618if test -z "$with_threads"
9619then with_threads="yes"
9620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009621echo "$as_me:$LINENO: result: $with_threads" >&5
9622echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00009623
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009624
Barry Warsawc0d24d82000-06-29 16:12:00 +00009625if test "$with_threads" = "no"
9626then
9627 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009628elif test "$ac_cv_pthread_is_default" = yes
9629then
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009631#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009632_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009633
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009634 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009636#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009637_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009638
9639 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009641elif test "$ac_cv_kpthread" = "yes"
9642then
9643 CC="$CC -Kpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009645#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009646_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009648 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009649 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009650else
9651 if test ! -z "$with_threads" -a -d "$with_threads"
9652 then LDFLAGS="$LDFLAGS -L$with_threads"
9653 fi
9654 if test ! -z "$withval" -a -d "$withval"
9655 then LDFLAGS="$LDFLAGS -L$withval"
9656 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009657
9658 # According to the POSIX spec, a pthreads implementation must
9659 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
9661echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
9662 cat >conftest.$ac_ext <<_ACEOF
9663#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009664#include "confdefs.h"
9665#include <unistd.h>
9666 #ifdef _POSIX_THREADS
9667 yes
9668 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669
9670_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +00009672 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009673 unistd_defines_pthreads=yes
9674else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009675 unistd_defines_pthreads=no
9676fi
9677rm -f conftest*
9678
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
9680echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009681
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009683#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009684_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009685
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 if test "${ac_cv_header_cthreads_h+set}" = set; then
9687 echo "$as_me:$LINENO: checking for cthreads.h" >&5
9688echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9689if test "${ac_cv_header_cthreads_h+set}" = set; then
9690 echo $ECHO_N "(cached) $ECHO_C" >&6
9691fi
9692echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9693echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009694else
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 # Is the header compilable?
9696echo "$as_me:$LINENO: checking cthreads.h usability" >&5
9697echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
9698cat >conftest.$ac_ext <<_ACEOF
9699#line $LINENO "configure"
9700#include "confdefs.h"
9701$ac_includes_default
9702#include <cthreads.h>
9703_ACEOF
9704rm -f conftest.$ac_objext
9705if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9706 (eval $ac_compile) 2>&5
9707 ac_status=$?
9708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9709 (exit $ac_status); } &&
9710 { ac_try='test -s conftest.$ac_objext'
9711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 (exit $ac_status); }; }; then
9716 ac_header_compiler=yes
9717else
9718 echo "$as_me: failed program was:" >&5
9719cat conftest.$ac_ext >&5
9720ac_header_compiler=no
9721fi
9722rm -f conftest.$ac_objext conftest.$ac_ext
9723echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9724echo "${ECHO_T}$ac_header_compiler" >&6
9725
9726# Is the header present?
9727echo "$as_me:$LINENO: checking cthreads.h presence" >&5
9728echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
9729cat >conftest.$ac_ext <<_ACEOF
9730#line $LINENO "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009731#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009732#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009733_ACEOF
9734if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9735 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9736 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 rm -f conftest.er1
9739 cat conftest.err >&5
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); } >/dev/null; then
9742 if test -s conftest.err; then
9743 ac_cpp_err=$ac_c_preproc_warn_flag
9744 else
9745 ac_cpp_err=
9746 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009747else
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ac_cpp_err=yes
9749fi
9750if test -z "$ac_cpp_err"; then
9751 ac_header_preproc=yes
9752else
9753 echo "$as_me: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00009754 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009757rm -f conftest.err conftest.$ac_ext
9758echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9759echo "${ECHO_T}$ac_header_preproc" >&6
9760
9761# So? What about this header?
9762case $ac_header_compiler:$ac_header_preproc in
9763 yes:no )
9764 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9765echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9766 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9767echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9768 no:yes )
9769 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
9770echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
9771 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
9772echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
9773 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
9774echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;};;
9775esac
9776echo "$as_me:$LINENO: checking for cthreads.h" >&5
9777echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
9778if test "${ac_cv_header_cthreads_h+set}" = set; then
9779 echo $ECHO_N "(cached) $ECHO_C" >&6
9780else
9781 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009783echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
9784echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
9785
9786fi
9787if test $ac_cv_header_cthreads_h = yes; then
9788 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009789#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009791
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009793#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009794_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009795
Martin v. Löwis11437992002-04-12 09:54:03 +00009796
9797cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009798#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009799_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009800
9801 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009802 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009803else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009804
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9806 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9807echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9808if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9809 echo $ECHO_N "(cached) $ECHO_C" >&6
9810fi
9811echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9812echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009813else
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 # Is the header compilable?
9815echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
9816echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
9817cat >conftest.$ac_ext <<_ACEOF
9818#line $LINENO "configure"
9819#include "confdefs.h"
9820$ac_includes_default
9821#include <mach/cthreads.h>
9822_ACEOF
9823rm -f conftest.$ac_objext
9824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9825 (eval $ac_compile) 2>&5
9826 ac_status=$?
9827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9828 (exit $ac_status); } &&
9829 { ac_try='test -s conftest.$ac_objext'
9830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9831 (eval $ac_try) 2>&5
9832 ac_status=$?
9833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9834 (exit $ac_status); }; }; then
9835 ac_header_compiler=yes
9836else
9837 echo "$as_me: failed program was:" >&5
9838cat conftest.$ac_ext >&5
9839ac_header_compiler=no
9840fi
9841rm -f conftest.$ac_objext conftest.$ac_ext
9842echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9843echo "${ECHO_T}$ac_header_compiler" >&6
9844
9845# Is the header present?
9846echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
9847echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
9848cat >conftest.$ac_ext <<_ACEOF
9849#line $LINENO "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009850#include "confdefs.h"
9851#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
9853if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9854 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9855 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +00009856 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 rm -f conftest.er1
9858 cat conftest.err >&5
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); } >/dev/null; then
9861 if test -s conftest.err; then
9862 ac_cpp_err=$ac_c_preproc_warn_flag
9863 else
9864 ac_cpp_err=
9865 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 ac_cpp_err=yes
9868fi
9869if test -z "$ac_cpp_err"; then
9870 ac_header_preproc=yes
9871else
9872 echo "$as_me: failed program was:" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009873 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009876rm -f conftest.err conftest.$ac_ext
9877echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9878echo "${ECHO_T}$ac_header_preproc" >&6
9879
9880# So? What about this header?
9881case $ac_header_compiler:$ac_header_preproc in
9882 yes:no )
9883 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
9884echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9885 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9886echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9887 no:yes )
9888 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
9889echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
9890 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
9891echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
9892 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
9893echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;};;
9894esac
9895echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
9896echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
9897if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
9898 echo $ECHO_N "(cached) $ECHO_C" >&6
9899else
9900 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009902echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
9903echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
9904
9905fi
9906if test $ac_cv_header_mach_cthreads_h = yes; then
9907 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009908#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009909_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009910
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009912#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009914
Martin v. Löwis11437992002-04-12 09:54:03 +00009915
9916cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009917#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009918_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009919
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009920 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009921else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009922
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 echo "$as_me:$LINENO: checking for --with-pth" >&5
9924echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
9925
9926# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009927if test "${with_pth+set}" = set; then
9928 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009929 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009930echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009931 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00009932#define WITH_THREAD 1
9933_ACEOF
9934
9935
9936cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009937#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009938_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009939
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009940 LIBS="-lpth $LIBS"
9941 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009942else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009943 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009944echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009945
9946 # Just looking for pthread_create in libpthread is not enough:
9947 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9948 # So we really have to include pthread.h, and then link.
9949 _libs=$LIBS
9950 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
9952echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
9953 cat >conftest.$ac_ext <<_ACEOF
9954#line $LINENO "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009955#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009956#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009957
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009958void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009959int
9960main ()
9961{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009962
9963pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ;
9965 return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext conftest$ac_exeext
9969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9970 (eval $ac_link) 2>&5
9971 ac_status=$?
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); } &&
9974 { ac_try='test -s conftest$ac_exeext'
9975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; }; then
9980
9981 echo "$as_me:$LINENO: result: yes" >&5
9982echo "${ECHO_T}yes" >&6
9983 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009984#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009985_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00009986
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009987 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009988 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009989else
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 echo "$as_me: failed program was:" >&5
9991cat conftest.$ac_ext >&5
9992
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009993 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 echo "$as_me:$LINENO: checking for pthread_detach" >&5
9995echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
9996if test "${ac_cv_func_pthread_detach+set}" = set; then
9997 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009998else
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 cat >conftest.$ac_ext <<_ACEOF
10000#line $LINENO "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +000010001#include "confdefs.h"
10002/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 which can conflict with char pthread_detach (); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010004#include <assert.h>
10005/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010006#ifdef __cplusplus
10007extern "C"
10008#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010009/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 builtin and then its argument prototype would still apply. */
10011char pthread_detach ();
10012char (*f) ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010013
Martin v. Löwis11437992002-04-12 09:54:03 +000010014int
10015main ()
10016{
Guido van Rossumad678af1998-10-02 14:42:15 +000010017/* The GNU C library defines this for functions which it implements
10018 to always fail with ENOSYS. Some functions are actually named
10019 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010020#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010021choke me
10022#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010023f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +000010024#endif
10025
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 ;
10027 return 0;
10028}
10029_ACEOF
10030rm -f conftest.$ac_objext conftest$ac_exeext
10031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10032 (eval $ac_link) 2>&5
10033 ac_status=$?
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); } &&
10036 { ac_try='test -s conftest$ac_exeext'
10037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10038 (eval $ac_try) 2>&5
10039 ac_status=$?
10040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10041 (exit $ac_status); }; }; then
10042 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010043else
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 echo "$as_me: failed program was:" >&5
10045cat conftest.$ac_ext >&5
10046ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010048rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010050echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10051echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10052if test $ac_cv_func_pthread_detach = yes; then
10053 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010054#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010055_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010056
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010057 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010058 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010059else
Guido van Rossumad678af1998-10-02 14:42:15 +000010060
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010061 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10062 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10063echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10064if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10065 echo $ECHO_N "(cached) $ECHO_C" >&6
10066fi
10067echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10068echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10069else
10070 # Is the header compilable?
10071echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10072echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10073cat >conftest.$ac_ext <<_ACEOF
10074#line $LINENO "configure"
10075#include "confdefs.h"
10076$ac_includes_default
10077#include <atheos/threads.h>
10078_ACEOF
10079rm -f conftest.$ac_objext
10080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10081 (eval $ac_compile) 2>&5
10082 ac_status=$?
10083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10084 (exit $ac_status); } &&
10085 { ac_try='test -s conftest.$ac_objext'
10086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10087 (eval $ac_try) 2>&5
10088 ac_status=$?
10089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10090 (exit $ac_status); }; }; then
10091 ac_header_compiler=yes
10092else
10093 echo "$as_me: failed program was:" >&5
10094cat conftest.$ac_ext >&5
10095ac_header_compiler=no
10096fi
10097rm -f conftest.$ac_objext conftest.$ac_ext
10098echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10099echo "${ECHO_T}$ac_header_compiler" >&6
10100
10101# Is the header present?
10102echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10103echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10104cat >conftest.$ac_ext <<_ACEOF
10105#line $LINENO "configure"
10106#include "confdefs.h"
10107#include <atheos/threads.h>
10108_ACEOF
10109if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10110 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10111 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +000010112 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010113 rm -f conftest.er1
10114 cat conftest.err >&5
10115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10116 (exit $ac_status); } >/dev/null; then
10117 if test -s conftest.err; then
10118 ac_cpp_err=$ac_c_preproc_warn_flag
10119 else
10120 ac_cpp_err=
10121 fi
10122else
10123 ac_cpp_err=yes
10124fi
10125if test -z "$ac_cpp_err"; then
10126 ac_header_preproc=yes
10127else
10128 echo "$as_me: failed program was:" >&5
10129 cat conftest.$ac_ext >&5
10130 ac_header_preproc=no
10131fi
10132rm -f conftest.err conftest.$ac_ext
10133echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10134echo "${ECHO_T}$ac_header_preproc" >&6
10135
10136# So? What about this header?
10137case $ac_header_compiler:$ac_header_preproc in
10138 yes:no )
10139 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10140echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10141 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10142echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10143 no:yes )
10144 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10145echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10146 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10147echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10148 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10149echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;};;
10150esac
10151echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10152echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10153if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10154 echo $ECHO_N "(cached) $ECHO_C" >&6
10155else
10156 ac_cv_header_atheos_threads_h=$ac_header_preproc
10157fi
10158echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10159echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10160
10161fi
10162if test $ac_cv_header_atheos_threads_h = yes; then
10163 cat >>confdefs.h <<\_ACEOF
10164#define WITH_THREAD 1
10165_ACEOF
10166
10167
10168cat >>confdefs.h <<\_ACEOF
10169#define ATHEOS_THREADS 1
10170_ACEOF
10171
10172 THREADOBJ="Python/thread.o"
10173else
10174
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10176 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10177echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10178if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10179 echo $ECHO_N "(cached) $ECHO_C" >&6
10180fi
10181echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10182echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010183else
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 # Is the header compilable?
10185echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10186echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10187cat >conftest.$ac_ext <<_ACEOF
10188#line $LINENO "configure"
10189#include "confdefs.h"
10190$ac_includes_default
10191#include <kernel/OS.h>
10192_ACEOF
10193rm -f conftest.$ac_objext
10194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10195 (eval $ac_compile) 2>&5
10196 ac_status=$?
10197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10198 (exit $ac_status); } &&
10199 { ac_try='test -s conftest.$ac_objext'
10200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10201 (eval $ac_try) 2>&5
10202 ac_status=$?
10203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10204 (exit $ac_status); }; }; then
10205 ac_header_compiler=yes
10206else
10207 echo "$as_me: failed program was:" >&5
10208cat conftest.$ac_ext >&5
10209ac_header_compiler=no
10210fi
10211rm -f conftest.$ac_objext conftest.$ac_ext
10212echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10213echo "${ECHO_T}$ac_header_compiler" >&6
10214
10215# Is the header present?
10216echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
10217echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
10218cat >conftest.$ac_ext <<_ACEOF
10219#line $LINENO "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010220#include "confdefs.h"
10221#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010222_ACEOF
10223if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10224 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10225 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +000010226 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010227 rm -f conftest.er1
10228 cat conftest.err >&5
10229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10230 (exit $ac_status); } >/dev/null; then
10231 if test -s conftest.err; then
10232 ac_cpp_err=$ac_c_preproc_warn_flag
10233 else
10234 ac_cpp_err=
10235 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010236else
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_cpp_err=yes
10238fi
10239if test -z "$ac_cpp_err"; then
10240 ac_header_preproc=yes
10241else
10242 echo "$as_me: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010243 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010246rm -f conftest.err conftest.$ac_ext
10247echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10248echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010249
Martin v. Löwis11437992002-04-12 09:54:03 +000010250# So? What about this header?
10251case $ac_header_compiler:$ac_header_preproc in
10252 yes:no )
10253 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
10254echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10255 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10256echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10257 no:yes )
10258 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
10259echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
10260 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
10261echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
10262 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
10263echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;};;
10264esac
10265echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10266echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10267if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10268 echo $ECHO_N "(cached) $ECHO_C" >&6
10269else
10270 ac_cv_header_kernel_OS_h=$ac_header_preproc
10271fi
10272echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10273echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
10274
10275fi
10276if test $ac_cv_header_kernel_OS_h = yes; then
10277 cat >>confdefs.h <<\_ACEOF
10278#define WITH_THREAD 1
10279_ACEOF
10280
10281
10282cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010283#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010285
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010286 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010287else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010288
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
10290echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
10291if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
10292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010293else
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010295LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010296cat >conftest.$ac_ext <<_ACEOF
10297#line $LINENO "configure"
Greg Steinadf63d62000-07-05 10:38:09 +000010298#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010299
Greg Steinadf63d62000-07-05 10:38:09 +000010300/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010301#ifdef __cplusplus
10302extern "C"
10303#endif
Greg Steinadf63d62000-07-05 10:38:09 +000010304/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 builtin and then its argument prototype would still apply. */
10306char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307int
10308main ()
10309{
10310pthread_create ();
10311 ;
10312 return 0;
10313}
10314_ACEOF
10315rm -f conftest.$ac_objext conftest$ac_exeext
10316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10317 (eval $ac_link) 2>&5
10318 ac_status=$?
10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10320 (exit $ac_status); } &&
10321 { ac_try='test -s conftest$ac_exeext'
10322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10323 (eval $ac_try) 2>&5
10324 ac_status=$?
10325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10326 (exit $ac_status); }; }; then
10327 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010328else
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 echo "$as_me: failed program was:" >&5
10330cat conftest.$ac_ext >&5
10331ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010332fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10334LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
10337echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
10338if test $ac_cv_lib_pthreads_pthread_create = yes; then
10339 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010340#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010341_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000010342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010343 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010344 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010345 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010346else
Greg Steinadf63d62000-07-05 10:38:09 +000010347
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
10349echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
10350if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
10351 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010352else
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010354LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010355cat >conftest.$ac_ext <<_ACEOF
10356#line $LINENO "configure"
Guido van Rossum49545951997-12-02 19:28:29 +000010357#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Guido van Rossum49545951997-12-02 19:28:29 +000010359/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010360#ifdef __cplusplus
10361extern "C"
10362#endif
Guido van Rossum49545951997-12-02 19:28:29 +000010363/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 builtin and then its argument prototype would still apply. */
10365char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010366int
10367main ()
10368{
10369pthread_create ();
10370 ;
10371 return 0;
10372}
10373_ACEOF
10374rm -f conftest.$ac_objext conftest$ac_exeext
10375if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10376 (eval $ac_link) 2>&5
10377 ac_status=$?
10378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10379 (exit $ac_status); } &&
10380 { ac_try='test -s conftest$ac_exeext'
10381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10382 (eval $ac_try) 2>&5
10383 ac_status=$?
10384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10385 (exit $ac_status); }; }; then
10386 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 echo "$as_me: failed program was:" >&5
10389cat conftest.$ac_ext >&5
10390ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010392rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10393LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010395echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
10396echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
10397if test $ac_cv_lib_c_r_pthread_create = yes; then
10398 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010399#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000010401
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010402 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010403 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010404 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010405else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010406
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 echo "$as_me:$LINENO: checking for __d6_pthread_create in -lthread" >&5
10408echo $ECHO_N "checking for __d6_pthread_create in -lthread... $ECHO_C" >&6
10409if test "${ac_cv_lib_thread___d6_pthread_create+set}" = set; then
10410 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010411else
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010413LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010414cat >conftest.$ac_ext <<_ACEOF
10415#line $LINENO "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010416#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010419#ifdef __cplusplus
10420extern "C"
10421#endif
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010422/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010423 builtin and then its argument prototype would still apply. */
10424char __d6_pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010425int
10426main ()
10427{
10428__d6_pthread_create ();
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433rm -f conftest.$ac_objext conftest$ac_exeext
10434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10435 (eval $ac_link) 2>&5
10436 ac_status=$?
10437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10438 (exit $ac_status); } &&
10439 { ac_try='test -s conftest$ac_exeext'
10440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10441 (eval $ac_try) 2>&5
10442 ac_status=$?
10443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10444 (exit $ac_status); }; }; then
10445 ac_cv_lib_thread___d6_pthread_create=yes
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 echo "$as_me: failed program was:" >&5
10448cat conftest.$ac_ext >&5
10449ac_cv_lib_thread___d6_pthread_create=no
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010451rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010453fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010454echo "$as_me:$LINENO: result: $ac_cv_lib_thread___d6_pthread_create" >&5
10455echo "${ECHO_T}$ac_cv_lib_thread___d6_pthread_create" >&6
10456if test $ac_cv_lib_thread___d6_pthread_create = yes; then
10457 cat >>confdefs.h <<\_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010458#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010460
Martin v. Löwis779ffc02002-12-02 22:17:01 +000010461 echo Systems with __d6_pthread_create are not supported anymore.
10462 echo See README
10463 exit 1
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010464 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010465 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010466 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +000010467else
Guido van Rossum49545951997-12-02 19:28:29 +000010468
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
10470echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
10471if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
10472 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010473else
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010475LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010476cat >conftest.$ac_ext <<_ACEOF
10477#line $LINENO "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010478#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010479
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010480/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010481#ifdef __cplusplus
10482extern "C"
10483#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010484/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 builtin and then its argument prototype would still apply. */
10486char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010487int
10488main ()
10489{
10490__pthread_create_system ();
10491 ;
10492 return 0;
10493}
10494_ACEOF
10495rm -f conftest.$ac_objext conftest$ac_exeext
10496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10497 (eval $ac_link) 2>&5
10498 ac_status=$?
10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500 (exit $ac_status); } &&
10501 { ac_try='test -s conftest$ac_exeext'
10502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10503 (eval $ac_try) 2>&5
10504 ac_status=$?
10505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10506 (exit $ac_status); }; }; then
10507 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 echo "$as_me: failed program was:" >&5
10510cat conftest.$ac_ext >&5
10511ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010513rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010516echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10517echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
10518if test $ac_cv_lib_pthread___pthread_create_system = yes; then
10519 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010520#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010521_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010524 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010525 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010526else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010527
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
10529echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
10530if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
10531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010532else
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010534LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010535cat >conftest.$ac_ext <<_ACEOF
10536#line $LINENO "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010537#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010538
Guido van Rossumb93a8621998-05-07 13:27:32 +000010539/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010540#ifdef __cplusplus
10541extern "C"
10542#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000010543/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 builtin and then its argument prototype would still apply. */
10545char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546int
10547main ()
10548{
10549pthread_create ();
10550 ;
10551 return 0;
10552}
10553_ACEOF
10554rm -f conftest.$ac_objext conftest$ac_exeext
10555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10556 (eval $ac_link) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); } &&
10560 { ac_try='test -s conftest$ac_exeext'
10561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10562 (eval $ac_try) 2>&5
10563 ac_status=$?
10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565 (exit $ac_status); }; }; then
10566 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010567else
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 echo "$as_me: failed program was:" >&5
10569cat conftest.$ac_ext >&5
10570ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010571fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10573LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010574fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010575echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
10576echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
10577if test $ac_cv_lib_cma_pthread_create = yes; then
10578 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010579#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000010581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010582 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010583 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010584 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010585else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010586
Martin v. Löwis130fb172001-07-19 11:00:41 +000010587 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010588fi
10589
Guido van Rossum627b2d71993-12-24 10:39:16 +000010590
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010591fi
10592
Guido van Rossum0be3e491997-05-22 20:33:33 +000010593fi
10594
Guido van Rossum49545951997-12-02 19:28:29 +000010595fi
10596
Guido van Rossumb93a8621998-05-07 13:27:32 +000010597fi
10598
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010599fi
10600
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010601
Michael W. Hudson54241132001-12-07 15:38:26 +000010602fi
10603
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010604
10605fi
10606
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010608rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10609fi;
10610fi
10611
10612
10613fi
10614
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010615
Michael W. Hudson54241132001-12-07 15:38:26 +000010616
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010617 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010618 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010619
10620cat >>confdefs.h <<\_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010621#define _POSIX_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010622_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010623
10624 fi
10625
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10627echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
10628 if test "${ac_cv_pthread_system_supported+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010630else
10631 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010632 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010633else
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 cat >conftest.$ac_ext <<_ACEOF
10635#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010636#include "confdefs.h"
10637#include <pthread.h>
10638 void *foo(void *parm) {
10639 return NULL;
10640 }
10641 main() {
10642 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010643 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010644 if (pthread_attr_init(&attr)) exit(-1);
10645 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +000010646 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010647 exit(0);
10648 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010649_ACEOF
10650rm -f conftest$ac_exeext
10651if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10652 (eval $ac_link) 2>&5
10653 ac_status=$?
10654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10655 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10657 (eval $ac_try) 2>&5
10658 ac_status=$?
10659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10660 (exit $ac_status); }; }; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010661 ac_cv_pthread_system_supported=yes
10662else
Martin v. Löwis11437992002-04-12 09:54:03 +000010663 echo "$as_me: program exited with status $ac_status" >&5
10664echo "$as_me: failed program was:" >&5
10665cat conftest.$ac_ext >&5
10666( exit $ac_status )
10667ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010668fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000010669rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010670fi
10671
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010672fi
10673
Martin v. Löwis11437992002-04-12 09:54:03 +000010674 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
10675echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010676 if test "$ac_cv_pthread_system_supported" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010677
10678cat >>confdefs.h <<\_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010679#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010680_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010681
10682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010683
10684for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010685do
Martin v. Löwis11437992002-04-12 09:54:03 +000010686as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10687echo "$as_me:$LINENO: checking for $ac_func" >&5
10688echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10689if eval "test \"\${$as_ac_var+set}\" = set"; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010691else
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 cat >conftest.$ac_ext <<_ACEOF
10693#line $LINENO "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010694#include "confdefs.h"
10695/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 which can conflict with char $ac_func (); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010697#include <assert.h>
10698/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010699#ifdef __cplusplus
10700extern "C"
10701#endif
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010702/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010703 builtin and then its argument prototype would still apply. */
10704char $ac_func ();
10705char (*f) ();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010706
Martin v. Löwis11437992002-04-12 09:54:03 +000010707int
10708main ()
10709{
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010710/* The GNU C library defines this for functions which it implements
10711 to always fail with ENOSYS. Some functions are actually named
10712 something starting with __ and the normal name is an alias. */
10713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10714choke me
10715#else
Martin v. Löwis11437992002-04-12 09:54:03 +000010716f = $ac_func;
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010717#endif
10718
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
10723rm -f conftest.$ac_objext conftest$ac_exeext
10724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10725 (eval $ac_link) 2>&5
10726 ac_status=$?
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); } &&
10729 { ac_try='test -s conftest$ac_exeext'
10730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10731 (eval $ac_try) 2>&5
10732 ac_status=$?
10733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10734 (exit $ac_status); }; }; then
10735 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000010736else
Martin v. Löwis11437992002-04-12 09:54:03 +000010737 echo "$as_me: failed program was:" >&5
10738cat conftest.$ac_ext >&5
10739eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000010740fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010743echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10744echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10745if test `eval echo '${'$as_ac_var'}'` = yes; then
10746 cat >>confdefs.h <<_ACEOF
10747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10748_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010749
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010750fi
10751done
10752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010753 fi
10754
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
10756echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
10757if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
10758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010759else
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010761LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010762cat >conftest.$ac_ext <<_ACEOF
10763#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010764#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010765
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010766/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010767#ifdef __cplusplus
10768extern "C"
10769#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010770/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 builtin and then its argument prototype would still apply. */
10772char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010773int
10774main ()
10775{
10776usconfig ();
10777 ;
10778 return 0;
10779}
10780_ACEOF
10781rm -f conftest.$ac_objext conftest$ac_exeext
10782if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10783 (eval $ac_link) 2>&5
10784 ac_status=$?
10785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); } &&
10787 { ac_try='test -s conftest$ac_exeext'
10788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10789 (eval $ac_try) 2>&5
10790 ac_status=$?
10791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10792 (exit $ac_status); }; }; then
10793 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010794else
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 echo "$as_me: failed program was:" >&5
10796cat conftest.$ac_ext >&5
10797ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010802echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
10803echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
10804if test $ac_cv_lib_mpc_usconfig = yes; then
10805 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010807_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010808
Martin v. Löwis130fb172001-07-19 11:00:41 +000010809 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010810 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010811 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010812fi
10813
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010814
Neal Norwitza978ab02002-11-02 16:58:05 +000010815 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010816 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
10817echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
10818if test "${ac_cv_lib_thread_thr_create+set}" = set; then
10819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010820else
Martin v. Löwis11437992002-04-12 09:54:03 +000010821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010822LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010823cat >conftest.$ac_ext <<_ACEOF
10824#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000010825#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010826
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010827/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010828#ifdef __cplusplus
10829extern "C"
10830#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010832 builtin and then its argument prototype would still apply. */
10833char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010834int
10835main ()
10836{
10837thr_create ();
10838 ;
10839 return 0;
10840}
10841_ACEOF
10842rm -f conftest.$ac_objext conftest$ac_exeext
10843if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10844 (eval $ac_link) 2>&5
10845 ac_status=$?
10846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10847 (exit $ac_status); } &&
10848 { ac_try='test -s conftest$ac_exeext'
10849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10850 (eval $ac_try) 2>&5
10851 ac_status=$?
10852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10853 (exit $ac_status); }; }; then
10854 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855else
Martin v. Löwis11437992002-04-12 09:54:03 +000010856 echo "$as_me: failed program was:" >&5
10857cat conftest.$ac_ext >&5
10858ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010859fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10861LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010863echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
10864echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
10865if test $ac_cv_lib_thread_thr_create = yes; then
10866 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010868_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010869
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010870 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010871 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010872 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010873fi
10874
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010875 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010876
Martin v. Löwis130fb172001-07-19 11:00:41 +000010877 if test "$USE_THREAD_MODULE" != "#"
10878 then
10879 # If the above checks didn't disable threads, (at least) OSF1
10880 # needs this '-threads' argument during linking.
10881 case $ac_sys_system in
10882 OSF1) LDLAST=-threads;;
10883 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010884 fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010885
10886 if test "$posix_threads" = yes -a \
10887 "$ac_sys_system" = "SunOS" -a \
10888 "$ac_sys_release" = "5.6"; then
10889
10890cat >>confdefs.h <<\_ACEOF
10891#define HAVE_PTHREAD_DESTRUCTOR 1
10892_ACEOF
10893
10894 fi
10895
Guido van Rossum627b2d71993-12-24 10:39:16 +000010896fi
10897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010899
10900
10901echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
10902echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010903# Check whether --enable-ipv6 or --disable-ipv6 was given.
10904if test "${enable_ipv6+set}" = set; then
10905 enableval="$enable_ipv6"
10906 case "$enableval" in
10907 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 echo "$as_me:$LINENO: result: no" >&5
10909echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910 ipv6=no
10911 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 *) echo "$as_me:$LINENO: result: yes" >&5
10913echo "${ECHO_T}yes" >&6
10914 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010916_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917
10918 ipv6=yes
10919 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921else
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010924 echo "$as_me:$LINENO: result: no" >&5
10925echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6=no
10927
10928else
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 cat >conftest.$ac_ext <<_ACEOF
10930#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931#include "confdefs.h"
10932 /* AF_INET6 available check */
10933#include <sys/types.h>
10934#include <sys/socket.h>
10935main()
10936{
10937 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
10938 exit(1);
10939 else
10940 exit(0);
10941}
10942
Martin v. Löwis11437992002-04-12 09:54:03 +000010943_ACEOF
10944rm -f conftest$ac_exeext
10945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10946 (eval $ac_link) 2>&5
10947 ac_status=$?
10948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10951 (eval $ac_try) 2>&5
10952 ac_status=$?
10953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10954 (exit $ac_status); }; }; then
10955 echo "$as_me:$LINENO: result: yes" >&5
10956echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010957 ipv6=yes
10958else
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 echo "$as_me: program exited with status $ac_status" >&5
10960echo "$as_me: failed program was:" >&5
10961cat conftest.$ac_ext >&5
10962( exit $ac_status )
10963echo "$as_me:$LINENO: result: no" >&5
10964echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 ipv6=no
10966fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000010967rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968fi
10969
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010970if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
10972echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
10973 cat >conftest.$ac_ext <<_ACEOF
10974#line $LINENO "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010975#include "confdefs.h"
10976#include <sys/types.h>
10977#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978int
10979main ()
10980{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010981struct sockaddr_in6 x;
10982x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 ;
10984 return 0;
10985}
10986_ACEOF
10987rm -f conftest.$ac_objext
10988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10989 (eval $ac_compile) 2>&5
10990 ac_status=$?
10991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992 (exit $ac_status); } &&
10993 { ac_try='test -s conftest.$ac_objext'
10994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995 (eval $ac_try) 2>&5
10996 ac_status=$?
10997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998 (exit $ac_status); }; }; then
10999 echo "$as_me:$LINENO: result: yes" >&5
11000echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001 ipv6=yes
11002else
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 echo "$as_me: failed program was:" >&5
11004cat conftest.$ac_ext >&5
11005echo "$as_me:$LINENO: result: no" >&5
11006echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011007 ipv6=no
11008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011009rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011010fi
11011
11012if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011014#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011015_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011016
11017fi
11018
Martin v. Löwis11437992002-04-12 09:54:03 +000011019fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011020
11021ipv6type=unknown
11022ipv6lib=none
11023ipv6trylibc=no
11024
11025if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11027echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011028 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11029 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030 case $i in
11031 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011032 cat >conftest.$ac_ext <<_ACEOF
11033#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036#include <netinet/in.h>
11037#ifdef IPV6_INRIA_VERSION
11038yes
11039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011042 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011043 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044fi
11045rm -f conftest*
11046
11047 ;;
11048 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 cat >conftest.$ac_ext <<_ACEOF
11050#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053#include <netinet/in.h>
11054#ifdef __KAME__
11055yes
11056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011057_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011059 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060 ipv6type=$i;
11061 ipv6lib=inet6
11062 ipv6libdir=/usr/local/v6/lib
11063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064fi
11065rm -f conftest*
11066
11067 ;;
11068 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 cat >conftest.$ac_ext <<_ACEOF
11070#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073#include <features.h>
11074#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11075yes
11076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080 ipv6type=$i;
11081 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082fi
11083rm -f conftest*
11084
11085 ;;
11086 linux-inet6)
11087 if test -d /usr/inet6; then
11088 ipv6type=$i
11089 ipv6lib=inet6
11090 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011091 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 fi
11093 ;;
11094 solaris)
11095 if test -f /etc/netconfig; then
11096 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11097 ipv6type=$i
11098 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099 fi
11100 fi
11101 ;;
11102 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 cat >conftest.$ac_ext <<_ACEOF
11104#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011106
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107#include <sys/param.h>
11108#ifdef _TOSHIBA_INET6
11109yes
11110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011113 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114 ipv6type=$i;
11115 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011116 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117fi
11118rm -f conftest*
11119
11120 ;;
11121 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 cat >conftest.$ac_ext <<_ACEOF
11123#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126#include </usr/local/v6/include/sys/v6config.h>
11127#ifdef __V6D__
11128yes
11129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011132 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133 ipv6type=$i;
11134 ipv6lib=v6;
11135 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011136 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137fi
11138rm -f conftest*
11139
11140 ;;
11141 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 cat >conftest.$ac_ext <<_ACEOF
11143#line $LINENO "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011146#include <sys/param.h>
11147#ifdef _ZETA_MINAMI_INET6
11148yes
11149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000011152 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011153 ipv6type=$i;
11154 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011155 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156fi
11157rm -f conftest*
11158
11159 ;;
11160 esac
11161 if test "$ipv6type" != "unknown"; then
11162 break
11163 fi
11164 done
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 echo "$as_me:$LINENO: result: $ipv6type" >&5
11166echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167fi
11168
11169if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11170 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11171 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11172 echo "using lib$ipv6lib"
11173 else
11174 if test $ipv6trylibc = "yes"; then
11175 echo "using libc"
11176 else
11177 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11178 echo "You need to fetch lib$ipv6lib.a from appropriate"
11179 echo 'ipv6 kit and compile beforehand.'
11180 exit 1
11181 fi
11182 fi
11183fi
11184
Jack Jansen7b8c7542002-04-14 20:12:41 +000011185# Check for universal newline support
Guido van Rossum402905e2002-08-15 13:56:35 +000011186echo "$as_me:$LINENO: checking for --with-universal-newlines" >&5
11187echo $ECHO_N "checking for --with-universal-newlines... $ECHO_C" >&6
Jack Jansen7b8c7542002-04-14 20:12:41 +000011188
11189# Check whether --with-universal-newlines or --without-universal-newlines was given.
11190if test "${with_universal_newlines+set}" = set; then
11191 withval="$with_universal_newlines"
11192
11193fi;
11194
11195if test -z "$with_universal_newlines"
11196then with_universal_newlines="yes"
11197fi
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011198if test "$with_universal_newlines" = "no"
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011199then
Martin v. Löwis7e4cfcb2002-12-19 16:21:49 +000011200 echo --without-universal-newlines is unsupported, see README
11201 exit 1
Martin v. Löwis03d00d52002-12-19 19:03:31 +000011202else
Martin v. Löwise8aea582002-04-16 05:51:02 +000011203
11204cat >>confdefs.h <<\_ACEOF
Jack Jansen7b8c7542002-04-14 20:12:41 +000011205#define WITH_UNIVERSAL_NEWLINES 1
11206_ACEOF
11207
11208fi
11209echo "$as_me:$LINENO: result: $with_universal_newlines" >&5
11210echo "${ECHO_T}$with_universal_newlines" >&6
11211
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011212# Check for --with-doc-strings
11213echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
11214echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
11215
11216# Check whether --with-doc-strings or --without-doc-strings was given.
11217if test "${with_doc_strings+set}" = set; then
11218 withval="$with_doc_strings"
11219
11220fi;
11221
11222if test -z "$with_doc_strings"
11223then with_doc_strings="yes"
11224fi
11225if test "$with_doc_strings" != "no"
11226then
11227
11228cat >>confdefs.h <<\_ACEOF
11229#define WITH_DOC_STRINGS 1
11230_ACEOF
11231
11232fi
11233echo "$as_me:$LINENO: result: $with_doc_strings" >&5
11234echo "${ECHO_T}$with_doc_strings" >&6
11235
Neil Schemenauera35c6882001-02-27 04:45:05 +000011236# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000011237echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
11238echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
11239
Neil Schemenauera35c6882001-02-27 04:45:05 +000011240# Check whether --with-pymalloc or --without-pymalloc was given.
11241if test "${with_pymalloc+set}" = set; then
11242 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000011243
Martin v. Löwis11437992002-04-12 09:54:03 +000011244fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000011245
Neil Schemenauer16c22972002-03-22 15:34:49 +000011246if test -z "$with_pymalloc"
11247then with_pymalloc="yes"
11248fi
11249if test "$with_pymalloc" != "no"
11250then
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
11252cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011253#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011254_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000011255
11256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011257echo "$as_me:$LINENO: result: $with_pymalloc" >&5
11258echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000011259
Barry Warsawef82cd72000-06-30 16:21:01 +000011260# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011261echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
11262echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
11263
Barry Warsawef82cd72000-06-30 16:21:01 +000011264# Check whether --with-wctype-functions or --without-wctype-functions was given.
11265if test "${with_wctype_functions+set}" = set; then
11266 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000011267
Barry Warsawef82cd72000-06-30 16:21:01 +000011268if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011269then
11270
11271cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000011272#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011273_ACEOF
11274
11275 echo "$as_me:$LINENO: result: yes" >&5
11276echo "${ECHO_T}yes" >&6
11277else echo "$as_me:$LINENO: result: no" >&5
11278echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000011279fi
11280else
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 echo "$as_me:$LINENO: result: no" >&5
11282echo "${ECHO_T}no" >&6
11283fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000011284
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011285# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011286
Guido van Rossum98935bf2001-09-05 19:13:16 +000011287DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289echo "$as_me:$LINENO: checking for --with-sgi-dl" >&5
11290echo $ECHO_N "checking for --with-sgi-dl... $ECHO_C" >&6
11291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011293if test "${with_sgi_dl+set}" = set; then
11294 withval="$with_sgi_dl"
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
11296echo "$as_me:$LINENO: result: $withval" >&5
11297echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011298echo --with-sgi-dl is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011299exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
11301cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302#define WITH_SGI_DL 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011304
Guido van Rossume97ee181999-12-20 21:27:22 +000011305DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011306dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +000011307if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011308then LDFLAGS="$LDFLAGS -L$dldir"
Martin v. Löwis11437992002-04-12 09:54:03 +000011309else { { echo "$as_me:$LINENO: error: proper usage is --with-sgi-dl=DIRECTORY" >&5
11310echo "$as_me: error: proper usage is --with-sgi-dl=DIRECTORY" >&2;}
11311 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011312fi
11313DLINCLDIR=${dldir}
11314LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011315else
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 echo "$as_me:$LINENO: result: no" >&5
11317echo "${ECHO_T}no" >&6
11318fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011319
Martin v. Löwis11437992002-04-12 09:54:03 +000011320echo "$as_me:$LINENO: checking for --with-dl-dld" >&5
11321echo $ECHO_N "checking for --with-dl-dld... $ECHO_C" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000011322
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011323# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011324if test "${with_dl_dld+set}" = set; then
11325 withval="$with_dl_dld"
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
11327echo "$as_me:$LINENO: result: $withval" >&5
11328echo "${ECHO_T}$withval" >&6
Martin v. Löwis9ef33762002-12-02 22:23:56 +000011329echo --with-dl-dld is unsupported, see README
Martin v. Löwis779ffc02002-12-02 22:17:01 +000011330exit 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
11332cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011333#define WITH_DL_DLD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000011335
Guido van Rossume97ee181999-12-20 21:27:22 +000011336DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011337dldir=`echo "$withval" | sed 's/,.*//'`
11338dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +000011339if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +000011340then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011341else { { echo "$as_me:$LINENO: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&5
11342echo "$as_me: error: proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY" >&2;}
11343 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011344fi
11345DLINCLDIR=${dldir}
11346LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +000011347else
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 echo "$as_me:$LINENO: result: no" >&5
11349echo "${ECHO_T}no" >&6
11350fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011351
Guido van Rossume97ee181999-12-20 21:27:22 +000011352# the dlopen() function means we might want to use dynload_shlib.o. some
11353# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Thomas Wouters3a584202000-08-05 23:28:51 +000011355for ac_func in dlopen
11356do
Martin v. Löwis11437992002-04-12 09:54:03 +000011357as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11358echo "$as_me:$LINENO: checking for $ac_func" >&5
11359echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11360if eval "test \"\${$as_ac_var+set}\" = set"; then
11361 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011362else
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 cat >conftest.$ac_ext <<_ACEOF
11364#line $LINENO "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +000011365#include "confdefs.h"
11366/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 which can conflict with char $ac_func (); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +000011368#include <assert.h>
11369/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011370#ifdef __cplusplus
11371extern "C"
11372#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000011373/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 builtin and then its argument prototype would still apply. */
11375char $ac_func ();
11376char (*f) ();
Guido van Rossume97ee181999-12-20 21:27:22 +000011377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378int
11379main ()
11380{
Guido van Rossume97ee181999-12-20 21:27:22 +000011381/* The GNU C library defines this for functions which it implements
11382 to always fail with ENOSYS. Some functions are actually named
11383 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000011384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000011385choke me
11386#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011387f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +000011388#endif
11389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 ;
11391 return 0;
11392}
11393_ACEOF
11394rm -f conftest.$ac_objext conftest$ac_exeext
11395if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11396 (eval $ac_link) 2>&5
11397 ac_status=$?
11398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11399 (exit $ac_status); } &&
11400 { ac_try='test -s conftest$ac_exeext'
11401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11402 (eval $ac_try) 2>&5
11403 ac_status=$?
11404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11405 (exit $ac_status); }; }; then
11406 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011407else
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 echo "$as_me: failed program was:" >&5
11409cat conftest.$ac_ext >&5
11410eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011411fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011413fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011414echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11415echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11416if test `eval echo '${'$as_ac_var'}'` = yes; then
11417 cat >>confdefs.h <<_ACEOF
11418#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11419_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011420
Guido van Rossume97ee181999-12-20 21:27:22 +000011421fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011422done
Guido van Rossume97ee181999-12-20 21:27:22 +000011423
Michael W. Hudson54241132001-12-07 15:38:26 +000011424
Guido van Rossume97ee181999-12-20 21:27:22 +000011425# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11426# loading of modules.
11427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
11429echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011430if test -z "$DYNLOADFILE"
11431then
11432 case $ac_sys_system/$ac_sys_release in
11433 AIX*) DYNLOADFILE="dynload_aix.o";;
11434 BeOS*) DYNLOADFILE="dynload_beos.o";;
11435 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000011436 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011437 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011438 *)
11439 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11440 # out any dynamic loading
11441 if test "$ac_cv_func_dlopen" = yes
11442 then DYNLOADFILE="dynload_shlib.o"
11443 else DYNLOADFILE="dynload_stub.o"
11444 fi
11445 ;;
11446 esac
11447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011448echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
11449echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000011450if test "$DYNLOADFILE" != "dynload_stub.o"
11451then
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
11453cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011454#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011455_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011456
11457fi
11458
Neil Schemenauer4e425612001-06-19 15:44:15 +000011459# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11460
Michael W. Hudson54241132001-12-07 15:38:26 +000011461
Martin v. Löwis11437992002-04-12 09:54:03 +000011462echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
11463echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011464if test -z "$MACHDEP_OBJS"
11465then
Jack Jansene578a632001-08-15 01:27:14 +000011466 MACHDEP_OBJS=$extra_machdep_objs
11467else
11468 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011469fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011470echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
11471echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000011472
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
Martin v. Löwis9c36c292002-12-21 18:34:06 +000011547
Martin v. Löwis438b5342002-12-27 10:16:42 +000011548
Martin v. Löwisd5843682002-11-21 20:41:28 +000011549for ac_func in alarm chown clock confstr ctermid execv \
Fred Drake6b3cc522002-04-15 19:20:27 +000011550 fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000011551 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
11552 getpriority getpwent getwd \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553 hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000011554 mremap nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +000011555 putenv readlink \
Martin v. Löwisd5843682002-11-21 20:41:28 +000011556 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +000011557 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558 sigaction siginterrupt sigrelse strftime strptime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011559 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000011560 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000011561do
Martin v. Löwis11437992002-04-12 09:54:03 +000011562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11563echo "$as_me:$LINENO: checking for $ac_func" >&5
11564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11565if eval "test \"\${$as_ac_var+set}\" = set"; then
11566 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011567else
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 cat >conftest.$ac_ext <<_ACEOF
11569#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000011570#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011571/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011572 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011573#include <assert.h>
11574/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011575#ifdef __cplusplus
11576extern "C"
11577#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011578/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 builtin and then its argument prototype would still apply. */
11580char $ac_func ();
11581char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011582
Martin v. Löwis11437992002-04-12 09:54:03 +000011583int
11584main ()
11585{
Guido van Rossum627b2d71993-12-24 10:39:16 +000011586/* The GNU C library defines this for functions which it implements
11587 to always fail with ENOSYS. Some functions are actually named
11588 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011590choke me
11591#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011592f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011593#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011594
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
11599rm -f conftest.$ac_objext conftest$ac_exeext
11600if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11601 (eval $ac_link) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); } &&
11605 { ac_try='test -s conftest$ac_exeext'
11606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11607 (eval $ac_try) 2>&5
11608 ac_status=$?
11609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); }; }; then
11611 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011612else
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 echo "$as_me: failed program was:" >&5
11614cat conftest.$ac_ext >&5
11615eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011616fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011617rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011619echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11620echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11621if test `eval echo '${'$as_ac_var'}'` = yes; then
11622 cat >>confdefs.h <<_ACEOF
11623#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11624_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011625
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011626fi
11627done
11628
Michael W. Hudson54241132001-12-07 15:38:26 +000011629
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011630# For some functions, having a definition is not sufficient, since
11631# we want to take their address.
11632echo "$as_me:$LINENO: checking for chroot" >&5
11633echo $ECHO_N "checking for chroot... $ECHO_C" >&6
11634cat >conftest.$ac_ext <<_ACEOF
11635#line $LINENO "configure"
11636#include "confdefs.h"
11637#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011638int
11639main ()
11640{
11641void *x=chroot
11642 ;
11643 return 0;
11644}
11645_ACEOF
11646rm -f conftest.$ac_objext
11647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11648 (eval $ac_compile) 2>&5
11649 ac_status=$?
11650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11651 (exit $ac_status); } &&
11652 { ac_try='test -s conftest.$ac_objext'
11653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11654 (eval $ac_try) 2>&5
11655 ac_status=$?
11656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11657 (exit $ac_status); }; }; then
11658
11659cat >>confdefs.h <<\_ACEOF
11660#define HAVE_CHROOT 1
11661_ACEOF
11662
11663 echo "$as_me:$LINENO: result: yes" >&5
11664echo "${ECHO_T}yes" >&6
11665else
11666 echo "$as_me: failed program was:" >&5
11667cat conftest.$ac_ext >&5
11668echo "$as_me:$LINENO: result: no" >&5
11669echo "${ECHO_T}no" >&6
11670
11671fi
11672rm -f conftest.$ac_objext conftest.$ac_ext
11673echo "$as_me:$LINENO: checking for link" >&5
11674echo $ECHO_N "checking for link... $ECHO_C" >&6
11675cat >conftest.$ac_ext <<_ACEOF
11676#line $LINENO "configure"
11677#include "confdefs.h"
11678#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011679int
11680main ()
11681{
11682void *x=link
11683 ;
11684 return 0;
11685}
11686_ACEOF
11687rm -f conftest.$ac_objext
11688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11689 (eval $ac_compile) 2>&5
11690 ac_status=$?
11691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11692 (exit $ac_status); } &&
11693 { ac_try='test -s conftest.$ac_objext'
11694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11695 (eval $ac_try) 2>&5
11696 ac_status=$?
11697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11698 (exit $ac_status); }; }; then
11699
11700cat >>confdefs.h <<\_ACEOF
11701#define HAVE_LINK 1
11702_ACEOF
11703
11704 echo "$as_me:$LINENO: result: yes" >&5
11705echo "${ECHO_T}yes" >&6
11706else
11707 echo "$as_me: failed program was:" >&5
11708cat conftest.$ac_ext >&5
11709echo "$as_me:$LINENO: result: no" >&5
11710echo "${ECHO_T}no" >&6
11711
11712fi
11713rm -f conftest.$ac_objext conftest.$ac_ext
11714echo "$as_me:$LINENO: checking for symlink" >&5
11715echo $ECHO_N "checking for symlink... $ECHO_C" >&6
11716cat >conftest.$ac_ext <<_ACEOF
11717#line $LINENO "configure"
11718#include "confdefs.h"
11719#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011720int
11721main ()
11722{
11723void *x=symlink
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728rm -f conftest.$ac_objext
11729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11730 (eval $ac_compile) 2>&5
11731 ac_status=$?
11732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11733 (exit $ac_status); } &&
11734 { ac_try='test -s conftest.$ac_objext'
11735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11736 (eval $ac_try) 2>&5
11737 ac_status=$?
11738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11739 (exit $ac_status); }; }; then
11740
11741cat >>confdefs.h <<\_ACEOF
11742#define HAVE_SYMLINK 1
11743_ACEOF
11744
11745 echo "$as_me:$LINENO: result: yes" >&5
11746echo "${ECHO_T}yes" >&6
11747else
11748 echo "$as_me: failed program was:" >&5
11749cat conftest.$ac_ext >&5
11750echo "$as_me:$LINENO: result: no" >&5
11751echo "${ECHO_T}no" >&6
11752
11753fi
11754rm -f conftest.$ac_objext conftest.$ac_ext
11755
Martin v. Löwisd5843682002-11-21 20:41:28 +000011756# On some systems (eg. FreeBSD 5), we would find a definition of the
11757# functions ctermid_r, setgroups in the library, but no prototype
11758# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11759# address to avoid compiler warnings and potential miscompilations
11760# because of the missing prototypes.
11761
11762echo "$as_me:$LINENO: checking for ctermid_r" >&5
11763echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
11764cat >conftest.$ac_ext <<_ACEOF
11765#line $LINENO "configure"
11766#include "confdefs.h"
11767
11768#include "confdefs.h"
11769#include <stdio.h>
11770
Martin v. Löwisd5843682002-11-21 20:41:28 +000011771int
11772main ()
11773{
11774void* p = ctermid_r
11775 ;
11776 return 0;
11777}
11778_ACEOF
11779rm -f conftest.$ac_objext
11780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11781 (eval $ac_compile) 2>&5
11782 ac_status=$?
11783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11784 (exit $ac_status); } &&
11785 { ac_try='test -s conftest.$ac_objext'
11786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11787 (eval $ac_try) 2>&5
11788 ac_status=$?
11789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11790 (exit $ac_status); }; }; then
11791
11792cat >>confdefs.h <<\_ACEOF
11793#define HAVE_CTERMID_R 1
11794_ACEOF
11795
11796 echo "$as_me:$LINENO: result: yes" >&5
11797echo "${ECHO_T}yes" >&6
11798else
11799 echo "$as_me: failed program was:" >&5
11800cat conftest.$ac_ext >&5
11801echo "$as_me:$LINENO: result: no" >&5
11802echo "${ECHO_T}no" >&6
11803
11804fi
11805rm -f conftest.$ac_objext conftest.$ac_ext
11806
11807echo "$as_me:$LINENO: checking for setgroups" >&5
11808echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
11809cat >conftest.$ac_ext <<_ACEOF
11810#line $LINENO "configure"
11811#include "confdefs.h"
11812
11813#include "confdefs.h"
11814#include <unistd.h.h>
11815
Martin v. Löwisd5843682002-11-21 20:41:28 +000011816int
11817main ()
11818{
11819void* p = setgroups
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11826 (eval $ac_compile) 2>&5
11827 ac_status=$?
11828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11829 (exit $ac_status); } &&
11830 { ac_try='test -s conftest.$ac_objext'
11831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11832 (eval $ac_try) 2>&5
11833 ac_status=$?
11834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11835 (exit $ac_status); }; }; then
11836
11837cat >>confdefs.h <<\_ACEOF
11838#define HAVE_SETGROUPS 1
11839_ACEOF
11840
11841 echo "$as_me:$LINENO: result: yes" >&5
11842echo "${ECHO_T}yes" >&6
11843else
11844 echo "$as_me: failed program was:" >&5
11845cat conftest.$ac_ext >&5
11846echo "$as_me:$LINENO: result: no" >&5
11847echo "${ECHO_T}no" >&6
11848
11849fi
11850rm -f conftest.$ac_objext conftest.$ac_ext
11851
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011852# check for openpty and forkpty
11853
Martin v. Löwis11437992002-04-12 09:54:03 +000011854
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011855for ac_func in openpty
11856do
Martin v. Löwis11437992002-04-12 09:54:03 +000011857as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11858echo "$as_me:$LINENO: checking for $ac_func" >&5
11859echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11860if eval "test \"\${$as_ac_var+set}\" = set"; then
11861 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011862else
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 cat >conftest.$ac_ext <<_ACEOF
11864#line $LINENO "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011865#include "confdefs.h"
11866/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 which can conflict with char $ac_func (); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011868#include <assert.h>
11869/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011870#ifdef __cplusplus
11871extern "C"
11872#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011873/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 builtin and then its argument prototype would still apply. */
11875char $ac_func ();
11876char (*f) ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011877
Martin v. Löwis11437992002-04-12 09:54:03 +000011878int
11879main ()
11880{
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011881/* The GNU C library defines this for functions which it implements
11882 to always fail with ENOSYS. Some functions are actually named
11883 something starting with __ and the normal name is an alias. */
11884#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11885choke me
11886#else
Martin v. Löwis11437992002-04-12 09:54:03 +000011887f = $ac_func;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011888#endif
11889
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext conftest$ac_exeext
11895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11896 (eval $ac_link) 2>&5
11897 ac_status=$?
11898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11899 (exit $ac_status); } &&
11900 { ac_try='test -s conftest$ac_exeext'
11901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11902 (eval $ac_try) 2>&5
11903 ac_status=$?
11904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11905 (exit $ac_status); }; }; then
11906 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000011907else
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 echo "$as_me: failed program was:" >&5
11909cat conftest.$ac_ext >&5
11910eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000011911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011912rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011913fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011914echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11915echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11916if test `eval echo '${'$as_ac_var'}'` = yes; then
11917 cat >>confdefs.h <<_ACEOF
11918#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11919_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011920
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011921else
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
11923echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
11924if test "${ac_cv_lib_util_openpty+set}" = set; then
11925 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011926else
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011928LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011929cat >conftest.$ac_ext <<_ACEOF
11930#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011931#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Fred Drake8cef4cf2000-06-28 16:40:38 +000011933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011934#ifdef __cplusplus
11935extern "C"
11936#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000011937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 builtin and then its argument prototype would still apply. */
11939char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011940int
11941main ()
11942{
11943openpty ();
11944 ;
11945 return 0;
11946}
11947_ACEOF
11948rm -f conftest.$ac_objext conftest$ac_exeext
11949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11950 (eval $ac_link) 2>&5
11951 ac_status=$?
11952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11953 (exit $ac_status); } &&
11954 { ac_try='test -s conftest$ac_exeext'
11955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11956 (eval $ac_try) 2>&5
11957 ac_status=$?
11958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11959 (exit $ac_status); }; }; then
11960 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011961else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 echo "$as_me: failed program was:" >&5
11963cat conftest.$ac_ext >&5
11964ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11967LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011968fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011969echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
11970echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
11971if test $ac_cv_lib_util_openpty = yes; then
11972 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011973#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011974_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011976fi
11977
11978fi
11979done
11980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981
Fred Drake8cef4cf2000-06-28 16:40:38 +000011982for ac_func in forkpty
11983do
Martin v. Löwis11437992002-04-12 09:54:03 +000011984as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11985echo "$as_me:$LINENO: checking for $ac_func" >&5
11986echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11987if eval "test \"\${$as_ac_var+set}\" = set"; then
11988 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011989else
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 cat >conftest.$ac_ext <<_ACEOF
11991#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000011992#include "confdefs.h"
11993/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 which can conflict with char $ac_func (); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000011995#include <assert.h>
11996/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011997#ifdef __cplusplus
11998extern "C"
11999#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012000/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 builtin and then its argument prototype would still apply. */
12002char $ac_func ();
12003char (*f) ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000012004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005int
12006main ()
12007{
Fred Drake8cef4cf2000-06-28 16:40:38 +000012008/* The GNU C library defines this for functions which it implements
12009 to always fail with ENOSYS. Some functions are actually named
12010 something starting with __ and the normal name is an alias. */
12011#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12012choke me
12013#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +000012015#endif
12016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
12021rm -f conftest.$ac_objext conftest$ac_exeext
12022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12023 (eval $ac_link) 2>&5
12024 ac_status=$?
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); } &&
12027 { ac_try='test -s conftest$ac_exeext'
12028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12029 (eval $ac_try) 2>&5
12030 ac_status=$?
12031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12032 (exit $ac_status); }; }; then
12033 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012034else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 echo "$as_me: failed program was:" >&5
12036cat conftest.$ac_ext >&5
12037eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012038fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012039rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012041echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12042echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12043if test `eval echo '${'$as_ac_var'}'` = yes; then
12044 cat >>confdefs.h <<_ACEOF
12045#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12046_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012047
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048else
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
12050echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
12051if test "${ac_cv_lib_util_forkpty+set}" = set; then
12052 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012053else
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012055LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012056cat >conftest.$ac_ext <<_ACEOF
12057#line $LINENO "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012058#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012059
Fred Drake8cef4cf2000-06-28 16:40:38 +000012060/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012061#ifdef __cplusplus
12062extern "C"
12063#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000012064/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 builtin and then its argument prototype would still apply. */
12066char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012067int
12068main ()
12069{
12070forkpty ();
12071 ;
12072 return 0;
12073}
12074_ACEOF
12075rm -f conftest.$ac_objext conftest$ac_exeext
12076if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12077 (eval $ac_link) 2>&5
12078 ac_status=$?
12079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12080 (exit $ac_status); } &&
12081 { ac_try='test -s conftest$ac_exeext'
12082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12083 (eval $ac_try) 2>&5
12084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); }; }; then
12087 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012088else
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 echo "$as_me: failed program was:" >&5
12090cat conftest.$ac_ext >&5
12091ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12094LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012096echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
12097echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
12098if test $ac_cv_lib_util_forkpty = yes; then
12099 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012100#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103fi
12104
12105fi
12106done
12107
Jack Jansendd19cf82001-12-06 22:36:17 +000012108
Michael W. Hudson54241132001-12-07 15:38:26 +000012109# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
12111
12112
12113
12114
12115
Fred Drake8cef4cf2000-06-28 16:40:38 +000012116for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
12117do
Martin v. Löwis11437992002-04-12 09:54:03 +000012118as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12119echo "$as_me:$LINENO: checking for $ac_func" >&5
12120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12121if eval "test \"\${$as_ac_var+set}\" = set"; then
12122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012123else
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 cat >conftest.$ac_ext <<_ACEOF
12125#line $LINENO "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012126#include "confdefs.h"
12127/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 which can conflict with char $ac_func (); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012129#include <assert.h>
12130/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131#ifdef __cplusplus
12132extern "C"
12133#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012134/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 builtin and then its argument prototype would still apply. */
12136char $ac_func ();
12137char (*f) ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012138
Martin v. Löwis11437992002-04-12 09:54:03 +000012139int
12140main ()
12141{
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012142/* The GNU C library defines this for functions which it implements
12143 to always fail with ENOSYS. Some functions are actually named
12144 something starting with __ and the normal name is an alias. */
12145#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12146choke me
12147#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012148f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012149#endif
12150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ;
12152 return 0;
12153}
12154_ACEOF
12155rm -f conftest.$ac_objext conftest$ac_exeext
12156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12157 (eval $ac_link) 2>&5
12158 ac_status=$?
12159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12160 (exit $ac_status); } &&
12161 { ac_try='test -s conftest$ac_exeext'
12162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163 (eval $ac_try) 2>&5
12164 ac_status=$?
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); }; }; then
12167 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012168else
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 echo "$as_me: failed program was:" >&5
12170cat conftest.$ac_ext >&5
12171eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012173rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012175echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12176echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12177if test `eval echo '${'$as_ac_var'}'` = yes; then
12178 cat >>confdefs.h <<_ACEOF
12179#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12180_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012181
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012183done
12184
Michael W. Hudson54241132001-12-07 15:38:26 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
12187
12188
12189
12190
Martin v. Löwis1142de32002-03-29 16:28:31 +000012191for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000012192do
Martin v. Löwis11437992002-04-12 09:54:03 +000012193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12194echo "$as_me:$LINENO: checking for $ac_func" >&5
12195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12196if eval "test \"\${$as_ac_var+set}\" = set"; then
12197 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198else
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 cat >conftest.$ac_ext <<_ACEOF
12200#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012201#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012202/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012204#include <assert.h>
12205/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012206#ifdef __cplusplus
12207extern "C"
12208#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012209/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 builtin and then its argument prototype would still apply. */
12211char $ac_func ();
12212char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214int
12215main ()
12216{
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217/* The GNU C library defines this for functions which it implements
12218 to always fail with ENOSYS. Some functions are actually named
12219 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221choke me
12222#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012223f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext conftest$ac_exeext
12231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12232 (eval $ac_link) 2>&5
12233 ac_status=$?
12234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235 (exit $ac_status); } &&
12236 { ac_try='test -s conftest$ac_exeext'
12237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12239 ac_status=$?
12240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12241 (exit $ac_status); }; }; then
12242 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012243else
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 echo "$as_me: failed program was:" >&5
12245cat conftest.$ac_ext >&5
12246eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012248rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000012249fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012250echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12251echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12252if test `eval echo '${'$as_ac_var'}'` = yes; then
12253 cat >>confdefs.h <<_ACEOF
12254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12255_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000012256
Martin v. Löwis1142de32002-03-29 16:28:31 +000012257else
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012259fi
12260done
12261
12262
Martin v. Löwis11437992002-04-12 09:54:03 +000012263
Martin v. Löwis1142de32002-03-29 16:28:31 +000012264for ac_func in getpgrp
12265do
Martin v. Löwis11437992002-04-12 09:54:03 +000012266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12267echo "$as_me:$LINENO: checking for $ac_func" >&5
12268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12269if eval "test \"\${$as_ac_var+set}\" = set"; then
12270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000012271else
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 cat >conftest.$ac_ext <<_ACEOF
12273#line $LINENO "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +000012274#include "confdefs.h"
12275/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 which can conflict with char $ac_func (); below. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000012277#include <assert.h>
12278/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012279#ifdef __cplusplus
12280extern "C"
12281#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000012282/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 builtin and then its argument prototype would still apply. */
12284char $ac_func ();
12285char (*f) ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287int
12288main ()
12289{
Martin v. Löwis1142de32002-03-29 16:28:31 +000012290/* The GNU C library defines this for functions which it implements
12291 to always fail with ENOSYS. Some functions are actually named
12292 something starting with __ and the normal name is an alias. */
12293#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12294choke me
12295#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012296f = $ac_func;
Martin v. Löwis1142de32002-03-29 16:28:31 +000012297#endif
12298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
12303rm -f conftest.$ac_objext conftest$ac_exeext
12304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12305 (eval $ac_link) 2>&5
12306 ac_status=$?
12307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308 (exit $ac_status); } &&
12309 { ac_try='test -s conftest$ac_exeext'
12310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12311 (eval $ac_try) 2>&5
12312 ac_status=$?
12313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); }; }; then
12315 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012316else
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 echo "$as_me: failed program was:" >&5
12318cat conftest.$ac_ext >&5
12319eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012320fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012321rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012322fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012323echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12324echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12325if test `eval echo '${'$as_ac_var'}'` = yes; then
12326 cat >>confdefs.h <<_ACEOF
12327#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12328_ACEOF
12329 cat >conftest.$ac_ext <<_ACEOF
12330#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331#include "confdefs.h"
12332#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012333int
12334main ()
12335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012336getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
12341rm -f conftest.$ac_objext
12342if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12343 (eval $ac_compile) 2>&5
12344 ac_status=$?
12345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12346 (exit $ac_status); } &&
12347 { ac_try='test -s conftest.$ac_objext'
12348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12349 (eval $ac_try) 2>&5
12350 ac_status=$?
12351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12352 (exit $ac_status); }; }; then
12353
12354cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012356_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012357
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Guido van Rossumf78abae1997-01-21 22:02:36 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 echo "$as_me: failed program was:" >&5
12361cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000012362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012363rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012364
Guido van Rossum627b2d71993-12-24 10:39:16 +000012365fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012366done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012367
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012368echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
12369echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
12370if test "${ac_cv_func_setpgrp_void+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012373 if test "$cross_compiling" = yes; then
12374 { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
12375echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
12376 { (exit 1); exit 1; }; }
12377else
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 cat >conftest.$ac_ext <<_ACEOF
12379#line $LINENO "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012380#include "confdefs.h"
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012381#if HAVE_UNISTD_H
12382# include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012383#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012384
Martin v. Löwis11437992002-04-12 09:54:03 +000012385int
12386main ()
12387{
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012388/* If this system has a BSD-style setpgrp which takes arguments,
12389 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
12390 exit successfully. */
12391 exit (setpgrp (1,1) == -1 ? 0 : 1);
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012396rm -f conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000012397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12398 (eval $ac_link) 2>&5
12399 ac_status=$?
12400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12403 (eval $ac_try) 2>&5
12404 ac_status=$?
12405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12406 (exit $ac_status); }; }; then
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012407 ac_cv_func_setpgrp_void=no
Michael W. Hudson54241132001-12-07 15:38:26 +000012408else
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012409 echo "$as_me: program exited with status $ac_status" >&5
12410echo "$as_me: failed program was:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012411cat conftest.$ac_ext >&5
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012412( exit $ac_status )
12413ac_cv_func_setpgrp_void=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012414fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000012415rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012416fi
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012417fi
12418echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
12419echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
12420if test $ac_cv_func_setpgrp_void = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
12422cat >>confdefs.h <<\_ACEOF
Jeremy Hyltonaf4c12f2002-07-18 20:25:46 +000012423#define SETPGRP_VOID 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012425
12426fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Thomas Wouters3a584202000-08-05 23:28:51 +000012429for ac_func in gettimeofday
12430do
Martin v. Löwis11437992002-04-12 09:54:03 +000012431as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12432echo "$as_me:$LINENO: checking for $ac_func" >&5
12433echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12434if eval "test \"\${$as_ac_var+set}\" = set"; then
12435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436else
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 cat >conftest.$ac_ext <<_ACEOF
12438#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012439#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012440/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012442#include <assert.h>
12443/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012444#ifdef __cplusplus
12445extern "C"
12446#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012447/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 builtin and then its argument prototype would still apply. */
12449char $ac_func ();
12450char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455/* The GNU C library defines this for functions which it implements
12456 to always fail with ENOSYS. Some functions are actually named
12457 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012459choke me
12460#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012461f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462#endif
12463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 ;
12465 return 0;
12466}
12467_ACEOF
12468rm -f conftest.$ac_objext conftest$ac_exeext
12469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12470 (eval $ac_link) 2>&5
12471 ac_status=$?
12472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473 (exit $ac_status); } &&
12474 { ac_try='test -s conftest$ac_exeext'
12475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12476 (eval $ac_try) 2>&5
12477 ac_status=$?
12478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479 (exit $ac_status); }; }; then
12480 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012481else
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 echo "$as_me: failed program was:" >&5
12483cat conftest.$ac_ext >&5
12484eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012488echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12489echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12490if test `eval echo '${'$as_ac_var'}'` = yes; then
12491 cat >>confdefs.h <<_ACEOF
12492#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12493_ACEOF
12494 cat >conftest.$ac_ext <<_ACEOF
12495#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012496#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012497#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012501gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 ;
12503 return 0;
12504}
12505_ACEOF
12506rm -f conftest.$ac_objext
12507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12508 (eval $ac_compile) 2>&5
12509 ac_status=$?
12510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511 (exit $ac_status); } &&
12512 { ac_try='test -s conftest.$ac_objext'
12513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12514 (eval $ac_try) 2>&5
12515 ac_status=$?
12516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12517 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000012518 :
12519else
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 echo "$as_me: failed program was:" >&5
12521cat conftest.$ac_ext >&5
12522
12523cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012525_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Guido van Rossum627b2d71993-12-24 10:39:16 +000012528fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012529rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012531fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012532done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533
Michael W. Hudson54241132001-12-07 15:38:26 +000012534
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012535echo "$as_me:$LINENO: checking for major" >&5
12536echo $ECHO_N "checking for major... $ECHO_C" >&6
12537cat >conftest.$ac_ext <<_ACEOF
12538#line $LINENO "configure"
12539#include "confdefs.h"
12540
12541 #if defined(MAJOR_IN_MKDEV)
12542 #include <sys/mkdev.h>
12543 #elif defined(MAJOR_IN_SYSMACROS)
12544 #include <sys/sysmacros.h>
12545 #else
12546 #include <sys/types.h>
12547 #endif
12548
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012549int
12550main ()
12551{
12552
12553 makedev(major(0),minor(0));
12554
12555 ;
12556 return 0;
12557}
12558_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000012559rm -f conftest.$ac_objext conftest$ac_exeext
12560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12561 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012562 ac_status=$?
12563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12564 (exit $ac_status); } &&
Martin v. Löwise3271202002-11-07 07:42:30 +000012565 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12568 ac_status=$?
12569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12570 (exit $ac_status); }; }; then
12571
12572
12573cat >>confdefs.h <<\_ACEOF
12574#define HAVE_DEVICE_MACROS 1
12575_ACEOF
12576
12577 echo "$as_me:$LINENO: result: yes" >&5
12578echo "${ECHO_T}yes" >&6
12579
12580else
12581 echo "$as_me: failed program was:" >&5
12582cat conftest.$ac_ext >&5
12583
12584 echo "$as_me:$LINENO: result: no" >&5
12585echo "${ECHO_T}no" >&6
12586
12587fi
Martin v. Löwise3271202002-11-07 07:42:30 +000012588rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012589
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012590# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012591# for [no]getaddrinfo in netdb.h.
12592echo "$as_me:$LINENO: checking for getaddrinfo" >&5
12593echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
12594cat >conftest.$ac_ext <<_ACEOF
12595#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012596#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012597
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012598#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012599#include <sys/socket.h>
12600#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012601#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603int
12604main ()
12605{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012606
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012607getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012608
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ;
12610 return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext conftest$ac_exeext
12614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12615 (eval $ac_link) 2>&5
12616 ac_status=$?
12617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12618 (exit $ac_status); } &&
12619 { ac_try='test -s conftest$ac_exeext'
12620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12621 (eval $ac_try) 2>&5
12622 ac_status=$?
12623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12624 (exit $ac_status); }; }; then
12625
12626echo "$as_me:$LINENO: result: yes" >&5
12627echo "${ECHO_T}yes" >&6
12628echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
12629echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 echo "$as_me:$LINENO: result: buggy" >&5
12632echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633buggygetaddrinfo=yes
12634else
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 cat >conftest.$ac_ext <<_ACEOF
12636#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012637#include "confdefs.h"
12638
12639#include <sys/types.h>
12640#include <netdb.h>
12641#include <string.h>
12642#include <sys/socket.h>
12643#include <netinet/in.h>
12644
12645main()
12646{
12647 int passive, gaierr, inet4 = 0, inet6 = 0;
12648 struct addrinfo hints, *ai, *aitop;
12649 char straddr[INET6_ADDRSTRLEN], strport[16];
12650
12651 for (passive = 0; passive <= 1; passive++) {
12652 memset(&hints, 0, sizeof(hints));
12653 hints.ai_family = AF_UNSPEC;
12654 hints.ai_flags = passive ? AI_PASSIVE : 0;
12655 hints.ai_socktype = SOCK_STREAM;
12656 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12657 (void)gai_strerror(gaierr);
12658 goto bad;
12659 }
12660 for (ai = aitop; ai; ai = ai->ai_next) {
12661 if (ai->ai_addr == NULL ||
12662 ai->ai_addrlen == 0 ||
12663 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12664 straddr, sizeof(straddr), strport, sizeof(strport),
12665 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12666 goto bad;
12667 }
12668 switch (ai->ai_family) {
12669 case AF_INET:
12670 if (strcmp(strport, "54321") != 0) {
12671 goto bad;
12672 }
12673 if (passive) {
12674 if (strcmp(straddr, "0.0.0.0") != 0) {
12675 goto bad;
12676 }
12677 } else {
12678 if (strcmp(straddr, "127.0.0.1") != 0) {
12679 goto bad;
12680 }
12681 }
12682 inet4++;
12683 break;
12684 case AF_INET6:
12685 if (strcmp(strport, "54321") != 0) {
12686 goto bad;
12687 }
12688 if (passive) {
12689 if (strcmp(straddr, "::") != 0) {
12690 goto bad;
12691 }
12692 } else {
12693 if (strcmp(straddr, "::1") != 0) {
12694 goto bad;
12695 }
12696 }
12697 inet6++;
12698 break;
12699 case AF_UNSPEC:
12700 goto bad;
12701 break;
12702 default:
12703 /* another family support? */
12704 break;
12705 }
12706 }
12707 }
12708
12709 if (!(inet4 == 0 || inet4 == 2))
12710 goto bad;
12711 if (!(inet6 == 0 || inet6 == 2))
12712 goto bad;
12713
12714 if (aitop)
12715 freeaddrinfo(aitop);
12716 exit(0);
12717
12718 bad:
12719 if (aitop)
12720 freeaddrinfo(aitop);
12721 exit(1);
12722}
12723
Martin v. Löwis11437992002-04-12 09:54:03 +000012724_ACEOF
12725rm -f conftest$ac_exeext
12726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12727 (eval $ac_link) 2>&5
12728 ac_status=$?
12729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12732 (eval $ac_try) 2>&5
12733 ac_status=$?
12734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735 (exit $ac_status); }; }; then
12736 echo "$as_me:$LINENO: result: good" >&5
12737echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738buggygetaddrinfo=no
12739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 echo "$as_me: program exited with status $ac_status" >&5
12741echo "$as_me: failed program was:" >&5
12742cat conftest.$ac_ext >&5
12743( exit $ac_status )
12744echo "$as_me:$LINENO: result: buggy" >&5
12745echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012746buggygetaddrinfo=yes
12747fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000012748rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012749fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750else
Martin v. Löwis11437992002-04-12 09:54:03 +000012751 echo "$as_me: failed program was:" >&5
12752cat conftest.$ac_ext >&5
12753
12754echo "$as_me:$LINENO: result: no" >&5
12755echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012757
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012759rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760
12761if test "$buggygetaddrinfo" = "yes"; then
12762 if test "$ipv6" = "yes"; then
12763 echo 'Fatal: You must get working getaddrinfo() function.'
12764 echo ' or you can specify "--disable-ipv6"'.
12765 exit 1
12766 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012767else
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
12769cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012770#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012771_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012772
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012775for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776do
Martin v. Löwis11437992002-04-12 09:54:03 +000012777as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12778echo "$as_me:$LINENO: checking for $ac_func" >&5
12779echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12780if eval "test \"\${$as_ac_var+set}\" = set"; then
12781 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012782else
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 cat >conftest.$ac_ext <<_ACEOF
12784#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785#include "confdefs.h"
12786/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 which can conflict with char $ac_func (); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788#include <assert.h>
12789/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012790#ifdef __cplusplus
12791extern "C"
12792#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012793/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 builtin and then its argument prototype would still apply. */
12795char $ac_func ();
12796char (*f) ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012797
Martin v. Löwis11437992002-04-12 09:54:03 +000012798int
12799main ()
12800{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801/* The GNU C library defines this for functions which it implements
12802 to always fail with ENOSYS. Some functions are actually named
12803 something starting with __ and the normal name is an alias. */
12804#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12805choke me
12806#else
Martin v. Löwis11437992002-04-12 09:54:03 +000012807f = $ac_func;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012808#endif
12809
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ;
12811 return 0;
12812}
12813_ACEOF
12814rm -f conftest.$ac_objext conftest$ac_exeext
12815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12816 (eval $ac_link) 2>&5
12817 ac_status=$?
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12819 (exit $ac_status); } &&
12820 { ac_try='test -s conftest$ac_exeext'
12821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12822 (eval $ac_try) 2>&5
12823 ac_status=$?
12824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12825 (exit $ac_status); }; }; then
12826 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012827else
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 echo "$as_me: failed program was:" >&5
12829cat conftest.$ac_ext >&5
12830eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012833fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012834echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12835echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12836if test `eval echo '${'$as_ac_var'}'` = yes; then
12837 cat >>confdefs.h <<_ACEOF
12838#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12839_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012840
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012841fi
12842done
12843
Michael W. Hudson54241132001-12-07 15:38:26 +000012844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012845# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000012846echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12847echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12848if test "${ac_cv_header_time+set}" = set; then
12849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850else
Martin v. Löwis11437992002-04-12 09:54:03 +000012851 cat >conftest.$ac_ext <<_ACEOF
12852#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000012853#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012854#include <sys/types.h>
12855#include <sys/time.h>
12856#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858int
12859main ()
12860{
12861if ((struct tm *) 0)
12862return 0;
12863 ;
12864 return 0;
12865}
12866_ACEOF
12867rm -f conftest.$ac_objext
12868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12869 (eval $ac_compile) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); } &&
12873 { ac_try='test -s conftest.$ac_objext'
12874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12875 (eval $ac_try) 2>&5
12876 ac_status=$?
12877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12878 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880else
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 echo "$as_me: failed program was:" >&5
12882cat conftest.$ac_ext >&5
12883ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012884fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012885rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012887echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12888echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012889if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
12891cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012893_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012894
12895fi
12896
Martin v. Löwis11437992002-04-12 09:54:03 +000012897echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
12898echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
12899if test "${ac_cv_struct_tm+set}" = set; then
12900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901else
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 cat >conftest.$ac_ext <<_ACEOF
12903#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012904#include "confdefs.h"
12905#include <sys/types.h>
12906#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Martin v. Löwis11437992002-04-12 09:54:03 +000012908int
12909main ()
12910{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012911struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 ;
12913 return 0;
12914}
12915_ACEOF
12916rm -f conftest.$ac_objext
12917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12918 (eval $ac_compile) 2>&5
12919 ac_status=$?
12920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12921 (exit $ac_status); } &&
12922 { ac_try='test -s conftest.$ac_objext'
12923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12924 (eval $ac_try) 2>&5
12925 ac_status=$?
12926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12927 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928 ac_cv_struct_tm=time.h
12929else
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 echo "$as_me: failed program was:" >&5
12931cat conftest.$ac_ext >&5
12932ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012934rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012936echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
12937echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012938if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
12940cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012941#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012942_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943
12944fi
12945
Martin v. Löwis11437992002-04-12 09:54:03 +000012946echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
12947echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
12948if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
12949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950else
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 cat >conftest.$ac_ext <<_ACEOF
12952#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953#include "confdefs.h"
12954#include <sys/types.h>
12955#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
12957
Martin v. Löwis11437992002-04-12 09:54:03 +000012958int
12959main ()
12960{
12961static struct tm ac_aggr;
12962if (ac_aggr.tm_zone)
12963return 0;
12964 ;
12965 return 0;
12966}
12967_ACEOF
12968rm -f conftest.$ac_objext
12969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12970 (eval $ac_compile) 2>&5
12971 ac_status=$?
12972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12973 (exit $ac_status); } &&
12974 { ac_try='test -s conftest.$ac_objext'
12975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12976 (eval $ac_try) 2>&5
12977 ac_status=$?
12978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979 (exit $ac_status); }; }; then
12980 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000012981else
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 echo "$as_me: failed program was:" >&5
12983cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +000012984cat >conftest.$ac_ext <<_ACEOF
12985#line $LINENO "configure"
12986#include "confdefs.h"
12987#include <sys/types.h>
12988#include <$ac_cv_struct_tm>
12989
12990
12991int
12992main ()
12993{
12994static struct tm ac_aggr;
12995if (sizeof ac_aggr.tm_zone)
12996return 0;
12997 ;
12998 return 0;
12999}
13000_ACEOF
13001rm -f conftest.$ac_objext
13002if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13003 (eval $ac_compile) 2>&5
13004 ac_status=$?
13005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13006 (exit $ac_status); } &&
13007 { ac_try='test -s conftest.$ac_objext'
13008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13009 (eval $ac_try) 2>&5
13010 ac_status=$?
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); }; }; then
13013 ac_cv_member_struct_tm_tm_zone=yes
13014else
13015 echo "$as_me: failed program was:" >&5
13016cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013017ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013018fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013019rm -f conftest.$ac_objext conftest.$ac_ext
13020fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000013021rm -f conftest.$ac_objext conftest.$ac_ext
13022fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013023echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
13024echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
13025if test $ac_cv_member_struct_tm_tm_zone = yes; then
13026
13027cat >>confdefs.h <<_ACEOF
13028#define HAVE_STRUCT_TM_TM_ZONE 1
13029_ACEOF
13030
13031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013033
Martin v. Löwis11437992002-04-12 09:54:03 +000013034if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13035
13036cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013038_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013039
13040else
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 echo "$as_me:$LINENO: checking for tzname" >&5
13042echo $ECHO_N "checking for tzname... $ECHO_C" >&6
13043if test "${ac_cv_var_tzname+set}" = set; then
13044 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 cat >conftest.$ac_ext <<_ACEOF
13047#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013048#include "confdefs.h"
13049#include <time.h>
13050#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054int
13055main ()
13056{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013057atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ;
13059 return 0;
13060}
13061_ACEOF
13062rm -f conftest.$ac_objext conftest$ac_exeext
13063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13064 (eval $ac_link) 2>&5
13065 ac_status=$?
13066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067 (exit $ac_status); } &&
13068 { ac_try='test -s conftest$ac_exeext'
13069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13070 (eval $ac_try) 2>&5
13071 ac_status=$?
13072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074 ac_cv_var_tzname=yes
13075else
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 echo "$as_me: failed program was:" >&5
13077cat conftest.$ac_ext >&5
13078ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013080rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013082echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
13083echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013084 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013085
13086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013088_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013090 fi
13091fi
13092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
13094echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
13095if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
13096 echo $ECHO_N "(cached) $ECHO_C" >&6
13097else
13098 cat >conftest.$ac_ext <<_ACEOF
13099#line $LINENO "configure"
13100#include "confdefs.h"
13101$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013102int
13103main ()
13104{
13105static struct stat ac_aggr;
13106if (ac_aggr.st_rdev)
13107return 0;
13108 ;
13109 return 0;
13110}
13111_ACEOF
13112rm -f conftest.$ac_objext
13113if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13114 (eval $ac_compile) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); } &&
13118 { ac_try='test -s conftest.$ac_objext'
13119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13120 (eval $ac_try) 2>&5
13121 ac_status=$?
13122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123 (exit $ac_status); }; }; then
13124 ac_cv_member_struct_stat_st_rdev=yes
13125else
13126 echo "$as_me: failed program was:" >&5
13127cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +000013128cat >conftest.$ac_ext <<_ACEOF
13129#line $LINENO "configure"
13130#include "confdefs.h"
13131$ac_includes_default
13132int
13133main ()
13134{
13135static struct stat ac_aggr;
13136if (sizeof ac_aggr.st_rdev)
13137return 0;
13138 ;
13139 return 0;
13140}
13141_ACEOF
13142rm -f conftest.$ac_objext
13143if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13144 (eval $ac_compile) 2>&5
13145 ac_status=$?
13146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13147 (exit $ac_status); } &&
13148 { ac_try='test -s conftest.$ac_objext'
13149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13150 (eval $ac_try) 2>&5
13151 ac_status=$?
13152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13153 (exit $ac_status); }; }; then
13154 ac_cv_member_struct_stat_st_rdev=yes
13155else
13156 echo "$as_me: failed program was:" >&5
13157cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013158ac_cv_member_struct_stat_st_rdev=no
13159fi
13160rm -f conftest.$ac_objext conftest.$ac_ext
13161fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000013162rm -f conftest.$ac_objext conftest.$ac_ext
13163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013164echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
13165echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
13166if test $ac_cv_member_struct_stat_st_rdev = yes; then
13167
13168cat >>confdefs.h <<_ACEOF
13169#define HAVE_STRUCT_STAT_ST_RDEV 1
13170_ACEOF
13171
13172
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013173fi
13174
Martin v. Löwis11437992002-04-12 09:54:03 +000013175echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
13176echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
13177if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
13178 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 cat >conftest.$ac_ext <<_ACEOF
13181#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013182#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013183$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013184int
13185main ()
13186{
13187static struct stat ac_aggr;
13188if (ac_aggr.st_blksize)
13189return 0;
13190 ;
13191 return 0;
13192}
13193_ACEOF
13194rm -f conftest.$ac_objext
13195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13196 (eval $ac_compile) 2>&5
13197 ac_status=$?
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); } &&
13200 { ac_try='test -s conftest.$ac_objext'
13201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13202 (eval $ac_try) 2>&5
13203 ac_status=$?
13204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13205 (exit $ac_status); }; }; then
13206 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013207else
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 echo "$as_me: failed program was:" >&5
13209cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +000013210cat >conftest.$ac_ext <<_ACEOF
13211#line $LINENO "configure"
13212#include "confdefs.h"
13213$ac_includes_default
13214int
13215main ()
13216{
13217static struct stat ac_aggr;
13218if (sizeof ac_aggr.st_blksize)
13219return 0;
13220 ;
13221 return 0;
13222}
13223_ACEOF
13224rm -f conftest.$ac_objext
13225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13226 (eval $ac_compile) 2>&5
13227 ac_status=$?
13228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13229 (exit $ac_status); } &&
13230 { ac_try='test -s conftest.$ac_objext'
13231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13232 (eval $ac_try) 2>&5
13233 ac_status=$?
13234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235 (exit $ac_status); }; }; then
13236 ac_cv_member_struct_stat_st_blksize=yes
13237else
13238 echo "$as_me: failed program was:" >&5
13239cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013240ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013242rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013243fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000013244rm -f conftest.$ac_objext conftest.$ac_ext
13245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013246echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
13247echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
13248if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013249
Martin v. Löwis11437992002-04-12 09:54:03 +000013250cat >>confdefs.h <<_ACEOF
13251#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13252_ACEOF
13253
13254
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013255fi
13256
Martin v. Löwis11437992002-04-12 09:54:03 +000013257echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
13258echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
13259if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
13260 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013261else
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 cat >conftest.$ac_ext <<_ACEOF
13263#line $LINENO "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013264#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013265$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013266int
13267main ()
13268{
13269static struct stat ac_aggr;
13270if (ac_aggr.st_blocks)
13271return 0;
13272 ;
13273 return 0;
13274}
13275_ACEOF
13276rm -f conftest.$ac_objext
13277if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13278 (eval $ac_compile) 2>&5
13279 ac_status=$?
13280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13281 (exit $ac_status); } &&
13282 { ac_try='test -s conftest.$ac_objext'
13283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13284 (eval $ac_try) 2>&5
13285 ac_status=$?
13286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13287 (exit $ac_status); }; }; then
13288 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000013289else
Martin v. Löwis11437992002-04-12 09:54:03 +000013290 echo "$as_me: failed program was:" >&5
13291cat conftest.$ac_ext >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +000013292cat >conftest.$ac_ext <<_ACEOF
13293#line $LINENO "configure"
13294#include "confdefs.h"
13295$ac_includes_default
13296int
13297main ()
13298{
13299static struct stat ac_aggr;
13300if (sizeof ac_aggr.st_blocks)
13301return 0;
13302 ;
13303 return 0;
13304}
13305_ACEOF
13306rm -f conftest.$ac_objext
13307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13308 (eval $ac_compile) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); } &&
13312 { ac_try='test -s conftest.$ac_objext'
13313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314 (eval $ac_try) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); }; }; then
13318 ac_cv_member_struct_stat_st_blocks=yes
13319else
13320 echo "$as_me: failed program was:" >&5
13321cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013322ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000013323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013324rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013325fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000013326rm -f conftest.$ac_objext conftest.$ac_ext
13327fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013328echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
13329echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
13330if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000013331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332cat >>confdefs.h <<_ACEOF
13333#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13334_ACEOF
13335
13336
13337cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013338#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013339_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013340
13341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013343fi
13344
Michael W. Hudson54241132001-12-07 15:38:26 +000013345
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
13348echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
13349if test "${ac_cv_header_time_altzone+set}" = set; then
13350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013351else
Martin v. Löwis11437992002-04-12 09:54:03 +000013352 cat >conftest.$ac_ext <<_ACEOF
13353#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013354#include "confdefs.h"
13355#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013356int
13357main ()
13358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ;
13361 return 0;
13362}
13363_ACEOF
13364rm -f conftest.$ac_objext
13365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13366 (eval $ac_compile) 2>&5
13367 ac_status=$?
13368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13369 (exit $ac_status); } &&
13370 { ac_try='test -s conftest.$ac_objext'
13371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13372 (eval $ac_try) 2>&5
13373 ac_status=$?
13374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13375 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013376 ac_cv_header_time_altzone=yes
13377else
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 echo "$as_me: failed program was:" >&5
13379cat conftest.$ac_ext >&5
13380ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013381fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013382rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013383fi
13384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
13386echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
13389cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013390#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013391_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013392
13393fi
13394
Guido van Rossumda88dad1995-01-26 00:46:29 +000013395was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013396echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
13397echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
13398cat >conftest.$ac_ext <<_ACEOF
13399#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013400#include "confdefs.h"
13401
13402#include <sys/types.h>
13403#include <sys/select.h>
13404#include <sys/time.h>
13405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409;
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
13414rm -f conftest.$ac_objext
13415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13416 (eval $ac_compile) 2>&5
13417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); } &&
13420 { ac_try='test -s conftest.$ac_objext'
13421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; }; then
13426
13427
13428cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013430_ACEOF
13431
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013432 was_it_defined=yes
13433
Guido van Rossumf78abae1997-01-21 22:02:36 +000013434else
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 echo "$as_me: failed program was:" >&5
13436cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013438rm -f conftest.$ac_objext conftest.$ac_ext
13439echo "$as_me:$LINENO: result: $was_it_defined" >&5
13440echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442echo "$as_me:$LINENO: checking for addrinfo" >&5
13443echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
13444if test "${ac_cv_struct_addrinfo+set}" = set; then
13445 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013446else
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 cat >conftest.$ac_ext <<_ACEOF
13448#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013449#include "confdefs.h"
13450
13451# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013452int
13453main ()
13454{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013455struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 ;
13457 return 0;
13458}
13459_ACEOF
13460rm -f conftest.$ac_objext
13461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13462 (eval $ac_compile) 2>&5
13463 ac_status=$?
13464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13465 (exit $ac_status); } &&
13466 { ac_try='test -s conftest.$ac_objext'
13467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13468 (eval $ac_try) 2>&5
13469 ac_status=$?
13470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013472 ac_cv_struct_addrinfo=yes
13473else
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 echo "$as_me: failed program was:" >&5
13475cat conftest.$ac_ext >&5
13476ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013478rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013479fi
13480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
13482echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013483if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
13485cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013486#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013487_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013488
13489fi
13490
Martin v. Löwis11437992002-04-12 09:54:03 +000013491echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
13492echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
13493if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
13494 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013495else
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 cat >conftest.$ac_ext <<_ACEOF
13497#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013498#include "confdefs.h"
13499
13500# include <sys/types.h>
13501# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013502int
13503main ()
13504{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013505struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 ;
13507 return 0;
13508}
13509_ACEOF
13510rm -f conftest.$ac_objext
13511if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13512 (eval $ac_compile) 2>&5
13513 ac_status=$?
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); } &&
13516 { ac_try='test -s conftest.$ac_objext'
13517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13518 (eval $ac_try) 2>&5
13519 ac_status=$?
13520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13521 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013522 ac_cv_struct_sockaddr_storage=yes
13523else
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 echo "$as_me: failed program was:" >&5
13525cat conftest.$ac_ext >&5
13526ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013528rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013529fi
13530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
13532echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013533if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
13535cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013536#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013537_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013538
13539fi
13540
Guido van Rossum627b2d71993-12-24 10:39:16 +000013541# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542
Michael W. Hudson54241132001-12-07 15:38:26 +000013543
Martin v. Löwis11437992002-04-12 09:54:03 +000013544echo "$as_me:$LINENO: checking whether char is unsigned" >&5
13545echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
13546if test "${ac_cv_c_char_unsigned+set}" = set; then
13547 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013548else
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 cat >conftest.$ac_ext <<_ACEOF
13550#line $LINENO "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +000013551#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
13556static int test_array [1 - 2 * !(((char) -1) < 0)];
13557test_array [0] = 0
13558
13559 ;
13560 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013561}
Martin v. Löwis11437992002-04-12 09:54:03 +000013562_ACEOF
13563rm -f conftest.$ac_objext
13564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13565 (eval $ac_compile) 2>&5
13566 ac_status=$?
13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568 (exit $ac_status); } &&
13569 { ac_try='test -s conftest.$ac_objext'
13570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13571 (eval $ac_try) 2>&5
13572 ac_status=$?
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000013575 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013576else
13577 echo "$as_me: failed program was:" >&5
13578cat conftest.$ac_ext >&5
13579ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013581rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013582fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013583echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
13584echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013585if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013588_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013589
13590fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
13593echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13594if test "${ac_cv_c_const+set}" = set; then
13595 echo $ECHO_N "(cached) $ECHO_C" >&6
13596else
13597 cat >conftest.$ac_ext <<_ACEOF
13598#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013599#include "confdefs.h"
13600
Martin v. Löwis11437992002-04-12 09:54:03 +000013601int
13602main ()
13603{
13604/* FIXME: Include the comments suggested by Paul. */
13605#ifndef __cplusplus
13606 /* Ultrix mips cc rejects this. */
13607 typedef int charset[2];
13608 const charset x;
13609 /* SunOS 4.1.1 cc rejects this. */
13610 char const *const *ccp;
13611 char **p;
13612 /* NEC SVR4.0.2 mips cc rejects this. */
13613 struct point {int x, y;};
13614 static struct point const zero = {0,0};
13615 /* AIX XL C 1.02.0.0 rejects this.
13616 It does not let you subtract one const X* pointer from another in
13617 an arm of an if-expression whose if-part is not a constant
13618 expression */
13619 const char *g = "string";
13620 ccp = &g + (g ? g-g : 0);
13621 /* HPUX 7.0 cc rejects these. */
13622 ++ccp;
13623 p = (char**) ccp;
13624 ccp = (char const *const *) p;
13625 { /* SCO 3.2v4 cc rejects this. */
13626 char *t;
13627 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 *t++ = 0;
13630 }
13631 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13632 int x[] = {25, 17};
13633 const int *foo = &x[0];
13634 ++foo;
13635 }
13636 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13637 typedef const int *iptr;
13638 iptr p = 0;
13639 ++p;
13640 }
13641 { /* AIX XL C 1.02.0.0 rejects this saying
13642 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13643 struct s { int j; const int *ap[3]; };
13644 struct s *b; b->j = 5;
13645 }
13646 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13647 const int foo = 10;
13648 }
13649#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651 ;
13652 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013653}
Martin v. Löwis11437992002-04-12 09:54:03 +000013654_ACEOF
13655rm -f conftest.$ac_objext
13656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13657 (eval $ac_compile) 2>&5
13658 ac_status=$?
13659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } &&
13661 { ac_try='test -s conftest.$ac_objext'
13662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13663 (eval $ac_try) 2>&5
13664 ac_status=$?
13665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13666 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013667 ac_cv_c_const=yes
13668else
Martin v. Löwis11437992002-04-12 09:54:03 +000013669 echo "$as_me: failed program was:" >&5
13670cat conftest.$ac_ext >&5
13671ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013673rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013675echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
13676echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
13679cat >>confdefs.h <<\_ACEOF
13680#define const
13681_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682
13683fi
13684
Michael W. Hudson54241132001-12-07 15:38:26 +000013685
Guido van Rossumda88dad1995-01-26 00:46:29 +000013686works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013687echo "$as_me:$LINENO: checking for working volatile" >&5
13688echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
13689cat >conftest.$ac_ext <<_ACEOF
13690#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013691#include "confdefs.h"
13692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693int
13694main ()
13695{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013696volatile int x; x = 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 Rossumda88dad1995-01-26 00:46:29 +000013713 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013714else
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
13719#define volatile
13720_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013721
Martin v. Löwisc45929e2002-04-06 10:10:49 +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
13725echo "$as_me:$LINENO: result: $works" >&5
13726echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013727
Guido van Rossumda88dad1995-01-26 00:46:29 +000013728works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013729echo "$as_me:$LINENO: checking for working signed char" >&5
13730echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
13731cat >conftest.$ac_ext <<_ACEOF
13732#line $LINENO "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013733#include "confdefs.h"
13734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735int
13736main ()
13737{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ;
13740 return 0;
13741}
13742_ACEOF
13743rm -f conftest.$ac_objext
13744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13745 (eval $ac_compile) 2>&5
13746 ac_status=$?
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); } &&
13749 { ac_try='test -s conftest.$ac_objext'
13750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13751 (eval $ac_try) 2>&5
13752 ac_status=$?
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000013755 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013756else
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me: failed program was:" >&5
13758cat conftest.$ac_ext >&5
13759
13760cat >>confdefs.h <<\_ACEOF
13761#define signed
13762_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000013763
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013764
Guido van Rossum7f43da71994-08-01 12:15:30 +000013765fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013766rm -f conftest.$ac_objext conftest.$ac_ext
13767echo "$as_me:$LINENO: result: $works" >&5
13768echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000013769
Guido van Rossumda88dad1995-01-26 00:46:29 +000013770have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013771echo "$as_me:$LINENO: checking for prototypes" >&5
13772echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
13773cat >conftest.$ac_ext <<_ACEOF
13774#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013775#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013776int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013777int
13778main ()
13779{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ;
13782 return 0;
13783}
13784_ACEOF
13785rm -f conftest.$ac_objext
13786if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13787 (eval $ac_compile) 2>&5
13788 ac_status=$?
13789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790 (exit $ac_status); } &&
13791 { ac_try='test -s conftest.$ac_objext'
13792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793 (eval $ac_try) 2>&5
13794 ac_status=$?
13795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796 (exit $ac_status); }; }; then
13797
13798
13799cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013801_ACEOF
13802
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013803 have_prototypes=yes
13804
Guido van Rossumf78abae1997-01-21 22:02:36 +000013805else
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 echo "$as_me: failed program was:" >&5
13807cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013808fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013809rm -f conftest.$ac_objext conftest.$ac_ext
13810echo "$as_me:$LINENO: result: $have_prototypes" >&5
13811echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812
Guido van Rossumda88dad1995-01-26 00:46:29 +000013813works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013814echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
13815echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
13816cat >conftest.$ac_ext <<_ACEOF
13817#line $LINENO "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013818#include "confdefs.h"
13819
13820#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013821int foo(int x, ...) {
13822 va_list va;
13823 va_start(va, x);
13824 va_arg(va, int);
13825 va_arg(va, char *);
13826 va_arg(va, double);
13827 return 0;
13828}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Guido van Rossum90eea071996-08-30 20:58:57 +000013833return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext
13839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13840 (eval $ac_compile) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); } &&
13844 { ac_try='test -s conftest.$ac_objext'
13845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); }; }; then
13850
13851
13852cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013854_ACEOF
13855
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013856 works=yes
13857
Guido van Rossumf78abae1997-01-21 22:02:36 +000013858else
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 echo "$as_me: failed program was:" >&5
13860cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +000013861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013862rm -f conftest.$ac_objext conftest.$ac_ext
13863echo "$as_me:$LINENO: result: $works" >&5
13864echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013865
Guido van Rossumda88dad1995-01-26 00:46:29 +000013866if test "$have_prototypes" = yes; then
13867bad_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013868echo "$as_me:$LINENO: checking for bad exec* prototypes" >&5
13869echo $ECHO_N "checking for bad exec* prototypes... $ECHO_C" >&6
13870cat >conftest.$ac_ext <<_ACEOF
13871#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872#include "confdefs.h"
13873#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877char **t;execve("@",t,t);
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
13882rm -f conftest.$ac_objext
13883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13884 (eval $ac_compile) 2>&5
13885 ac_status=$?
13886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13887 (exit $ac_status); } &&
13888 { ac_try='test -s conftest.$ac_objext'
13889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13890 (eval $ac_try) 2>&5
13891 ac_status=$?
13892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13893 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000013894 :
13895else
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 echo "$as_me: failed program was:" >&5
13897cat conftest.$ac_ext >&5
13898
13899cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900#define BAD_EXEC_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013901_ACEOF
13902
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013903 bad_prototypes=yes
13904
Guido van Rossum627b2d71993-12-24 10:39:16 +000013905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013906rm -f conftest.$ac_objext conftest.$ac_ext
13907echo "$as_me:$LINENO: result: $bad_prototypes" >&5
13908echo "${ECHO_T}$bad_prototypes" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000013909fi
13910
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013911# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000013912echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
13913echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
13914cat >conftest.$ac_ext <<_ACEOF
13915#line $LINENO "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013916#include "confdefs.h"
13917#include <sys/types.h>
13918#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013919int
13920main ()
13921{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013922struct sockaddr x;
13923x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 ;
13925 return 0;
13926}
13927_ACEOF
13928rm -f conftest.$ac_objext
13929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13930 (eval $ac_compile) 2>&5
13931 ac_status=$?
13932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13933 (exit $ac_status); } &&
13934 { ac_try='test -s conftest.$ac_objext'
13935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936 (eval $ac_try) 2>&5
13937 ac_status=$?
13938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939 (exit $ac_status); }; }; then
13940 echo "$as_me:$LINENO: result: yes" >&5
13941echo "${ECHO_T}yes" >&6
13942
13943cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013944#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013945_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013946
13947else
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 echo "$as_me: failed program was:" >&5
13949cat conftest.$ac_ext >&5
13950echo "$as_me:$LINENO: result: no" >&5
13951echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013953rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013954
Guido van Rossumda88dad1995-01-26 00:46:29 +000013955va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013956echo "$as_me:$LINENO: checking whether va_list is an array" >&5
13957echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
13958cat >conftest.$ac_ext <<_ACEOF
13959#line $LINENO "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960#include "confdefs.h"
13961
13962#ifdef HAVE_STDARG_PROTOTYPES
13963#include <stdarg.h>
13964#else
13965#include <varargs.h>
13966#endif
13967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968int
13969main ()
13970{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013971va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 ;
13973 return 0;
13974}
13975_ACEOF
13976rm -f conftest.$ac_objext
13977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13978 (eval $ac_compile) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); } &&
13982 { ac_try='test -s conftest.$ac_objext'
13983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13984 (eval $ac_try) 2>&5
13985 ac_status=$?
13986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13987 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013988 :
13989else
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 echo "$as_me: failed program was:" >&5
13991cat conftest.$ac_ext >&5
13992
13993
13994cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013996_ACEOF
13997
Guido van Rossumda88dad1995-01-26 00:46:29 +000013998 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014000fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014001rm -f conftest.$ac_objext conftest.$ac_ext
14002echo "$as_me:$LINENO: result: $va_list_is_array" >&5
14003echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014004
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014005# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
14007
14008
14009echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
14010echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
14011if test "${ac_cv_func_gethostbyname_r+set}" = set; then
14012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013else
Martin v. Löwis11437992002-04-12 09:54:03 +000014014 cat >conftest.$ac_ext <<_ACEOF
14015#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016#include "confdefs.h"
14017/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 which can conflict with char gethostbyname_r (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014019#include <assert.h>
14020/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014021#ifdef __cplusplus
14022extern "C"
14023#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 builtin and then its argument prototype would still apply. */
14026char gethostbyname_r ();
14027char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028
Martin v. Löwis11437992002-04-12 09:54:03 +000014029int
14030main ()
14031{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032/* The GNU C library defines this for functions which it implements
14033 to always fail with ENOSYS. Some functions are actually named
14034 something starting with __ and the normal name is an alias. */
14035#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
14036choke me
14037#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014038f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039#endif
14040
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ;
14042 return 0;
14043}
14044_ACEOF
14045rm -f conftest.$ac_objext conftest$ac_exeext
14046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14047 (eval $ac_link) 2>&5
14048 ac_status=$?
14049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14050 (exit $ac_status); } &&
14051 { ac_try='test -s conftest$ac_exeext'
14052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14053 (eval $ac_try) 2>&5
14054 ac_status=$?
14055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14056 (exit $ac_status); }; }; then
14057 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014058else
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 echo "$as_me: failed program was:" >&5
14060cat conftest.$ac_ext >&5
14061ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014063rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014065echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
14066echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
14067if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014070#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014071_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014072
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
14074echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075 OLD_CFLAGS=$CFLAGS
14076 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 cat >conftest.$ac_ext <<_ACEOF
14078#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079#include "confdefs.h"
14080
14081# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
Martin v. Löwis11437992002-04-12 09:54:03 +000014083int
14084main ()
14085{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014086
14087 char *name;
14088 struct hostent *he, *res;
14089 char buffer[2048];
14090 int buflen = 2048;
14091 int h_errnop;
14092
14093 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099rm -f conftest.$ac_objext
14100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14101 (eval $ac_compile) 2>&5
14102 ac_status=$?
14103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14104 (exit $ac_status); } &&
14105 { ac_try='test -s conftest.$ac_objext'
14106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14107 (eval $ac_try) 2>&5
14108 ac_status=$?
14109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14110 (exit $ac_status); }; }; then
14111
14112 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014113#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014114_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014115
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
14117cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014118#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014119_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014120
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 echo "$as_me:$LINENO: result: yes" >&5
14122echo "${ECHO_T}yes" >&6
14123
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014124else
Martin v. Löwis11437992002-04-12 09:54:03 +000014125 echo "$as_me: failed program was:" >&5
14126cat conftest.$ac_ext >&5
14127
14128 echo "$as_me:$LINENO: result: no" >&5
14129echo "${ECHO_T}no" >&6
14130 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
14131echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
14132 cat >conftest.$ac_ext <<_ACEOF
14133#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014134#include "confdefs.h"
14135
14136# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138int
14139main ()
14140{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014141
14142 char *name;
14143 struct hostent *he;
14144 char buffer[2048];
14145 int buflen = 2048;
14146 int h_errnop;
14147
14148 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
14150 ;
14151 return 0;
14152}
14153_ACEOF
14154rm -f conftest.$ac_objext
14155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14156 (eval $ac_compile) 2>&5
14157 ac_status=$?
14158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14159 (exit $ac_status); } &&
14160 { ac_try='test -s conftest.$ac_objext'
14161 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14162 (eval $ac_try) 2>&5
14163 ac_status=$?
14164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165 (exit $ac_status); }; }; then
14166
14167 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014168#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014169_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014170
Martin v. Löwis11437992002-04-12 09:54:03 +000014171
14172cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014173#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014174_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014175
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 echo "$as_me:$LINENO: result: yes" >&5
14177echo "${ECHO_T}yes" >&6
14178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014179else
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 echo "$as_me: failed program was:" >&5
14181cat conftest.$ac_ext >&5
14182
14183 echo "$as_me:$LINENO: result: no" >&5
14184echo "${ECHO_T}no" >&6
14185 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
14186echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
14187 cat >conftest.$ac_ext <<_ACEOF
14188#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014189#include "confdefs.h"
14190
14191# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
Martin v. Löwis11437992002-04-12 09:54:03 +000014193int
14194main ()
14195{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014196
14197 char *name;
14198 struct hostent *he;
14199 struct hostent_data data;
14200
14201 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
14203 ;
14204 return 0;
14205}
14206_ACEOF
14207rm -f conftest.$ac_objext
14208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14209 (eval $ac_compile) 2>&5
14210 ac_status=$?
14211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212 (exit $ac_status); } &&
14213 { ac_try='test -s conftest.$ac_objext'
14214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215 (eval $ac_try) 2>&5
14216 ac_status=$?
14217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); }; }; then
14219
14220 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014221#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014222_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014223
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
14225cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014226#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014227_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 echo "$as_me:$LINENO: result: yes" >&5
14230echo "${ECHO_T}yes" >&6
14231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014232else
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 echo "$as_me: failed program was:" >&5
14234cat conftest.$ac_ext >&5
14235
14236 echo "$as_me:$LINENO: result: no" >&5
14237echo "${ECHO_T}no" >&6
14238
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014239fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014240rm -f conftest.$ac_objext conftest.$ac_ext
14241
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014243rm -f conftest.$ac_objext conftest.$ac_ext
14244
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014245fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014246rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014247 CFLAGS=$OLD_CFLAGS
14248
14249else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000014253do
Martin v. Löwis11437992002-04-12 09:54:03 +000014254as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14255echo "$as_me:$LINENO: checking for $ac_func" >&5
14256echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14257if eval "test \"\${$as_ac_var+set}\" = set"; then
14258 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014259else
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 cat >conftest.$ac_ext <<_ACEOF
14261#line $LINENO "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014262#include "confdefs.h"
14263/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014264 which can conflict with char $ac_func (); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014265#include <assert.h>
14266/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014267#ifdef __cplusplus
14268extern "C"
14269#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014270/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014271 builtin and then its argument prototype would still apply. */
14272char $ac_func ();
14273char (*f) ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014274
Martin v. Löwis11437992002-04-12 09:54:03 +000014275int
14276main ()
14277{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014278/* The GNU C library defines this for functions which it implements
14279 to always fail with ENOSYS. Some functions are actually named
14280 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014282choke me
14283#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014284f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014285#endif
14286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ;
14288 return 0;
14289}
14290_ACEOF
14291rm -f conftest.$ac_objext conftest$ac_exeext
14292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14293 (eval $ac_link) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); } &&
14297 { ac_try='test -s conftest$ac_exeext'
14298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014304else
Martin v. Löwis11437992002-04-12 09:54:03 +000014305 echo "$as_me: failed program was:" >&5
14306cat conftest.$ac_ext >&5
14307eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014308fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014309rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014310fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014311echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14312echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14313if test `eval echo '${'$as_ac_var'}'` = yes; then
14314 cat >>confdefs.h <<_ACEOF
14315#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14316_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014317
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014318fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014319done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014320
Michael W. Hudson54241132001-12-07 15:38:26 +000014321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014322fi
14323
Michael W. Hudson54241132001-12-07 15:38:26 +000014324
14325
14326
14327
14328
14329
Guido van Rossum627b2d71993-12-24 10:39:16 +000014330# checks for system services
14331# (none yet)
14332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014333# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000014334echo "$as_me:$LINENO: checking for __fpu_control" >&5
14335echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
14336if test "${ac_cv_func___fpu_control+set}" = set; then
14337 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014338else
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 cat >conftest.$ac_ext <<_ACEOF
14340#line $LINENO "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014341#include "confdefs.h"
14342/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 which can conflict with char __fpu_control (); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014344#include <assert.h>
14345/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014346#ifdef __cplusplus
14347extern "C"
14348#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014349/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 builtin and then its argument prototype would still apply. */
14351char __fpu_control ();
14352char (*f) ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014353
Martin v. Löwis11437992002-04-12 09:54:03 +000014354int
14355main ()
14356{
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014357/* The GNU C library defines this for functions which it implements
14358 to always fail with ENOSYS. Some functions are actually named
14359 something starting with __ and the normal name is an alias. */
14360#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
14361choke me
14362#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014363f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014364#endif
14365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ;
14367 return 0;
14368}
14369_ACEOF
14370rm -f conftest.$ac_objext conftest$ac_exeext
14371if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14372 (eval $ac_link) 2>&5
14373 ac_status=$?
14374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); } &&
14376 { ac_try='test -s conftest$ac_exeext'
14377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
14382 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014383else
Martin v. Löwis11437992002-04-12 09:54:03 +000014384 echo "$as_me: failed program was:" >&5
14385cat conftest.$ac_ext >&5
14386ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014387fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014389fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014390echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
14391echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
14392if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014393 :
14394else
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
14396echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
14397echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
14398if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014400else
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014402LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014403cat >conftest.$ac_ext <<_ACEOF
14404#line $LINENO "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +000014405#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014407/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014408#ifdef __cplusplus
14409extern "C"
14410#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014411/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 builtin and then its argument prototype would still apply. */
14413char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014414int
14415main ()
14416{
14417__fpu_control ();
14418 ;
14419 return 0;
14420}
14421_ACEOF
14422rm -f conftest.$ac_objext conftest$ac_exeext
14423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14424 (eval $ac_link) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); } &&
14428 { ac_try='test -s conftest$ac_exeext'
14429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); }; }; then
14434 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 echo "$as_me: failed program was:" >&5
14437cat conftest.$ac_ext >&5
14438ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014443echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
14444echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
14445if test $ac_cv_lib_ieee___fpu_control = yes; then
14446 cat >>confdefs.h <<_ACEOF
14447#define HAVE_LIBIEEE 1
14448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014450 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014451
Guido van Rossum627b2d71993-12-24 10:39:16 +000014452fi
14453
Michael W. Hudson54241132001-12-07 15:38:26 +000014454
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014455fi
14456
Michael W. Hudson54241132001-12-07 15:38:26 +000014457
Guido van Rossum7f253911997-05-09 02:42:48 +000014458# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000014459echo "$as_me:$LINENO: checking for --with-fpectl" >&5
14460echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
14461
Guido van Rossum7f253911997-05-09 02:42:48 +000014462# Check whether --with-fpectl or --without-fpectl was given.
14463if test "${with_fpectl+set}" = set; then
14464 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Guido van Rossum7f253911997-05-09 02:42:48 +000014466if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014467then
14468
14469cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000014470#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
14472
14473 echo "$as_me:$LINENO: result: yes" >&5
14474echo "${ECHO_T}yes" >&6
14475else echo "$as_me:$LINENO: result: no" >&5
14476echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014477fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014478else
Martin v. Löwis11437992002-04-12 09:54:03 +000014479 echo "$as_me:$LINENO: result: no" >&5
14480echo "${ECHO_T}no" >&6
14481fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000014482
Guido van Rossum7f43da71994-08-01 12:15:30 +000014483# check for --with-libm=...
14484
Guido van Rossum563e7081996-09-10 18:20:48 +000014485case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014486Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014487BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014488*) LIBM=-lm
14489esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014490echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
14491echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
14492
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014493# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014494if test "${with_libm+set}" = set; then
14495 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000014496
Guido van Rossum7f253911997-05-09 02:42:48 +000014497if test "$withval" = no
14498then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 echo "$as_me:$LINENO: result: force LIBM empty" >&5
14500echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014501elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014502then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
14504echo "${ECHO_T}set LIBM=\"$withval\"" >&6
14505else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
14506echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
14507 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014508fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014509else
Martin v. Löwis11437992002-04-12 09:54:03 +000014510 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
14511echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
14512fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014513
14514# check for --with-libc=...
14515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
14517echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
14518
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014519# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014520if test "${with_libc+set}" = set; then
14521 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
Guido van Rossum7f253911997-05-09 02:42:48 +000014523if test "$withval" = no
14524then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000014525 echo "$as_me:$LINENO: result: force LIBC empty" >&5
14526echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000014527elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014528then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
14530echo "${ECHO_T}set LIBC=\"$withval\"" >&6
14531else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
14532echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
14533 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000014534fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
14537echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
14538fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014539
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014540# check for hypot() in math library
14541LIBS_SAVE=$LIBS
14542LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014544for ac_func in hypot
14545do
Martin v. Löwis11437992002-04-12 09:54:03 +000014546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14547echo "$as_me:$LINENO: checking for $ac_func" >&5
14548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14549if eval "test \"\${$as_ac_var+set}\" = set"; then
14550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014551else
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 cat >conftest.$ac_ext <<_ACEOF
14553#line $LINENO "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014554#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014555/* System header to define __stub macros and hopefully few prototypes,
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 which can conflict with char $ac_func (); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014557#include <assert.h>
14558/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014559#ifdef __cplusplus
14560extern "C"
14561#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014562/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 builtin and then its argument prototype would still apply. */
14564char $ac_func ();
14565char (*f) ();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014566
Martin v. Löwis11437992002-04-12 09:54:03 +000014567int
14568main ()
14569{
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014570/* The GNU C library defines this for functions which it implements
14571 to always fail with ENOSYS. Some functions are actually named
14572 something starting with __ and the normal name is an alias. */
14573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14574choke me
14575#else
Martin v. Löwis11437992002-04-12 09:54:03 +000014576f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014577#endif
14578
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ;
14580 return 0;
14581}
14582_ACEOF
14583rm -f conftest.$ac_objext conftest$ac_exeext
14584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14585 (eval $ac_link) 2>&5
14586 ac_status=$?
14587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588 (exit $ac_status); } &&
14589 { ac_try='test -s conftest$ac_exeext'
14590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14591 (eval $ac_try) 2>&5
14592 ac_status=$?
14593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14594 (exit $ac_status); }; }; then
14595 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014596else
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 echo "$as_me: failed program was:" >&5
14598cat conftest.$ac_ext >&5
14599eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014600fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014601rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014602fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014603echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14604echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14605if test `eval echo '${'$as_ac_var'}'` = yes; then
14606 cat >>confdefs.h <<_ACEOF
14607#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14608_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014609
Michael W. Hudson54241132001-12-07 15:38:26 +000014610else
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014612fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000014613done
14614
Michael W. Hudson54241132001-12-07 15:38:26 +000014615
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014616LIBS=$LIBS_SAVE
14617
Guido van Rossumef2255b2000-03-10 22:30:29 +000014618# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014619if test "${ac_cv_header_wchar_h+set}" = set; then
14620 echo "$as_me:$LINENO: checking for wchar.h" >&5
14621echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14622if test "${ac_cv_header_wchar_h+set}" = set; then
14623 echo $ECHO_N "(cached) $ECHO_C" >&6
14624fi
14625echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14626echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014627else
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 # Is the header compilable?
14629echo "$as_me:$LINENO: checking wchar.h usability" >&5
14630echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
14631cat >conftest.$ac_ext <<_ACEOF
14632#line $LINENO "configure"
14633#include "confdefs.h"
14634$ac_includes_default
14635#include <wchar.h>
14636_ACEOF
14637rm -f conftest.$ac_objext
14638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14639 (eval $ac_compile) 2>&5
14640 ac_status=$?
14641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642 (exit $ac_status); } &&
14643 { ac_try='test -s conftest.$ac_objext'
14644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14645 (eval $ac_try) 2>&5
14646 ac_status=$?
14647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648 (exit $ac_status); }; }; then
14649 ac_header_compiler=yes
14650else
14651 echo "$as_me: failed program was:" >&5
14652cat conftest.$ac_ext >&5
14653ac_header_compiler=no
14654fi
14655rm -f conftest.$ac_objext conftest.$ac_ext
14656echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14657echo "${ECHO_T}$ac_header_compiler" >&6
14658
14659# Is the header present?
14660echo "$as_me:$LINENO: checking wchar.h presence" >&5
14661echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
14662cat >conftest.$ac_ext <<_ACEOF
14663#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664#include "confdefs.h"
14665#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014666_ACEOF
14667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
14668 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14669 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +000014670 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 rm -f conftest.er1
14672 cat conftest.err >&5
14673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14674 (exit $ac_status); } >/dev/null; then
14675 if test -s conftest.err; then
14676 ac_cpp_err=$ac_c_preproc_warn_flag
14677 else
14678 ac_cpp_err=
14679 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014680else
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 ac_cpp_err=yes
14682fi
14683if test -z "$ac_cpp_err"; then
14684 ac_header_preproc=yes
14685else
14686 echo "$as_me: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +000014687 cat conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014690rm -f conftest.err conftest.$ac_ext
14691echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14692echo "${ECHO_T}$ac_header_preproc" >&6
14693
14694# So? What about this header?
14695case $ac_header_compiler:$ac_header_preproc in
14696 yes:no )
14697 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
14698echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14699 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14700echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14701 no:yes )
14702 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
14703echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
14704 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
14705echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
14706 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
14707echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;};;
14708esac
14709echo "$as_me:$LINENO: checking for wchar.h" >&5
14710echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
14711if test "${ac_cv_header_wchar_h+set}" = set; then
14712 echo $ECHO_N "(cached) $ECHO_C" >&6
14713else
14714 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014716echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
14717echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
14718
14719fi
14720if test $ac_cv_header_wchar_h = yes; then
14721
14722
14723cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000014724#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014725_ACEOF
14726
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014727 wchar_h="yes"
14728
Guido van Rossumef2255b2000-03-10 22:30:29 +000014729else
Martin v. Löwis11437992002-04-12 09:54:03 +000014730 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014731
14732fi
14733
Michael W. Hudson54241132001-12-07 15:38:26 +000014734
Martin v. Löwis11437992002-04-12 09:54:03 +000014735
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014736# determine wchar_t size
14737if test "$wchar_h" = yes
14738then
Martin v. Löwis11437992002-04-12 09:54:03 +000014739 echo "$as_me:$LINENO: checking for wchar_t" >&5
14740echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
14741if test "${ac_cv_type_wchar_t+set}" = set; then
14742 echo $ECHO_N "(cached) $ECHO_C" >&6
14743else
14744 cat >conftest.$ac_ext <<_ACEOF
14745#line $LINENO "configure"
14746#include "confdefs.h"
14747#include <wchar.h>
14748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749int
14750main ()
14751{
14752if ((wchar_t *) 0)
14753 return 0;
14754if (sizeof (wchar_t))
14755 return 0;
14756 ;
14757 return 0;
14758}
14759_ACEOF
14760rm -f conftest.$ac_objext
14761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14762 (eval $ac_compile) 2>&5
14763 ac_status=$?
14764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765 (exit $ac_status); } &&
14766 { ac_try='test -s conftest.$ac_objext'
14767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14768 (eval $ac_try) 2>&5
14769 ac_status=$?
14770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14771 (exit $ac_status); }; }; then
14772 ac_cv_type_wchar_t=yes
14773else
14774 echo "$as_me: failed program was:" >&5
14775cat conftest.$ac_ext >&5
14776ac_cv_type_wchar_t=no
14777fi
14778rm -f conftest.$ac_objext conftest.$ac_ext
14779fi
14780echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
14781echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
14782
14783echo "$as_me:$LINENO: checking size of wchar_t" >&5
14784echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
14785if test "${ac_cv_sizeof_wchar_t+set}" = set; then
14786 echo $ECHO_N "(cached) $ECHO_C" >&6
14787else
14788 if test "$ac_cv_type_wchar_t" = yes; then
14789 # The cast to unsigned long works around a bug in the HP C Compiler
14790 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14791 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14792 # This bug is HP SR number 8606223364.
14793 if test "$cross_compiling" = yes; then
14794 # Depending upon the size, compute the lo and hi bounds.
14795cat >conftest.$ac_ext <<_ACEOF
14796#line $LINENO "configure"
14797#include "confdefs.h"
14798#include <wchar.h>
14799
Martin v. Löwis11437992002-04-12 09:54:03 +000014800int
14801main ()
14802{
14803static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
14804test_array [0] = 0
14805
14806 ;
14807 return 0;
14808}
14809_ACEOF
14810rm -f conftest.$ac_objext
14811if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14812 (eval $ac_compile) 2>&5
14813 ac_status=$?
14814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815 (exit $ac_status); } &&
14816 { ac_try='test -s conftest.$ac_objext'
14817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14818 (eval $ac_try) 2>&5
14819 ac_status=$?
14820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14821 (exit $ac_status); }; }; then
14822 ac_lo=0 ac_mid=0
14823 while :; do
14824 cat >conftest.$ac_ext <<_ACEOF
14825#line $LINENO "configure"
14826#include "confdefs.h"
14827#include <wchar.h>
14828
Martin v. Löwis11437992002-04-12 09:54:03 +000014829int
14830main ()
14831{
14832static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14833test_array [0] = 0
14834
14835 ;
14836 return 0;
14837}
14838_ACEOF
14839rm -f conftest.$ac_objext
14840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14841 (eval $ac_compile) 2>&5
14842 ac_status=$?
14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844 (exit $ac_status); } &&
14845 { ac_try='test -s conftest.$ac_objext'
14846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14847 (eval $ac_try) 2>&5
14848 ac_status=$?
14849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14850 (exit $ac_status); }; }; then
14851 ac_hi=$ac_mid; break
14852else
14853 echo "$as_me: failed program was:" >&5
14854cat conftest.$ac_ext >&5
14855ac_lo=`expr $ac_mid + 1`
14856 if test $ac_lo -le $ac_mid; then
14857 ac_lo= ac_hi=
14858 break
14859 fi
14860 ac_mid=`expr 2 '*' $ac_mid + 1`
14861fi
14862rm -f conftest.$ac_objext conftest.$ac_ext
14863 done
14864else
14865 echo "$as_me: failed program was:" >&5
14866cat conftest.$ac_ext >&5
14867cat >conftest.$ac_ext <<_ACEOF
14868#line $LINENO "configure"
14869#include "confdefs.h"
14870#include <wchar.h>
14871
Martin v. Löwis11437992002-04-12 09:54:03 +000014872int
14873main ()
14874{
14875static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
14876test_array [0] = 0
14877
14878 ;
14879 return 0;
14880}
14881_ACEOF
14882rm -f conftest.$ac_objext
14883if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14884 (eval $ac_compile) 2>&5
14885 ac_status=$?
14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14887 (exit $ac_status); } &&
14888 { ac_try='test -s conftest.$ac_objext'
14889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14890 (eval $ac_try) 2>&5
14891 ac_status=$?
14892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14893 (exit $ac_status); }; }; then
14894 ac_hi=-1 ac_mid=-1
14895 while :; do
14896 cat >conftest.$ac_ext <<_ACEOF
14897#line $LINENO "configure"
14898#include "confdefs.h"
14899#include <wchar.h>
14900
Martin v. Löwis11437992002-04-12 09:54:03 +000014901int
14902main ()
14903{
14904static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
14905test_array [0] = 0
14906
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911rm -f conftest.$ac_objext
14912if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14913 (eval $ac_compile) 2>&5
14914 ac_status=$?
14915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
14917 { ac_try='test -s conftest.$ac_objext'
14918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14920 ac_status=$?
14921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
14923 ac_lo=$ac_mid; break
14924else
14925 echo "$as_me: failed program was:" >&5
14926cat conftest.$ac_ext >&5
14927ac_hi=`expr '(' $ac_mid ')' - 1`
14928 if test $ac_mid -le $ac_hi; then
14929 ac_lo= ac_hi=
14930 break
14931 fi
14932 ac_mid=`expr 2 '*' $ac_mid`
14933fi
14934rm -f conftest.$ac_objext conftest.$ac_ext
14935 done
14936else
14937 echo "$as_me: failed program was:" >&5
14938cat conftest.$ac_ext >&5
14939ac_lo= ac_hi=
14940fi
14941rm -f conftest.$ac_objext conftest.$ac_ext
14942fi
14943rm -f conftest.$ac_objext conftest.$ac_ext
14944# Binary search between lo and hi bounds.
14945while test "x$ac_lo" != "x$ac_hi"; do
14946 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14947 cat >conftest.$ac_ext <<_ACEOF
14948#line $LINENO "configure"
14949#include "confdefs.h"
14950#include <wchar.h>
14951
Martin v. Löwis11437992002-04-12 09:54:03 +000014952int
14953main ()
14954{
14955static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
14956test_array [0] = 0
14957
14958 ;
14959 return 0;
14960}
14961_ACEOF
14962rm -f conftest.$ac_objext
14963if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14964 (eval $ac_compile) 2>&5
14965 ac_status=$?
14966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14967 (exit $ac_status); } &&
14968 { ac_try='test -s conftest.$ac_objext'
14969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14970 (eval $ac_try) 2>&5
14971 ac_status=$?
14972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14973 (exit $ac_status); }; }; then
14974 ac_hi=$ac_mid
14975else
14976 echo "$as_me: failed program was:" >&5
14977cat conftest.$ac_ext >&5
14978ac_lo=`expr '(' $ac_mid ')' + 1`
14979fi
14980rm -f conftest.$ac_objext conftest.$ac_ext
14981done
14982case $ac_lo in
14983?*) ac_cv_sizeof_wchar_t=$ac_lo;;
14984'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
14985echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
14986 { (exit 1); exit 1; }; } ;;
14987esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014988else
14989 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14991echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14992 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014993else
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 cat >conftest.$ac_ext <<_ACEOF
14995#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014996#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014997#include <wchar.h>
14998
14999long longval () { return (long) (sizeof (wchar_t)); }
15000unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000015001#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015002#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015003int
15004main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015005{
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
15007 FILE *f = fopen ("conftest.val", "w");
15008 if (! f)
15009 exit (1);
15010 if (((long) (sizeof (wchar_t))) < 0)
15011 {
15012 long i = longval ();
15013 if (i != ((long) (sizeof (wchar_t))))
15014 exit (1);
15015 fprintf (f, "%ld\n", i);
15016 }
15017 else
15018 {
15019 unsigned long i = ulongval ();
15020 if (i != ((long) (sizeof (wchar_t))))
15021 exit (1);
15022 fprintf (f, "%lu\n", i);
15023 }
15024 exit (ferror (f) || fclose (f) != 0);
15025
15026 ;
15027 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028}
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
15030rm -f conftest$ac_exeext
15031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15032 (eval $ac_link) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15037 (eval $ac_try) 2>&5
15038 ac_status=$?
15039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040 (exit $ac_status); }; }; then
15041 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000015042else
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 echo "$as_me: program exited with status $ac_status" >&5
15044echo "$as_me: failed program was:" >&5
15045cat conftest.$ac_ext >&5
15046( exit $ac_status )
15047{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77" >&5
15048echo "$as_me: error: cannot compute sizeof (wchar_t), 77" >&2;}
15049 { (exit 1); exit 1; }; }
15050fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000015051rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015052fi
15053fi
15054rm -f conftest.val
15055else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015056 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015059echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
15060echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
15061cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015062#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015063_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015064
Michael W. Hudson54241132001-12-07 15:38:26 +000015065
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015066fi
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068echo "$as_me:$LINENO: checking what type to use for unicode" >&5
15069echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015070# Check whether --enable-unicode or --disable-unicode was given.
15071if test "${enable_unicode+set}" = set; then
15072 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000015073
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015074else
15075 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015076fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015077
15078if test $enable_unicode = yes
15079then
Martin v. Löwisfd917792001-06-27 20:22:04 +000015080 # Without any arguments, Py_UNICODE defaults to two-byte mode
15081 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015082fi
15083
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015084
15085
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015086case "$enable_unicode" in
15087ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015089#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000015090_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015091
15092 ;;
15093ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015095#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000015096_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015097
15098 ;;
15099esac
15100
Michael W. Hudson54241132001-12-07 15:38:26 +000015101
Martin v. Löwis11437992002-04-12 09:54:03 +000015102
15103
Martin v. Löwis0036cba2002-04-12 09:58:45 +000015104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015105if test "$enable_unicode" = "no"
15106then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015107 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 echo "$as_me:$LINENO: result: not used" >&5
15109echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015110else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000015111 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
15113cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015114#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015116
15117 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
15118 then
15119 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015120
Martin v. Löwis11437992002-04-12 09:54:03 +000015121cat >>confdefs.h <<\_ACEOF
15122#define HAVE_USABLE_WCHAR_T 1
15123_ACEOF
15124
15125 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015126#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000015127_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015128
15129 elif test "$ac_cv_sizeof_short" = "$unicode_size"
15130 then
15131 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015133#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000015134_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015135
15136 elif test "$ac_cv_sizeof_long" = "$unicode_size"
15137 then
15138 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015140#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015142
15143 else
15144 PY_UNICODE_TYPE="no type found"
15145 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
15147echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000015148fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000015149
15150# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015151echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
15152echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
15153if test "${ac_cv_c_bigendian+set}" = set; then
15154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000015155else
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 # See if sys/param.h defines the BYTE_ORDER macro.
15157cat >conftest.$ac_ext <<_ACEOF
15158#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015159#include "confdefs.h"
15160#include <sys/types.h>
15161#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163int
15164main ()
15165{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015166#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
15167 bogus endian macros
15168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
15170 ;
15171 return 0;
15172}
15173_ACEOF
15174rm -f conftest.$ac_objext
15175if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15176 (eval $ac_compile) 2>&5
15177 ac_status=$?
15178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); } &&
15180 { ac_try='test -s conftest.$ac_objext'
15181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015186 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000015187cat >conftest.$ac_ext <<_ACEOF
15188#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015189#include "confdefs.h"
15190#include <sys/types.h>
15191#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000015192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193int
15194main ()
15195{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015196#if BYTE_ORDER != BIG_ENDIAN
15197 not big endian
15198#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015199
15200 ;
15201 return 0;
15202}
15203_ACEOF
15204rm -f conftest.$ac_objext
15205if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15206 (eval $ac_compile) 2>&5
15207 ac_status=$?
15208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15209 (exit $ac_status); } &&
15210 { ac_try='test -s conftest.$ac_objext'
15211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15212 (eval $ac_try) 2>&5
15213 ac_status=$?
15214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15215 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015216 ac_cv_c_bigendian=yes
15217else
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 echo "$as_me: failed program was:" >&5
15219cat conftest.$ac_ext >&5
15220ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000015221fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015222rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015223else
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 echo "$as_me: failed program was:" >&5
15225cat conftest.$ac_ext >&5
15226# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000015227if test "$cross_compiling" = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +000015228 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 ac_cv_c_bigendian=unknown
15230 cat >conftest.$ac_ext <<_ACEOF
15231#line $LINENO "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +000015232#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015233short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15234short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15235void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
15236short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15237short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15238void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015239int
15240main ()
15241{
15242 _ascii (); _ebcdic ();
15243 ;
15244 return 0;
15245}
15246_ACEOF
15247rm -f conftest.$ac_objext
15248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15249 (eval $ac_compile) 2>&5
15250 ac_status=$?
15251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15252 (exit $ac_status); } &&
15253 { ac_try='test -s conftest.$ac_objext'
15254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15255 (eval $ac_try) 2>&5
15256 ac_status=$?
15257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15258 (exit $ac_status); }; }; then
Skip Montanarodecc6a42003-01-01 20:07:49 +000015259 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ac_cv_c_bigendian=yes
15261fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000015262if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015263 if test "$ac_cv_c_bigendian" = unknown; then
15264 ac_cv_c_bigendian=no
15265 else
15266 # finding both strings is unlikely to happen, but who knows?
15267 ac_cv_c_bigendian=unknown
15268 fi
15269fi
15270else
15271 echo "$as_me: failed program was:" >&5
15272cat conftest.$ac_ext >&5
15273fi
15274rm -f conftest.$ac_objext conftest.$ac_ext
15275else
15276 cat >conftest.$ac_ext <<_ACEOF
15277#line $LINENO "configure"
15278#include "confdefs.h"
15279int
15280main ()
15281{
Guido van Rossumef2255b2000-03-10 22:30:29 +000015282 /* Are we little or big endian? From Harbison&Steele. */
15283 union
15284 {
15285 long l;
15286 char c[sizeof (long)];
15287 } u;
15288 u.l = 1;
15289 exit (u.c[sizeof (long) - 1] == 1);
15290}
Martin v. Löwis11437992002-04-12 09:54:03 +000015291_ACEOF
15292rm -f conftest$ac_exeext
15293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15294 (eval $ac_link) 2>&5
15295 ac_status=$?
15296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15299 (eval $ac_try) 2>&5
15300 ac_status=$?
15301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15302 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000015303 ac_cv_c_bigendian=no
15304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 echo "$as_me: program exited with status $ac_status" >&5
15306echo "$as_me: failed program was:" >&5
15307cat conftest.$ac_ext >&5
15308( exit $ac_status )
15309ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015310fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000015311rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015313fi
15314rm -f conftest.$ac_objext conftest.$ac_ext
15315fi
15316echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
15317echo "${ECHO_T}$ac_cv_c_bigendian" >&6
15318case $ac_cv_c_bigendian in
15319 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000015320
Martin v. Löwis11437992002-04-12 09:54:03 +000015321cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000015322#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015323_ACEOF
15324 ;;
15325 no)
15326 ;;
15327 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +000015328 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015329presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanarodecc6a42003-01-01 20:07:49 +000015330echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000015331presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
15332 { (exit 1); exit 1; }; } ;;
15333esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015334
Michael W. Hudson54241132001-12-07 15:38:26 +000015335
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015336# Check whether right shifting a negative integer extends the sign bit
15337# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000015338echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
15339echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
15340if test "${ac_cv_rshift_extends_sign+set}" = set; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015342else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015344if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015345 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015346else
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 cat >conftest.$ac_ext <<_ACEOF
15348#line $LINENO "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015349#include "confdefs.h"
15350
15351int main()
15352{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015353 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015354}
15355
Martin v. Löwis11437992002-04-12 09:54:03 +000015356_ACEOF
15357rm -f conftest$ac_exeext
15358if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15359 (eval $ac_link) 2>&5
15360 ac_status=$?
15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15364 (eval $ac_try) 2>&5
15365 ac_status=$?
15366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000015368 ac_cv_rshift_extends_sign=yes
15369else
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 echo "$as_me: program exited with status $ac_status" >&5
15371echo "$as_me: failed program was:" >&5
15372cat conftest.$ac_ext >&5
15373( exit $ac_status )
15374ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015375fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000015376rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015377fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000015378fi
15379
Martin v. Löwis11437992002-04-12 09:54:03 +000015380echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
15381echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015382if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015383then
Martin v. Löwis11437992002-04-12 09:54:03 +000015384
15385cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015386#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015387_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015388
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015389fi
15390
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015391# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015392echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
15393echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
15394if test "${ac_cv_have_getc_unlocked+set}" = set; then
15395 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015396else
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
15398cat >conftest.$ac_ext <<_ACEOF
15399#line $LINENO "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015400#include "confdefs.h"
15401#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015402int
15403main ()
15404{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015405
15406 FILE *f = fopen("/dev/null", "r");
15407 flockfile(f);
15408 getc_unlocked(f);
15409 funlockfile(f);
15410
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ;
15412 return 0;
15413}
15414_ACEOF
15415rm -f conftest.$ac_objext conftest$ac_exeext
15416if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15417 (eval $ac_link) 2>&5
15418 ac_status=$?
15419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420 (exit $ac_status); } &&
15421 { ac_try='test -s conftest$ac_exeext'
15422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15423 (eval $ac_try) 2>&5
15424 ac_status=$?
15425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15426 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015427 ac_cv_have_getc_unlocked=yes
15428else
Martin v. Löwis11437992002-04-12 09:54:03 +000015429 echo "$as_me: failed program was:" >&5
15430cat conftest.$ac_ext >&5
15431ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015433rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015434fi
15435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
15437echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015438if test "$ac_cv_have_getc_unlocked" = yes
15439then
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
15441cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015442#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015443_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015444
15445fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015446
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015447# check for readline 2.2
15448cat >conftest.$ac_ext <<_ACEOF
15449#line $LINENO "configure"
15450#include "confdefs.h"
15451#include <readline/readline.h>
15452_ACEOF
15453if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15454 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15455 ac_status=$?
Skip Montanarodecc6a42003-01-01 20:07:49 +000015456 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015457 rm -f conftest.er1
15458 cat conftest.err >&5
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); } >/dev/null; then
15461 if test -s conftest.err; then
15462 ac_cpp_err=$ac_c_preproc_warn_flag
15463 else
15464 ac_cpp_err=
15465 fi
15466else
15467 ac_cpp_err=yes
15468fi
15469if test -z "$ac_cpp_err"; then
15470 have_readline=yes
15471else
15472 echo "$as_me: failed program was:" >&5
15473 cat conftest.$ac_ext >&5
15474 have_readline=no
15475fi
15476rm -f conftest.err conftest.$ac_ext
15477if test $have_readline = yes
15478then
15479 cat >conftest.$ac_ext <<_ACEOF
15480#line $LINENO "configure"
15481#include "confdefs.h"
15482#include <readline/readline.h>
15483
15484_ACEOF
15485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanarodecc6a42003-01-01 20:07:49 +000015486 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015487
15488cat >>confdefs.h <<\_ACEOF
15489#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15490_ACEOF
15491
15492fi
15493rm -f conftest*
15494
15495fi
15496
Martin v. Löwis0daad592001-09-30 21:09:59 +000015497# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000015498echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
15499echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
15500if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
15501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015502else
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000015504LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015505cat >conftest.$ac_ext <<_ACEOF
15506#line $LINENO "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +000015507#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015508
Guido van Rossum353ae582001-07-10 16:45:32 +000015509/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015510#ifdef __cplusplus
15511extern "C"
15512#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000015513/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 builtin and then its argument prototype would still apply. */
15515char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015516int
15517main ()
15518{
15519rl_pre_input_hook ();
15520 ;
15521 return 0;
15522}
15523_ACEOF
15524rm -f conftest.$ac_objext conftest$ac_exeext
15525if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15526 (eval $ac_link) 2>&5
15527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); } &&
15530 { ac_try='test -s conftest$ac_exeext'
15531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15532 (eval $ac_try) 2>&5
15533 ac_status=$?
15534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15535 (exit $ac_status); }; }; then
15536 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015537else
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 echo "$as_me: failed program was:" >&5
15539cat conftest.$ac_ext >&5
15540ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015541fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015542rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15543LIBS=$ac_check_lib_save_LIBS
15544fi
15545echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15546echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
15547if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015548
Martin v. Löwis11437992002-04-12 09:54:03 +000015549cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015550#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015551_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000015552
Martin v. Löwis0daad592001-09-30 21:09:59 +000015553fi
15554
Michael W. Hudson54241132001-12-07 15:38:26 +000015555
Martin v. Löwis0daad592001-09-30 21:09:59 +000015556# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000015557echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
15558echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
15559if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
15560 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015561else
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000015563LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015564cat >conftest.$ac_ext <<_ACEOF
15565#line $LINENO "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +000015566#include "confdefs.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015567
Martin v. Löwis0daad592001-09-30 21:09:59 +000015568/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015569#ifdef __cplusplus
15570extern "C"
15571#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000015572/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 builtin and then its argument prototype would still apply. */
15574char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015575int
15576main ()
15577{
15578rl_completion_matches ();
15579 ;
15580 return 0;
15581}
15582_ACEOF
15583rm -f conftest.$ac_objext conftest$ac_exeext
15584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15585 (eval $ac_link) 2>&5
15586 ac_status=$?
15587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15588 (exit $ac_status); } &&
15589 { ac_try='test -s conftest$ac_exeext'
15590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15591 (eval $ac_try) 2>&5
15592 ac_status=$?
15593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15594 (exit $ac_status); }; }; then
15595 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015596else
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 echo "$as_me: failed program was:" >&5
15598cat conftest.$ac_ext >&5
15599ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015600fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015601rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15602LIBS=$ac_check_lib_save_LIBS
15603fi
15604echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15605echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
15606if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015607
Martin v. Löwis11437992002-04-12 09:54:03 +000015608cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015609#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000015611
Guido van Rossum353ae582001-07-10 16:45:32 +000015612fi
15613
Jack Jansendd19cf82001-12-06 22:36:17 +000015614
Martin v. Löwis11437992002-04-12 09:54:03 +000015615echo "$as_me:$LINENO: checking for broken nice()" >&5
15616echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
15617if test "${ac_cv_broken_nice+set}" = set; then
15618 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015619else
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015621if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000015622 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015623else
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 cat >conftest.$ac_ext <<_ACEOF
15625#line $LINENO "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015626#include "confdefs.h"
15627
15628int main()
15629{
15630 int val1 = nice(1);
15631 if (val1 != -1 && val1 == nice(2))
15632 exit(0);
15633 exit(1);
15634}
15635
Martin v. Löwis11437992002-04-12 09:54:03 +000015636_ACEOF
15637rm -f conftest$ac_exeext
15638if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15639 (eval $ac_link) 2>&5
15640 ac_status=$?
15641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15644 (eval $ac_try) 2>&5
15645 ac_status=$?
15646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15647 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015648 ac_cv_broken_nice=yes
15649else
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 echo "$as_me: program exited with status $ac_status" >&5
15651echo "$as_me: failed program was:" >&5
15652cat conftest.$ac_ext >&5
15653( exit $ac_status )
15654ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015655fi
Skip Montanarodecc6a42003-01-01 20:07:49 +000015656rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015657fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015658fi
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
15661echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015662if test "$ac_cv_broken_nice" = yes
15663then
Martin v. Löwis11437992002-04-12 09:54:03 +000015664
15665cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015666#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015668
15669fi
15670
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015671# Look for subsecond timestamps in struct stat
15672echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
15673echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
15674if test "${ac_cv_stat_tv_nsec+set}" = set; then
15675 echo $ECHO_N "(cached) $ECHO_C" >&6
15676else
15677 cat >conftest.$ac_ext <<_ACEOF
15678#line $LINENO "configure"
15679#include "confdefs.h"
15680#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015681int
15682main ()
15683{
15684
15685struct stat st;
15686st.st_mtim.tv_nsec = 1;
15687
15688 ;
15689 return 0;
15690}
15691_ACEOF
15692rm -f conftest.$ac_objext
15693if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15694 (eval $ac_compile) 2>&5
15695 ac_status=$?
15696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15697 (exit $ac_status); } &&
15698 { ac_try='test -s conftest.$ac_objext'
15699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15700 (eval $ac_try) 2>&5
15701 ac_status=$?
15702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15703 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015704 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015705else
15706 echo "$as_me: failed program was:" >&5
15707cat conftest.$ac_ext >&5
15708ac_cv_stat_tv_nsec=no
15709fi
15710rm -f conftest.$ac_objext conftest.$ac_ext
15711fi
15712
15713echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
15714echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
15715if test "$ac_cv_stat_tv_nsec" = yes
15716then
15717
15718cat >>confdefs.h <<\_ACEOF
15719#define HAVE_STAT_TV_NSEC 1
15720_ACEOF
15721
15722fi
15723
Jack Jansen666b1e72001-10-31 12:11:48 +000015724# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000015725echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
15726echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
15727if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
15728 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015729else
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >conftest.$ac_ext <<_ACEOF
15731#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015732#include "confdefs.h"
15733#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015734int
15735main ()
15736{
Jack Jansen666b1e72001-10-31 12:11:48 +000015737
15738 int rtn;
15739 rtn = mvwdelch(0,0,0);
15740
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 ;
15742 return 0;
15743}
15744_ACEOF
15745rm -f conftest.$ac_objext
15746if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15747 (eval $ac_compile) 2>&5
15748 ac_status=$?
15749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15750 (exit $ac_status); } &&
15751 { ac_try='test -s conftest.$ac_objext'
15752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15753 (eval $ac_try) 2>&5
15754 ac_status=$?
15755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15756 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015757 ac_cv_mvwdelch_is_expression=yes
15758else
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 echo "$as_me: failed program was:" >&5
15760cat conftest.$ac_ext >&5
15761ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015762fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015763rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015764fi
15765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
15767echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015768
15769if test "$ac_cv_mvwdelch_is_expression" = yes
15770then
Martin v. Löwis11437992002-04-12 09:54:03 +000015771
15772cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015773#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015774_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015775
15776fi
15777
Martin v. Löwis11437992002-04-12 09:54:03 +000015778echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
15779echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
15780if test "${ac_cv_window_has_flags+set}" = set; then
15781 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015782else
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 cat >conftest.$ac_ext <<_ACEOF
15784#line $LINENO "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +000015785#include "confdefs.h"
15786#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015787int
15788main ()
15789{
Jack Jansen666b1e72001-10-31 12:11:48 +000015790
15791 WINDOW *w;
15792 w->_flags = 0;
15793
Martin v. Löwis11437992002-04-12 09:54:03 +000015794 ;
15795 return 0;
15796}
15797_ACEOF
15798rm -f conftest.$ac_objext
15799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15800 (eval $ac_compile) 2>&5
15801 ac_status=$?
15802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15803 (exit $ac_status); } &&
15804 { ac_try='test -s conftest.$ac_objext'
15805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15806 (eval $ac_try) 2>&5
15807 ac_status=$?
15808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15809 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000015810 ac_cv_window_has_flags=yes
15811else
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 echo "$as_me: failed program was:" >&5
15813cat conftest.$ac_ext >&5
15814ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015815fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015816rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000015817fi
15818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
15820echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015821
Jack Jansen666b1e72001-10-31 12:11:48 +000015822
15823if test "$ac_cv_window_has_flags" = yes
15824then
Martin v. Löwis11437992002-04-12 09:54:03 +000015825
15826cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015827#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000015829
15830fi
15831
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015832echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
15833echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
15834
15835if test -e /dev/ptmx
15836then
15837 echo "$as_me:$LINENO: result: yes" >&5
15838echo "${ECHO_T}yes" >&6
15839
15840cat >>confdefs.h <<\_ACEOF
15841#define HAVE_DEV_PTMX 1
15842_ACEOF
15843
15844else
15845 echo "$as_me:$LINENO: result: no" >&5
15846echo "${ECHO_T}no" >&6
15847fi
15848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849echo "$as_me:$LINENO: checking for socklen_t" >&5
15850echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
15851if test "${ac_cv_type_socklen_t+set}" = set; then
15852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000015853else
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 cat >conftest.$ac_ext <<_ACEOF
15855#line $LINENO "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +000015856#include "confdefs.h"
Martin v. Löwis01c04012002-11-11 14:58:44 +000015857
15858#ifdef HAVE_SYS_TYPES_H
15859#include <sys/types.h>
15860#endif
15861#ifdef HAVE_SYS_SOCKET_H
15862#include <sys/socket.h>
15863#endif
15864
15865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866int
15867main ()
15868{
15869if ((socklen_t *) 0)
15870 return 0;
15871if (sizeof (socklen_t))
15872 return 0;
15873 ;
15874 return 0;
15875}
15876_ACEOF
15877rm -f conftest.$ac_objext
15878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15879 (eval $ac_compile) 2>&5
15880 ac_status=$?
15881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882 (exit $ac_status); } &&
15883 { ac_try='test -s conftest.$ac_objext'
15884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15885 (eval $ac_try) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015889 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 echo "$as_me: failed program was:" >&5
15892cat conftest.$ac_ext >&5
15893ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000015894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015895rm -f conftest.$ac_objext conftest.$ac_ext
15896fi
15897echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
15898echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
15899if test $ac_cv_type_socklen_t = yes; then
15900 :
15901else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015902
Martin v. Löwis01c04012002-11-11 14:58:44 +000015903cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015904#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000015905_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000015906
15907fi
15908
Michael W. Hudson54241132001-12-07 15:38:26 +000015909
Michael W. Hudson54241132001-12-07 15:38:26 +000015910
15911
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015912for h in `(cd $srcdir;echo Python/thread_*.h)`
15913do
15914 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15915done
15916
Michael W. Hudson54241132001-12-07 15:38:26 +000015917
Jack Jansen0b06be72002-06-21 14:48:38 +000015918SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000015919echo "$as_me:$LINENO: checking for build directories" >&5
15920echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015921for dir in $SRCDIRS; do
15922 if test ! -d $dir; then
15923 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015924 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015925done
Martin v. Löwis11437992002-04-12 09:54:03 +000015926echo "$as_me:$LINENO: result: done" >&5
15927echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000015928
Guido van Rossum627b2d71993-12-24 10:39:16 +000015929# generate output files
Skip Montanarodecc6a42003-01-01 20:07:49 +000015930 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015933# This file is a shell script that caches the results of configure
15934# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015935# scripts and configure runs, see configure's option --config-cache.
15936# It is not useful on other systems. If it contains results you don't
15937# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015938#
Martin v. Löwis11437992002-04-12 09:54:03 +000015939# config.status only pays attention to the cache file if you give it
15940# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015941#
Skip Montanarodecc6a42003-01-01 20:07:49 +000015942# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015943# loading this file, other *unset* `ac_cv_foo' will be assigned the
15944# following values.
15945
15946_ACEOF
15947
Guido van Rossumf78abae1997-01-21 22:02:36 +000015948# The following way of writing the cache mishandles newlines in values,
15949# but we know of no workaround that is simple, portable, and efficient.
15950# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015951# Ultrix sh set writes to stderr and can't be redirected directly,
15952# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000015953{
15954 (set) 2>&1 |
15955 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15956 *ac_space=\ *)
15957 # `set' does not quote correctly, so add quotes (double-quote
15958 # substitution turns \\\\ into \\, and sed turns \\ into \).
15959 sed -n \
15960 "s/'/'\\\\''/g;
15961 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15962 ;;
15963 *)
15964 # `set' quotes correctly as required by POSIX, so do not add quotes.
15965 sed -n \
15966 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15967 ;;
15968 esac;
15969} |
15970 sed '
15971 t clear
15972 : clear
15973 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15974 t end
15975 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15976 : end' >>confcache
15977if cmp -s $cache_file confcache; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015978 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15980 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015981 else
15982 echo "not updating unwritable cache $cache_file"
15983 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015984fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015985rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015986
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015987test "x$prefix" = xNONE && prefix=$ac_default_prefix
15988# Let make expand exec_prefix.
15989test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015990
Martin v. Löwis11437992002-04-12 09:54:03 +000015991# VPATH may cause trouble with some makes, so we remove $(srcdir),
15992# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15993# trailing colons and then remove the whole line if VPATH becomes empty
15994# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000015995if test "x$srcdir" = x.; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15997s/:*\$(srcdir):*/:/;
15998s/:*\${srcdir}:*/:/;
15999s/:*@srcdir@:*/:/;
16000s/^\([^=]*=[ ]*\):*/\1/;
16001s/:*$//;
16002s/^[^=]*=[ ]*$//;
16003}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016004fi
16005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016006DEFS=-DHAVE_CONFIG_H
16007
Skip Montanarodecc6a42003-01-01 20:07:49 +000016008ac_libobjs=
16009ac_ltlibobjs=
16010for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16011 # 1. Remove the extension, and $U if already installed.
16012 ac_i=`echo "$ac_i" |
16013 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
16014 # 2. Add them.
16015 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16016 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16017done
16018LIBOBJS=$ac_libobjs
16019
16020LTLIBOBJS=$ac_ltlibobjs
16021
16022
Martin v. Löwis11437992002-04-12 09:54:03 +000016023
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016024: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000016025ac_clean_files_save=$ac_clean_files
16026ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16027{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16028echo "$as_me: creating $CONFIG_STATUS" >&6;}
16029cat >$CONFIG_STATUS <<_ACEOF
16030#! $SHELL
16031# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016032# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016033# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016034# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036debug=false
16037SHELL=\${CONFIG_SHELL-$SHELL}
16038_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000016039
Martin v. Löwis11437992002-04-12 09:54:03 +000016040cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016041## --------------------- ##
16042## M4sh Initialization. ##
16043## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016044
Martin v. Löwis11437992002-04-12 09:54:03 +000016045# Be Bourne compatible
16046if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16047 emulate sh
16048 NULLCMD=:
Skip Montanarodecc6a42003-01-01 20:07:49 +000016049 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16050 # is contrary to our usage. Disable this feature.
16051 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000016052elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16053 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000016054fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016055
Martin v. Löwis11437992002-04-12 09:54:03 +000016056# Support unset when possible.
16057if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16058 as_unset=unset
16059else
16060 as_unset=false
16061fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016062
Skip Montanarodecc6a42003-01-01 20:07:49 +000016063
16064# Work around bugs in pre-3.0 UWIN ksh.
16065$as_unset ENV MAIL MAILPATH
16066PS1='$ '
16067PS2='> '
16068PS4='+ '
16069
16070# NLS nuisances.
16071for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
16072do
16073 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
16074 eval $as_var=C; export $as_var
16075 else
16076 $as_unset $as_var
16077 fi
16078done
16079
16080# Required to use basename.
16081if expr a : '\(a\)' >/dev/null 2>&1; then
16082 as_expr=expr
16083else
16084 as_expr=false
16085fi
16086
16087if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16088 as_basename=basename
16089else
16090 as_basename=false
16091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093
16094# Name of the executable.
Skip Montanarodecc6a42003-01-01 20:07:49 +000016095as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016096$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16097 X"$0" : 'X\(//\)$' \| \
16098 X"$0" : 'X\(/\)$' \| \
16099 . : '\(.\)' 2>/dev/null ||
16100echo X/"$0" |
16101 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16102 /^X\/\(\/\/\)$/{ s//\1/; q; }
16103 /^X\/\(\/\).*/{ s//\1/; q; }
16104 s/.*/./; q'`
16105
Skip Montanarodecc6a42003-01-01 20:07:49 +000016106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107# PATH needs CR, and LINENO needs CR and PATH.
16108# Avoid depending upon Character Ranges.
16109as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16110as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16111as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16112as_cr_digits='0123456789'
16113as_cr_alnum=$as_cr_Letters$as_cr_digits
16114
16115# The user is always right.
16116if test "${PATH_SEPARATOR+set}" != set; then
16117 echo "#! /bin/sh" >conftest.sh
16118 echo "exit 0" >>conftest.sh
16119 chmod +x conftest.sh
Skip Montanarodecc6a42003-01-01 20:07:49 +000016120 if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 PATH_SEPARATOR=';'
16122 else
16123 PATH_SEPARATOR=:
16124 fi
16125 rm -f conftest.sh
16126fi
16127
16128
16129 as_lineno_1=$LINENO
16130 as_lineno_2=$LINENO
16131 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16132 test "x$as_lineno_1" != "x$as_lineno_2" &&
16133 test "x$as_lineno_3" = "x$as_lineno_2" || {
16134 # Find who we are. Look in the path if we contain no path at all
16135 # relative or not.
16136 case $0 in
16137 *[\\/]* ) as_myself=$0 ;;
16138 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16139for as_dir in $PATH
16140do
16141 IFS=$as_save_IFS
16142 test -z "$as_dir" && as_dir=.
16143 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16144done
16145
16146 ;;
16147 esac
16148 # We did not find ourselves, most probably we were run as `sh COMMAND'
16149 # in which case we are not to be found in the path.
16150 if test "x$as_myself" = x; then
16151 as_myself=$0
16152 fi
16153 if test ! -f "$as_myself"; then
16154 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16155echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16156 { (exit 1); exit 1; }; }
16157 fi
16158 case $CONFIG_SHELL in
16159 '')
16160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16161for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16162do
16163 IFS=$as_save_IFS
16164 test -z "$as_dir" && as_dir=.
16165 for as_base in sh bash ksh sh5; do
16166 case $as_dir in
16167 /*)
16168 if ("$as_dir/$as_base" -c '
16169 as_lineno_1=$LINENO
16170 as_lineno_2=$LINENO
16171 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16172 test "x$as_lineno_1" != "x$as_lineno_2" &&
16173 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanarodecc6a42003-01-01 20:07:49 +000016174 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16175 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 CONFIG_SHELL=$as_dir/$as_base
16177 export CONFIG_SHELL
16178 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16179 fi;;
16180 esac
16181 done
16182done
16183;;
Jack Jansendd19cf82001-12-06 22:36:17 +000016184 esac
16185
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16187 # uniformly replaced by the line number. The first 'sed' inserts a
16188 # line-number line before each line; the second 'sed' does the real
16189 # work. The second script uses 'N' to pair each line-number line
16190 # with the numbered line, and appends trailing '-' during
16191 # substitution so that $LINENO is not a special case at line end.
16192 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16193 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
16194 sed '=' <$as_myself |
16195 sed '
16196 N
16197 s,$,-,
16198 : loop
16199 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16200 t loop
16201 s,-$,,
16202 s,^['$as_cr_digits']*\n,,
16203 ' >$as_me.lineno &&
16204 chmod +x $as_me.lineno ||
16205 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16206echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16207 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000016208
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 # Don't try to exec as it changes $[0], causing all sort of problems
16210 # (the dirname of $[0] is not the place where we might find the
16211 # original and so on. Autoconf is especially sensible to this).
16212 . ./$as_me.lineno
16213 # Exit status is that of the last command.
16214 exit
16215}
16216
16217
16218case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16219 *c*,-n*) ECHO_N= ECHO_C='
16220' ECHO_T=' ' ;;
16221 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16222 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
16223esac
16224
16225if expr a : '\(a\)' >/dev/null 2>&1; then
16226 as_expr=expr
16227else
16228 as_expr=false
16229fi
16230
16231rm -f conf$$ conf$$.exe conf$$.file
16232echo >conf$$.file
16233if ln -s conf$$.file conf$$ 2>/dev/null; then
16234 # We could just check for DJGPP; but this test a) works b) is more generic
16235 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16236 if test -f conf$$.exe; then
16237 # Don't use ln at all; we don't have any links
16238 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016239 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 as_ln_s='ln -s'
16241 fi
16242elif ln conf$$.file conf$$ 2>/dev/null; then
16243 as_ln_s=ln
16244else
16245 as_ln_s='cp -p'
16246fi
16247rm -f conf$$ conf$$.exe conf$$.file
16248
Skip Montanarodecc6a42003-01-01 20:07:49 +000016249if mkdir -p . 2>/dev/null; then
16250 as_mkdir_p=:
16251else
16252 as_mkdir_p=false
16253fi
16254
Martin v. Löwis11437992002-04-12 09:54:03 +000016255as_executable_p="test -f"
16256
16257# Sed expression to map a string onto a valid CPP name.
16258as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16259
16260# Sed expression to map a string onto a valid variable name.
16261as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16262
16263
16264# IFS
16265# We need space, tab and new line, in precisely that order.
16266as_nl='
16267'
16268IFS=" $as_nl"
16269
16270# CDPATH.
Skip Montanarodecc6a42003-01-01 20:07:49 +000016271$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000016272
16273exec 6>&1
16274
16275# Open the log real soon, to keep \$[0] and so on meaningful, and to
16276# report actual input values of CONFIG_FILES etc. instead of their
16277# values after options handling. Logging --version etc. is OK.
16278exec 5>>config.log
16279{
16280 echo
16281 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16282## Running $as_me. ##
16283_ASBOX
16284} >&5
16285cat >&5 <<_CSEOF
16286
Martin v. Löwis88afe662002-10-26 13:47:44 +000016287This file was extended by python $as_me 2.3, which was
Skip Montanarodecc6a42003-01-01 20:07:49 +000016288generated by GNU Autoconf 2.54. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
16290 CONFIG_FILES = $CONFIG_FILES
16291 CONFIG_HEADERS = $CONFIG_HEADERS
16292 CONFIG_LINKS = $CONFIG_LINKS
16293 CONFIG_COMMANDS = $CONFIG_COMMANDS
16294 $ $0 $@
16295
16296_CSEOF
16297echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16298echo >&5
16299_ACEOF
16300
16301# Files that config.status was made for.
16302if test -n "$ac_config_files"; then
16303 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16304fi
16305
16306if test -n "$ac_config_headers"; then
16307 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16308fi
16309
16310if test -n "$ac_config_links"; then
16311 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16312fi
16313
16314if test -n "$ac_config_commands"; then
16315 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16316fi
16317
16318cat >>$CONFIG_STATUS <<\_ACEOF
16319
16320ac_cs_usage="\
16321\`$as_me' instantiates files from templates according to the
16322current configuration.
16323
16324Usage: $0 [OPTIONS] [FILE]...
16325
16326 -h, --help print this help, then exit
16327 -V, --version print version number, then exit
16328 -d, --debug don't remove temporary files
16329 --recheck update $as_me by reconfiguring in the same conditions
16330 --file=FILE[:TEMPLATE]
16331 instantiate the configuration file FILE
16332 --header=FILE[:TEMPLATE]
16333 instantiate the configuration header FILE
16334
16335Configuration files:
16336$config_files
16337
16338Configuration headers:
16339$config_headers
16340
16341Report bugs to <bug-autoconf@gnu.org>."
16342_ACEOF
16343
16344cat >>$CONFIG_STATUS <<_ACEOF
16345ac_cs_version="\\
Martin v. Löwis88afe662002-10-26 13:47:44 +000016346python config.status 2.3
Skip Montanarodecc6a42003-01-01 20:07:49 +000016347configured by $0, generated by GNU Autoconf 2.54,
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16349
16350Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16351Free Software Foundation, Inc.
16352This config.status script is free software; the Free Software Foundation
16353gives unlimited permission to copy, distribute and modify it."
16354srcdir=$srcdir
16355INSTALL="$INSTALL"
16356_ACEOF
16357
16358cat >>$CONFIG_STATUS <<\_ACEOF
16359# If no file are specified by the user, then we need to provide default
16360# value. By we need to know if files were specified by the user.
16361ac_need_defaults=:
16362while test $# != 0
16363do
16364 case $1 in
16365 --*=*)
16366 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16367 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanarodecc6a42003-01-01 20:07:49 +000016368 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016370 -*)
16371 ac_option=$1
16372 ac_optarg=$2
16373 ac_shift=shift
16374 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 *) # This is not an option, so the user has probably given explicit
16376 # arguments.
Skip Montanarodecc6a42003-01-01 20:07:49 +000016377 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 ac_need_defaults=false;;
16379 esac
16380
Skip Montanarodecc6a42003-01-01 20:07:49 +000016381 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016382 # Handling of the options.
16383_ACEOF
16384cat >>$CONFIG_STATUS <<_ACEOF
16385 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16386 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16387 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16388_ACEOF
16389cat >>$CONFIG_STATUS <<\_ACEOF
16390 --version | --vers* | -V )
16391 echo "$ac_cs_version"; exit 0 ;;
16392 --he | --h)
16393 # Conflict between --help and --header
16394 { { echo "$as_me:$LINENO: error: ambiguous option: $1
16395Try \`$0 --help' for more information." >&5
16396echo "$as_me: error: ambiguous option: $1
16397Try \`$0 --help' for more information." >&2;}
16398 { (exit 1); exit 1; }; };;
16399 --help | --hel | -h )
16400 echo "$ac_cs_usage"; exit 0 ;;
16401 --debug | --d* | -d )
16402 debug=: ;;
16403 --file | --fil | --fi | --f )
Skip Montanarodecc6a42003-01-01 20:07:49 +000016404 $ac_shift
16405 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 ac_need_defaults=false;;
16407 --header | --heade | --head | --hea )
Skip Montanarodecc6a42003-01-01 20:07:49 +000016408 $ac_shift
16409 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 ac_need_defaults=false;;
16411
16412 # This is an error.
16413 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16414Try \`$0 --help' for more information." >&5
16415echo "$as_me: error: unrecognized option: $1
16416Try \`$0 --help' for more information." >&2;}
16417 { (exit 1); exit 1; }; } ;;
16418
16419 *) ac_config_targets="$ac_config_targets $1" ;;
16420
16421 esac
16422 shift
16423done
16424
16425_ACEOF
16426
16427
16428
16429
16430
16431cat >>$CONFIG_STATUS <<\_ACEOF
16432for ac_config_target in $ac_config_targets
16433do
16434 case "$ac_config_target" in
16435 # Handling of arguments.
16436 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16437 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
16438 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16439 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16440echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16441 { (exit 1); exit 1; }; };;
16442 esac
16443done
16444
16445# If the user did not use the arguments to specify the items to instantiate,
16446# then the envvar interface is used. Set only those that are not.
16447# We use the long form for the default assignment because of an extremely
16448# bizarre bug on SunOS 4.1.3.
16449if $ac_need_defaults; then
16450 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16451 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16452fi
16453
16454# Create a temporary directory, and hook for its removal unless debugging.
16455$debug ||
16456{
16457 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16458 trap '{ (exit 1); exit 1; }' 1 2 13 15
16459}
16460
16461# Create a (secure) tmp directory for tmp files.
16462: ${TMPDIR=/tmp}
16463{
16464 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16465 test -n "$tmp" && test -d "$tmp"
16466} ||
16467{
16468 tmp=$TMPDIR/cs$$-$RANDOM
16469 (umask 077 && mkdir $tmp)
16470} ||
16471{
16472 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16473 { (exit 1); exit 1; }
16474}
16475
16476_ACEOF
16477
16478cat >>$CONFIG_STATUS <<_ACEOF
16479
16480#
16481# CONFIG_FILES section.
16482#
16483
16484# No need to generate the scripts if there are no CONFIG_FILES.
16485# This happens for instance when ./config.status config.h
16486if test -n "\$CONFIG_FILES"; then
16487 # Protect against being on the right side of a sed subst in config.status.
16488 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16489 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16490s,@SHELL@,$SHELL,;t t
16491s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16492s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16493s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16494s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16495s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16496s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16497s,@exec_prefix@,$exec_prefix,;t t
16498s,@prefix@,$prefix,;t t
16499s,@program_transform_name@,$program_transform_name,;t t
16500s,@bindir@,$bindir,;t t
16501s,@sbindir@,$sbindir,;t t
16502s,@libexecdir@,$libexecdir,;t t
16503s,@datadir@,$datadir,;t t
16504s,@sysconfdir@,$sysconfdir,;t t
16505s,@sharedstatedir@,$sharedstatedir,;t t
16506s,@localstatedir@,$localstatedir,;t t
16507s,@libdir@,$libdir,;t t
16508s,@includedir@,$includedir,;t t
16509s,@oldincludedir@,$oldincludedir,;t t
16510s,@infodir@,$infodir,;t t
16511s,@mandir@,$mandir,;t t
16512s,@build_alias@,$build_alias,;t t
16513s,@host_alias@,$host_alias,;t t
16514s,@target_alias@,$target_alias,;t t
16515s,@DEFS@,$DEFS,;t t
16516s,@ECHO_C@,$ECHO_C,;t t
16517s,@ECHO_N@,$ECHO_N,;t t
16518s,@ECHO_T@,$ECHO_T,;t t
16519s,@LIBS@,$LIBS,;t t
16520s,@VERSION@,$VERSION,;t t
16521s,@SOVERSION@,$SOVERSION,;t t
16522s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
16523s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
16524s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
16525s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
16526s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
16527s,@MACHDEP@,$MACHDEP,;t t
16528s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000016529s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016530s,@CXX@,$CXX,;t t
16531s,@MAINOBJ@,$MAINOBJ,;t t
16532s,@EXEEXT@,$EXEEXT,;t t
16533s,@CC@,$CC,;t t
16534s,@CFLAGS@,$CFLAGS,;t t
16535s,@LDFLAGS@,$LDFLAGS,;t t
16536s,@CPPFLAGS@,$CPPFLAGS,;t t
16537s,@ac_ct_CC@,$ac_ct_CC,;t t
16538s,@OBJEXT@,$OBJEXT,;t t
16539s,@CPP@,$CPP,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000016540s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016541s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
16542s,@LIBRARY@,$LIBRARY,;t t
16543s,@LDLIBRARY@,$LDLIBRARY,;t t
16544s,@DLLLIBRARY@,$DLLLIBRARY,;t t
16545s,@BLDLIBRARY@,$BLDLIBRARY,;t t
16546s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
16547s,@INSTSONAME@,$INSTSONAME,;t t
16548s,@RUNSHARED@,$RUNSHARED,;t t
16549s,@LINKCC@,$LINKCC,;t t
16550s,@RANLIB@,$RANLIB,;t t
16551s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16552s,@AR@,$AR,;t t
16553s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16554s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16555s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16556s,@LN@,$LN,;t t
16557s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000016558s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016559s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
16560s,@SO@,$SO,;t t
16561s,@LDSHARED@,$LDSHARED,;t t
16562s,@BLDSHARED@,$BLDSHARED,;t t
16563s,@CCSHARED@,$CCSHARED,;t t
16564s,@LINKFORSHARED@,$LINKFORSHARED,;t t
16565s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016566s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016567s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
16568s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
16569s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
16570s,@LDLAST@,$LDLAST,;t t
16571s,@THREADOBJ@,$THREADOBJ,;t t
16572s,@DLINCLDIR@,$DLINCLDIR,;t t
16573s,@DYNLOADFILE@,$DYNLOADFILE,;t t
16574s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
16575s,@LIBOBJS@,$LIBOBJS,;t t
16576s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
16577s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
16578s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
16579s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
16580s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
16581s,@LIBM@,$LIBM,;t t
16582s,@LIBC@,$LIBC,;t t
16583s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
16584s,@THREADHEADERS@,$THREADHEADERS,;t t
16585s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000016586s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000016587CEOF
16588
16589_ACEOF
16590
16591 cat >>$CONFIG_STATUS <<\_ACEOF
16592 # Split the substitutions into bite-sized pieces for seds with
16593 # small command number limits, like on Digital OSF/1 and HP-UX.
16594 ac_max_sed_lines=48
16595 ac_sed_frag=1 # Number of current file.
16596 ac_beg=1 # First line for current file.
16597 ac_end=$ac_max_sed_lines # Line after last line for current file.
16598 ac_more_lines=:
16599 ac_sed_cmds=
16600 while $ac_more_lines; do
16601 if test $ac_beg -gt 1; then
16602 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16603 else
16604 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16605 fi
16606 if test ! -s $tmp/subs.frag; then
16607 ac_more_lines=false
16608 else
16609 # The purpose of the label and of the branching condition is to
16610 # speed up the sed processing (if there are no `@' at all, there
16611 # is no need to browse any of the substitutions).
16612 # These are the two extra sed commands mentioned above.
16613 (echo ':t
16614 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16615 if test -z "$ac_sed_cmds"; then
16616 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16617 else
16618 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16619 fi
16620 ac_sed_frag=`expr $ac_sed_frag + 1`
16621 ac_beg=$ac_end
16622 ac_end=`expr $ac_end + $ac_max_sed_lines`
16623 fi
16624 done
16625 if test -z "$ac_sed_cmds"; then
16626 ac_sed_cmds=cat
16627 fi
16628fi # test -n "$CONFIG_FILES"
16629
16630_ACEOF
16631cat >>$CONFIG_STATUS <<\_ACEOF
16632for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16633 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16634 case $ac_file in
16635 - | *:- | *:-:* ) # input from stdin
16636 cat >$tmp/stdin
16637 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16638 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16639 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16640 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16641 * ) ac_file_in=$ac_file.in ;;
16642 esac
16643
16644 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16645 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16646$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16647 X"$ac_file" : 'X\(//\)[^/]' \| \
16648 X"$ac_file" : 'X\(//\)$' \| \
16649 X"$ac_file" : 'X\(/\)' \| \
16650 . : '\(.\)' 2>/dev/null ||
16651echo X"$ac_file" |
16652 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16653 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16654 /^X\(\/\/\)$/{ s//\1/; q; }
16655 /^X\(\/\).*/{ s//\1/; q; }
16656 s/.*/./; q'`
Skip Montanarodecc6a42003-01-01 20:07:49 +000016657 { if $as_mkdir_p; then
16658 mkdir -p "$ac_dir"
16659 else
16660 as_dir="$ac_dir"
16661 as_dirs=
16662 while test ! -d "$as_dir"; do
16663 as_dirs="$as_dir $as_dirs"
16664 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16665$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16666 X"$as_dir" : 'X\(//\)[^/]' \| \
16667 X"$as_dir" : 'X\(//\)$' \| \
16668 X"$as_dir" : 'X\(/\)' \| \
16669 . : '\(.\)' 2>/dev/null ||
16670echo X"$as_dir" |
16671 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16672 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16673 /^X\(\/\/\)$/{ s//\1/; q; }
16674 /^X\(\/\).*/{ s//\1/; q; }
16675 s/.*/./; q'`
16676 done
16677 test ! -n "$as_dirs" || mkdir $as_dirs
16678 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
16679echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
16680 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016681
16682 ac_builddir=.
16683
16684if test "$ac_dir" != .; then
16685 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16686 # A "../" for each directory in $ac_dir_suffix.
16687 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16688else
16689 ac_dir_suffix= ac_top_builddir=
16690fi
16691
16692case $srcdir in
16693 .) # No --srcdir option. We are building in place.
16694 ac_srcdir=.
16695 if test -z "$ac_top_builddir"; then
16696 ac_top_srcdir=.
16697 else
16698 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16699 fi ;;
16700 [\\/]* | ?:[\\/]* ) # Absolute path.
16701 ac_srcdir=$srcdir$ac_dir_suffix;
16702 ac_top_srcdir=$srcdir ;;
16703 *) # Relative path.
16704 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
16705 ac_top_srcdir=$ac_top_builddir$srcdir ;;
16706esac
16707# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
16708# absolute.
16709ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016710ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000016711ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
16712ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
16713
16714
16715 case $INSTALL in
16716 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16717 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
16718 esac
16719
16720 if test x"$ac_file" != x-; then
16721 { echo "$as_me:$LINENO: creating $ac_file" >&5
16722echo "$as_me: creating $ac_file" >&6;}
16723 rm -f "$ac_file"
16724 fi
16725 # Let's still pretend it is `configure' which instantiates (i.e., don't
16726 # use $as_me), people would be surprised to read:
16727 # /* config.h. Generated by config.status. */
16728 if test x"$ac_file" = x-; then
16729 configure_input=
16730 else
16731 configure_input="$ac_file. "
16732 fi
16733 configure_input=$configure_input"Generated from `echo $ac_file_in |
16734 sed 's,.*/,,'` by configure."
16735
16736 # First look for the input files in the build tree, otherwise in the
16737 # src tree.
16738 ac_file_inputs=`IFS=:
16739 for f in $ac_file_in; do
16740 case $f in
16741 -) echo $tmp/stdin ;;
16742 [\\/$]*)
16743 # Absolute (can't be DOS-style, as IFS=:)
16744 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16745echo "$as_me: error: cannot find input file: $f" >&2;}
16746 { (exit 1); exit 1; }; }
16747 echo $f;;
16748 *) # Relative
16749 if test -f "$f"; then
16750 # Build tree
16751 echo $f
16752 elif test -f "$srcdir/$f"; then
16753 # Source tree
16754 echo $srcdir/$f
16755 else
16756 # /dev/null tree
16757 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16758echo "$as_me: error: cannot find input file: $f" >&2;}
16759 { (exit 1); exit 1; }; }
16760 fi;;
16761 esac
16762 done` || { (exit 1); exit 1; }
16763_ACEOF
16764cat >>$CONFIG_STATUS <<_ACEOF
16765 sed "$ac_vpsub
16766$extrasub
16767_ACEOF
16768cat >>$CONFIG_STATUS <<\_ACEOF
16769:t
16770/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16771s,@configure_input@,$configure_input,;t t
16772s,@srcdir@,$ac_srcdir,;t t
16773s,@abs_srcdir@,$ac_abs_srcdir,;t t
16774s,@top_srcdir@,$ac_top_srcdir,;t t
16775s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
16776s,@builddir@,$ac_builddir,;t t
16777s,@abs_builddir@,$ac_abs_builddir,;t t
16778s,@top_builddir@,$ac_top_builddir,;t t
16779s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
16780s,@INSTALL@,$ac_INSTALL,;t t
16781" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16782 rm -f $tmp/stdin
16783 if test x"$ac_file" != x-; then
16784 mv $tmp/out $ac_file
16785 else
16786 cat $tmp/out
16787 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016788 fi
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790done
16791_ACEOF
16792cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016793
Martin v. Löwis11437992002-04-12 09:54:03 +000016794#
16795# CONFIG_HEADER section.
16796#
Guido van Rossum627b2d71993-12-24 10:39:16 +000016797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016798# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16799# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016800#
16801# ac_d sets the value in "#define NAME VALUE" lines.
Martin v. Löwis11437992002-04-12 09:54:03 +000016802ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16803ac_dB='[ ].*$,\1#\2'
16804ac_dC=' '
16805ac_dD=',;t'
16806# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16807ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16808ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016809ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000016810ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000016811
Martin v. Löwis11437992002-04-12 09:54:03 +000016812for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000016813 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 case $ac_file in
16815 - | *:- | *:-:* ) # input from stdin
16816 cat >$tmp/stdin
16817 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16818 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16819 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16820 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16821 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016822 esac
16823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
16825echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000016826
Martin v. Löwis11437992002-04-12 09:54:03 +000016827 # First look for the input files in the build tree, otherwise in the
16828 # src tree.
16829 ac_file_inputs=`IFS=:
16830 for f in $ac_file_in; do
16831 case $f in
16832 -) echo $tmp/stdin ;;
16833 [\\/$]*)
16834 # Absolute (can't be DOS-style, as IFS=:)
16835 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16836echo "$as_me: error: cannot find input file: $f" >&2;}
16837 { (exit 1); exit 1; }; }
16838 echo $f;;
16839 *) # Relative
16840 if test -f "$f"; then
16841 # Build tree
16842 echo $f
16843 elif test -f "$srcdir/$f"; then
16844 # Source tree
16845 echo $srcdir/$f
16846 else
16847 # /dev/null tree
16848 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
16849echo "$as_me: error: cannot find input file: $f" >&2;}
16850 { (exit 1); exit 1; }; }
16851 fi;;
16852 esac
16853 done` || { (exit 1); exit 1; }
16854 # Remove the trailing spaces.
16855 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016856
Martin v. Löwis11437992002-04-12 09:54:03 +000016857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858
Martin v. Löwis11437992002-04-12 09:54:03 +000016859# Transform confdefs.h into two sed scripts, `conftest.defines' and
16860# `conftest.undefs', that substitutes the proper values into
16861# config.h.in to produce config.h. The first handles `#define'
16862# templates, and the second `#undef' templates.
16863# And first: Protect against being on the right side of a sed subst in
16864# config.status. Protect against being in an unquoted here document
16865# in config.status.
16866rm -f conftest.defines conftest.undefs
16867# Using a here document instead of a string reduces the quoting nightmare.
16868# Putting comments in sed scripts is not portable.
16869#
16870# `end' is used to avoid that the second main sed command (meant for
16871# 0-ary CPP macros) applies to n-ary macro definitions.
16872# See the Autoconf documentation for `clear'.
16873cat >confdef2sed.sed <<\_ACEOF
16874s/[\\&,]/\\&/g
16875s,[\\$`],\\&,g
16876t clear
16877: clear
16878s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
16879t end
16880s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
16881: end
16882_ACEOF
16883# If some macros were called several times there might be several times
16884# the same #defines, which is useless. Nevertheless, we may not want to
16885# sort them, since we want the *last* AC-DEFINE to be honored.
16886uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
16887sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
16888rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016889
16890# This sed command replaces #undef with comments. This is necessary, for
16891# example, in the case of _POSIX_SOURCE, which is predefined and required
16892# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016893cat >>conftest.undefs <<\_ACEOF
16894s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
16895_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016896
Martin v. Löwis11437992002-04-12 09:54:03 +000016897# Break up conftest.defines because some shells have a limit on the size
16898# of here documents, and old seds have small limits too (100 cmds).
16899echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarodecc6a42003-01-01 20:07:49 +000016900echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016901echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
16902echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016903rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000016904while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000016905do
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 # Write a limited-size here document to $tmp/defines.sed.
16907 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
16908 # Speed up: don't consider the non `#define' lines.
16909 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
16910 # Work around the forget-to-reset-the-flag bug.
16911 echo 't clr' >>$CONFIG_STATUS
16912 echo ': clr' >>$CONFIG_STATUS
16913 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016914 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 sed -f $tmp/defines.sed $tmp/in >$tmp/out
16916 rm -f $tmp/in
16917 mv $tmp/out $tmp/in
16918' >>$CONFIG_STATUS
16919 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
16920 rm -f conftest.defines
16921 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000016922done
Martin v. Löwis11437992002-04-12 09:54:03 +000016923rm -f conftest.defines
Skip Montanarodecc6a42003-01-01 20:07:49 +000016924echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000016925echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000016926
Martin v. Löwis11437992002-04-12 09:54:03 +000016927# Break up conftest.undefs because some shells have a limit on the size
16928# of here documents, and old seds have small limits too (100 cmds).
16929echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
16930rm -f conftest.tail
16931while grep . conftest.undefs >/dev/null
16932do
16933 # Write a limited-size here document to $tmp/undefs.sed.
16934 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
16935 # Speed up: don't consider the non `#undef'
16936 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
16937 # Work around the forget-to-reset-the-flag bug.
16938 echo 't clr' >>$CONFIG_STATUS
16939 echo ': clr' >>$CONFIG_STATUS
16940 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
16941 echo 'CEOF
16942 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
16943 rm -f $tmp/in
16944 mv $tmp/out $tmp/in
16945' >>$CONFIG_STATUS
16946 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
16947 rm -f conftest.undefs
16948 mv conftest.tail conftest.undefs
16949done
16950rm -f conftest.undefs
16951
16952cat >>$CONFIG_STATUS <<\_ACEOF
16953 # Let's still pretend it is `configure' which instantiates (i.e., don't
16954 # use $as_me), people would be surprised to read:
16955 # /* config.h. Generated by config.status. */
16956 if test x"$ac_file" = x-; then
16957 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000016958 else
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000016960 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 cat $tmp/in >>$tmp/config.h
16962 rm -f $tmp/in
16963 if test x"$ac_file" != x-; then
16964 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16965 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
16966echo "$as_me: $ac_file is unchanged" >&6;}
16967 else
16968 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16969$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16970 X"$ac_file" : 'X\(//\)[^/]' \| \
16971 X"$ac_file" : 'X\(//\)$' \| \
16972 X"$ac_file" : 'X\(/\)' \| \
16973 . : '\(.\)' 2>/dev/null ||
16974echo X"$ac_file" |
16975 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16976 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16977 /^X\(\/\/\)$/{ s//\1/; q; }
16978 /^X\(\/\).*/{ s//\1/; q; }
16979 s/.*/./; q'`
Skip Montanarodecc6a42003-01-01 20:07:49 +000016980 { if $as_mkdir_p; then
16981 mkdir -p "$ac_dir"
16982 else
16983 as_dir="$ac_dir"
16984 as_dirs=
16985 while test ! -d "$as_dir"; do
16986 as_dirs="$as_dir $as_dirs"
16987 as_dir=`(dirname "$as_dir") 2>/dev/null ||
16988$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16989 X"$as_dir" : 'X\(//\)[^/]' \| \
16990 X"$as_dir" : 'X\(//\)$' \| \
16991 X"$as_dir" : 'X\(/\)' \| \
16992 . : '\(.\)' 2>/dev/null ||
16993echo X"$as_dir" |
16994 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16995 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16996 /^X\(\/\/\)$/{ s//\1/; q; }
16997 /^X\(\/\).*/{ s//\1/; q; }
16998 s/.*/./; q'`
16999 done
17000 test ! -n "$as_dirs" || mkdir $as_dirs
17001 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17002echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17003 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 rm -f $ac_file
17006 mv $tmp/config.h $ac_file
17007 fi
17008 else
17009 cat $tmp/config.h
17010 rm -f $tmp/config.h
17011 fi
17012done
17013_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017014
Martin v. Löwis11437992002-04-12 09:54:03 +000017015cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017016
Martin v. Löwis11437992002-04-12 09:54:03 +000017017{ (exit 0); exit 0; }
17018_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017019chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000017020ac_clean_files=$ac_clean_files_save
17021
17022
17023# configure is writing to config.log, and then calls config.status.
17024# config.status does its own redirection, appending to config.log.
17025# Unfortunately, on DOS this fails, as config.log is still kept open
17026# by configure, so config.status won't be able to write to it; its
17027# output is simply discarded. So we exec the FD to /dev/null,
17028# effectively closing config.log, so it can be properly (re)opened and
17029# appended to by config.status. When coming back to configure, we
17030# need to make the FD available again.
17031if test "$no_create" != yes; then
17032 ac_cs_success=:
17033 exec 5>/dev/null
17034 $SHELL $CONFIG_STATUS || ac_cs_success=false
17035 exec 5>>config.log
17036 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17037 # would make configure fail if this is the last instruction.
17038 $ac_cs_success || { (exit 1); exit 1; }
17039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017040
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017041
17042echo "creating Setup"
17043if test ! -f Modules/Setup
17044then
17045 cp $srcdir/Modules/Setup.dist Modules/Setup
17046fi
17047
17048echo "creating Setup.local"
17049if test ! -f Modules/Setup.local
17050then
17051 echo "# Edit this file for local setup changes" >Modules/Setup.local
17052fi
17053
17054echo "creating Makefile"
17055$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17056 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017057 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017058mv config.c Modules