blob: 0984980481a05152584b20e7b9c7414c644b73ad [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002# From configure.in Revision: 1.483 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanarof0d5f792004-08-15 14:08:23 +00008# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011## --------------------- ##
12## M4sh Initialization. ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000025DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026
Martin v. Löwis11437992002-04-12 09:54:03 +000027# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000029 as_unset=unset
30else
31 as_unset=false
32fi
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
35# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH
37PS1='$ '
38PS2='> '
39PS4='+ '
40
41# NLS nuisances.
42for as_var in \
43 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45 LC_TELEPHONE LC_TIME
46do
Skip Montanarof0d5f792004-08-15 14:08:23 +000047 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000048 eval $as_var=C; export $as_var
49 else
50 $as_unset $as_var
51 fi
52done
53
54# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then
56 as_expr=expr
57else
58 as_expr=false
59fi
60
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
62 as_basename=basename
63else
64 as_basename=false
65fi
Martin v. Löwis11437992002-04-12 09:54:03 +000066
67
68# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000069as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
76 /^X\/\(\/\/\)$/{ s//\1/; q; }
77 /^X\/\(\/\).*/{ s//\1/; q; }
78 s/.*/./; q'`
79
Skip Montanaro6dead952003-09-25 14:50:04 +000080
Martin v. Löwis11437992002-04-12 09:54:03 +000081# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88
89# The user is always right.
90if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000091 echo "#! /bin/sh" >conf$$.sh
92 echo "exit 0" >>conf$$.sh
93 chmod +x conf$$.sh
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000095 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000099 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +0000100fi
101
102
103 as_lineno_1=$LINENO
104 as_lineno_2=$LINENO
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
106 test "x$as_lineno_1" != "x$as_lineno_2" &&
107 test "x$as_lineno_3" = "x$as_lineno_2" || {
108 # Find who we are. Look in the path if we contain no path at all
109 # relative or not.
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119
120 ;;
121 esac
122 # We did not find ourselves, most probably we were run as `sh COMMAND'
123 # in which case we are not to be found in the path.
124 if test "x$as_myself" = x; then
125 as_myself=$0
126 fi
127 if test ! -f "$as_myself"; then
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
129 { (exit 1); exit 1; }; }
130 fi
131 case $CONFIG_SHELL in
132 '')
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
140 /*)
141 if ("$as_dir/$as_base" -c '
142 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
155done
156;;
157 esac
158
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real
162 # work. The second script uses 'N' to pair each line-number line
163 # with the numbered line, and appends trailing '-' during
164 # substitution so that $LINENO is not a special case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
168 sed '
169 N
170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop
174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; }
180
181 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
185 # Exit status is that of the last command.
186 exit
187}
188
189
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
191 *c*,-n*) ECHO_N= ECHO_C='
192' ECHO_T=' ' ;;
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
195esac
196
197if expr a : '\(a\)' >/dev/null 2>&1; then
198 as_expr=expr
199else
200 as_expr=false
201fi
202
203rm -f conf$$ conf$$.exe conf$$.file
204echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
208 if test -f conf$$.exe; then
209 # Don't use ln at all; we don't have any links
210 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
219rm -f conf$$ conf$$.exe conf$$.file
220
Skip Montanaro6dead952003-09-25 14:50:04 +0000221if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=:
223else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000224 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000225 as_mkdir_p=false
226fi
227
Martin v. Löwis11437992002-04-12 09:54:03 +0000228as_executable_p="test -f"
229
230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000235
236
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000244$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245
246
247# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251
252exec 6>&1
253
254#
255# Initializations.
256#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000258ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000259cross_compiling=no
260subdirs=
261MFLAGS=
262MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh}
264
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000273PACKAGE_VERSION='2.5'
274PACKAGE_STRING='python 2.5'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292# include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297# include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
Bob Ippolito7026a0a2005-03-28 23:23:47 +0000315ac_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 EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET 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 OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE 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'
Skip Montanaro6dead952003-09-25 14:50:04 +0000316ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000317
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000319ac_init_help=
320ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000321# The variables have the same names as the options, with
322# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000323cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000334verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335x_includes=NONE
336x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share'
347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include'
352oldincludedir='/usr/include'
353infodir='${prefix}/info'
354mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000355
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356ac_prev=
357for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000358do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 # If the previous option needs an argument, assign it.
360 if test -n "$ac_prev"; then
361 eval "$ac_prev=\$ac_option"
362 ac_prev=
363 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Martin v. Löwis11437992002-04-12 09:54:03 +0000366 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 # Accept the important Cygnus configure options, so we can diagnose typos.
369
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000372 -bindir | --bindir | --bindi | --bind | --bin | --bi)
373 ac_prev=bindir ;;
374 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376
377 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000379 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000380 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000382 -cache-file | --cache-file | --cache-fil | --cache-fi \
383 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
384 ac_prev=cache_file ;;
385 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
386 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000387 cache_file=$ac_optarg ;;
388
389 --config-cache | -C)
390 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393 ac_prev=datadir ;;
394 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000397
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; }
404 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
405 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; }
413 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414 case $ac_option in
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416 *) ac_optarg=yes ;;
417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000418 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422 | --exec | --exe | --ex)
423 ac_prev=exec_prefix ;;
424 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000427 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000428
429 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 # Obsolete; use --with-gas.
431 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 -help | --help | --hel | --he | -h)
434 ac_init_help=long ;;
435 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
436 ac_init_help=recursive ;;
437 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
438 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439
440 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000445 -includedir | --includedir | --includedi | --included | --include \
446 | --includ | --inclu | --incl | --inc)
447 ac_prev=includedir ;;
448 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
449 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -infodir | --infodir | --infodi | --infod | --info | --inf)
453 ac_prev=infodir ;;
454 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000456
457 -libdir | --libdir | --libdi | --libd)
458 ac_prev=libdir ;;
459 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000461
462 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
463 | --libexe | --libex | --libe)
464 ac_prev=libexecdir ;;
465 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
466 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000467 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000468
469 -localstatedir | --localstatedir | --localstatedi | --localstated \
470 | --localstate | --localstat | --localsta | --localst \
471 | --locals | --local | --loca | --loc | --lo)
472 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000476 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000477
478 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
479 ac_prev=mandir ;;
480 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000481 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000482
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Obsolete; use --without-fp.
485 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489 no_create=yes ;;
490
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
493 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000495 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
496 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
497 | --oldin | --oldi | --old | --ol | --o)
498 ac_prev=oldincludedir ;;
499 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
500 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
501 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000503
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
505 ac_prev=prefix ;;
506 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508
509 -program-prefix | --program-prefix | --program-prefi | --program-pref \
510 | --program-pre | --program-pr | --program-p)
511 ac_prev=program_prefix ;;
512 -program-prefix=* | --program-prefix=* | --program-prefi=* \
513 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000514 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000515
516 -program-suffix | --program-suffix | --program-suffi | --program-suff \
517 | --program-suf | --program-su | --program-s)
518 ac_prev=program_suffix ;;
519 -program-suffix=* | --program-suffix=* | --program-suffi=* \
520 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -program-transform-name | --program-transform-name \
524 | --program-transform-nam | --program-transform-na \
525 | --program-transform-n | --program-transform- \
526 | --program-transform | --program-transfor \
527 | --program-transfo | --program-transf \
528 | --program-trans | --program-tran \
529 | --progr-tra | --program-tr | --program-t)
530 ac_prev=program_transform_name ;;
531 -program-transform-name=* | --program-transform-name=* \
532 | --program-transform-nam=* | --program-transform-na=* \
533 | --program-transform-n=* | --program-transform-=* \
534 | --program-transform=* | --program-transfor=* \
535 | --program-transfo=* | --program-transf=* \
536 | --program-trans=* | --program-tran=* \
537 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000538 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000539
540 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541 | -silent | --silent | --silen | --sile | --sil)
542 silent=yes ;;
543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000544 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
545 ac_prev=sbindir ;;
546 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
547 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000548 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549
550 -sharedstatedir | --sharedstatedir | --sharedstatedi \
551 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
552 | --sharedst | --shareds | --shared | --share | --shar \
553 | --sha | --sh)
554 ac_prev=sharedstatedir ;;
555 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
556 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
557 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
558 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000561 -site | --site | --sit)
562 ac_prev=site ;;
563 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565
Guido van Rossum7f43da71994-08-01 12:15:30 +0000566 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
567 ac_prev=srcdir ;;
568 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000571 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
572 | --syscon | --sysco | --sysc | --sys | --sy)
573 ac_prev=sysconfdir ;;
574 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
575 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000577
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000581 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582
583 -v | -verbose | --verbose | --verbos | --verbo | --verb)
584 verbose=yes ;;
585
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 -version | --version | --versio | --versi | --vers | -V)
587 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000588
589 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000591 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000596 case $ac_option in
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598 *) ac_optarg=yes ;;
599 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000601
602 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000604 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
606 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; }
608 ac_package=`echo $ac_package | sed 's/-/_/g'`
609 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000610
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611 --x)
612 # Obsolete; use --with-x.
613 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
616 | --x-incl | --x-inc | --x-in | --x-i)
617 ac_prev=x_includes ;;
618 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
619 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000620 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000621
622 -x-libraries | --x-libraries | --x-librarie | --x-librari \
623 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
624 ac_prev=x_libraries ;;
625 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
626 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000628
Martin v. Löwis11437992002-04-12 09:54:03 +0000629 -*) { echo "$as_me: error: unrecognized option: $ac_option
630Try \`$0 --help' for more information." >&2
631 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 ;;
633
Martin v. Löwis11437992002-04-12 09:54:03 +0000634 *=*)
635 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
636 # Reject names that are not valid shell variable names.
637 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639 { (exit 1); exit 1; }; }
640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641 eval "$ac_envvar='$ac_optarg'"
642 export $ac_envvar ;;
643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000644 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000645 # FIXME: should be removed in autoconf 3.0.
646 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
647 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
648 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
649 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000650 ;;
651
652 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000653done
654
Guido van Rossum7f43da71994-08-01 12:15:30 +0000655if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000656 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
657 { echo "$as_me: error: missing argument to $ac_option" >&2
658 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659fi
660
Martin v. Löwis11437992002-04-12 09:54:03 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Martin v. Löwis11437992002-04-12 09:54:03 +0000664 eval ac_val=$`echo $ac_var`
665 case $ac_val in
666 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000669 esac
670done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671
Martin v. Löwis11437992002-04-12 09:54:03 +0000672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000674 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000675do
676 eval ac_val=$`echo $ac_var`
677 case $ac_val in
678 [\\/$]* | ?:[\\/]* ) ;;
679 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
680 { (exit 1); exit 1; }; };;
681 esac
682done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683
Martin v. Löwis11437992002-04-12 09:54:03 +0000684# There might be people who depend on the old broken behavior: `$host'
685# used to hold the argument of --host etc.
686# FIXME: To remove some day.
687build=$build_alias
688host=$host_alias
689target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
Martin v. Löwis11437992002-04-12 09:54:03 +0000691# FIXME: To remove some day.
692if test "x$host_alias" != x; then
693 if test "x$build_alias" = x; then
694 cross_compiling=maybe
695 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
696 If a cross compiler is detected then cross compile mode will be used." >&2
697 elif test "x$build_alias" != "x$host_alias"; then
698 cross_compiling=yes
699 fi
700fi
701
702ac_tool_prefix=
703test -n "$host_alias" && ac_tool_prefix=$host_alias-
704
705test "$silent" = yes && exec 6>/dev/null
706
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707
708# Find the source files, if location was not specified.
709if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000710 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000712 ac_confdir=`(dirname "$0") 2>/dev/null ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000714 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \
716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
720 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
721 /^X\(\/\/\)$/{ s//\1/; q; }
722 /^X\(\/\).*/{ s//\1/; q; }
723 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724 srcdir=$ac_confdir
725 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000726 srcdir=..
727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000728else
729 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000739fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
741 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
742 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CC_set=${CC+set}
757ac_env_CC_value=$CC
758ac_cv_env_CC_set=${CC+set}
759ac_cv_env_CC_value=$CC
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Martin v. Löwis11437992002-04-12 09:54:03 +0000777#
778# Report the --help message.
779#
780if test "$ac_init_help" = "long"; then
781 # Omit some internal or obsolete options to make the list less imposing.
782 # This message is too long to be a string in the A/UX 3.1 sh.
783 cat <<_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000784\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000811 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000812
813By default, \`make install' will install all the files in
814\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
815an installation prefix other than \`$ac_default_prefix' using \`--prefix',
816for instance \`--prefix=\$HOME'.
817
818For better control, use the options below.
819
820Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000841 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000848 --enable-framework[=INSTALLDIR]
849 Build (MacOSX|Darwin) framework
850 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000851 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000852 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
853 --enable-ipv6 Enable ipv6 (with ipv4) support
854 --disable-ipv6 Disable ipv6 support
855 --enable-unicode[=ucs[24]]
856 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858Optional Packages:
859 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
860 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000861 --without-gcc never use gcc
862 --with-cxx=<compiler> enable C++ support
863 --with-suffix=.exe set executable suffix
864 --with-pydebug build with Py_DEBUG defined
865 --with-libs='lib1 ...' link against additional libs
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis99968282004-09-15 06:02:54 +00001483 OpenBSD/2.* | OpenBSD/3.[0123456])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001484 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001485 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1486 # of union __?sigval. Reported by Stuart Bishop.
1487 SunOS/5.6)
1488 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001489 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1490 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001491 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001492 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 define_xopen_source=no;;
1494 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001495 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001497 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001498 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1499 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1500 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1501 # This should hopefully be fixed in FreeBSD 4.9
1502 FreeBSD/4.8* | Darwin/6* )
1503 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001504 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1505 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1506 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001507 AIX/4)
1508 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001509 AIX/5)
1510 if test `uname -r` -eq 1; then
1511 define_xopen_source=no
1512 fi
1513 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001514 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1515 # disables platform specific features beyond repair.
1516 Darwin/8.*)
1517 define_xopen_source=no
1518 ;;
1519
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001520esac
1521
1522if test $define_xopen_source = yes
1523then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1525 # defined precisely as g++ defines it
1526 case $ac_sys_system/$ac_sys_release in
1527 SunOS/5.8|SunOS/5.9)
1528
1529cat >>confdefs.h <<\_ACEOF
1530#define _XOPEN_SOURCE 500
1531_ACEOF
1532
1533 ;;
1534 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001535
1536cat >>confdefs.h <<\_ACEOF
1537#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001538_ACEOF
1539
Skip Montanarof0d5f792004-08-15 14:08:23 +00001540 ;;
1541 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001542
1543 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1544 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1545 # several APIs are not declared. Since this is also needed in some
1546 # cases for HP-UX, we define it globally.
1547
1548
1549cat >>confdefs.h <<\_ACEOF
1550#define _XOPEN_SOURCE_EXTENDED 1
1551_ACEOF
1552
1553
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001554
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001555cat >>confdefs.h <<\_ACEOF
1556#define _POSIX_C_SOURCE 200112L
1557_ACEOF
1558
1559
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001560fi
1561
Guido van Rossum91922671997-10-09 20:24:13 +00001562#
1563# SGI compilers allow the specification of the both the ABI and the
1564# ISA on the command line. Depending on the values of these switches,
1565# different and often incompatable code will be generated.
1566#
1567# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1568# thus supply support for various ABI/ISA combinations. The MACHDEP
1569# variable is also adjusted.
1570#
1571
1572if test ! -z "$SGI_ABI"
1573then
1574 CC="cc $SGI_ABI"
1575 LDFLAGS="$SGI_ABI $LDFLAGS"
1576 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001578echo "$as_me:$LINENO: result: $MACHDEP" >&5
1579echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001580
Jack Jansen83f898c2002-12-30 22:23:40 +00001581# And add extra plat-mac for darwin
1582
Jack Jansen7b59b422003-03-17 15:44:10 +00001583
Jack Jansen83f898c2002-12-30 22:23:40 +00001584echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1585echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1586if test -z "$EXTRAPLATDIR"
1587then
1588 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001589 darwin)
1590 EXTRAPLATDIR="\$(PLATMACDIRS)"
1591 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1592 ;;
1593 *)
1594 EXTRAPLATDIR=""
1595 EXTRAMACHDEPPATH=""
1596 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001597 esac
1598fi
1599echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1600echo "${ECHO_T}$EXTRAPLATDIR" >&6
1601
Jack Jansen6b08a402004-06-03 12:41:45 +00001602# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1603# it may influence the way we can build extensions, so distutils
1604# needs to check it
1605
1606CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1607
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001609
1610# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1611# for debug/optimization stuff. BASECFLAGS is for flags that are required
1612# just to get things to compile and link. Users are free to override OPT
1613# when running configure or make. The build should not break if they do.
1614# BASECFLAGS should generally not be messed with, however.
1615
1616# XXX shouldn't some/most/all of this code be merged with the stuff later
1617# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001618echo "$as_me:$LINENO: checking for --without-gcc" >&5
1619echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1620
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001622if test "${with_gcc+set}" = set; then
1623 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Guido van Rossum7f43da71994-08-01 12:15:30 +00001625 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001626 no) CC=cc
1627 without_gcc=yes;;
1628 yes) CC=gcc
1629 without_gcc=no;;
1630 *) CC=$withval
1631 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001632 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001635 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001636 AIX*) CC=cc_r
1637 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001638 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001639 case $BE_HOST_CPU in
1640 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001641 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001642 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001643 BASECFLAGS="$BASECFLAGS -export pragma"
1644 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001645 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001646 ;;
1647 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001648 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001649 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001650 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 ;;
1652 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1654echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1655 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001656 ;;
1657 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001658 AR="\$(srcdir)/Modules/ar_beos"
1659 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001661 Monterey*)
1662 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001663 without_gcc=;;
1664 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001665 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001666fi;
1667echo "$as_me:$LINENO: result: $without_gcc" >&5
1668echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001669
1670
Guido van Rossum95012191999-12-16 17:50:52 +00001671
Fred Drakea1a84e72001-03-06 05:52:16 +00001672MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001673echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1674echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1675
Guido van Rossum95012191999-12-16 17:50:52 +00001676# Check whether --with-cxx or --without-cxx was given.
1677if test "${with_cxx+set}" = set; then
1678 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001679
Martin v. Löwis22352952000-12-13 17:37:02 +00001680 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001681 case $withval in
1682 no) CXX=
1683 with_cxx=no;;
1684 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001685 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001686 with_cxx=$withval;;
1687 esac
1688else
Martin v. Löwis11437992002-04-12 09:54:03 +00001689
Guido van Rossum95012191999-12-16 17:50:52 +00001690 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001691 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693fi;
1694echo "$as_me:$LINENO: result: $with_cxx" >&5
1695echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001696
1697if test "$with_cxx" = "yes"
1698then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1700echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1701 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001702fi
1703
1704
1705
1706
Martin v. Löwis11437992002-04-12 09:54:03 +00001707if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001708then
1709 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1710do
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # 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 +00001712set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001713echo "$as_me:$LINENO: checking for $ac_word" >&5
1714echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1715if test "${ac_cv_prog_CXX+set}" = set; then
1716 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001717else
1718 if test -n "$CXX"; then
1719 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1720else
Martin v. Löwis11437992002-04-12 09:54:03 +00001721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1722for as_dir in $PATH
1723do
1724 IFS=$as_save_IFS
1725 test -z "$as_dir" && as_dir=.
1726 for ac_exec_ext in '' $ac_executable_extensions; do
1727 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1728 ac_cv_prog_CXX="$ac_prog"
1729 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1730 break 2
1731 fi
1732done
1733done
1734
Martin v. Löwis22352952000-12-13 17:37:02 +00001735fi
1736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001737CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001738if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 echo "$as_me:$LINENO: result: $CXX" >&5
1740echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001741else
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 echo "$as_me:$LINENO: result: no" >&5
1743echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001744fi
1745
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001747done
1748test -n "$CXX" || CXX="notfound"
1749
1750 if test "$CXX" = "notfound"
1751 then
1752 CXX=
1753 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001755ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001760/* confdefs.h. */
1761_ACEOF
1762cat confdefs.h >>conftest.$ac_ext
1763cat >>conftest.$ac_ext <<_ACEOF
1764/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001765
Martin v. Löwis11437992002-04-12 09:54:03 +00001766int
1767main ()
1768{
Michael W. Hudson54241132001-12-07 15:38:26 +00001769
Martin v. Löwis11437992002-04-12 09:54:03 +00001770 ;
1771 return 0;
1772}
1773_ACEOF
1774ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001775ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001776# Try to create an executable without -o first, disregard a.out.
1777# It will help us diagnose broken compilers, and finding out an intuition
1778# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001779echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1780echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001781ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1782if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1783 (eval $ac_link_default) 2>&5
1784 ac_status=$?
1785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1786 (exit $ac_status); }; then
1787 # Find the output, starting from the most likely. This scheme is
1788# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1789# resort.
1790
1791# Be careful to initialize this variable, since it used to be cached.
1792# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1793ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001794# b.out is created by i960 compilers.
1795for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1796do
1797 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001798 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001800 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001801 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001802 # This is the source file.
1803 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001804 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001805 # We found the default executable, but exeext='' is most
1806 # certainly right.
1807 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001808 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001809 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810 # FIXME: I believe we export ac_cv_exeext for Libtool,
1811 # but it would be cool to find out if it's true. Does anybody
1812 # maintain Libtool? --akim.
1813 export ac_cv_exeext
1814 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001815 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001816 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 esac
1818done
1819else
1820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001821sed 's/^/| /' conftest.$ac_ext >&5
1822
1823{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1824See \`config.log' for more details." >&5
1825echo "$as_me: error: C++ compiler cannot create executables
1826See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829
1830ac_exeext=$ac_cv_exeext
1831echo "$as_me:$LINENO: result: $ac_file" >&5
1832echo "${ECHO_T}$ac_file" >&6
1833
1834# Check the compiler produces executables we can run. If not, either
1835# the compiler is broken, or we cross compile.
1836echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1837echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1838# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1839# If not cross compiling, check that we can run a simple program.
1840if test "$cross_compiling" != yes; then
1841 if { ac_try='./$ac_file'
1842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1843 (eval $ac_try) 2>&5
1844 ac_status=$?
1845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1846 (exit $ac_status); }; }; then
1847 cross_compiling=no
1848 else
1849 if test "$cross_compiling" = maybe; then
1850 cross_compiling=yes
1851 else
1852 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001853If you meant to cross compile, use \`--host'.
1854See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001855echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001856If you meant to cross compile, use \`--host'.
1857See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001858 { (exit 1); exit 1; }; }
1859 fi
1860 fi
1861fi
1862echo "$as_me:$LINENO: result: yes" >&5
1863echo "${ECHO_T}yes" >&6
1864
Skip Montanaro6dead952003-09-25 14:50:04 +00001865rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001866ac_clean_files=$ac_clean_files_save
1867# Check the compiler produces executables we can run. If not, either
1868# the compiler is broken, or we cross compile.
1869echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1870echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1871echo "$as_me:$LINENO: result: $cross_compiling" >&5
1872echo "${ECHO_T}$cross_compiling" >&6
1873
1874echo "$as_me:$LINENO: checking for suffix of executables" >&5
1875echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1877 (eval $ac_link) 2>&5
1878 ac_status=$?
1879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1880 (exit $ac_status); }; then
1881 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1882# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1883# work properly (i.e., refer to `conftest.exe'), while it won't with
1884# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001885for ac_file in conftest.exe conftest conftest.*; do
1886 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001887 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001890 export ac_cv_exeext
1891 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001892 * ) break;;
1893 esac
1894done
1895else
Skip Montanaro6dead952003-09-25 14:50:04 +00001896 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1897See \`config.log' for more details." >&5
1898echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1899See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001900 { (exit 1); exit 1; }; }
1901fi
1902
1903rm -f conftest$ac_cv_exeext
1904echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1905echo "${ECHO_T}$ac_cv_exeext" >&6
1906
1907rm -f conftest.$ac_ext
1908EXEEXT=$ac_cv_exeext
1909ac_exeext=$EXEEXT
1910
1911 ac_ext=c
1912ac_cpp='$CPP $CPPFLAGS'
1913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1915ac_compiler_gnu=$ac_cv_c_compiler_gnu
1916
1917
Martin v. Löwis22352952000-12-13 17:37:02 +00001918
1919 fi
1920fi
1921
Guido van Rossum8b131c51995-03-09 14:10:13 +00001922# If the user switches compilers, we can't believe the cache
1923if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1924then
Martin v. Löwis11437992002-04-12 09:54:03 +00001925 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1926(it is also a good idea to do 'make clean' before compiling)" >&5
1927echo "$as_me: error: cached CC is different -- throw away $cache_file
1928(it is also a good idea to do 'make clean' before compiling)" >&2;}
1929 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001930fi
1931
Martin v. Löwis11437992002-04-12 09:54:03 +00001932ac_ext=c
1933ac_cpp='$CPP $CPPFLAGS'
1934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1936ac_compiler_gnu=$ac_cv_c_compiler_gnu
1937if test -n "$ac_tool_prefix"; then
1938 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1939set dummy ${ac_tool_prefix}gcc; ac_word=$2
1940echo "$as_me:$LINENO: checking for $ac_word" >&5
1941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1942if test "${ac_cv_prog_CC+set}" = set; then
1943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001944else
1945 if test -n "$CC"; then
1946 ac_cv_prog_CC="$CC" # Let the user override the test.
1947else
Martin v. Löwis11437992002-04-12 09:54:03 +00001948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1949for as_dir in $PATH
1950do
1951 IFS=$as_save_IFS
1952 test -z "$as_dir" && as_dir=.
1953 for ac_exec_ext in '' $ac_executable_extensions; do
1954 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1955 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1956 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1957 break 2
1958 fi
1959done
1960done
1961
Jack Jansendd19cf82001-12-06 22:36:17 +00001962fi
1963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001964CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001965if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001966 echo "$as_me:$LINENO: result: $CC" >&5
1967echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001968else
Martin v. Löwis11437992002-04-12 09:54:03 +00001969 echo "$as_me:$LINENO: result: no" >&5
1970echo "${ECHO_T}no" >&6
1971fi
1972
1973fi
1974if test -z "$ac_cv_prog_CC"; then
1975 ac_ct_CC=$CC
1976 # Extract the first word of "gcc", so it can be a program name with args.
1977set dummy gcc; ac_word=$2
1978echo "$as_me:$LINENO: checking for $ac_word" >&5
1979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1980if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1981 echo $ECHO_N "(cached) $ECHO_C" >&6
1982else
1983 if test -n "$ac_ct_CC"; then
1984 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1985else
1986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1987for as_dir in $PATH
1988do
1989 IFS=$as_save_IFS
1990 test -z "$as_dir" && as_dir=.
1991 for ac_exec_ext in '' $ac_executable_extensions; do
1992 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1993 ac_cv_prog_ac_ct_CC="gcc"
1994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1995 break 2
1996 fi
1997done
1998done
1999
2000fi
2001fi
2002ac_ct_CC=$ac_cv_prog_ac_ct_CC
2003if test -n "$ac_ct_CC"; then
2004 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2005echo "${ECHO_T}$ac_ct_CC" >&6
2006else
2007 echo "$as_me:$LINENO: result: no" >&5
2008echo "${ECHO_T}no" >&6
2009fi
2010
2011 CC=$ac_ct_CC
2012else
2013 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002014fi
2015
Jack Jansendd19cf82001-12-06 22:36:17 +00002016if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002017 if test -n "$ac_tool_prefix"; then
2018 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2019set dummy ${ac_tool_prefix}cc; ac_word=$2
2020echo "$as_me:$LINENO: checking for $ac_word" >&5
2021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2022if test "${ac_cv_prog_CC+set}" = set; then
2023 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002024else
2025 if test -n "$CC"; then
2026 ac_cv_prog_CC="$CC" # Let the user override the test.
2027else
Martin v. Löwis11437992002-04-12 09:54:03 +00002028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2029for as_dir in $PATH
2030do
2031 IFS=$as_save_IFS
2032 test -z "$as_dir" && as_dir=.
2033 for ac_exec_ext in '' $ac_executable_extensions; do
2034 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2035 ac_cv_prog_CC="${ac_tool_prefix}cc"
2036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2037 break 2
2038 fi
2039done
2040done
2041
2042fi
2043fi
2044CC=$ac_cv_prog_CC
2045if test -n "$CC"; then
2046 echo "$as_me:$LINENO: result: $CC" >&5
2047echo "${ECHO_T}$CC" >&6
2048else
2049 echo "$as_me:$LINENO: result: no" >&5
2050echo "${ECHO_T}no" >&6
2051fi
2052
2053fi
2054if test -z "$ac_cv_prog_CC"; then
2055 ac_ct_CC=$CC
2056 # Extract the first word of "cc", so it can be a program name with args.
2057set dummy cc; ac_word=$2
2058echo "$as_me:$LINENO: checking for $ac_word" >&5
2059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2060if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2061 echo $ECHO_N "(cached) $ECHO_C" >&6
2062else
2063 if test -n "$ac_ct_CC"; then
2064 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2065else
2066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2067for as_dir in $PATH
2068do
2069 IFS=$as_save_IFS
2070 test -z "$as_dir" && as_dir=.
2071 for ac_exec_ext in '' $ac_executable_extensions; do
2072 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2073 ac_cv_prog_ac_ct_CC="cc"
2074 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2075 break 2
2076 fi
2077done
2078done
2079
2080fi
2081fi
2082ac_ct_CC=$ac_cv_prog_ac_ct_CC
2083if test -n "$ac_ct_CC"; then
2084 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2085echo "${ECHO_T}$ac_ct_CC" >&6
2086else
2087 echo "$as_me:$LINENO: result: no" >&5
2088echo "${ECHO_T}no" >&6
2089fi
2090
2091 CC=$ac_ct_CC
2092else
2093 CC="$ac_cv_prog_CC"
2094fi
2095
2096fi
2097if test -z "$CC"; then
2098 # Extract the first word of "cc", so it can be a program name with args.
2099set dummy cc; ac_word=$2
2100echo "$as_me:$LINENO: checking for $ac_word" >&5
2101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2102if test "${ac_cv_prog_CC+set}" = set; then
2103 echo $ECHO_N "(cached) $ECHO_C" >&6
2104else
2105 if test -n "$CC"; then
2106 ac_cv_prog_CC="$CC" # Let the user override the test.
2107else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002108 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110for as_dir in $PATH
2111do
2112 IFS=$as_save_IFS
2113 test -z "$as_dir" && as_dir=.
2114 for ac_exec_ext in '' $ac_executable_extensions; do
2115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2116 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2117 ac_prog_rejected=yes
2118 continue
2119 fi
2120 ac_cv_prog_CC="cc"
2121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2122 break 2
2123 fi
2124done
2125done
2126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002127if test $ac_prog_rejected = yes; then
2128 # We found a bogon in the path, so make sure we never use it.
2129 set dummy $ac_cv_prog_CC
2130 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002132 # We chose a different compiler from the bogus one.
2133 # However, it has the same basename, so the bogon will be chosen
2134 # first if we set CC to just the basename; use the full file name.
2135 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002136 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002137 fi
2138fi
2139fi
2140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002141CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002143 echo "$as_me:$LINENO: result: $CC" >&5
2144echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002145else
Martin v. Löwis11437992002-04-12 09:54:03 +00002146 echo "$as_me:$LINENO: result: no" >&5
2147echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002148fi
2149
Martin v. Löwis11437992002-04-12 09:54:03 +00002150fi
2151if test -z "$CC"; then
2152 if test -n "$ac_tool_prefix"; then
2153 for ac_prog in cl
2154 do
2155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2157echo "$as_me:$LINENO: checking for $ac_word" >&5
2158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2159if test "${ac_cv_prog_CC+set}" = set; then
2160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002161else
2162 if test -n "$CC"; then
2163 ac_cv_prog_CC="$CC" # Let the user override the test.
2164else
Martin v. Löwis11437992002-04-12 09:54:03 +00002165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2166for as_dir in $PATH
2167do
2168 IFS=$as_save_IFS
2169 test -z "$as_dir" && as_dir=.
2170 for ac_exec_ext in '' $ac_executable_extensions; do
2171 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2172 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2173 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2174 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002176done
2177done
2178
2179fi
2180fi
2181CC=$ac_cv_prog_CC
2182if test -n "$CC"; then
2183 echo "$as_me:$LINENO: result: $CC" >&5
2184echo "${ECHO_T}$CC" >&6
2185else
2186 echo "$as_me:$LINENO: result: no" >&5
2187echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002188fi
2189
Martin v. Löwis11437992002-04-12 09:54:03 +00002190 test -n "$CC" && break
2191 done
2192fi
2193if test -z "$CC"; then
2194 ac_ct_CC=$CC
2195 for ac_prog in cl
2196do
2197 # Extract the first word of "$ac_prog", so it can be a program name with args.
2198set dummy $ac_prog; ac_word=$2
2199echo "$as_me:$LINENO: checking for $ac_word" >&5
2200echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2201if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2202 echo $ECHO_N "(cached) $ECHO_C" >&6
2203else
2204 if test -n "$ac_ct_CC"; then
2205 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2206else
2207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2208for as_dir in $PATH
2209do
2210 IFS=$as_save_IFS
2211 test -z "$as_dir" && as_dir=.
2212 for ac_exec_ext in '' $ac_executable_extensions; do
2213 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2214 ac_cv_prog_ac_ct_CC="$ac_prog"
2215 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2216 break 2
2217 fi
2218done
2219done
Jack Jansendd19cf82001-12-06 22:36:17 +00002220
Martin v. Löwis11437992002-04-12 09:54:03 +00002221fi
2222fi
2223ac_ct_CC=$ac_cv_prog_ac_ct_CC
2224if test -n "$ac_ct_CC"; then
2225 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2226echo "${ECHO_T}$ac_ct_CC" >&6
2227else
2228 echo "$as_me:$LINENO: result: no" >&5
2229echo "${ECHO_T}no" >&6
2230fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002231
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 test -n "$ac_ct_CC" && break
2233done
Michael W. Hudson54241132001-12-07 15:38:26 +00002234
Martin v. Löwis11437992002-04-12 09:54:03 +00002235 CC=$ac_ct_CC
2236fi
2237
2238fi
2239
2240
Skip Montanaro6dead952003-09-25 14:50:04 +00002241test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2242See \`config.log' for more details." >&5
2243echo "$as_me: error: no acceptable C compiler found in \$PATH
2244See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 { (exit 1); exit 1; }; }
2246
2247# Provide some information about the compiler.
2248echo "$as_me:$LINENO:" \
2249 "checking for C compiler version" >&5
2250ac_compiler=`set X $ac_compile; echo $2`
2251{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2252 (eval $ac_compiler --version </dev/null >&5) 2>&5
2253 ac_status=$?
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); }
2256{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2257 (eval $ac_compiler -v </dev/null >&5) 2>&5
2258 ac_status=$?
2259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2260 (exit $ac_status); }
2261{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2262 (eval $ac_compiler -V </dev/null >&5) 2>&5
2263 ac_status=$?
2264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2265 (exit $ac_status); }
2266
2267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002268/* confdefs.h. */
2269_ACEOF
2270cat confdefs.h >>conftest.$ac_ext
2271cat >>conftest.$ac_ext <<_ACEOF
2272/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274int
2275main ()
2276{
2277
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002283ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002284# Try to create an executable without -o first, disregard a.out.
2285# It will help us diagnose broken compilers, and finding out an intuition
2286# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002287echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2288echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002289ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2290if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2291 (eval $ac_link_default) 2>&5
2292 ac_status=$?
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); }; then
2295 # Find the output, starting from the most likely. This scheme is
2296# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2297# resort.
2298
2299# Be careful to initialize this variable, since it used to be cached.
2300# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2301ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002302# b.out is created by i960 compilers.
2303for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2304do
2305 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002306 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002307 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002308 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002309 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002310 # This is the source file.
2311 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002312 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002313 # We found the default executable, but exeext='' is most
2314 # certainly right.
2315 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002316 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2318 # FIXME: I believe we export ac_cv_exeext for Libtool,
2319 # but it would be cool to find out if it's true. Does anybody
2320 # maintain Libtool? --akim.
2321 export ac_cv_exeext
2322 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002323 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002324 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 esac
2326done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002327else
Martin v. Löwis11437992002-04-12 09:54:03 +00002328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002329sed 's/^/| /' conftest.$ac_ext >&5
2330
2331{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2332See \`config.log' for more details." >&5
2333echo "$as_me: error: C compiler cannot create executables
2334See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002335 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002336fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002337
Martin v. Löwis11437992002-04-12 09:54:03 +00002338ac_exeext=$ac_cv_exeext
2339echo "$as_me:$LINENO: result: $ac_file" >&5
2340echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002341
Martin v. Löwis11437992002-04-12 09:54:03 +00002342# Check the compiler produces executables we can run. If not, either
2343# the compiler is broken, or we cross compile.
2344echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2345echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2346# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2347# If not cross compiling, check that we can run a simple program.
2348if test "$cross_compiling" != yes; then
2349 if { ac_try='./$ac_file'
2350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351 (eval $ac_try) 2>&5
2352 ac_status=$?
2353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354 (exit $ac_status); }; }; then
2355 cross_compiling=no
2356 else
2357 if test "$cross_compiling" = maybe; then
2358 cross_compiling=yes
2359 else
2360 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002361If you meant to cross compile, use \`--host'.
2362See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002363echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002364If you meant to cross compile, use \`--host'.
2365See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002366 { (exit 1); exit 1; }; }
2367 fi
2368 fi
2369fi
2370echo "$as_me:$LINENO: result: yes" >&5
2371echo "${ECHO_T}yes" >&6
2372
Skip Montanaro6dead952003-09-25 14:50:04 +00002373rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002374ac_clean_files=$ac_clean_files_save
2375# Check the compiler produces executables we can run. If not, either
2376# the compiler is broken, or we cross compile.
2377echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2378echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2379echo "$as_me:$LINENO: result: $cross_compiling" >&5
2380echo "${ECHO_T}$cross_compiling" >&6
2381
2382echo "$as_me:$LINENO: checking for suffix of executables" >&5
2383echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2385 (eval $ac_link) 2>&5
2386 ac_status=$?
2387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2388 (exit $ac_status); }; then
2389 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2390# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2391# work properly (i.e., refer to `conftest.exe'), while it won't with
2392# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393for ac_file in conftest.exe conftest conftest.*; do
2394 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002395 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002398 export ac_cv_exeext
2399 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 * ) break;;
2401 esac
2402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002403else
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2405See \`config.log' for more details." >&5
2406echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2407See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002409fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002410
Martin v. Löwis11437992002-04-12 09:54:03 +00002411rm -f conftest$ac_cv_exeext
2412echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2413echo "${ECHO_T}$ac_cv_exeext" >&6
2414
2415rm -f conftest.$ac_ext
2416EXEEXT=$ac_cv_exeext
2417ac_exeext=$EXEEXT
2418echo "$as_me:$LINENO: checking for suffix of object files" >&5
2419echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2420if test "${ac_cv_objext+set}" = set; then
2421 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002422else
Martin v. Löwis11437992002-04-12 09:54:03 +00002423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002424/* confdefs.h. */
2425_ACEOF
2426cat confdefs.h >>conftest.$ac_ext
2427cat >>conftest.$ac_ext <<_ACEOF
2428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002429
Martin v. Löwis11437992002-04-12 09:54:03 +00002430int
2431main ()
2432{
2433
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438rm -f conftest.o conftest.obj
2439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2440 (eval $ac_compile) 2>&5
2441 ac_status=$?
2442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2443 (exit $ac_status); }; then
2444 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2445 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2448 break;;
2449 esac
2450done
2451else
2452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2456See \`config.log' for more details." >&5
2457echo "$as_me: error: cannot compute suffix of object files: cannot compile
2458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 { (exit 1); exit 1; }; }
2460fi
2461
2462rm -f conftest.$ac_cv_objext conftest.$ac_ext
2463fi
2464echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2465echo "${ECHO_T}$ac_cv_objext" >&6
2466OBJEXT=$ac_cv_objext
2467ac_objext=$OBJEXT
2468echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2469echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2470if test "${ac_cv_c_compiler_gnu+set}" = set; then
2471 echo $ECHO_N "(cached) $ECHO_C" >&6
2472else
2473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002474/* confdefs.h. */
2475_ACEOF
2476cat confdefs.h >>conftest.$ac_ext
2477cat >>conftest.$ac_ext <<_ACEOF
2478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
Martin v. Löwis11437992002-04-12 09:54:03 +00002480int
2481main ()
2482{
2483#ifndef __GNUC__
2484 choke me
2485#endif
2486
2487 ;
2488 return 0;
2489}
2490_ACEOF
2491rm -f conftest.$ac_objext
2492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 grep -v '^ *+' conftest.er1 >conftest.err
2496 rm -f conftest.er1
2497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002500 { ac_try='test -z "$ac_c_werror_flag"
2501 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2503 (eval $ac_try) 2>&5
2504 ac_status=$?
2505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506 (exit $ac_status); }; } &&
2507 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2509 (eval $ac_try) 2>&5
2510 ac_status=$?
2511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2512 (exit $ac_status); }; }; then
2513 ac_compiler_gnu=yes
2514else
2515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002516sed 's/^/| /' conftest.$ac_ext >&5
2517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518ac_compiler_gnu=no
2519fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_cv_c_compiler_gnu=$ac_compiler_gnu
2522
2523fi
2524echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2525echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2526GCC=`test $ac_compiler_gnu = yes && echo yes`
2527ac_test_CFLAGS=${CFLAGS+set}
2528ac_save_CFLAGS=$CFLAGS
2529CFLAGS="-g"
2530echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2531echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2532if test "${ac_cv_prog_cc_g+set}" = set; then
2533 echo $ECHO_N "(cached) $ECHO_C" >&6
2534else
2535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002536/* confdefs.h. */
2537_ACEOF
2538cat confdefs.h >>conftest.$ac_ext
2539cat >>conftest.$ac_ext <<_ACEOF
2540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542int
2543main ()
2544{
2545
2546 ;
2547 return 0;
2548}
2549_ACEOF
2550rm -f conftest.$ac_objext
2551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002552 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002554 grep -v '^ *+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002559 { ac_try='test -z "$ac_c_werror_flag"
2560 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2562 (eval $ac_try) 2>&5
2563 ac_status=$?
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); }; } &&
2566 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568 (eval $ac_try) 2>&5
2569 ac_status=$?
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002572 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573else
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002575sed 's/^/| /' conftest.$ac_ext >&5
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002578fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002579rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002581echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2582echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002583if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002585elif test $ac_cv_prog_cc_g = yes; then
2586 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002587 CFLAGS="-g -O2"
2588 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002589 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590 fi
2591else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002592 if test "$GCC" = yes; then
2593 CFLAGS="-O2"
2594 else
2595 CFLAGS=
2596 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002598echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2599echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2600if test "${ac_cv_prog_cc_stdc+set}" = set; then
2601 echo $ECHO_N "(cached) $ECHO_C" >&6
2602else
2603 ac_cv_prog_cc_stdc=no
2604ac_save_CC=$CC
2605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002606/* confdefs.h. */
2607_ACEOF
2608cat confdefs.h >>conftest.$ac_ext
2609cat >>conftest.$ac_ext <<_ACEOF
2610/* end confdefs.h. */
2611#include <stdarg.h>
2612#include <stdio.h>
2613#include <sys/types.h>
2614#include <sys/stat.h>
2615/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2616struct buf { int x; };
2617FILE * (*rcsopen) (struct buf *, struct stat *, int);
2618static char *e (p, i)
2619 char **p;
2620 int i;
2621{
2622 return p[i];
2623}
2624static char *f (char * (*g) (char **, int), char **p, ...)
2625{
2626 char *s;
2627 va_list v;
2628 va_start (v,p);
2629 s = g (p, va_arg (v,int));
2630 va_end (v);
2631 return s;
2632}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002633
2634/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2635 function prototypes and stuff, but not '\xHH' hex character constants.
2636 These don't provoke an error unfortunately, instead are silently treated
2637 as 'x'. The following induces an error, until -std1 is added to get
2638 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2639 array size at least. It's necessary to write '\x00'==0 to get something
2640 that's true only with -std1. */
2641int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2642
Skip Montanaro6dead952003-09-25 14:50:04 +00002643int test (int i, double x);
2644struct s1 {int (*f) (int a);};
2645struct s2 {int (*f) (double a);};
2646int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2647int argc;
2648char **argv;
2649int
2650main ()
2651{
2652return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2653 ;
2654 return 0;
2655}
2656_ACEOF
2657# Don't try gcc -ansi; that turns off useful extensions and
2658# breaks some systems' header files.
2659# AIX -qlanglvl=ansi
2660# Ultrix and OSF/1 -std1
2661# HP-UX 10.20 and later -Ae
2662# HP-UX older versions -Aa -D_HPUX_SOURCE
2663# SVR4 -Xc -D__EXTENSIONS__
2664for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2665do
2666 CC="$ac_save_CC $ac_arg"
2667 rm -f conftest.$ac_objext
2668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002669 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002671 grep -v '^ *+' conftest.er1 >conftest.err
2672 rm -f conftest.er1
2673 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002676 { ac_try='test -z "$ac_c_werror_flag"
2677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2679 (eval $ac_try) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; } &&
2683 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2685 (eval $ac_try) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); }; }; then
2689 ac_cv_prog_cc_stdc=$ac_arg
2690break
2691else
2692 echo "$as_me: failed program was:" >&5
2693sed 's/^/| /' conftest.$ac_ext >&5
2694
2695fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002696rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002697done
2698rm -f conftest.$ac_ext conftest.$ac_objext
2699CC=$ac_save_CC
2700
2701fi
2702
2703case "x$ac_cv_prog_cc_stdc" in
2704 x|xno)
2705 echo "$as_me:$LINENO: result: none needed" >&5
2706echo "${ECHO_T}none needed" >&6 ;;
2707 *)
2708 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2709echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2710 CC="$CC $ac_cv_prog_cc_stdc" ;;
2711esac
2712
Martin v. Löwis11437992002-04-12 09:54:03 +00002713# Some people use a C++ compiler to compile C. Since we use `exit',
2714# in C++ we need to declare it. In case someone uses the same compiler
2715# for both compiling C and C++ we need to have the C++ compiler decide
2716# the declaration of exit, since it's the most demanding environment.
2717cat >conftest.$ac_ext <<_ACEOF
2718#ifndef __cplusplus
2719 choke me
2720#endif
2721_ACEOF
2722rm -f conftest.$ac_objext
2723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002726 grep -v '^ *+' conftest.er1 >conftest.err
2727 rm -f conftest.er1
2728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002731 { ac_try='test -z "$ac_c_werror_flag"
2732 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734 (eval $ac_try) 2>&5
2735 ac_status=$?
2736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737 (exit $ac_status); }; } &&
2738 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2740 (eval $ac_try) 2>&5
2741 ac_status=$?
2742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743 (exit $ac_status); }; }; then
2744 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002745 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 'extern "C" void std::exit (int) throw (); using std::exit;' \
2747 'extern "C" void std::exit (int); using std::exit;' \
2748 'extern "C" void exit (int) throw ();' \
2749 'extern "C" void exit (int);' \
2750 'void exit (int);'
2751do
2752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002753/* confdefs.h. */
2754_ACEOF
2755cat confdefs.h >>conftest.$ac_ext
2756cat >>conftest.$ac_ext <<_ACEOF
2757/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002758$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002759#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002760int
2761main ()
2762{
2763exit (42);
2764 ;
2765 return 0;
2766}
2767_ACEOF
2768rm -f conftest.$ac_objext
2769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002770 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002772 grep -v '^ *+' conftest.er1 >conftest.err
2773 rm -f conftest.er1
2774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002777 { ac_try='test -z "$ac_c_werror_flag"
2778 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2780 (eval $ac_try) 2>&5
2781 ac_status=$?
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); }; } &&
2784 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2786 (eval $ac_try) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); }; }; then
2790 :
2791else
2792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002793sed 's/^/| /' conftest.$ac_ext >&5
2794
Martin v. Löwis11437992002-04-12 09:54:03 +00002795continue
2796fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002799/* confdefs.h. */
2800_ACEOF
2801cat confdefs.h >>conftest.$ac_ext
2802cat >>conftest.$ac_ext <<_ACEOF
2803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002804$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002805int
2806main ()
2807{
2808exit (42);
2809 ;
2810 return 0;
2811}
2812_ACEOF
2813rm -f conftest.$ac_objext
2814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002815 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002817 grep -v '^ *+' conftest.er1 >conftest.err
2818 rm -f conftest.er1
2819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002822 { ac_try='test -z "$ac_c_werror_flag"
2823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2825 (eval $ac_try) 2>&5
2826 ac_status=$?
2827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); }; } &&
2829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831 (eval $ac_try) 2>&5
2832 ac_status=$?
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834 (exit $ac_status); }; }; then
2835 break
2836else
2837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002838sed 's/^/| /' conftest.$ac_ext >&5
2839
Martin v. Löwis11437992002-04-12 09:54:03 +00002840fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002842done
2843rm -f conftest*
2844if test -n "$ac_declaration"; then
2845 echo '#ifdef __cplusplus' >>confdefs.h
2846 echo $ac_declaration >>confdefs.h
2847 echo '#endif' >>confdefs.h
2848fi
2849
2850else
2851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002852sed 's/^/| /' conftest.$ac_ext >&5
2853
Martin v. Löwis11437992002-04-12 09:54:03 +00002854fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002856ac_ext=c
2857ac_cpp='$CPP $CPPFLAGS'
2858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2860ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002861
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002862
2863# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865ac_ext=c
2866ac_cpp='$CPP $CPPFLAGS'
2867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869ac_compiler_gnu=$ac_cv_c_compiler_gnu
2870echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2871echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002872# On Suns, sometimes $CPP names a directory.
2873if test -n "$CPP" && test -d "$CPP"; then
2874 CPP=
2875fi
2876if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 if test "${ac_cv_prog_CPP+set}" = set; then
2878 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002879else
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 # Double quotes because CPP needs to be expanded
2881 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2882 do
2883 ac_preproc_ok=false
2884for ac_c_preproc_warn_flag in '' yes
2885do
2886 # Use a header file that comes with gcc, so configuring glibc
2887 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002888 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2889 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002890 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 # not just through cpp. "Syntax error" is here to catch this case.
2892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002893/* confdefs.h. */
2894_ACEOF
2895cat confdefs.h >>conftest.$ac_ext
2896cat >>conftest.$ac_ext <<_ACEOF
2897/* end confdefs.h. */
2898#ifdef __STDC__
2899# include <limits.h>
2900#else
2901# include <assert.h>
2902#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002903 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002904_ACEOF
2905if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2906 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2907 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002908 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 rm -f conftest.er1
2910 cat conftest.err >&5
2911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2912 (exit $ac_status); } >/dev/null; then
2913 if test -s conftest.err; then
2914 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002915 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 else
2917 ac_cpp_err=
2918 fi
2919else
2920 ac_cpp_err=yes
2921fi
2922if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923 :
2924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002926sed 's/^/| /' conftest.$ac_ext >&5
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928 # Broken: fails on valid input.
2929continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002931rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 # OK, works on sane cases. Now check whether non-existent headers
2934 # can be detected and how.
2935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002936/* confdefs.h. */
2937_ACEOF
2938cat confdefs.h >>conftest.$ac_ext
2939cat >>conftest.$ac_ext <<_ACEOF
2940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002941#include <ac_nonexistent.h>
2942_ACEOF
2943if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2945 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002946 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 rm -f conftest.er1
2948 cat conftest.err >&5
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } >/dev/null; then
2951 if test -s conftest.err; then
2952 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 else
2955 ac_cpp_err=
2956 fi
2957else
2958 ac_cpp_err=yes
2959fi
2960if test -z "$ac_cpp_err"; then
2961 # Broken: success on invalid input.
2962continue
2963else
2964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967 # Passes both tests.
2968ac_preproc_ok=:
2969break
2970fi
2971rm -f conftest.err conftest.$ac_ext
2972
2973done
2974# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2975rm -f conftest.err conftest.$ac_ext
2976if $ac_preproc_ok; then
2977 break
2978fi
2979
2980 done
2981 ac_cv_prog_CPP=$CPP
2982
2983fi
2984 CPP=$ac_cv_prog_CPP
2985else
2986 ac_cv_prog_CPP=$CPP
2987fi
2988echo "$as_me:$LINENO: result: $CPP" >&5
2989echo "${ECHO_T}$CPP" >&6
2990ac_preproc_ok=false
2991for ac_c_preproc_warn_flag in '' yes
2992do
2993 # Use a header file that comes with gcc, so configuring glibc
2994 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002995 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 # On the NeXT, cc -E runs the code through the compiler's parser,
2998 # not just through cpp. "Syntax error" is here to catch this case.
2999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003000/* confdefs.h. */
3001_ACEOF
3002cat confdefs.h >>conftest.$ac_ext
3003cat >>conftest.$ac_ext <<_ACEOF
3004/* end confdefs.h. */
3005#ifdef __STDC__
3006# include <limits.h>
3007#else
3008# include <assert.h>
3009#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003010 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003011_ACEOF
3012if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3013 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3014 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003015 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003016 rm -f conftest.er1
3017 cat conftest.err >&5
3018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3019 (exit $ac_status); } >/dev/null; then
3020 if test -s conftest.err; then
3021 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003022 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003023 else
3024 ac_cpp_err=
3025 fi
3026else
3027 ac_cpp_err=yes
3028fi
3029if test -z "$ac_cpp_err"; then
3030 :
3031else
3032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003033sed 's/^/| /' conftest.$ac_ext >&5
3034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035 # Broken: fails on valid input.
3036continue
3037fi
3038rm -f conftest.err conftest.$ac_ext
3039
3040 # OK, works on sane cases. Now check whether non-existent headers
3041 # can be detected and how.
3042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003048#include <ac_nonexistent.h>
3049_ACEOF
3050if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3051 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3052 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003053 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 rm -f conftest.er1
3055 cat conftest.err >&5
3056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3057 (exit $ac_status); } >/dev/null; then
3058 if test -s conftest.err; then
3059 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003060 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003061 else
3062 ac_cpp_err=
3063 fi
3064else
3065 ac_cpp_err=yes
3066fi
3067if test -z "$ac_cpp_err"; then
3068 # Broken: success on invalid input.
3069continue
3070else
3071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003072sed 's/^/| /' conftest.$ac_ext >&5
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074 # Passes both tests.
3075ac_preproc_ok=:
3076break
3077fi
3078rm -f conftest.err conftest.$ac_ext
3079
3080done
3081# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3082rm -f conftest.err conftest.$ac_ext
3083if $ac_preproc_ok; then
3084 :
3085else
Skip Montanaro6dead952003-09-25 14:50:04 +00003086 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3087See \`config.log' for more details." >&5
3088echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003090 { (exit 1); exit 1; }; }
3091fi
3092
3093ac_ext=c
3094ac_cpp='$CPP $CPPFLAGS'
3095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3097ac_compiler_gnu=$ac_cv_c_compiler_gnu
3098
3099
Skip Montanaro6dead952003-09-25 14:50:04 +00003100echo "$as_me:$LINENO: checking for egrep" >&5
3101echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3102if test "${ac_cv_prog_egrep+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3104else
3105 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3106 then ac_cv_prog_egrep='grep -E'
3107 else ac_cv_prog_egrep='egrep'
3108 fi
3109fi
3110echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3111echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3112 EGREP=$ac_cv_prog_egrep
3113
3114
Martin v. Löwis11437992002-04-12 09:54:03 +00003115
3116echo "$as_me:$LINENO: checking for AIX" >&5
3117echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003119/* confdefs.h. */
3120_ACEOF
3121cat confdefs.h >>conftest.$ac_ext
3122cat >>conftest.$ac_ext <<_ACEOF
3123/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003124#ifdef _AIX
3125 yes
3126#endif
3127
Martin v. Löwis11437992002-04-12 09:54:03 +00003128_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003130 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003131 echo "$as_me:$LINENO: result: yes" >&5
3132echo "${ECHO_T}yes" >&6
3133cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003134#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003135_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003136
3137else
Martin v. Löwis11437992002-04-12 09:54:03 +00003138 echo "$as_me:$LINENO: result: no" >&5
3139echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003140fi
3141rm -f conftest*
3142
Michael W. Hudson54241132001-12-07 15:38:26 +00003143
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003144
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003145# Check for unsupported systems
3146case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003147Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003148 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3149 echo See README for details.
3150 exit 1;;
3151esac
3152
Michael W. Hudson54241132001-12-07 15:38:26 +00003153
Martin v. Löwis11437992002-04-12 09:54:03 +00003154echo "$as_me:$LINENO: checking for --with-suffix" >&5
3155echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003156
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003157# Check whether --with-suffix or --without-suffix was given.
3158if test "${with_suffix+set}" = set; then
3159 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003161 case $withval in
3162 no) EXEEXT=;;
3163 yes) EXEEXT=.exe;;
3164 *) EXEEXT=$withval;;
3165 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003166fi;
3167echo "$as_me:$LINENO: result: $EXEEXT" >&5
3168echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003169
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003170# Test whether we're running on a non-case-sensitive system, in which
3171# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003172
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3174echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003175if test ! -d CaseSensitiveTestDir; then
3176mkdir CaseSensitiveTestDir
3177fi
3178
3179if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003180then
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 echo "$as_me:$LINENO: result: yes" >&5
3182echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003183 BUILDEXEEXT=.exe
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: no" >&5
3186echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003187 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003188fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003189rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003190
Guido van Rossumdd997f71998-10-07 19:58:26 +00003191case $MACHDEP in
3192bsdos*)
3193 case $CC in
3194 gcc) CC="$CC -D_HAVE_BSDI";;
3195 esac;;
3196esac
3197
Guido van Rossum24b1e751997-08-21 02:29:16 +00003198case $ac_sys_system in
3199hp*|HP*)
3200 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003201 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003202 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003203Monterey*)
3204 case $CC in
3205 cc) CC="$CC -Wl,-Bexport";;
3206 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003207SunOS*)
3208 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
3210cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003211#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003212_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003213
3214 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003215esac
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219echo "$as_me:$LINENO: checking LIBRARY" >&5
3220echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003221if test -z "$LIBRARY"
3222then
3223 LIBRARY='libpython$(VERSION).a'
3224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003225echo "$as_me:$LINENO: result: $LIBRARY" >&5
3226echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003227
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003228# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003229# name of the library into which to insert object files). BLDLIBRARY is also
3230# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3231# is blank as the main program is not linked directly against LDLIBRARY.
3232# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3233# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3234# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3235# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003236#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237# RUNSHARED is used to run shared python without installed libraries
3238#
3239# INSTSONAME is the name of the shared library that will be use to install
3240# on the system - some systems like version suffix, others don't
3241
3242
Michael W. Hudson54241132001-12-07 15:38:26 +00003243
3244
3245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003246
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003247LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003248BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003249INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003250DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003251LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003252RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003253
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003254# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003255# If CXX is set, and if it is needed to link a main function that was
3256# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3257# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003258# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003259# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003260
Martin v. Löwis11437992002-04-12 09:54:03 +00003261echo "$as_me:$LINENO: checking LINKCC" >&5
3262echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003263if test -z "$LINKCC"
3264then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003265 if test -z "$CXX"; then
3266 LINKCC="\$(PURIFY) \$(CC)"
3267 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003268 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003269 $CXX -c conftest.$ac_ext 2>&5
3270 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3271 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3272 then
3273 LINKCC="\$(PURIFY) \$(CC)"
3274 else
3275 LINKCC="\$(PURIFY) \$(CXX)"
3276 fi
3277 rm -fr conftest*
3278 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003279 case $ac_sys_system in
3280 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003281 exp_extra="\"\""
3282 if test $ac_sys_release -ge 5 -o \
3283 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3284 exp_extra="."
3285 fi
3286 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003287 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003288 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003289 esac
3290fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003291echo "$as_me:$LINENO: result: $LINKCC" >&5
3292echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003293
Martin v. Löwis11437992002-04-12 09:54:03 +00003294echo "$as_me:$LINENO: checking for --enable-shared" >&5
3295echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003296# Check whether --enable-shared or --disable-shared was given.
3297if test "${enable_shared+set}" = set; then
3298 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003299
Martin v. Löwis11437992002-04-12 09:54:03 +00003300fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003301
3302if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003303then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003304 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003305 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003306 enable_shared="yes";;
3307 *)
3308 enable_shared="no";;
3309 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003310fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003311echo "$as_me:$LINENO: result: $enable_shared" >&5
3312echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003313
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003314echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3315echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3316# Check whether --enable-profiling or --disable-profiling was given.
3317if test "${enable_profiling+set}" = set; then
3318 enableval="$enable_profiling"
3319 ac_save_cc="$CC"
3320 CC="$CC -pg"
3321 if test "$cross_compiling" = yes; then
3322 ac_enable_profiling="no"
3323else
3324 cat >conftest.$ac_ext <<_ACEOF
3325/* confdefs.h. */
3326_ACEOF
3327cat confdefs.h >>conftest.$ac_ext
3328cat >>conftest.$ac_ext <<_ACEOF
3329/* end confdefs.h. */
3330int main() { return 0; }
3331_ACEOF
3332rm -f conftest$ac_exeext
3333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3334 (eval $ac_link) 2>&5
3335 ac_status=$?
3336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3339 (eval $ac_try) 2>&5
3340 ac_status=$?
3341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3342 (exit $ac_status); }; }; then
3343 ac_enable_profiling="yes"
3344else
3345 echo "$as_me: program exited with status $ac_status" >&5
3346echo "$as_me: failed program was:" >&5
3347sed 's/^/| /' conftest.$ac_ext >&5
3348
3349( exit $ac_status )
3350ac_enable_profiling="no"
3351fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003352rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003353fi
3354 CC="$ac_save_cc"
3355fi;
3356echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3357echo "${ECHO_T}$ac_enable_profiling" >&6
3358
3359case "$ac_enable_profiling" in
3360 "yes")
3361 BASECFLAGS="-pg $BASECFLAGS"
3362 LDFLAGS="-pg $LDFLAGS"
3363 ;;
3364esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003365
Martin v. Löwis11437992002-04-12 09:54:03 +00003366echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3367echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003368
Guido van Rossumb8552162001-09-05 14:58:11 +00003369# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3370# library that we build, but we do not want to link against it (we
3371# will find it with a -framework option). For this reason there is an
3372# extra variable BLDLIBRARY against which Python and the extension
3373# modules are linked, BLDLIBRARY. This is normally the same as
3374# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003375if test "$enable_framework"
3376then
3377 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003378 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003379 BLDLIBRARY=''
3380else
3381 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003382fi
Jack Jansene578a632001-08-15 01:27:14 +00003383
Martin v. Löwis1142de32002-03-29 16:28:31 +00003384# Other platforms follow
3385if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003386
3387cat >>confdefs.h <<\_ACEOF
3388#define Py_ENABLE_SHARED 1
3389_ACEOF
3390
Martin v. Löwis1142de32002-03-29 16:28:31 +00003391 case $ac_sys_system in
3392 BeOS*)
3393 LDLIBRARY='libpython$(VERSION).so'
3394 ;;
3395 CYGWIN*)
3396 LDLIBRARY='libpython$(VERSION).dll.a'
3397 DLLLIBRARY='libpython$(VERSION).dll'
3398 ;;
3399 SunOS*)
3400 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003401 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003402 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003403 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003404 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003405 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003406 LDLIBRARY='libpython$(VERSION).so'
3407 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003408 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003409 case $ac_sys_system in
3410 FreeBSD*)
3411 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3412 ;;
3413 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003414 INSTSONAME="$LDLIBRARY".$SOVERSION
3415 ;;
3416 hp*|HP*)
3417 LDLIBRARY='libpython$(VERSION).sl'
3418 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003419 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003420 ;;
3421 OSF*)
3422 LDLIBRARY='libpython$(VERSION).so'
3423 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003424 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003425 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003426 atheos*)
3427 LDLIBRARY='libpython$(VERSION).so'
3428 BLDLIBRARY='-L. -lpython$(VERSION)'
3429 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3430 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003431 esac
Jason Tishler30765592003-09-04 11:04:06 +00003432else # shared is disabled
3433 case $ac_sys_system in
3434 CYGWIN*)
3435 BLDLIBRARY='$(LIBRARY)'
3436 LDLIBRARY='libpython$(VERSION).dll.a'
3437 ;;
3438 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003439fi
3440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3442echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444if test -n "$ac_tool_prefix"; then
3445 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3446set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3447echo "$as_me:$LINENO: checking for $ac_word" >&5
3448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3449if test "${ac_cv_prog_RANLIB+set}" = set; then
3450 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451else
3452 if test -n "$RANLIB"; then
3453 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3454else
Martin v. Löwis11437992002-04-12 09:54:03 +00003455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3456for as_dir in $PATH
3457do
3458 IFS=$as_save_IFS
3459 test -z "$as_dir" && as_dir=.
3460 for ac_exec_ext in '' $ac_executable_extensions; do
3461 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3462 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3463 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3464 break 2
3465 fi
3466done
3467done
3468
Guido van Rossum627b2d71993-12-24 10:39:16 +00003469fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003471RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003472if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 echo "$as_me:$LINENO: result: $RANLIB" >&5
3474echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003475else
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 echo "$as_me:$LINENO: result: no" >&5
3477echo "${ECHO_T}no" >&6
3478fi
3479
3480fi
3481if test -z "$ac_cv_prog_RANLIB"; then
3482 ac_ct_RANLIB=$RANLIB
3483 # Extract the first word of "ranlib", so it can be a program name with args.
3484set dummy ranlib; ac_word=$2
3485echo "$as_me:$LINENO: checking for $ac_word" >&5
3486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3487if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3489else
3490 if test -n "$ac_ct_RANLIB"; then
3491 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3492else
3493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 for ac_exec_ext in '' $ac_executable_extensions; do
3499 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3500 ac_cv_prog_ac_ct_RANLIB="ranlib"
3501 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3502 break 2
3503 fi
3504done
3505done
3506
3507 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3508fi
3509fi
3510ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3511if test -n "$ac_ct_RANLIB"; then
3512 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3513echo "${ECHO_T}$ac_ct_RANLIB" >&6
3514else
3515 echo "$as_me:$LINENO: result: no" >&5
3516echo "${ECHO_T}no" >&6
3517fi
3518
3519 RANLIB=$ac_ct_RANLIB
3520else
3521 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003522fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003523
3524
Guido van Rossum7f43da71994-08-01 12:15:30 +00003525for ac_prog in ar aal
3526do
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003528set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003529echo "$as_me:$LINENO: checking for $ac_word" >&5
3530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3531if test "${ac_cv_prog_AR+set}" = set; then
3532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003533else
3534 if test -n "$AR"; then
3535 ac_cv_prog_AR="$AR" # Let the user override the test.
3536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3538for as_dir in $PATH
3539do
3540 IFS=$as_save_IFS
3541 test -z "$as_dir" && as_dir=.
3542 for ac_exec_ext in '' $ac_executable_extensions; do
3543 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3544 ac_cv_prog_AR="$ac_prog"
3545 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3546 break 2
3547 fi
3548done
3549done
3550
Guido van Rossum7f43da71994-08-01 12:15:30 +00003551fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003553AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003554if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 echo "$as_me:$LINENO: result: $AR" >&5
3556echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003557else
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 echo "$as_me:$LINENO: result: no" >&5
3559echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003560fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003561
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003563done
3564test -n "$AR" || AR="ar"
3565
Michael W. Hudson54241132001-12-07 15:38:26 +00003566
Neil Schemenauera42c8272001-03-31 00:01:55 +00003567case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003568bsdos*|hp*|HP*)
3569 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003570 if test -z "$INSTALL"
3571 then
3572 INSTALL="${srcdir}/install-sh -c"
3573 fi
3574esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003575ac_aux_dir=
3576for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3577 if test -f $ac_dir/install-sh; then
3578 ac_aux_dir=$ac_dir
3579 ac_install_sh="$ac_aux_dir/install-sh -c"
3580 break
3581 elif test -f $ac_dir/install.sh; then
3582 ac_aux_dir=$ac_dir
3583 ac_install_sh="$ac_aux_dir/install.sh -c"
3584 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 elif test -f $ac_dir/shtool; then
3586 ac_aux_dir=$ac_dir
3587 ac_install_sh="$ac_aux_dir/shtool install -c"
3588 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589 fi
3590done
3591if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3593echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3594 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003595fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003596ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3597ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3598ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003599
3600# Find a good install program. We prefer a C program (faster),
3601# so one script is as good as another. But avoid the broken or
3602# incompatible versions:
3603# SysV /etc/install, /usr/sbin/install
3604# SunOS /usr/etc/install
3605# IRIX /sbin/install
3606# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003607# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003608# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3609# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3610# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003611# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003612# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003613echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3614echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003615if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003616if test "${ac_cv_path_install+set}" = set; then
3617 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
3624 # Account for people who put trailing slashes in PATH elements.
3625case $as_dir/ in
3626 ./ | .// | /cC/* | \
3627 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003628 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 /usr/ucb/* ) ;;
3630 *)
3631 # OSF1 and SCO ODT 3.0 have their own names for install.
3632 # Don't use installbsd from OSF since it installs stuff as root
3633 # by default.
3634 for ac_prog in ginstall scoinst install; do
3635 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003636 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3637 if test $ac_prog = install &&
3638 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3639 # AIX install. It has an incompatible calling convention.
3640 :
3641 elif test $ac_prog = install &&
3642 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3643 # program-specific install script used by HP pwplus--don't use.
3644 :
3645 else
3646 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3647 break 3
3648 fi
3649 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003650 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 done
3652 ;;
3653esac
3654done
3655
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003656
3657fi
3658 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003660 else
3661 # As a last resort, use the slow shell script. We don't cache a
3662 # path for INSTALL within a source directory, because that will
3663 # break other packages using the cache if that directory is
3664 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666 fi
3667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668echo "$as_me:$LINENO: result: $INSTALL" >&5
3669echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003670
3671# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3672# It thinks the first close brace ends the variable substitution.
3673test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3674
Martin v. Löwis11437992002-04-12 09:54:03 +00003675test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003676
3677test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3678
Michael W. Hudson54241132001-12-07 15:38:26 +00003679
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003680# Not every filesystem supports hard links
3681
3682if test -z "$LN" ; then
3683 case $ac_sys_system in
3684 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003685 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003686 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003687 *) LN=ln;;
3688 esac
3689fi
3690
Fred Drake109d9862001-07-11 06:27:56 +00003691# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003692echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3693echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3694
Fred Drake109d9862001-07-11 06:27:56 +00003695# Check whether --with-pydebug or --without-pydebug was given.
3696if test "${with_pydebug+set}" = set; then
3697 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003698
Fred Drake109d9862001-07-11 06:27:56 +00003699if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003700then
3701
3702cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003703#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003704_ACEOF
3705
3706 echo "$as_me:$LINENO: result: yes" >&5
3707echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003708 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003709else echo "$as_me:$LINENO: result: no" >&5
3710echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003711fi
3712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 echo "$as_me:$LINENO: result: no" >&5
3714echo "${ECHO_T}no" >&6
3715fi;
Fred Drake109d9862001-07-11 06:27:56 +00003716
Skip Montanarodecc6a42003-01-01 20:07:49 +00003717# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3718# merged with this chunk of code?
3719
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003720# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003721# ------------------------
3722# (The following bit of code is complicated enough - please keep things
3723# indented properly. Just pretend you're editing Python code. ;-)
3724
3725# There are two parallel sets of case statements below, one that checks to
3726# see if OPT was set and one that does BASECFLAGS setting based upon
3727# compiler and platform. BASECFLAGS tweaks need to be made even if the
3728# user set OPT.
3729
3730# tweak OPT based on compiler and platform, only if the user didn't set
3731# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003732
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003733if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003734then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003735 case $GCC in
3736 yes)
3737 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003738 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003739 if test "$Py_DEBUG" = 'true' ; then
3740 # Optimization messes up debuggers, so turn it off for
3741 # debug builds.
3742 OPT="-g -Wall -Wstrict-prototypes"
3743 else
3744 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003745 fi
3746 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003747 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003748 OPT="-O3 -Wall -Wstrict-prototypes"
3749 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003750 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003751 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003752 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3753 ;;
3754 esac
Fred Drake109d9862001-07-11 06:27:56 +00003755 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003756
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003757 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003758 OPT="-O"
3759 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003760 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003761
3762 # The current (beta) Monterey compiler dies with optimizations
3763 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003764 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003765 Monterey*)
3766 OPT=""
3767 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003768 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003769
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003770fi
3771
Skip Montanarodecc6a42003-01-01 20:07:49 +00003772
3773# tweak BASECFLAGS based on compiler and platform
3774case $GCC in
3775yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003776 # Python violates C99 rules, by casting between incompatible
3777 # pointer types. GCC may generate bad code as a result of that,
3778 # so use -fno-strict-aliasing if supported.
3779 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3780echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3781 ac_save_cc="$CC"
3782 CC="$CC -fno-strict-aliasing"
3783 if test "$cross_compiling" = yes; then
3784 ac_cv_no_strict_aliasing_ok=no
3785else
3786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003787/* confdefs.h. */
3788_ACEOF
3789cat confdefs.h >>conftest.$ac_ext
3790cat >>conftest.$ac_ext <<_ACEOF
3791/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003792int main() { return 0; }
3793_ACEOF
3794rm -f conftest$ac_exeext
3795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3796 (eval $ac_link) 2>&5
3797 ac_status=$?
3798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3801 (eval $ac_try) 2>&5
3802 ac_status=$?
3803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804 (exit $ac_status); }; }; then
3805 ac_cv_no_strict_aliasing_ok=yes
3806else
3807 echo "$as_me: program exited with status $ac_status" >&5
3808echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003809sed 's/^/| /' conftest.$ac_ext >&5
3810
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003811( exit $ac_status )
3812ac_cv_no_strict_aliasing_ok=no
3813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003814rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003815fi
3816 CC="$ac_save_cc"
3817 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3818echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3819 if test $ac_cv_no_strict_aliasing_ok = yes
3820 then
3821 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3822 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003823 case $ac_sys_system in
3824 SCO_SV*)
3825 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3826 ;;
3827 # is there any other compiler on Darwin besides gcc?
3828 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003829 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003830 ;;
3831 esac
3832 ;;
3833
3834*)
3835 case $ac_sys_system in
3836 OpenUNIX*|UnixWare*)
3837 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3838 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003839 OSF*)
3840 BASECFLAGS="$BASECFLAGS -ieee -std"
3841 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003842 SCO_SV*)
3843 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3844 ;;
3845 esac
3846 ;;
3847esac
3848
Fred Drakee1ceaa02001-12-04 20:55:47 +00003849if test "$Py_DEBUG" = 'true'; then
3850 :
3851else
3852 OPT="-DNDEBUG $OPT"
3853fi
3854
Guido van Rossum563e7081996-09-10 18:20:48 +00003855if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003856then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003857 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003858fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3861echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3862if test "${ac_cv_opt_olimit_ok+set}" = set; then
3863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003864else
3865 ac_save_cc="$CC"
3866CC="$CC -OPT:Olimit=0"
3867if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003868 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003869else
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003871/* confdefs.h. */
3872_ACEOF
3873cat confdefs.h >>conftest.$ac_ext
3874cat >>conftest.$ac_ext <<_ACEOF
3875/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003876int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877_ACEOF
3878rm -f conftest$ac_exeext
3879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3880 (eval $ac_link) 2>&5
3881 ac_status=$?
3882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3885 (eval $ac_try) 2>&5
3886 ac_status=$?
3887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3888 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003889 ac_cv_opt_olimit_ok=yes
3890else
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 echo "$as_me: program exited with status $ac_status" >&5
3892echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003893sed 's/^/| /' conftest.$ac_ext >&5
3894
Martin v. Löwis11437992002-04-12 09:54:03 +00003895( exit $ac_status )
3896ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003897fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003898rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003899fi
Guido van Rossum91922671997-10-09 20:24:13 +00003900CC="$ac_save_cc"
3901fi
3902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3904echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003905if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003906 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003907 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3908 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3909 # environment?
3910 Darwin*)
3911 ;;
3912 *)
3913 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3914 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003915 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003916else
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3918echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3919 if test "${ac_cv_olimit_ok+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003921else
3922 ac_save_cc="$CC"
3923 CC="$CC -Olimit 1500"
3924 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003925 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003926else
Martin v. Löwis11437992002-04-12 09:54:03 +00003927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003928/* confdefs.h. */
3929_ACEOF
3930cat confdefs.h >>conftest.$ac_ext
3931cat >>conftest.$ac_ext <<_ACEOF
3932/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003933int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003934_ACEOF
3935rm -f conftest$ac_exeext
3936if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3937 (eval $ac_link) 2>&5
3938 ac_status=$?
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3942 (eval $ac_try) 2>&5
3943 ac_status=$?
3944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3945 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003946 ac_cv_olimit_ok=yes
3947else
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 echo "$as_me: program exited with status $ac_status" >&5
3949echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003950sed 's/^/| /' conftest.$ac_ext >&5
3951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952( exit $ac_status )
3953ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003954fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003955rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003956fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003957 CC="$ac_save_cc"
3958fi
3959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3961echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003962 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003963 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003964 fi
3965fi
3966
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003967# On some compilers, pthreads are available without further options
3968# (e.g. MacOS X). On some of these systems, the compiler will not
3969# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3970# So we have to see first whether pthreads are available without
3971# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003972echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3973echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3974if test "${ac_cv_pthread_is_default+set}" = set; then
3975 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003976else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003977 if test "$cross_compiling" = yes; then
3978 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003979else
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003981/* confdefs.h. */
3982_ACEOF
3983cat confdefs.h >>conftest.$ac_ext
3984cat >>conftest.$ac_ext <<_ACEOF
3985/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003986
Martin v. Löwis130fb172001-07-19 11:00:41 +00003987#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003988
3989void* routine(void* p){return NULL;}
3990
3991int main(){
3992 pthread_t p;
3993 if(pthread_create(&p,NULL,routine,NULL)!=0)
3994 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003995 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003996 return 0;
3997}
3998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999_ACEOF
4000rm -f conftest$ac_exeext
4001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4002 (eval $ac_link) 2>&5
4003 ac_status=$?
4004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4007 (eval $ac_try) 2>&5
4008 ac_status=$?
4009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004011
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004012 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004013 ac_cv_kthread=no
4014 ac_cv_pthread=no
4015
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004016else
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 echo "$as_me: program exited with status $ac_status" >&5
4018echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004019sed 's/^/| /' conftest.$ac_ext >&5
4020
Martin v. Löwis11437992002-04-12 09:54:03 +00004021( exit $ac_status )
4022ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004023fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004024rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004025fi
4026
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004027fi
4028
Martin v. Löwis11437992002-04-12 09:54:03 +00004029echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4030echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004031
Michael W. Hudson54241132001-12-07 15:38:26 +00004032
Martin v. Löwis11437992002-04-12 09:54:03 +00004033if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004034then
4035 ac_cv_kpthread=no
4036else
4037# -Kpthread, if available, provides the right #defines
4038# and linker options to make pthread_create available
4039# Some compilers won't report that they do not support -Kpthread,
4040# so we need to run a program to see whether it really made the
4041# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004042echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4043echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4044if test "${ac_cv_kpthread+set}" = set; then
4045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004046else
4047 ac_save_cc="$CC"
4048CC="$CC -Kpthread"
4049if test "$cross_compiling" = yes; then
4050 ac_cv_kpthread=no
4051else
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004053/* confdefs.h. */
4054_ACEOF
4055cat confdefs.h >>conftest.$ac_ext
4056cat >>conftest.$ac_ext <<_ACEOF
4057/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004058
4059#include <pthread.h>
4060
4061void* routine(void* p){return NULL;}
4062
4063int main(){
4064 pthread_t p;
4065 if(pthread_create(&p,NULL,routine,NULL)!=0)
4066 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004067 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004068 return 0;
4069}
4070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071_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
Martin v. Löwis130fb172001-07-19 11:00:41 +00004083 ac_cv_kpthread=yes
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
Skip Montanaro6dead952003-09-25 14:50:04 +00004087sed 's/^/| /' conftest.$ac_ext >&5
4088
Martin v. Löwis11437992002-04-12 09:54:03 +00004089( exit $ac_status )
4090ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004091fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004092rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004093fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004094CC="$ac_save_cc"
4095fi
4096
Martin v. Löwis11437992002-04-12 09:54:03 +00004097echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4098echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004099fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004100
Skip Montanarod8d39a02003-07-10 20:44:10 +00004101if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004102then
4103# -Kthread, if available, provides the right #defines
4104# and linker options to make pthread_create available
4105# Some compilers won't report that they do not support -Kthread,
4106# so we need to run a program to see whether it really made the
4107# function available.
4108echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4109echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4110if test "${ac_cv_kthread+set}" = set; then
4111 echo $ECHO_N "(cached) $ECHO_C" >&6
4112else
4113 ac_save_cc="$CC"
4114CC="$CC -Kthread"
4115if test "$cross_compiling" = yes; then
4116 ac_cv_kthread=no
4117else
4118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004119/* confdefs.h. */
4120_ACEOF
4121cat confdefs.h >>conftest.$ac_ext
4122cat >>conftest.$ac_ext <<_ACEOF
4123/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004124
4125#include <pthread.h>
4126
4127void* routine(void* p){return NULL;}
4128
4129int main(){
4130 pthread_t p;
4131 if(pthread_create(&p,NULL,routine,NULL)!=0)
4132 return 1;
4133 (void)pthread_detach(p);
4134 return 0;
4135}
4136
4137_ACEOF
4138rm -f conftest$ac_exeext
4139if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4140 (eval $ac_link) 2>&5
4141 ac_status=$?
4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4143 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4145 (eval $ac_try) 2>&5
4146 ac_status=$?
4147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4148 (exit $ac_status); }; }; then
4149 ac_cv_kthread=yes
4150else
4151 echo "$as_me: program exited with status $ac_status" >&5
4152echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004153sed 's/^/| /' conftest.$ac_ext >&5
4154
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004155( exit $ac_status )
4156ac_cv_kthread=no
4157fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004158rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004159fi
4160CC="$ac_save_cc"
4161fi
4162
4163echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4164echo "${ECHO_T}$ac_cv_kthread" >&6
4165fi
4166
Skip Montanarod8d39a02003-07-10 20:44:10 +00004167if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004168then
4169# -pthread, if available, provides the right #defines
4170# and linker options to make pthread_create available
4171# Some compilers won't report that they do not support -pthread,
4172# so we need to run a program to see whether it really made the
4173# function available.
4174echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4175echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4176if test "${ac_cv_thread+set}" = set; then
4177 echo $ECHO_N "(cached) $ECHO_C" >&6
4178else
4179 ac_save_cc="$CC"
4180CC="$CC -pthread"
4181if test "$cross_compiling" = yes; then
4182 ac_cv_pthread=no
4183else
4184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* confdefs.h. */
4186_ACEOF
4187cat confdefs.h >>conftest.$ac_ext
4188cat >>conftest.$ac_ext <<_ACEOF
4189/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004190
4191#include <pthread.h>
4192
4193void* routine(void* p){return NULL;}
4194
4195int main(){
4196 pthread_t p;
4197 if(pthread_create(&p,NULL,routine,NULL)!=0)
4198 return 1;
4199 (void)pthread_detach(p);
4200 return 0;
4201}
4202
4203_ACEOF
4204rm -f conftest$ac_exeext
4205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4206 (eval $ac_link) 2>&5
4207 ac_status=$?
4208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4211 (eval $ac_try) 2>&5
4212 ac_status=$?
4213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4214 (exit $ac_status); }; }; then
4215 ac_cv_pthread=yes
4216else
4217 echo "$as_me: program exited with status $ac_status" >&5
4218echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004219sed 's/^/| /' conftest.$ac_ext >&5
4220
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004221( exit $ac_status )
4222ac_cv_pthread=no
4223fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004224rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004225fi
4226CC="$ac_save_cc"
4227fi
4228
4229echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4230echo "${ECHO_T}$ac_cv_pthread" >&6
4231fi
4232
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004233# If we have set a CC compiler flag for thread support then
4234# check if it works for CXX, too.
4235ac_cv_cxx_thread=no
4236if test ! -z "$CXX"
4237then
4238echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4239echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4240ac_save_cxx="$CXX"
4241
4242if test "$ac_cv_kpthread" = "yes"
4243then
4244 CXX="$CXX -Kpthread"
4245 ac_cv_cxx_thread=yes
4246elif test "$ac_cv_kthread" = "yes"
4247then
4248 CXX="$CXX -Kthread"
4249 ac_cv_cxx_thread=yes
4250elif test "$ac_cv_pthread" = "yes"
4251then
4252 CXX="$CXX -pthread"
4253 ac_cv_cxx_thread=yes
4254fi
4255
4256if test $ac_cv_cxx_thread = yes
4257then
4258 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4259 $CXX -c conftest.$ac_ext 2>&5
4260 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4261 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4262 then
4263 ac_cv_cxx_thread=yes
4264 else
4265 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004266 fi
4267 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004268fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004269echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4270echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004271fi
4272CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004273
Michael W. Hudson54241132001-12-07 15:38:26 +00004274
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004275# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004276echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4277echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4278if test "${ac_cv_header_stdc+set}" = set; then
4279 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280else
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* confdefs.h. */
4283_ACEOF
4284cat confdefs.h >>conftest.$ac_ext
4285cat >>conftest.$ac_ext <<_ACEOF
4286/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287#include <stdlib.h>
4288#include <stdarg.h>
4289#include <string.h>
4290#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004291
Skip Montanaro6dead952003-09-25 14:50:04 +00004292int
4293main ()
4294{
4295
4296 ;
4297 return 0;
4298}
Martin v. Löwis11437992002-04-12 09:54:03 +00004299_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004300rm -f conftest.$ac_objext
4301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304 grep -v '^ *+' conftest.er1 >conftest.err
4305 rm -f conftest.er1
4306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004308 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004309 { ac_try='test -z "$ac_c_werror_flag"
4310 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4312 (eval $ac_try) 2>&5
4313 ac_status=$?
4314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4315 (exit $ac_status); }; } &&
4316 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4318 (eval $ac_try) 2>&5
4319 ac_status=$?
4320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4321 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322 ac_cv_header_stdc=yes
4323else
Martin v. Löwis11437992002-04-12 09:54:03 +00004324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004325sed 's/^/| /' conftest.$ac_ext >&5
4326
4327ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330
4331if test $ac_cv_header_stdc = yes; then
4332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004334/* confdefs.h. */
4335_ACEOF
4336cat confdefs.h >>conftest.$ac_ext
4337cat >>conftest.$ac_ext <<_ACEOF
4338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004340
4341_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344 :
4345else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346 ac_cv_header_stdc=no
4347fi
4348rm -f conftest*
4349
4350fi
4351
4352if test $ac_cv_header_stdc = yes; then
4353 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004355/* confdefs.h. */
4356_ACEOF
4357cat confdefs.h >>conftest.$ac_ext
4358cat >>conftest.$ac_ext <<_ACEOF
4359/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004361
4362_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365 :
4366else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367 ac_cv_header_stdc=no
4368fi
4369rm -f conftest*
4370
4371fi
4372
4373if test $ac_cv_header_stdc = yes; then
4374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004375 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004376 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377else
Martin v. Löwis11437992002-04-12 09:54:03 +00004378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004379/* confdefs.h. */
4380_ACEOF
4381cat confdefs.h >>conftest.$ac_ext
4382cat >>conftest.$ac_ext <<_ACEOF
4383/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004384#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004385#if ((' ' & 0x0FF) == 0x020)
4386# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4387# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4388#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004389# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004390 (('a' <= (c) && (c) <= 'i') \
4391 || ('j' <= (c) && (c) <= 'r') \
4392 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004393# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4394#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004395
Martin v. Löwis11437992002-04-12 09:54:03 +00004396#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4397int
4398main ()
4399{
4400 int i;
4401 for (i = 0; i < 256; i++)
4402 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004403 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004404 exit(2);
4405 exit (0);
4406}
4407_ACEOF
4408rm -f conftest$ac_exeext
4409if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4410 (eval $ac_link) 2>&5
4411 ac_status=$?
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4415 (eval $ac_try) 2>&5
4416 ac_status=$?
4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4418 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419 :
4420else
Martin v. Löwis11437992002-04-12 09:54:03 +00004421 echo "$as_me: program exited with status $ac_status" >&5
4422echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004423sed 's/^/| /' conftest.$ac_ext >&5
4424
Martin v. Löwis11437992002-04-12 09:54:03 +00004425( exit $ac_status )
4426ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004427fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004428rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004429fi
4430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004431fi
4432echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4433echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004434if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004435
4436cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004438_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004439
4440fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004441
Skip Montanarob9820a32004-01-17 00:16:12 +00004442# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004453 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004454do
4455as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4456echo "$as_me:$LINENO: checking for $ac_header" >&5
4457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4458if eval "test \"\${$as_ac_Header+set}\" = set"; then
4459 echo $ECHO_N "(cached) $ECHO_C" >&6
4460else
4461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004462/* confdefs.h. */
4463_ACEOF
4464cat confdefs.h >>conftest.$ac_ext
4465cat >>conftest.$ac_ext <<_ACEOF
4466/* end confdefs.h. */
4467$ac_includes_default
4468
4469#include <$ac_header>
4470_ACEOF
4471rm -f conftest.$ac_objext
4472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004473 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004475 grep -v '^ *+' conftest.er1 >conftest.err
4476 rm -f conftest.er1
4477 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4479 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004480 { ac_try='test -z "$ac_c_werror_flag"
4481 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4483 (eval $ac_try) 2>&5
4484 ac_status=$?
4485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4486 (exit $ac_status); }; } &&
4487 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4489 (eval $ac_try) 2>&5
4490 ac_status=$?
4491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4492 (exit $ac_status); }; }; then
4493 eval "$as_ac_Header=yes"
4494else
4495 echo "$as_me: failed program was:" >&5
4496sed 's/^/| /' conftest.$ac_ext >&5
4497
4498eval "$as_ac_Header=no"
4499fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004500rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004501fi
4502echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4503echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4504if test `eval echo '${'$as_ac_Header'}'` = yes; then
4505 cat >>confdefs.h <<_ACEOF
4506#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4507_ACEOF
4508
4509fi
4510
4511done
4512
4513
Martin v. Löwis11437992002-04-12 09:54:03 +00004514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
Anthony Baxter8a560de2004-10-13 15:30:56 +00004550
Martin v. Löwisc3001752005-01-23 09:27:24 +00004551
4552for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004553libintl.h ncurses.h poll.h pthread.h \
4554stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004555unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004556sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4557sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004558sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisae2830c2004-09-18 09:54:52 +00004559sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004560sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4561bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004562do
Martin v. Löwis11437992002-04-12 09:54:03 +00004563as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4564if eval "test \"\${$as_ac_Header+set}\" = set"; then
4565 echo "$as_me:$LINENO: checking for $ac_header" >&5
4566echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4567if eval "test \"\${$as_ac_Header+set}\" = set"; then
4568 echo $ECHO_N "(cached) $ECHO_C" >&6
4569fi
4570echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4571echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572else
Martin v. Löwis11437992002-04-12 09:54:03 +00004573 # Is the header compilable?
4574echo "$as_me:$LINENO: checking $ac_header usability" >&5
4575echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004582$ac_includes_default
4583#include <$ac_header>
4584_ACEOF
4585rm -f conftest.$ac_objext
4586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004587 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004589 grep -v '^ *+' conftest.er1 >conftest.err
4590 rm -f conftest.er1
4591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004594 { ac_try='test -z "$ac_c_werror_flag"
4595 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4597 (eval $ac_try) 2>&5
4598 ac_status=$?
4599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4600 (exit $ac_status); }; } &&
4601 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4603 (eval $ac_try) 2>&5
4604 ac_status=$?
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); }; }; then
4607 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004608else
Martin v. Löwis11437992002-04-12 09:54:03 +00004609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004610sed 's/^/| /' conftest.$ac_ext >&5
4611
Martin v. Löwis11437992002-04-12 09:54:03 +00004612ac_header_compiler=no
4613fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004615echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4616echo "${ECHO_T}$ac_header_compiler" >&6
4617
4618# Is the header present?
4619echo "$as_me:$LINENO: checking $ac_header presence" >&5
4620echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004622/* confdefs.h. */
4623_ACEOF
4624cat confdefs.h >>conftest.$ac_ext
4625cat >>conftest.$ac_ext <<_ACEOF
4626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004627#include <$ac_header>
4628_ACEOF
4629if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4630 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4631 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004632 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004633 rm -f conftest.er1
4634 cat conftest.err >&5
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); } >/dev/null; then
4637 if test -s conftest.err; then
4638 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004639 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004640 else
4641 ac_cpp_err=
4642 fi
4643else
4644 ac_cpp_err=yes
4645fi
4646if test -z "$ac_cpp_err"; then
4647 ac_header_preproc=yes
4648else
4649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004650sed 's/^/| /' conftest.$ac_ext >&5
4651
Martin v. Löwis11437992002-04-12 09:54:03 +00004652 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004654rm -f conftest.err conftest.$ac_ext
4655echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4656echo "${ECHO_T}$ac_header_preproc" >&6
4657
4658# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004659case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4660 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004661 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4662echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004663 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4664echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4665 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004666 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004667 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004668 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4669echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004670 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4671echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4672 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4673echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4674 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4675echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004676 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4677echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004678 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4679echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004680 (
4681 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004682## ------------------------------------------------ ##
4683## Report this to http://www.python.org/python-bugs ##
4684## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004685_ASBOX
4686 ) |
4687 sed "s/^/$as_me: WARNING: /" >&2
4688 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004689esac
4690echo "$as_me:$LINENO: checking for $ac_header" >&5
4691echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4692if eval "test \"\${$as_ac_Header+set}\" = set"; then
4693 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004694else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004695 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004696fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004697echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4698echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4699
4700fi
4701if test `eval echo '${'$as_ac_Header'}'` = yes; then
4702 cat >>confdefs.h <<_ACEOF
4703#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4704_ACEOF
4705
4706fi
4707
Guido van Rossum627b2d71993-12-24 10:39:16 +00004708done
4709
Martin v. Löwis11437992002-04-12 09:54:03 +00004710
4711
4712
4713
4714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004715ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004716for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4717 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4718echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4719echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4720if eval "test \"\${$as_ac_Header+set}\" = set"; then
4721 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004722else
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004724/* confdefs.h. */
4725_ACEOF
4726cat confdefs.h >>conftest.$ac_ext
4727cat >>conftest.$ac_ext <<_ACEOF
4728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729#include <sys/types.h>
4730#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004731
Martin v. Löwis11437992002-04-12 09:54:03 +00004732int
4733main ()
4734{
4735if ((DIR *) 0)
4736return 0;
4737 ;
4738 return 0;
4739}
4740_ACEOF
4741rm -f conftest.$ac_objext
4742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004743 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004745 grep -v '^ *+' conftest.er1 >conftest.err
4746 rm -f conftest.er1
4747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4749 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004750 { ac_try='test -z "$ac_c_werror_flag"
4751 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4753 (eval $ac_try) 2>&5
4754 ac_status=$?
4755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756 (exit $ac_status); }; } &&
4757 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4759 (eval $ac_try) 2>&5
4760 ac_status=$?
4761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4762 (exit $ac_status); }; }; then
4763 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004764else
Martin v. Löwis11437992002-04-12 09:54:03 +00004765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004766sed 's/^/| /' conftest.$ac_ext >&5
4767
Martin v. Löwis11437992002-04-12 09:54:03 +00004768eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004771fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004772echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4773echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4774if test `eval echo '${'$as_ac_Header'}'` = yes; then
4775 cat >>confdefs.h <<_ACEOF
4776#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4777_ACEOF
4778
4779ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004780fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004781
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004782done
4783# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4784if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4786echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4787if test "${ac_cv_search_opendir+set}" = set; then
4788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789else
Martin v. Löwis11437992002-04-12 09:54:03 +00004790 ac_func_search_save_LIBS=$LIBS
4791ac_cv_search_opendir=no
4792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004793/* confdefs.h. */
4794_ACEOF
4795cat confdefs.h >>conftest.$ac_ext
4796cat >>conftest.$ac_ext <<_ACEOF
4797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004798
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004799/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004800#ifdef __cplusplus
4801extern "C"
4802#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004803/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 builtin and then its argument prototype would still apply. */
4805char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004806int
4807main ()
4808{
4809opendir ();
4810 ;
4811 return 0;
4812}
4813_ACEOF
4814rm -f conftest.$ac_objext conftest$ac_exeext
4815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004816 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004818 grep -v '^ *+' conftest.er1 >conftest.err
4819 rm -f conftest.er1
4820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004823 { ac_try='test -z "$ac_c_werror_flag"
4824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4826 (eval $ac_try) 2>&5
4827 ac_status=$?
4828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4829 (exit $ac_status); }; } &&
4830 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4832 (eval $ac_try) 2>&5
4833 ac_status=$?
4834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4835 (exit $ac_status); }; }; then
4836 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837else
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004839sed 's/^/| /' conftest.$ac_ext >&5
4840
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004841fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004842rm -f conftest.err conftest.$ac_objext \
4843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004844if test "$ac_cv_search_opendir" = no; then
4845 for ac_lib in dir; do
4846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004848/* confdefs.h. */
4849_ACEOF
4850cat confdefs.h >>conftest.$ac_ext
4851cat >>conftest.$ac_ext <<_ACEOF
4852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004854/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004855#ifdef __cplusplus
4856extern "C"
4857#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004858/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 builtin and then its argument prototype would still apply. */
4860char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004861int
4862main ()
4863{
4864opendir ();
4865 ;
4866 return 0;
4867}
4868_ACEOF
4869rm -f conftest.$ac_objext conftest$ac_exeext
4870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004871 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004873 grep -v '^ *+' conftest.er1 >conftest.err
4874 rm -f conftest.er1
4875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004878 { ac_try='test -z "$ac_c_werror_flag"
4879 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4881 (eval $ac_try) 2>&5
4882 ac_status=$?
4883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4884 (exit $ac_status); }; } &&
4885 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4887 (eval $ac_try) 2>&5
4888 ac_status=$?
4889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); }; }; then
4891 ac_cv_search_opendir="-l$ac_lib"
4892break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004895sed 's/^/| /' conftest.$ac_ext >&5
4896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004898rm -f conftest.err conftest.$ac_objext \
4899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 done
4901fi
4902LIBS=$ac_func_search_save_LIBS
4903fi
4904echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4905echo "${ECHO_T}$ac_cv_search_opendir" >&6
4906if test "$ac_cv_search_opendir" != no; then
4907 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
Michael W. Hudson54241132001-12-07 15:38:26 +00004911else
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4913echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4914if test "${ac_cv_search_opendir+set}" = set; then
4915 echo $ECHO_N "(cached) $ECHO_C" >&6
4916else
4917 ac_func_search_save_LIBS=$LIBS
4918ac_cv_search_opendir=no
4919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004920/* confdefs.h. */
4921_ACEOF
4922cat confdefs.h >>conftest.$ac_ext
4923cat >>conftest.$ac_ext <<_ACEOF
4924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004925
4926/* Override any gcc2 internal prototype to avoid an error. */
4927#ifdef __cplusplus
4928extern "C"
4929#endif
4930/* We use char because int might match the return type of a gcc2
4931 builtin and then its argument prototype would still apply. */
4932char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004933int
4934main ()
4935{
4936opendir ();
4937 ;
4938 return 0;
4939}
4940_ACEOF
4941rm -f conftest.$ac_objext conftest$ac_exeext
4942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004943 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004945 grep -v '^ *+' conftest.er1 >conftest.err
4946 rm -f conftest.er1
4947 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004950 { ac_try='test -z "$ac_c_werror_flag"
4951 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4953 (eval $ac_try) 2>&5
4954 ac_status=$?
4955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4956 (exit $ac_status); }; } &&
4957 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4959 (eval $ac_try) 2>&5
4960 ac_status=$?
4961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4962 (exit $ac_status); }; }; then
4963 ac_cv_search_opendir="none required"
4964else
4965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004966sed 's/^/| /' conftest.$ac_ext >&5
4967
Martin v. Löwis11437992002-04-12 09:54:03 +00004968fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004969rm -f conftest.err conftest.$ac_objext \
4970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004971if test "$ac_cv_search_opendir" = no; then
4972 for ac_lib in x; do
4973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004975/* confdefs.h. */
4976_ACEOF
4977cat confdefs.h >>conftest.$ac_ext
4978cat >>conftest.$ac_ext <<_ACEOF
4979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004980
4981/* Override any gcc2 internal prototype to avoid an error. */
4982#ifdef __cplusplus
4983extern "C"
4984#endif
4985/* We use char because int might match the return type of a gcc2
4986 builtin and then its argument prototype would still apply. */
4987char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004988int
4989main ()
4990{
4991opendir ();
4992 ;
4993 return 0;
4994}
4995_ACEOF
4996rm -f conftest.$ac_objext conftest$ac_exeext
4997if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004998 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005000 grep -v '^ *+' conftest.er1 >conftest.err
5001 rm -f conftest.er1
5002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005005 { ac_try='test -z "$ac_c_werror_flag"
5006 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5008 (eval $ac_try) 2>&5
5009 ac_status=$?
5010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5011 (exit $ac_status); }; } &&
5012 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5014 (eval $ac_try) 2>&5
5015 ac_status=$?
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); }; }; then
5018 ac_cv_search_opendir="-l$ac_lib"
5019break
5020else
5021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005022sed 's/^/| /' conftest.$ac_ext >&5
5023
Martin v. Löwis11437992002-04-12 09:54:03 +00005024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005025rm -f conftest.err conftest.$ac_objext \
5026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005027 done
5028fi
5029LIBS=$ac_func_search_save_LIBS
5030fi
5031echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5032echo "${ECHO_T}$ac_cv_search_opendir" >&6
5033if test "$ac_cv_search_opendir" != no; then
5034 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036fi
5037
5038fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005039
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005040echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5041echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5042if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
5044else
5045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005046/* confdefs.h. */
5047_ACEOF
5048cat confdefs.h >>conftest.$ac_ext
5049cat >>conftest.$ac_ext <<_ACEOF
5050/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005051#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005052int
5053main ()
5054{
5055return makedev(0, 0);
5056 ;
5057 return 0;
5058}
5059_ACEOF
5060rm -f conftest.$ac_objext conftest$ac_exeext
5061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005062 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005064 grep -v '^ *+' conftest.er1 >conftest.err
5065 rm -f conftest.er1
5066 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005069 { ac_try='test -z "$ac_c_werror_flag"
5070 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5072 (eval $ac_try) 2>&5
5073 ac_status=$?
5074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5075 (exit $ac_status); }; } &&
5076 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5078 (eval $ac_try) 2>&5
5079 ac_status=$?
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); }; }; then
5082 ac_cv_header_sys_types_h_makedev=yes
5083else
5084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005085sed 's/^/| /' conftest.$ac_ext >&5
5086
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005087ac_cv_header_sys_types_h_makedev=no
5088fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005089rm -f conftest.err conftest.$ac_objext \
5090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005091
5092fi
5093echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5094echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5095
5096if test $ac_cv_header_sys_types_h_makedev = no; then
5097if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5098 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5099echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5100if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5101 echo $ECHO_N "(cached) $ECHO_C" >&6
5102fi
5103echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5104echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5105else
5106 # Is the header compilable?
5107echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5108echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005110/* confdefs.h. */
5111_ACEOF
5112cat confdefs.h >>conftest.$ac_ext
5113cat >>conftest.$ac_ext <<_ACEOF
5114/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005115$ac_includes_default
5116#include <sys/mkdev.h>
5117_ACEOF
5118rm -f conftest.$ac_objext
5119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005120 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005122 grep -v '^ *+' conftest.er1 >conftest.err
5123 rm -f conftest.er1
5124 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005127 { ac_try='test -z "$ac_c_werror_flag"
5128 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130 (eval $ac_try) 2>&5
5131 ac_status=$?
5132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133 (exit $ac_status); }; } &&
5134 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136 (eval $ac_try) 2>&5
5137 ac_status=$?
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); }; }; then
5140 ac_header_compiler=yes
5141else
5142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005143sed 's/^/| /' conftest.$ac_ext >&5
5144
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005145ac_header_compiler=no
5146fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005148echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5149echo "${ECHO_T}$ac_header_compiler" >&6
5150
5151# Is the header present?
5152echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5153echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005155/* confdefs.h. */
5156_ACEOF
5157cat confdefs.h >>conftest.$ac_ext
5158cat >>conftest.$ac_ext <<_ACEOF
5159/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005160#include <sys/mkdev.h>
5161_ACEOF
5162if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5163 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5164 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005165 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005166 rm -f conftest.er1
5167 cat conftest.err >&5
5168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5169 (exit $ac_status); } >/dev/null; then
5170 if test -s conftest.err; then
5171 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005172 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005173 else
5174 ac_cpp_err=
5175 fi
5176else
5177 ac_cpp_err=yes
5178fi
5179if test -z "$ac_cpp_err"; then
5180 ac_header_preproc=yes
5181else
5182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005183sed 's/^/| /' conftest.$ac_ext >&5
5184
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005185 ac_header_preproc=no
5186fi
5187rm -f conftest.err conftest.$ac_ext
5188echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5189echo "${ECHO_T}$ac_header_preproc" >&6
5190
5191# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005192case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5193 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005194 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5195echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5197echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5198 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005199 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005200 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5202echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5204echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5205 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5206echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5207 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5208echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005209 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5210echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005211 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5212echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005213 (
5214 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005215## ------------------------------------------------ ##
5216## Report this to http://www.python.org/python-bugs ##
5217## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005218_ASBOX
5219 ) |
5220 sed "s/^/$as_me: WARNING: /" >&2
5221 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005222esac
5223echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5224echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5225if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5226 echo $ECHO_N "(cached) $ECHO_C" >&6
5227else
5228 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5229fi
5230echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5231echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5232
5233fi
5234if test $ac_cv_header_sys_mkdev_h = yes; then
5235
5236cat >>confdefs.h <<\_ACEOF
5237#define MAJOR_IN_MKDEV 1
5238_ACEOF
5239
5240fi
5241
5242
5243
5244 if test $ac_cv_header_sys_mkdev_h = no; then
5245 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5246 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5247echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5248if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5249 echo $ECHO_N "(cached) $ECHO_C" >&6
5250fi
5251echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5252echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5253else
5254 # Is the header compilable?
5255echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5256echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005258/* confdefs.h. */
5259_ACEOF
5260cat confdefs.h >>conftest.$ac_ext
5261cat >>conftest.$ac_ext <<_ACEOF
5262/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005263$ac_includes_default
5264#include <sys/sysmacros.h>
5265_ACEOF
5266rm -f conftest.$ac_objext
5267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005268 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005270 grep -v '^ *+' conftest.er1 >conftest.err
5271 rm -f conftest.er1
5272 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5274 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005275 { ac_try='test -z "$ac_c_werror_flag"
5276 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5278 (eval $ac_try) 2>&5
5279 ac_status=$?
5280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5281 (exit $ac_status); }; } &&
5282 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5284 (eval $ac_try) 2>&5
5285 ac_status=$?
5286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5287 (exit $ac_status); }; }; then
5288 ac_header_compiler=yes
5289else
5290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005291sed 's/^/| /' conftest.$ac_ext >&5
5292
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005293ac_header_compiler=no
5294fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005296echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5297echo "${ECHO_T}$ac_header_compiler" >&6
5298
5299# Is the header present?
5300echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5301echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005303/* confdefs.h. */
5304_ACEOF
5305cat confdefs.h >>conftest.$ac_ext
5306cat >>conftest.$ac_ext <<_ACEOF
5307/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005308#include <sys/sysmacros.h>
5309_ACEOF
5310if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5312 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005313 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005314 rm -f conftest.er1
5315 cat conftest.err >&5
5316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5317 (exit $ac_status); } >/dev/null; then
5318 if test -s conftest.err; then
5319 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005320 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005321 else
5322 ac_cpp_err=
5323 fi
5324else
5325 ac_cpp_err=yes
5326fi
5327if test -z "$ac_cpp_err"; then
5328 ac_header_preproc=yes
5329else
5330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005331sed 's/^/| /' conftest.$ac_ext >&5
5332
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005333 ac_header_preproc=no
5334fi
5335rm -f conftest.err conftest.$ac_ext
5336echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5337echo "${ECHO_T}$ac_header_preproc" >&6
5338
5339# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005340case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5341 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5343echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5345echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5346 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005347 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005348 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005349 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5350echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005351 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5352echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5353 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5354echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5355 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5356echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005357 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5358echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005359 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5360echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005361 (
5362 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005363## ------------------------------------------------ ##
5364## Report this to http://www.python.org/python-bugs ##
5365## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005366_ASBOX
5367 ) |
5368 sed "s/^/$as_me: WARNING: /" >&2
5369 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005370esac
5371echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5372echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5373if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5374 echo $ECHO_N "(cached) $ECHO_C" >&6
5375else
5376 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5377fi
5378echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5379echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5380
5381fi
5382if test $ac_cv_header_sys_sysmacros_h = yes; then
5383
5384cat >>confdefs.h <<\_ACEOF
5385#define MAJOR_IN_SYSMACROS 1
5386_ACEOF
5387
5388fi
5389
5390
5391 fi
5392fi
5393
Michael W. Hudson54241132001-12-07 15:38:26 +00005394
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005395# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005396
5397for ac_header in term.h
5398do
5399as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5400echo "$as_me:$LINENO: checking for $ac_header" >&5
5401echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5402if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005403 echo $ECHO_N "(cached) $ECHO_C" >&6
5404else
5405 cat >conftest.$ac_ext <<_ACEOF
5406/* confdefs.h. */
5407_ACEOF
5408cat confdefs.h >>conftest.$ac_ext
5409cat >>conftest.$ac_ext <<_ACEOF
5410/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005411
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005412#ifdef HAVE_CURSES_H
5413#include <curses.h>
5414#endif
5415
5416
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005417#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005418_ACEOF
5419rm -f conftest.$ac_objext
5420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5421 (eval $ac_compile) 2>conftest.er1
5422 ac_status=$?
5423 grep -v '^ *+' conftest.er1 >conftest.err
5424 rm -f conftest.er1
5425 cat conftest.err >&5
5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5427 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005428 { ac_try='test -z "$ac_c_werror_flag"
5429 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5431 (eval $ac_try) 2>&5
5432 ac_status=$?
5433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5434 (exit $ac_status); }; } &&
5435 { ac_try='test -s conftest.$ac_objext'
5436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005441 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005442else
5443 echo "$as_me: failed program was:" >&5
5444sed 's/^/| /' conftest.$ac_ext >&5
5445
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005446eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005447fi
5448rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5449fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005450echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5451echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5452if test `eval echo '${'$as_ac_Header'}'` = yes; then
5453 cat >>confdefs.h <<_ACEOF
5454#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5455_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005456
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005457fi
5458
5459done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005460
5461
Guido van Rossum627b2d71993-12-24 10:39:16 +00005462# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005463was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005464echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5465echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005467/* confdefs.h. */
5468_ACEOF
5469cat confdefs.h >>conftest.$ac_ext
5470cat >>conftest.$ac_ext <<_ACEOF
5471/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005472#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005473
5474_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005476 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005477 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005478else
Martin v. Löwis11437992002-04-12 09:54:03 +00005479
5480
5481cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005483_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005484
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005485
Guido van Rossum627b2d71993-12-24 10:39:16 +00005486fi
5487rm -f conftest*
5488
Martin v. Löwis11437992002-04-12 09:54:03 +00005489echo "$as_me:$LINENO: result: $was_it_defined" >&5
5490echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005491
Neal Norwitz11690112002-07-30 01:08:28 +00005492# Check whether using makedev requires defining _OSF_SOURCE
5493echo "$as_me:$LINENO: checking for makedev" >&5
5494echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005496/* confdefs.h. */
5497_ACEOF
5498cat confdefs.h >>conftest.$ac_ext
5499cat >>conftest.$ac_ext <<_ACEOF
5500/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005501#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005502int
5503main ()
5504{
5505 makedev(0, 0)
5506 ;
5507 return 0;
5508}
5509_ACEOF
5510rm -f conftest.$ac_objext conftest$ac_exeext
5511if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005512 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005514 grep -v '^ *+' conftest.er1 >conftest.err
5515 rm -f conftest.er1
5516 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005519 { ac_try='test -z "$ac_c_werror_flag"
5520 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5522 (eval $ac_try) 2>&5
5523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); }; } &&
5526 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5528 (eval $ac_try) 2>&5
5529 ac_status=$?
5530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531 (exit $ac_status); }; }; then
5532 ac_cv_has_makedev=yes
5533else
5534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005535sed 's/^/| /' conftest.$ac_ext >&5
5536
Neal Norwitz11690112002-07-30 01:08:28 +00005537ac_cv_has_makedev=no
5538fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005539rm -f conftest.err conftest.$ac_objext \
5540 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005541if test "$ac_cv_has_makedev" = "no"; then
5542 # we didn't link, try if _OSF_SOURCE will allow us to link
5543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005549
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005550#define _OSF_SOURCE 1
5551#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005552
Neal Norwitz11690112002-07-30 01:08:28 +00005553int
5554main ()
5555{
5556 makedev(0, 0)
5557 ;
5558 return 0;
5559}
5560_ACEOF
5561rm -f conftest.$ac_objext conftest$ac_exeext
5562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005563 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005565 grep -v '^ *+' conftest.er1 >conftest.err
5566 rm -f conftest.er1
5567 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005570 { ac_try='test -z "$ac_c_werror_flag"
5571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5573 (eval $ac_try) 2>&5
5574 ac_status=$?
5575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576 (exit $ac_status); }; } &&
5577 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5579 (eval $ac_try) 2>&5
5580 ac_status=$?
5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5582 (exit $ac_status); }; }; then
5583 ac_cv_has_makedev=yes
5584else
5585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005586sed 's/^/| /' conftest.$ac_ext >&5
5587
Neal Norwitz11690112002-07-30 01:08:28 +00005588ac_cv_has_makedev=no
5589fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005590rm -f conftest.err conftest.$ac_objext \
5591 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005592 if test "$ac_cv_has_makedev" = "yes"; then
5593
5594cat >>confdefs.h <<\_ACEOF
5595#define _OSF_SOURCE 1
5596_ACEOF
5597
5598 fi
5599fi
5600echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5601echo "${ECHO_T}$ac_cv_has_makedev" >&6
5602if test "$ac_cv_has_makedev" = "yes"; then
5603
5604cat >>confdefs.h <<\_ACEOF
5605#define HAVE_MAKEDEV 1
5606_ACEOF
5607
5608fi
5609
Martin v. Löwis399a6892002-10-04 10:22:02 +00005610# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5611# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5612# defined, but the compiler does not support pragma redefine_extname,
5613# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5614# structures (such as rlimit64) without declaring them. As a
5615# work-around, disable LFS on such configurations
5616
5617use_lfs=yes
5618echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5619echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005621/* confdefs.h. */
5622_ACEOF
5623cat confdefs.h >>conftest.$ac_ext
5624cat >>conftest.$ac_ext <<_ACEOF
5625/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005626
5627#define _LARGEFILE_SOURCE 1
5628#define _FILE_OFFSET_BITS 64
5629#include <sys/resource.h>
5630
Martin v. Löwis399a6892002-10-04 10:22:02 +00005631int
5632main ()
5633{
5634struct rlimit foo;
5635 ;
5636 return 0;
5637}
5638_ACEOF
5639rm -f conftest.$ac_objext
5640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005643 grep -v '^ *+' conftest.er1 >conftest.err
5644 rm -f conftest.er1
5645 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005648 { ac_try='test -z "$ac_c_werror_flag"
5649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5651 (eval $ac_try) 2>&5
5652 ac_status=$?
5653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5654 (exit $ac_status); }; } &&
5655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5657 (eval $ac_try) 2>&5
5658 ac_status=$?
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 (exit $ac_status); }; }; then
5661 sol_lfs_bug=no
5662else
5663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005664sed 's/^/| /' conftest.$ac_ext >&5
5665
Martin v. Löwis399a6892002-10-04 10:22:02 +00005666sol_lfs_bug=yes
5667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005669echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5670echo "${ECHO_T}$sol_lfs_bug" >&6
5671if test "$sol_lfs_bug" = "yes"; then
5672 use_lfs=no
5673fi
5674
5675if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005676# Two defines needed to enable largefile support on various platforms
5677# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679cat >>confdefs.h <<\_ACEOF
5680#define _LARGEFILE_SOURCE 1
5681_ACEOF
5682
5683
5684cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005685#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005686_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005687
Martin v. Löwis399a6892002-10-04 10:22:02 +00005688fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005689
Guido van Rossum84e7b241996-08-19 21:59:00 +00005690# Add some code to confdefs.h so that the test for off_t works on SCO
5691cat >> confdefs.h <<\EOF
5692#if defined(SCO_DS)
5693#undef _OFF_T
5694#endif
5695EOF
5696
Guido van Rossumef2255b2000-03-10 22:30:29 +00005697# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005698echo "$as_me:$LINENO: checking for mode_t" >&5
5699echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5700if test "${ac_cv_type_mode_t+set}" = set; then
5701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005702else
Martin v. Löwis11437992002-04-12 09:54:03 +00005703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005704/* confdefs.h. */
5705_ACEOF
5706cat confdefs.h >>conftest.$ac_ext
5707cat >>conftest.$ac_ext <<_ACEOF
5708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005709$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005710int
5711main ()
5712{
5713if ((mode_t *) 0)
5714 return 0;
5715if (sizeof (mode_t))
5716 return 0;
5717 ;
5718 return 0;
5719}
5720_ACEOF
5721rm -f conftest.$ac_objext
5722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005723 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005725 grep -v '^ *+' conftest.er1 >conftest.err
5726 rm -f conftest.er1
5727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5729 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005730 { ac_try='test -z "$ac_c_werror_flag"
5731 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5733 (eval $ac_try) 2>&5
5734 ac_status=$?
5735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736 (exit $ac_status); }; } &&
5737 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5739 (eval $ac_try) 2>&5
5740 ac_status=$?
5741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005743 ac_cv_type_mode_t=yes
5744else
Martin v. Löwis11437992002-04-12 09:54:03 +00005745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005746sed 's/^/| /' conftest.$ac_ext >&5
5747
Martin v. Löwis11437992002-04-12 09:54:03 +00005748ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005749fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005752echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5753echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5754if test $ac_cv_type_mode_t = yes; then
5755 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756else
Martin v. Löwis11437992002-04-12 09:54:03 +00005757
5758cat >>confdefs.h <<_ACEOF
5759#define mode_t int
5760_ACEOF
5761
5762fi
5763
5764echo "$as_me:$LINENO: checking for off_t" >&5
5765echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5766if test "${ac_cv_type_off_t+set}" = set; then
5767 echo $ECHO_N "(cached) $ECHO_C" >&6
5768else
5769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005770/* confdefs.h. */
5771_ACEOF
5772cat confdefs.h >>conftest.$ac_ext
5773cat >>conftest.$ac_ext <<_ACEOF
5774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005775$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005776int
5777main ()
5778{
5779if ((off_t *) 0)
5780 return 0;
5781if (sizeof (off_t))
5782 return 0;
5783 ;
5784 return 0;
5785}
5786_ACEOF
5787rm -f conftest.$ac_objext
5788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005789 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005791 grep -v '^ *+' conftest.er1 >conftest.err
5792 rm -f conftest.er1
5793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005796 { ac_try='test -z "$ac_c_werror_flag"
5797 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5799 (eval $ac_try) 2>&5
5800 ac_status=$?
5801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5802 (exit $ac_status); }; } &&
5803 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5805 (eval $ac_try) 2>&5
5806 ac_status=$?
5807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5808 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005809 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005810else
Martin v. Löwis11437992002-04-12 09:54:03 +00005811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005812sed 's/^/| /' conftest.$ac_ext >&5
5813
Martin v. Löwis11437992002-04-12 09:54:03 +00005814ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005815fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005816rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005817fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005818echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5819echo "${ECHO_T}$ac_cv_type_off_t" >&6
5820if test $ac_cv_type_off_t = yes; then
5821 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005822else
Martin v. Löwis11437992002-04-12 09:54:03 +00005823
5824cat >>confdefs.h <<_ACEOF
5825#define off_t long
5826_ACEOF
5827
5828fi
5829
5830echo "$as_me:$LINENO: checking for pid_t" >&5
5831echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5832if test "${ac_cv_type_pid_t+set}" = set; then
5833 echo $ECHO_N "(cached) $ECHO_C" >&6
5834else
5835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005836/* confdefs.h. */
5837_ACEOF
5838cat confdefs.h >>conftest.$ac_ext
5839cat >>conftest.$ac_ext <<_ACEOF
5840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005841$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005842int
5843main ()
5844{
5845if ((pid_t *) 0)
5846 return 0;
5847if (sizeof (pid_t))
5848 return 0;
5849 ;
5850 return 0;
5851}
5852_ACEOF
5853rm -f conftest.$ac_objext
5854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005855 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005857 grep -v '^ *+' conftest.er1 >conftest.err
5858 rm -f conftest.er1
5859 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005862 { ac_try='test -z "$ac_c_werror_flag"
5863 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5865 (eval $ac_try) 2>&5
5866 ac_status=$?
5867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5868 (exit $ac_status); }; } &&
5869 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005875 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005876else
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005878sed 's/^/| /' conftest.$ac_ext >&5
5879
Martin v. Löwis11437992002-04-12 09:54:03 +00005880ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005881fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005883fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005884echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5885echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5886if test $ac_cv_type_pid_t = yes; then
5887 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005888else
Martin v. Löwis11437992002-04-12 09:54:03 +00005889
5890cat >>confdefs.h <<_ACEOF
5891#define pid_t int
5892_ACEOF
5893
5894fi
5895
5896echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5897echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5898if test "${ac_cv_type_signal+set}" = set; then
5899 echo $ECHO_N "(cached) $ECHO_C" >&6
5900else
5901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005902/* confdefs.h. */
5903_ACEOF
5904cat confdefs.h >>conftest.$ac_ext
5905cat >>conftest.$ac_ext <<_ACEOF
5906/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005907#include <sys/types.h>
5908#include <signal.h>
5909#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005910# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005911#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005912#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005913extern "C" void (*signal (int, void (*)(int)))(int);
5914#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005915void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005916#endif
5917
Martin v. Löwis11437992002-04-12 09:54:03 +00005918int
5919main ()
5920{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 ;
5923 return 0;
5924}
5925_ACEOF
5926rm -f conftest.$ac_objext
5927if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005928 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005930 grep -v '^ *+' conftest.er1 >conftest.err
5931 rm -f conftest.er1
5932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005935 { ac_try='test -z "$ac_c_werror_flag"
5936 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5938 (eval $ac_try) 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'
Martin v. Löwis11437992002-04-12 09:54:03 +00005943 { (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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005949else
Martin v. Löwis11437992002-04-12 09:54:03 +00005950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005951sed 's/^/| /' conftest.$ac_ext >&5
5952
Martin v. Löwis11437992002-04-12 09:54:03 +00005953ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005954fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005957echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5958echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005959
Martin v. Löwis11437992002-04-12 09:54:03 +00005960cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005962_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005963
Michael W. Hudson54241132001-12-07 15:38:26 +00005964
Martin v. Löwis11437992002-04-12 09:54:03 +00005965echo "$as_me:$LINENO: checking for size_t" >&5
5966echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5967if test "${ac_cv_type_size_t+set}" = set; then
5968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005969else
Martin v. Löwis11437992002-04-12 09:54:03 +00005970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005971/* confdefs.h. */
5972_ACEOF
5973cat confdefs.h >>conftest.$ac_ext
5974cat >>conftest.$ac_ext <<_ACEOF
5975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005976$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005977int
5978main ()
5979{
5980if ((size_t *) 0)
5981 return 0;
5982if (sizeof (size_t))
5983 return 0;
5984 ;
5985 return 0;
5986}
5987_ACEOF
5988rm -f conftest.$ac_objext
5989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005990 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005992 grep -v '^ *+' conftest.er1 >conftest.err
5993 rm -f conftest.er1
5994 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5996 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005997 { ac_try='test -z "$ac_c_werror_flag"
5998 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6000 (eval $ac_try) 2>&5
6001 ac_status=$?
6002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6003 (exit $ac_status); }; } &&
6004 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6006 (eval $ac_try) 2>&5
6007 ac_status=$?
6008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6009 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006010 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006011else
Martin v. Löwis11437992002-04-12 09:54:03 +00006012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006013sed 's/^/| /' conftest.$ac_ext >&5
6014
Martin v. Löwis11437992002-04-12 09:54:03 +00006015ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006018fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006019echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6020echo "${ECHO_T}$ac_cv_type_size_t" >&6
6021if test $ac_cv_type_size_t = yes; then
6022 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006023else
Martin v. Löwis11437992002-04-12 09:54:03 +00006024
6025cat >>confdefs.h <<_ACEOF
6026#define size_t unsigned
6027_ACEOF
6028
6029fi
6030
6031echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6032echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6033if test "${ac_cv_type_uid_t+set}" = set; then
6034 echo $ECHO_N "(cached) $ECHO_C" >&6
6035else
6036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006037/* confdefs.h. */
6038_ACEOF
6039cat confdefs.h >>conftest.$ac_ext
6040cat >>conftest.$ac_ext <<_ACEOF
6041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006043
6044_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006046 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047 ac_cv_type_uid_t=yes
6048else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006049 ac_cv_type_uid_t=no
6050fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006051rm -f conftest*
6052
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006053fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006054echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6055echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006056if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057
Martin v. Löwis11437992002-04-12 09:54:03 +00006058cat >>confdefs.h <<\_ACEOF
6059#define uid_t int
6060_ACEOF
6061
6062
6063cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006065_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066
6067fi
6068
Jack Jansendd19cf82001-12-06 22:36:17 +00006069
Michael W. Hudson54241132001-12-07 15:38:26 +00006070# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006071# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006072echo "$as_me:$LINENO: checking for int" >&5
6073echo $ECHO_N "checking for int... $ECHO_C" >&6
6074if test "${ac_cv_type_int+set}" = set; then
6075 echo $ECHO_N "(cached) $ECHO_C" >&6
6076else
6077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006078/* confdefs.h. */
6079_ACEOF
6080cat confdefs.h >>conftest.$ac_ext
6081cat >>conftest.$ac_ext <<_ACEOF
6082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006083$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006084int
6085main ()
6086{
6087if ((int *) 0)
6088 return 0;
6089if (sizeof (int))
6090 return 0;
6091 ;
6092 return 0;
6093}
6094_ACEOF
6095rm -f conftest.$ac_objext
6096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006097 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006099 grep -v '^ *+' conftest.er1 >conftest.err
6100 rm -f conftest.er1
6101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6103 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006104 { ac_try='test -z "$ac_c_werror_flag"
6105 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6107 (eval $ac_try) 2>&5
6108 ac_status=$?
6109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6110 (exit $ac_status); }; } &&
6111 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6113 (eval $ac_try) 2>&5
6114 ac_status=$?
6115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6116 (exit $ac_status); }; }; then
6117 ac_cv_type_int=yes
6118else
6119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006120sed 's/^/| /' conftest.$ac_ext >&5
6121
Martin v. Löwis11437992002-04-12 09:54:03 +00006122ac_cv_type_int=no
6123fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006125fi
6126echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6127echo "${ECHO_T}$ac_cv_type_int" >&6
6128
6129echo "$as_me:$LINENO: checking size of int" >&5
6130echo $ECHO_N "checking size of int... $ECHO_C" >&6
6131if test "${ac_cv_sizeof_int+set}" = set; then
6132 echo $ECHO_N "(cached) $ECHO_C" >&6
6133else
6134 if test "$ac_cv_type_int" = yes; then
6135 # The cast to unsigned long works around a bug in the HP C Compiler
6136 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6137 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6138 # This bug is HP SR number 8606223364.
6139 if test "$cross_compiling" = yes; then
6140 # Depending upon the size, compute the lo and hi bounds.
6141cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006142/* confdefs.h. */
6143_ACEOF
6144cat confdefs.h >>conftest.$ac_ext
6145cat >>conftest.$ac_ext <<_ACEOF
6146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006147$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006148int
6149main ()
6150{
6151static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6152test_array [0] = 0
6153
6154 ;
6155 return 0;
6156}
6157_ACEOF
6158rm -f conftest.$ac_objext
6159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006160 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006162 grep -v '^ *+' conftest.er1 >conftest.err
6163 rm -f conftest.er1
6164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6166 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006167 { ac_try='test -z "$ac_c_werror_flag"
6168 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6170 (eval $ac_try) 2>&5
6171 ac_status=$?
6172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6173 (exit $ac_status); }; } &&
6174 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6176 (eval $ac_try) 2>&5
6177 ac_status=$?
6178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); }; }; then
6180 ac_lo=0 ac_mid=0
6181 while :; do
6182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006188$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006189int
6190main ()
6191{
6192static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6193test_array [0] = 0
6194
6195 ;
6196 return 0;
6197}
6198_ACEOF
6199rm -f conftest.$ac_objext
6200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006201 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 grep -v '^ *+' conftest.er1 >conftest.err
6204 rm -f conftest.er1
6205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006208 { ac_try='test -z "$ac_c_werror_flag"
6209 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6211 (eval $ac_try) 2>&5
6212 ac_status=$?
6213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6214 (exit $ac_status); }; } &&
6215 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6217 (eval $ac_try) 2>&5
6218 ac_status=$?
6219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); }; }; then
6221 ac_hi=$ac_mid; break
6222else
6223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006224sed 's/^/| /' conftest.$ac_ext >&5
6225
Martin v. Löwis11437992002-04-12 09:54:03 +00006226ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006227 if test $ac_lo -le $ac_mid; then
6228 ac_lo= ac_hi=
6229 break
6230 fi
6231 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006232fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006234 done
6235else
6236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006237sed 's/^/| /' conftest.$ac_ext >&5
6238
Martin v. Löwis11437992002-04-12 09:54:03 +00006239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006240/* confdefs.h. */
6241_ACEOF
6242cat confdefs.h >>conftest.$ac_ext
6243cat >>conftest.$ac_ext <<_ACEOF
6244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006245$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006246int
6247main ()
6248{
6249static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6250test_array [0] = 0
6251
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256rm -f conftest.$ac_objext
6257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 grep -v '^ *+' conftest.er1 >conftest.err
6261 rm -f conftest.er1
6262 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6264 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006265 { ac_try='test -z "$ac_c_werror_flag"
6266 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6268 (eval $ac_try) 2>&5
6269 ac_status=$?
6270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6271 (exit $ac_status); }; } &&
6272 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6274 (eval $ac_try) 2>&5
6275 ac_status=$?
6276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6277 (exit $ac_status); }; }; then
6278 ac_hi=-1 ac_mid=-1
6279 while :; do
6280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006281/* confdefs.h. */
6282_ACEOF
6283cat confdefs.h >>conftest.$ac_ext
6284cat >>conftest.$ac_ext <<_ACEOF
6285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006287int
6288main ()
6289{
6290static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6291test_array [0] = 0
6292
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006299 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006301 grep -v '^ *+' conftest.er1 >conftest.err
6302 rm -f conftest.er1
6303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006306 { ac_try='test -z "$ac_c_werror_flag"
6307 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6309 (eval $ac_try) 2>&5
6310 ac_status=$?
6311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6312 (exit $ac_status); }; } &&
6313 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6315 (eval $ac_try) 2>&5
6316 ac_status=$?
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); }; }; then
6319 ac_lo=$ac_mid; break
6320else
6321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006322sed 's/^/| /' conftest.$ac_ext >&5
6323
Martin v. Löwis11437992002-04-12 09:54:03 +00006324ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006325 if test $ac_mid -le $ac_hi; then
6326 ac_lo= ac_hi=
6327 break
6328 fi
6329 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006330fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006332 done
6333else
6334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006335sed 's/^/| /' conftest.$ac_ext >&5
6336
Martin v. Löwis11437992002-04-12 09:54:03 +00006337ac_lo= ac_hi=
6338fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006340fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006342# Binary search between lo and hi bounds.
6343while test "x$ac_lo" != "x$ac_hi"; do
6344 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006346/* confdefs.h. */
6347_ACEOF
6348cat confdefs.h >>conftest.$ac_ext
6349cat >>conftest.$ac_ext <<_ACEOF
6350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006352int
6353main ()
6354{
6355static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6356test_array [0] = 0
6357
6358 ;
6359 return 0;
6360}
6361_ACEOF
6362rm -f conftest.$ac_objext
6363if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006364 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006366 grep -v '^ *+' conftest.er1 >conftest.err
6367 rm -f conftest.er1
6368 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006371 { ac_try='test -z "$ac_c_werror_flag"
6372 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6374 (eval $ac_try) 2>&5
6375 ac_status=$?
6376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6377 (exit $ac_status); }; } &&
6378 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6380 (eval $ac_try) 2>&5
6381 ac_status=$?
6382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6383 (exit $ac_status); }; }; then
6384 ac_hi=$ac_mid
6385else
6386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006387sed 's/^/| /' conftest.$ac_ext >&5
6388
Martin v. Löwis11437992002-04-12 09:54:03 +00006389ac_lo=`expr '(' $ac_mid ')' + 1`
6390fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006392done
6393case $ac_lo in
6394?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006395'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6396See \`config.log' for more details." >&5
6397echo "$as_me: error: cannot compute sizeof (int), 77
6398See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 { (exit 1); exit 1; }; } ;;
6400esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006401else
6402 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006403 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6404See \`config.log' for more details." >&5
6405echo "$as_me: error: cannot run test program while cross compiling
6406See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006407 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006408else
Martin v. Löwis11437992002-04-12 09:54:03 +00006409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006410/* confdefs.h. */
6411_ACEOF
6412cat confdefs.h >>conftest.$ac_ext
6413cat >>conftest.$ac_ext <<_ACEOF
6414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006415$ac_includes_default
6416long longval () { return (long) (sizeof (int)); }
6417unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006418#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006419#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006420int
6421main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006422{
Martin v. Löwis11437992002-04-12 09:54:03 +00006423
6424 FILE *f = fopen ("conftest.val", "w");
6425 if (! f)
6426 exit (1);
6427 if (((long) (sizeof (int))) < 0)
6428 {
6429 long i = longval ();
6430 if (i != ((long) (sizeof (int))))
6431 exit (1);
6432 fprintf (f, "%ld\n", i);
6433 }
6434 else
6435 {
6436 unsigned long i = ulongval ();
6437 if (i != ((long) (sizeof (int))))
6438 exit (1);
6439 fprintf (f, "%lu\n", i);
6440 }
6441 exit (ferror (f) || fclose (f) != 0);
6442
6443 ;
6444 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006445}
Martin v. Löwis11437992002-04-12 09:54:03 +00006446_ACEOF
6447rm -f conftest$ac_exeext
6448if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6449 (eval $ac_link) 2>&5
6450 ac_status=$?
6451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6454 (eval $ac_try) 2>&5
6455 ac_status=$?
6456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6457 (exit $ac_status); }; }; then
6458 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006459else
Martin v. Löwis11437992002-04-12 09:54:03 +00006460 echo "$as_me: program exited with status $ac_status" >&5
6461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006462sed 's/^/| /' conftest.$ac_ext >&5
6463
Martin v. Löwis11437992002-04-12 09:54:03 +00006464( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006465{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6466See \`config.log' for more details." >&5
6467echo "$as_me: error: cannot compute sizeof (int), 77
6468See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006469 { (exit 1); exit 1; }; }
6470fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006471rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006472fi
6473fi
6474rm -f conftest.val
6475else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006476 ac_cv_sizeof_int=0
6477fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006478fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006479echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6480echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6481cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006482#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006483_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006484
6485
Martin v. Löwis11437992002-04-12 09:54:03 +00006486echo "$as_me:$LINENO: checking for long" >&5
6487echo $ECHO_N "checking for long... $ECHO_C" >&6
6488if test "${ac_cv_type_long+set}" = set; then
6489 echo $ECHO_N "(cached) $ECHO_C" >&6
6490else
6491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* confdefs.h. */
6493_ACEOF
6494cat confdefs.h >>conftest.$ac_ext
6495cat >>conftest.$ac_ext <<_ACEOF
6496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006497$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006498int
6499main ()
6500{
6501if ((long *) 0)
6502 return 0;
6503if (sizeof (long))
6504 return 0;
6505 ;
6506 return 0;
6507}
6508_ACEOF
6509rm -f conftest.$ac_objext
6510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006511 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006513 grep -v '^ *+' conftest.er1 >conftest.err
6514 rm -f conftest.er1
6515 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006518 { ac_try='test -z "$ac_c_werror_flag"
6519 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6521 (eval $ac_try) 2>&5
6522 ac_status=$?
6523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6524 (exit $ac_status); }; } &&
6525 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006526 { (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_type_long=yes
6532else
6533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006534sed 's/^/| /' conftest.$ac_ext >&5
6535
Martin v. Löwis11437992002-04-12 09:54:03 +00006536ac_cv_type_long=no
6537fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006539fi
6540echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6541echo "${ECHO_T}$ac_cv_type_long" >&6
6542
6543echo "$as_me:$LINENO: checking size of long" >&5
6544echo $ECHO_N "checking size of long... $ECHO_C" >&6
6545if test "${ac_cv_sizeof_long+set}" = set; then
6546 echo $ECHO_N "(cached) $ECHO_C" >&6
6547else
6548 if test "$ac_cv_type_long" = yes; then
6549 # The cast to unsigned long works around a bug in the HP C Compiler
6550 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6551 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6552 # This bug is HP SR number 8606223364.
6553 if test "$cross_compiling" = yes; then
6554 # Depending upon the size, compute the lo and hi bounds.
6555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006556/* confdefs.h. */
6557_ACEOF
6558cat confdefs.h >>conftest.$ac_ext
6559cat >>conftest.$ac_ext <<_ACEOF
6560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006562int
6563main ()
6564{
6565static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6566test_array [0] = 0
6567
6568 ;
6569 return 0;
6570}
6571_ACEOF
6572rm -f conftest.$ac_objext
6573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006574 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 grep -v '^ *+' conftest.er1 >conftest.err
6577 rm -f conftest.er1
6578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006581 { ac_try='test -z "$ac_c_werror_flag"
6582 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006583 { (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); }; } &&
6588 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6590 (eval $ac_try) 2>&5
6591 ac_status=$?
6592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); }; }; then
6594 ac_lo=0 ac_mid=0
6595 while :; do
6596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006602$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006603int
6604main ()
6605{
6606static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6607test_array [0] = 0
6608
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613rm -f conftest.$ac_objext
6614if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006617 grep -v '^ *+' conftest.er1 >conftest.err
6618 rm -f conftest.er1
6619 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006622 { ac_try='test -z "$ac_c_werror_flag"
6623 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6625 (eval $ac_try) 2>&5
6626 ac_status=$?
6627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6628 (exit $ac_status); }; } &&
6629 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6631 (eval $ac_try) 2>&5
6632 ac_status=$?
6633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); }; }; then
6635 ac_hi=$ac_mid; break
6636else
6637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006638sed 's/^/| /' conftest.$ac_ext >&5
6639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006641 if test $ac_lo -le $ac_mid; then
6642 ac_lo= ac_hi=
6643 break
6644 fi
6645 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006646fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006648 done
6649else
6650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006651sed 's/^/| /' conftest.$ac_ext >&5
6652
Martin v. Löwis11437992002-04-12 09:54:03 +00006653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006654/* confdefs.h. */
6655_ACEOF
6656cat confdefs.h >>conftest.$ac_ext
6657cat >>conftest.$ac_ext <<_ACEOF
6658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006659$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006660int
6661main ()
6662{
6663static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6664test_array [0] = 0
6665
6666 ;
6667 return 0;
6668}
6669_ACEOF
6670rm -f conftest.$ac_objext
6671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6678 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006679 { ac_try='test -z "$ac_c_werror_flag"
6680 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6682 (eval $ac_try) 2>&5
6683 ac_status=$?
6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6685 (exit $ac_status); }; } &&
6686 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6688 (eval $ac_try) 2>&5
6689 ac_status=$?
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); }; }; then
6692 ac_hi=-1 ac_mid=-1
6693 while :; do
6694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006695/* confdefs.h. */
6696_ACEOF
6697cat confdefs.h >>conftest.$ac_ext
6698cat >>conftest.$ac_ext <<_ACEOF
6699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006700$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006701int
6702main ()
6703{
6704static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6705test_array [0] = 0
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
6712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006713 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006715 grep -v '^ *+' conftest.er1 >conftest.err
6716 rm -f conftest.er1
6717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6719 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006720 { ac_try='test -z "$ac_c_werror_flag"
6721 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6723 (eval $ac_try) 2>&5
6724 ac_status=$?
6725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726 (exit $ac_status); }; } &&
6727 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6729 (eval $ac_try) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); }; }; then
6733 ac_lo=$ac_mid; break
6734else
6735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006736sed 's/^/| /' conftest.$ac_ext >&5
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006739 if test $ac_mid -le $ac_hi; then
6740 ac_lo= ac_hi=
6741 break
6742 fi
6743 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006746 done
6747else
6748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006749sed 's/^/| /' conftest.$ac_ext >&5
6750
Martin v. Löwis11437992002-04-12 09:54:03 +00006751ac_lo= ac_hi=
6752fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006754fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006755rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006756# 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
Skip Montanaro6dead952003-09-25 14:50:04 +00006760/* confdefs.h. */
6761_ACEOF
6762cat confdefs.h >>conftest.$ac_ext
6763cat >>conftest.$ac_ext <<_ACEOF
6764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006765$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006766int
6767main ()
6768{
6769static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6770test_array [0] = 0
6771
6772 ;
6773 return 0;
6774}
6775_ACEOF
6776rm -f conftest.$ac_objext
6777if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006778 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006780 grep -v '^ *+' conftest.er1 >conftest.err
6781 rm -f conftest.er1
6782 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006785 { ac_try='test -z "$ac_c_werror_flag"
6786 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6788 (eval $ac_try) 2>&5
6789 ac_status=$?
6790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6791 (exit $ac_status); }; } &&
6792 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6794 (eval $ac_try) 2>&5
6795 ac_status=$?
6796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797 (exit $ac_status); }; }; then
6798 ac_hi=$ac_mid
6799else
6800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006801sed 's/^/| /' conftest.$ac_ext >&5
6802
Martin v. Löwis11437992002-04-12 09:54:03 +00006803ac_lo=`expr '(' $ac_mid ')' + 1`
6804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006806done
6807case $ac_lo in
6808?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006809'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6810See \`config.log' for more details." >&5
6811echo "$as_me: error: cannot compute sizeof (long), 77
6812See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 { (exit 1); exit 1; }; } ;;
6814esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006815else
6816 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006817 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6818See \`config.log' for more details." >&5
6819echo "$as_me: error: cannot run test program while cross compiling
6820See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006822else
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006824/* confdefs.h. */
6825_ACEOF
6826cat confdefs.h >>conftest.$ac_ext
6827cat >>conftest.$ac_ext <<_ACEOF
6828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006829$ac_includes_default
6830long longval () { return (long) (sizeof (long)); }
6831unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006832#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006833#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006834int
6835main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006836{
Martin v. Löwis11437992002-04-12 09:54:03 +00006837
6838 FILE *f = fopen ("conftest.val", "w");
6839 if (! f)
6840 exit (1);
6841 if (((long) (sizeof (long))) < 0)
6842 {
6843 long i = longval ();
6844 if (i != ((long) (sizeof (long))))
6845 exit (1);
6846 fprintf (f, "%ld\n", i);
6847 }
6848 else
6849 {
6850 unsigned long i = ulongval ();
6851 if (i != ((long) (sizeof (long))))
6852 exit (1);
6853 fprintf (f, "%lu\n", i);
6854 }
6855 exit (ferror (f) || fclose (f) != 0);
6856
6857 ;
6858 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006859}
Martin v. Löwis11437992002-04-12 09:54:03 +00006860_ACEOF
6861rm -f conftest$ac_exeext
6862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6863 (eval $ac_link) 2>&5
6864 ac_status=$?
6865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6868 (eval $ac_try) 2>&5
6869 ac_status=$?
6870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6871 (exit $ac_status); }; }; then
6872 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006873else
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 echo "$as_me: program exited with status $ac_status" >&5
6875echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006876sed 's/^/| /' conftest.$ac_ext >&5
6877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006879{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6880See \`config.log' for more details." >&5
6881echo "$as_me: error: cannot compute sizeof (long), 77
6882See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 { (exit 1); exit 1; }; }
6884fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006885rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006886fi
6887fi
6888rm -f conftest.val
6889else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006890 ac_cv_sizeof_long=0
6891fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006893echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6894echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6895cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006896#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006897_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006898
6899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900echo "$as_me:$LINENO: checking for void *" >&5
6901echo $ECHO_N "checking for void *... $ECHO_C" >&6
6902if test "${ac_cv_type_void_p+set}" = set; then
6903 echo $ECHO_N "(cached) $ECHO_C" >&6
6904else
6905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006906/* confdefs.h. */
6907_ACEOF
6908cat confdefs.h >>conftest.$ac_ext
6909cat >>conftest.$ac_ext <<_ACEOF
6910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006911$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006912int
6913main ()
6914{
6915if ((void * *) 0)
6916 return 0;
6917if (sizeof (void *))
6918 return 0;
6919 ;
6920 return 0;
6921}
6922_ACEOF
6923rm -f conftest.$ac_objext
6924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006925 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006927 grep -v '^ *+' conftest.er1 >conftest.err
6928 rm -f conftest.er1
6929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006932 { ac_try='test -z "$ac_c_werror_flag"
6933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6935 (eval $ac_try) 2>&5
6936 ac_status=$?
6937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6938 (exit $ac_status); }; } &&
6939 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6941 (eval $ac_try) 2>&5
6942 ac_status=$?
6943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6944 (exit $ac_status); }; }; then
6945 ac_cv_type_void_p=yes
6946else
6947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Martin v. Löwis11437992002-04-12 09:54:03 +00006950ac_cv_type_void_p=no
6951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006953fi
6954echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6955echo "${ECHO_T}$ac_cv_type_void_p" >&6
6956
6957echo "$as_me:$LINENO: checking size of void *" >&5
6958echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6959if test "${ac_cv_sizeof_void_p+set}" = set; then
6960 echo $ECHO_N "(cached) $ECHO_C" >&6
6961else
6962 if test "$ac_cv_type_void_p" = yes; then
6963 # The cast to unsigned long works around a bug in the HP C Compiler
6964 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6965 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6966 # This bug is HP SR number 8606223364.
6967 if test "$cross_compiling" = yes; then
6968 # Depending upon the size, compute the lo and hi bounds.
6969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006970/* confdefs.h. */
6971_ACEOF
6972cat confdefs.h >>conftest.$ac_ext
6973cat >>conftest.$ac_ext <<_ACEOF
6974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006976int
6977main ()
6978{
6979static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6980test_array [0] = 0
6981
6982 ;
6983 return 0;
6984}
6985_ACEOF
6986rm -f conftest.$ac_objext
6987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006990 grep -v '^ *+' conftest.er1 >conftest.err
6991 rm -f conftest.er1
6992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006995 { ac_try='test -z "$ac_c_werror_flag"
6996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6998 (eval $ac_try) 2>&5
6999 ac_status=$?
7000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7001 (exit $ac_status); }; } &&
7002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7004 (eval $ac_try) 2>&5
7005 ac_status=$?
7006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7007 (exit $ac_status); }; }; then
7008 ac_lo=0 ac_mid=0
7009 while :; do
7010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007011/* confdefs.h. */
7012_ACEOF
7013cat confdefs.h >>conftest.$ac_ext
7014cat >>conftest.$ac_ext <<_ACEOF
7015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007016$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007017int
7018main ()
7019{
7020static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7021test_array [0] = 0
7022
7023 ;
7024 return 0;
7025}
7026_ACEOF
7027rm -f conftest.$ac_objext
7028if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007029 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007031 grep -v '^ *+' conftest.er1 >conftest.err
7032 rm -f conftest.er1
7033 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7035 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007036 { ac_try='test -z "$ac_c_werror_flag"
7037 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7039 (eval $ac_try) 2>&5
7040 ac_status=$?
7041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7042 (exit $ac_status); }; } &&
7043 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7045 (eval $ac_try) 2>&5
7046 ac_status=$?
7047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); }; }; then
7049 ac_hi=$ac_mid; break
7050else
7051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007052sed 's/^/| /' conftest.$ac_ext >&5
7053
Martin v. Löwis11437992002-04-12 09:54:03 +00007054ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007055 if test $ac_lo -le $ac_mid; then
7056 ac_lo= ac_hi=
7057 break
7058 fi
7059 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007060fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007062 done
7063else
7064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007065sed 's/^/| /' conftest.$ac_ext >&5
7066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007068/* confdefs.h. */
7069_ACEOF
7070cat confdefs.h >>conftest.$ac_ext
7071cat >>conftest.$ac_ext <<_ACEOF
7072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007074int
7075main ()
7076{
7077static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7078test_array [0] = 0
7079
7080 ;
7081 return 0;
7082}
7083_ACEOF
7084rm -f conftest.$ac_objext
7085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007086 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007088 grep -v '^ *+' conftest.er1 >conftest.err
7089 rm -f conftest.er1
7090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7092 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007093 { ac_try='test -z "$ac_c_werror_flag"
7094 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7096 (eval $ac_try) 2>&5
7097 ac_status=$?
7098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7099 (exit $ac_status); }; } &&
7100 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7102 (eval $ac_try) 2>&5
7103 ac_status=$?
7104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7105 (exit $ac_status); }; }; then
7106 ac_hi=-1 ac_mid=-1
7107 while :; do
7108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007109/* confdefs.h. */
7110_ACEOF
7111cat confdefs.h >>conftest.$ac_ext
7112cat >>conftest.$ac_ext <<_ACEOF
7113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007114$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007115int
7116main ()
7117{
7118static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7119test_array [0] = 0
7120
7121 ;
7122 return 0;
7123}
7124_ACEOF
7125rm -f conftest.$ac_objext
7126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007127 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007129 grep -v '^ *+' conftest.er1 >conftest.err
7130 rm -f conftest.er1
7131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007134 { ac_try='test -z "$ac_c_werror_flag"
7135 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7137 (eval $ac_try) 2>&5
7138 ac_status=$?
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); }; } &&
7141 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7143 (eval $ac_try) 2>&5
7144 ac_status=$?
7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); }; }; then
7147 ac_lo=$ac_mid; break
7148else
7149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007150sed 's/^/| /' conftest.$ac_ext >&5
7151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007153 if test $ac_mid -le $ac_hi; then
7154 ac_lo= ac_hi=
7155 break
7156 fi
7157 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007158fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007160 done
7161else
7162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007163sed 's/^/| /' conftest.$ac_ext >&5
7164
Martin v. Löwis11437992002-04-12 09:54:03 +00007165ac_lo= ac_hi=
7166fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007167rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007168fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007170# Binary search between lo and hi bounds.
7171while test "x$ac_lo" != "x$ac_hi"; do
7172 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007174/* confdefs.h. */
7175_ACEOF
7176cat confdefs.h >>conftest.$ac_ext
7177cat >>conftest.$ac_ext <<_ACEOF
7178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007179$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007180int
7181main ()
7182{
7183static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7184test_array [0] = 0
7185
7186 ;
7187 return 0;
7188}
7189_ACEOF
7190rm -f conftest.$ac_objext
7191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007192 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7198 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007199 { ac_try='test -z "$ac_c_werror_flag"
7200 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7202 (eval $ac_try) 2>&5
7203 ac_status=$?
7204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205 (exit $ac_status); }; } &&
7206 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7208 (eval $ac_try) 2>&5
7209 ac_status=$?
7210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7211 (exit $ac_status); }; }; then
7212 ac_hi=$ac_mid
7213else
7214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007215sed 's/^/| /' conftest.$ac_ext >&5
7216
Martin v. Löwis11437992002-04-12 09:54:03 +00007217ac_lo=`expr '(' $ac_mid ')' + 1`
7218fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007219rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007220done
7221case $ac_lo in
7222?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007223'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7224See \`config.log' for more details." >&5
7225echo "$as_me: error: cannot compute sizeof (void *), 77
7226See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 { (exit 1); exit 1; }; } ;;
7228esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007229else
7230 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007231 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7232See \`config.log' for more details." >&5
7233echo "$as_me: error: cannot run test program while cross compiling
7234See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007235 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007236else
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007238/* confdefs.h. */
7239_ACEOF
7240cat confdefs.h >>conftest.$ac_ext
7241cat >>conftest.$ac_ext <<_ACEOF
7242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007243$ac_includes_default
7244long longval () { return (long) (sizeof (void *)); }
7245unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007246#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007247#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007248int
7249main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007250{
Martin v. Löwis11437992002-04-12 09:54:03 +00007251
7252 FILE *f = fopen ("conftest.val", "w");
7253 if (! f)
7254 exit (1);
7255 if (((long) (sizeof (void *))) < 0)
7256 {
7257 long i = longval ();
7258 if (i != ((long) (sizeof (void *))))
7259 exit (1);
7260 fprintf (f, "%ld\n", i);
7261 }
7262 else
7263 {
7264 unsigned long i = ulongval ();
7265 if (i != ((long) (sizeof (void *))))
7266 exit (1);
7267 fprintf (f, "%lu\n", i);
7268 }
7269 exit (ferror (f) || fclose (f) != 0);
7270
7271 ;
7272 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007273}
Martin v. Löwis11437992002-04-12 09:54:03 +00007274_ACEOF
7275rm -f conftest$ac_exeext
7276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7277 (eval $ac_link) 2>&5
7278 ac_status=$?
7279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7282 (eval $ac_try) 2>&5
7283 ac_status=$?
7284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7285 (exit $ac_status); }; }; then
7286 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007287else
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 echo "$as_me: program exited with status $ac_status" >&5
7289echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007290sed 's/^/| /' conftest.$ac_ext >&5
7291
Martin v. Löwis11437992002-04-12 09:54:03 +00007292( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007293{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7294See \`config.log' for more details." >&5
7295echo "$as_me: error: cannot compute sizeof (void *), 77
7296See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007297 { (exit 1); exit 1; }; }
7298fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007299rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007300fi
7301fi
7302rm -f conftest.val
7303else
Guido van Rossumad678af1998-10-02 14:42:15 +00007304 ac_cv_sizeof_void_p=0
7305fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007306fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007307echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7308echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7309cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007310#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007311_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007312
7313
Martin v. Löwis11437992002-04-12 09:54:03 +00007314echo "$as_me:$LINENO: checking for short" >&5
7315echo $ECHO_N "checking for short... $ECHO_C" >&6
7316if test "${ac_cv_type_short+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
7318else
7319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* confdefs.h. */
7321_ACEOF
7322cat confdefs.h >>conftest.$ac_ext
7323cat >>conftest.$ac_ext <<_ACEOF
7324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007326int
7327main ()
7328{
7329if ((short *) 0)
7330 return 0;
7331if (sizeof (short))
7332 return 0;
7333 ;
7334 return 0;
7335}
7336_ACEOF
7337rm -f conftest.$ac_objext
7338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007339 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007341 grep -v '^ *+' conftest.er1 >conftest.err
7342 rm -f conftest.er1
7343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007346 { ac_try='test -z "$ac_c_werror_flag"
7347 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7349 (eval $ac_try) 2>&5
7350 ac_status=$?
7351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7352 (exit $ac_status); }; } &&
7353 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7355 (eval $ac_try) 2>&5
7356 ac_status=$?
7357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7358 (exit $ac_status); }; }; then
7359 ac_cv_type_short=yes
7360else
7361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007362sed 's/^/| /' conftest.$ac_ext >&5
7363
Martin v. Löwis11437992002-04-12 09:54:03 +00007364ac_cv_type_short=no
7365fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007367fi
7368echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7369echo "${ECHO_T}$ac_cv_type_short" >&6
7370
7371echo "$as_me:$LINENO: checking size of short" >&5
7372echo $ECHO_N "checking size of short... $ECHO_C" >&6
7373if test "${ac_cv_sizeof_short+set}" = set; then
7374 echo $ECHO_N "(cached) $ECHO_C" >&6
7375else
7376 if test "$ac_cv_type_short" = yes; then
7377 # The cast to unsigned long works around a bug in the HP C Compiler
7378 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7379 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7380 # This bug is HP SR number 8606223364.
7381 if test "$cross_compiling" = yes; then
7382 # Depending upon the size, compute the lo and hi bounds.
7383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007384/* confdefs.h. */
7385_ACEOF
7386cat confdefs.h >>conftest.$ac_ext
7387cat >>conftest.$ac_ext <<_ACEOF
7388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007389$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007390int
7391main ()
7392{
7393static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7394test_array [0] = 0
7395
7396 ;
7397 return 0;
7398}
7399_ACEOF
7400rm -f conftest.$ac_objext
7401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007402 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007404 grep -v '^ *+' conftest.er1 >conftest.err
7405 rm -f conftest.er1
7406 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7408 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007409 { ac_try='test -z "$ac_c_werror_flag"
7410 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7412 (eval $ac_try) 2>&5
7413 ac_status=$?
7414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7415 (exit $ac_status); }; } &&
7416 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7418 (eval $ac_try) 2>&5
7419 ac_status=$?
7420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); }; }; then
7422 ac_lo=0 ac_mid=0
7423 while :; do
7424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007425/* confdefs.h. */
7426_ACEOF
7427cat confdefs.h >>conftest.$ac_ext
7428cat >>conftest.$ac_ext <<_ACEOF
7429/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007430$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007431int
7432main ()
7433{
7434static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7435test_array [0] = 0
7436
7437 ;
7438 return 0;
7439}
7440_ACEOF
7441rm -f conftest.$ac_objext
7442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007443 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007445 grep -v '^ *+' conftest.er1 >conftest.err
7446 rm -f conftest.er1
7447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7449 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007450 { ac_try='test -z "$ac_c_werror_flag"
7451 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7453 (eval $ac_try) 2>&5
7454 ac_status=$?
7455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7456 (exit $ac_status); }; } &&
7457 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7459 (eval $ac_try) 2>&5
7460 ac_status=$?
7461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); }; }; then
7463 ac_hi=$ac_mid; break
7464else
7465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007466sed 's/^/| /' conftest.$ac_ext >&5
7467
Martin v. Löwis11437992002-04-12 09:54:03 +00007468ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007469 if test $ac_lo -le $ac_mid; then
7470 ac_lo= ac_hi=
7471 break
7472 fi
7473 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007474fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 done
7477else
7478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007479sed 's/^/| /' conftest.$ac_ext >&5
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007482/* confdefs.h. */
7483_ACEOF
7484cat confdefs.h >>conftest.$ac_ext
7485cat >>conftest.$ac_ext <<_ACEOF
7486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007487$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007488int
7489main ()
7490{
7491static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7492test_array [0] = 0
7493
7494 ;
7495 return 0;
7496}
7497_ACEOF
7498rm -f conftest.$ac_objext
7499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007500 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007501 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007502 grep -v '^ *+' conftest.er1 >conftest.err
7503 rm -f conftest.er1
7504 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7506 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007507 { ac_try='test -z "$ac_c_werror_flag"
7508 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7510 (eval $ac_try) 2>&5
7511 ac_status=$?
7512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7513 (exit $ac_status); }; } &&
7514 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 ac_hi=-1 ac_mid=-1
7521 while :; do
7522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007523/* confdefs.h. */
7524_ACEOF
7525cat confdefs.h >>conftest.$ac_ext
7526cat >>conftest.$ac_ext <<_ACEOF
7527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007528$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007529int
7530main ()
7531{
7532static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7533test_array [0] = 0
7534
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext
7540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007541 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007548 { ac_try='test -z "$ac_c_werror_flag"
7549 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7551 (eval $ac_try) 2>&5
7552 ac_status=$?
7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554 (exit $ac_status); }; } &&
7555 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); }; }; then
7561 ac_lo=$ac_mid; break
7562else
7563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007564sed 's/^/| /' conftest.$ac_ext >&5
7565
Martin v. Löwis11437992002-04-12 09:54:03 +00007566ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007567 if test $ac_mid -le $ac_hi; then
7568 ac_lo= ac_hi=
7569 break
7570 fi
7571 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 done
7575else
7576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007577sed 's/^/| /' conftest.$ac_ext >&5
7578
Martin v. Löwis11437992002-04-12 09:54:03 +00007579ac_lo= ac_hi=
7580fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007581rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007584# Binary search between lo and hi bounds.
7585while test "x$ac_lo" != "x$ac_hi"; do
7586 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007594int
7595main ()
7596{
7597static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7598test_array [0] = 0
7599
7600 ;
7601 return 0;
7602}
7603_ACEOF
7604rm -f conftest.$ac_objext
7605if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007606 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007608 grep -v '^ *+' conftest.er1 >conftest.err
7609 rm -f conftest.er1
7610 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7612 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007613 { ac_try='test -z "$ac_c_werror_flag"
7614 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7616 (eval $ac_try) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); }; } &&
7620 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625 (exit $ac_status); }; }; then
7626 ac_hi=$ac_mid
7627else
7628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007629sed 's/^/| /' conftest.$ac_ext >&5
7630
Martin v. Löwis11437992002-04-12 09:54:03 +00007631ac_lo=`expr '(' $ac_mid ')' + 1`
7632fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007633rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007634done
7635case $ac_lo in
7636?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007637'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7638See \`config.log' for more details." >&5
7639echo "$as_me: error: cannot compute sizeof (short), 77
7640See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 { (exit 1); exit 1; }; } ;;
7642esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007643else
7644 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007645 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7646See \`config.log' for more details." >&5
7647echo "$as_me: error: cannot run test program while cross compiling
7648See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007650else
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007652/* confdefs.h. */
7653_ACEOF
7654cat confdefs.h >>conftest.$ac_ext
7655cat >>conftest.$ac_ext <<_ACEOF
7656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007657$ac_includes_default
7658long longval () { return (long) (sizeof (short)); }
7659unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007660#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007661#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007662int
7663main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007664{
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
7666 FILE *f = fopen ("conftest.val", "w");
7667 if (! f)
7668 exit (1);
7669 if (((long) (sizeof (short))) < 0)
7670 {
7671 long i = longval ();
7672 if (i != ((long) (sizeof (short))))
7673 exit (1);
7674 fprintf (f, "%ld\n", i);
7675 }
7676 else
7677 {
7678 unsigned long i = ulongval ();
7679 if (i != ((long) (sizeof (short))))
7680 exit (1);
7681 fprintf (f, "%lu\n", i);
7682 }
7683 exit (ferror (f) || fclose (f) != 0);
7684
7685 ;
7686 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007687}
Martin v. Löwis11437992002-04-12 09:54:03 +00007688_ACEOF
7689rm -f conftest$ac_exeext
7690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7691 (eval $ac_link) 2>&5
7692 ac_status=$?
7693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7696 (eval $ac_try) 2>&5
7697 ac_status=$?
7698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7699 (exit $ac_status); }; }; then
7700 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007701else
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 echo "$as_me: program exited with status $ac_status" >&5
7703echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007704sed 's/^/| /' conftest.$ac_ext >&5
7705
Martin v. Löwis11437992002-04-12 09:54:03 +00007706( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007707{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7708See \`config.log' for more details." >&5
7709echo "$as_me: error: cannot compute sizeof (short), 77
7710See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 { (exit 1); exit 1; }; }
7712fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007713rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007714fi
7715fi
7716rm -f conftest.val
7717else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007718 ac_cv_sizeof_short=0
7719fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007720fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007721echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7722echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007724#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007726
7727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728echo "$as_me:$LINENO: checking for float" >&5
7729echo $ECHO_N "checking for float... $ECHO_C" >&6
7730if test "${ac_cv_type_float+set}" = set; then
7731 echo $ECHO_N "(cached) $ECHO_C" >&6
7732else
7733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007734/* confdefs.h. */
7735_ACEOF
7736cat confdefs.h >>conftest.$ac_ext
7737cat >>conftest.$ac_ext <<_ACEOF
7738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007739$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007740int
7741main ()
7742{
7743if ((float *) 0)
7744 return 0;
7745if (sizeof (float))
7746 return 0;
7747 ;
7748 return 0;
7749}
7750_ACEOF
7751rm -f conftest.$ac_objext
7752if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007753 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007755 grep -v '^ *+' conftest.er1 >conftest.err
7756 rm -f conftest.er1
7757 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007760 { ac_try='test -z "$ac_c_werror_flag"
7761 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7763 (eval $ac_try) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); }; } &&
7767 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7769 (eval $ac_try) 2>&5
7770 ac_status=$?
7771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772 (exit $ac_status); }; }; then
7773 ac_cv_type_float=yes
7774else
7775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007776sed 's/^/| /' conftest.$ac_ext >&5
7777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778ac_cv_type_float=no
7779fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007780rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781fi
7782echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7783echo "${ECHO_T}$ac_cv_type_float" >&6
7784
7785echo "$as_me:$LINENO: checking size of float" >&5
7786echo $ECHO_N "checking size of float... $ECHO_C" >&6
7787if test "${ac_cv_sizeof_float+set}" = set; then
7788 echo $ECHO_N "(cached) $ECHO_C" >&6
7789else
7790 if test "$ac_cv_type_float" = yes; then
7791 # The cast to unsigned long works around a bug in the HP C Compiler
7792 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7793 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7794 # This bug is HP SR number 8606223364.
7795 if test "$cross_compiling" = yes; then
7796 # Depending upon the size, compute the lo and hi bounds.
7797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007798/* confdefs.h. */
7799_ACEOF
7800cat confdefs.h >>conftest.$ac_ext
7801cat >>conftest.$ac_ext <<_ACEOF
7802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007803$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
7806{
7807static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7808test_array [0] = 0
7809
7810 ;
7811 return 0;
7812}
7813_ACEOF
7814rm -f conftest.$ac_objext
7815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007816 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007818 grep -v '^ *+' conftest.er1 >conftest.err
7819 rm -f conftest.er1
7820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007823 { ac_try='test -z "$ac_c_werror_flag"
7824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7826 (eval $ac_try) 2>&5
7827 ac_status=$?
7828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7829 (exit $ac_status); }; } &&
7830 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7832 (eval $ac_try) 2>&5
7833 ac_status=$?
7834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7835 (exit $ac_status); }; }; then
7836 ac_lo=0 ac_mid=0
7837 while :; do
7838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007839/* confdefs.h. */
7840_ACEOF
7841cat confdefs.h >>conftest.$ac_ext
7842cat >>conftest.$ac_ext <<_ACEOF
7843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
7847{
7848static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7849test_array [0] = 0
7850
7851 ;
7852 return 0;
7853}
7854_ACEOF
7855rm -f conftest.$ac_objext
7856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007857 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007859 grep -v '^ *+' conftest.er1 >conftest.err
7860 rm -f conftest.er1
7861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7863 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007864 { ac_try='test -z "$ac_c_werror_flag"
7865 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7867 (eval $ac_try) 2>&5
7868 ac_status=$?
7869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7870 (exit $ac_status); }; } &&
7871 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7873 (eval $ac_try) 2>&5
7874 ac_status=$?
7875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); }; }; then
7877 ac_hi=$ac_mid; break
7878else
7879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007880sed 's/^/| /' conftest.$ac_ext >&5
7881
Martin v. Löwis11437992002-04-12 09:54:03 +00007882ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007883 if test $ac_lo -le $ac_mid; then
7884 ac_lo= ac_hi=
7885 break
7886 fi
7887 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007888fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 done
7891else
7892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007893sed 's/^/| /' conftest.$ac_ext >&5
7894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* confdefs.h. */
7897_ACEOF
7898cat confdefs.h >>conftest.$ac_ext
7899cat >>conftest.$ac_ext <<_ACEOF
7900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007901$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007902int
7903main ()
7904{
7905static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7906test_array [0] = 0
7907
7908 ;
7909 return 0;
7910}
7911_ACEOF
7912rm -f conftest.$ac_objext
7913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007914 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 grep -v '^ *+' conftest.er1 >conftest.err
7917 rm -f conftest.er1
7918 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7920 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007921 { ac_try='test -z "$ac_c_werror_flag"
7922 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7924 (eval $ac_try) 2>&5
7925 ac_status=$?
7926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7927 (exit $ac_status); }; } &&
7928 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7930 (eval $ac_try) 2>&5
7931 ac_status=$?
7932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7933 (exit $ac_status); }; }; then
7934 ac_hi=-1 ac_mid=-1
7935 while :; do
7936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007937/* confdefs.h. */
7938_ACEOF
7939cat confdefs.h >>conftest.$ac_ext
7940cat >>conftest.$ac_ext <<_ACEOF
7941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007943int
7944main ()
7945{
7946static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7947test_array [0] = 0
7948
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953rm -f conftest.$ac_objext
7954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007962 { ac_try='test -z "$ac_c_werror_flag"
7963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7965 (eval $ac_try) 2>&5
7966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); }; } &&
7969 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971 (eval $ac_try) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); }; }; then
7975 ac_lo=$ac_mid; break
7976else
7977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007978sed 's/^/| /' conftest.$ac_ext >&5
7979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007981 if test $ac_mid -le $ac_hi; then
7982 ac_lo= ac_hi=
7983 break
7984 fi
7985 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007986fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 done
7989else
7990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007991sed 's/^/| /' conftest.$ac_ext >&5
7992
Martin v. Löwis11437992002-04-12 09:54:03 +00007993ac_lo= ac_hi=
7994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007996fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007998# Binary search between lo and hi bounds.
7999while test "x$ac_lo" != "x$ac_hi"; do
8000 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008002/* confdefs.h. */
8003_ACEOF
8004cat confdefs.h >>conftest.$ac_ext
8005cat >>conftest.$ac_ext <<_ACEOF
8006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008007$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008008int
8009main ()
8010{
8011static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8012test_array [0] = 0
8013
8014 ;
8015 return 0;
8016}
8017_ACEOF
8018rm -f conftest.$ac_objext
8019if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008022 grep -v '^ *+' conftest.er1 >conftest.err
8023 rm -f conftest.er1
8024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8026 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008027 { ac_try='test -z "$ac_c_werror_flag"
8028 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8030 (eval $ac_try) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); }; } &&
8034 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8036 (eval $ac_try) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); }; }; then
8040 ac_hi=$ac_mid
8041else
8042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008043sed 's/^/| /' conftest.$ac_ext >&5
8044
Martin v. Löwis11437992002-04-12 09:54:03 +00008045ac_lo=`expr '(' $ac_mid ')' + 1`
8046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048done
8049case $ac_lo in
8050?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008051'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8052See \`config.log' for more details." >&5
8053echo "$as_me: error: cannot compute sizeof (float), 77
8054See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 { (exit 1); exit 1; }; } ;;
8056esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008057else
8058 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008059 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8060See \`config.log' for more details." >&5
8061echo "$as_me: error: cannot run test program while cross compiling
8062See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008064else
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008066/* confdefs.h. */
8067_ACEOF
8068cat confdefs.h >>conftest.$ac_ext
8069cat >>conftest.$ac_ext <<_ACEOF
8070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008071$ac_includes_default
8072long longval () { return (long) (sizeof (float)); }
8073unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008074#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008075#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008076int
8077main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008078{
Martin v. Löwis11437992002-04-12 09:54:03 +00008079
8080 FILE *f = fopen ("conftest.val", "w");
8081 if (! f)
8082 exit (1);
8083 if (((long) (sizeof (float))) < 0)
8084 {
8085 long i = longval ();
8086 if (i != ((long) (sizeof (float))))
8087 exit (1);
8088 fprintf (f, "%ld\n", i);
8089 }
8090 else
8091 {
8092 unsigned long i = ulongval ();
8093 if (i != ((long) (sizeof (float))))
8094 exit (1);
8095 fprintf (f, "%lu\n", i);
8096 }
8097 exit (ferror (f) || fclose (f) != 0);
8098
8099 ;
8100 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008101}
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
8103rm -f conftest$ac_exeext
8104if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8105 (eval $ac_link) 2>&5
8106 ac_status=$?
8107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8110 (eval $ac_try) 2>&5
8111 ac_status=$?
8112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8113 (exit $ac_status); }; }; then
8114 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008115else
Martin v. Löwis11437992002-04-12 09:54:03 +00008116 echo "$as_me: program exited with status $ac_status" >&5
8117echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008118sed 's/^/| /' conftest.$ac_ext >&5
8119
Martin v. Löwis11437992002-04-12 09:54:03 +00008120( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008121{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8122See \`config.log' for more details." >&5
8123echo "$as_me: error: cannot compute sizeof (float), 77
8124See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 { (exit 1); exit 1; }; }
8126fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008127rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008128fi
8129fi
8130rm -f conftest.val
8131else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008132 ac_cv_sizeof_float=0
8133fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008135echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8136echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8137cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008138#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008139_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008140
8141
Martin v. Löwis11437992002-04-12 09:54:03 +00008142echo "$as_me:$LINENO: checking for double" >&5
8143echo $ECHO_N "checking for double... $ECHO_C" >&6
8144if test "${ac_cv_type_double+set}" = set; then
8145 echo $ECHO_N "(cached) $ECHO_C" >&6
8146else
8147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008148/* confdefs.h. */
8149_ACEOF
8150cat confdefs.h >>conftest.$ac_ext
8151cat >>conftest.$ac_ext <<_ACEOF
8152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008153$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008154int
8155main ()
8156{
8157if ((double *) 0)
8158 return 0;
8159if (sizeof (double))
8160 return 0;
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext
8166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008167 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008169 grep -v '^ *+' conftest.er1 >conftest.err
8170 rm -f conftest.er1
8171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008174 { ac_try='test -z "$ac_c_werror_flag"
8175 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8177 (eval $ac_try) 2>&5
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8180 (exit $ac_status); }; } &&
8181 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8183 (eval $ac_try) 2>&5
8184 ac_status=$?
8185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8186 (exit $ac_status); }; }; then
8187 ac_cv_type_double=yes
8188else
8189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008190sed 's/^/| /' conftest.$ac_ext >&5
8191
Martin v. Löwis11437992002-04-12 09:54:03 +00008192ac_cv_type_double=no
8193fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008194rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008195fi
8196echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8197echo "${ECHO_T}$ac_cv_type_double" >&6
8198
8199echo "$as_me:$LINENO: checking size of double" >&5
8200echo $ECHO_N "checking size of double... $ECHO_C" >&6
8201if test "${ac_cv_sizeof_double+set}" = set; then
8202 echo $ECHO_N "(cached) $ECHO_C" >&6
8203else
8204 if test "$ac_cv_type_double" = yes; then
8205 # The cast to unsigned long works around a bug in the HP C Compiler
8206 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8207 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8208 # This bug is HP SR number 8606223364.
8209 if test "$cross_compiling" = yes; then
8210 # Depending upon the size, compute the lo and hi bounds.
8211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008212/* confdefs.h. */
8213_ACEOF
8214cat confdefs.h >>conftest.$ac_ext
8215cat >>conftest.$ac_ext <<_ACEOF
8216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008217$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008218int
8219main ()
8220{
8221static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8222test_array [0] = 0
8223
8224 ;
8225 return 0;
8226}
8227_ACEOF
8228rm -f conftest.$ac_objext
8229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008230 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008232 grep -v '^ *+' conftest.er1 >conftest.err
8233 rm -f conftest.er1
8234 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8236 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008237 { ac_try='test -z "$ac_c_werror_flag"
8238 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8240 (eval $ac_try) 2>&5
8241 ac_status=$?
8242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8243 (exit $ac_status); }; } &&
8244 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8246 (eval $ac_try) 2>&5
8247 ac_status=$?
8248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8249 (exit $ac_status); }; }; then
8250 ac_lo=0 ac_mid=0
8251 while :; do
8252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008253/* confdefs.h. */
8254_ACEOF
8255cat confdefs.h >>conftest.$ac_ext
8256cat >>conftest.$ac_ext <<_ACEOF
8257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008258$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008259int
8260main ()
8261{
8262static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8263test_array [0] = 0
8264
8265 ;
8266 return 0;
8267}
8268_ACEOF
8269rm -f conftest.$ac_objext
8270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008271 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008273 grep -v '^ *+' conftest.er1 >conftest.err
8274 rm -f conftest.er1
8275 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008278 { ac_try='test -z "$ac_c_werror_flag"
8279 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8281 (eval $ac_try) 2>&5
8282 ac_status=$?
8283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8284 (exit $ac_status); }; } &&
8285 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8287 (eval $ac_try) 2>&5
8288 ac_status=$?
8289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290 (exit $ac_status); }; }; then
8291 ac_hi=$ac_mid; break
8292else
8293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008294sed 's/^/| /' conftest.$ac_ext >&5
8295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008297 if test $ac_lo -le $ac_mid; then
8298 ac_lo= ac_hi=
8299 break
8300 fi
8301 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008302fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008303rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 done
8305else
8306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008307sed 's/^/| /' conftest.$ac_ext >&5
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008310/* confdefs.h. */
8311_ACEOF
8312cat confdefs.h >>conftest.$ac_ext
8313cat >>conftest.$ac_ext <<_ACEOF
8314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008315$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008316int
8317main ()
8318{
8319static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8320test_array [0] = 0
8321
8322 ;
8323 return 0;
8324}
8325_ACEOF
8326rm -f conftest.$ac_objext
8327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008328 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008330 grep -v '^ *+' conftest.er1 >conftest.err
8331 rm -f conftest.er1
8332 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8334 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008335 { ac_try='test -z "$ac_c_werror_flag"
8336 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8338 (eval $ac_try) 2>&5
8339 ac_status=$?
8340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8341 (exit $ac_status); }; } &&
8342 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8344 (eval $ac_try) 2>&5
8345 ac_status=$?
8346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8347 (exit $ac_status); }; }; then
8348 ac_hi=-1 ac_mid=-1
8349 while :; do
8350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008351/* confdefs.h. */
8352_ACEOF
8353cat confdefs.h >>conftest.$ac_ext
8354cat >>conftest.$ac_ext <<_ACEOF
8355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008356$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008357int
8358main ()
8359{
8360static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8361test_array [0] = 0
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
8368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008369 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008376 { ac_try='test -z "$ac_c_werror_flag"
8377 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; } &&
8383 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; }; then
8389 ac_lo=$ac_mid; break
8390else
8391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008392sed 's/^/| /' conftest.$ac_ext >&5
8393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008395 if test $ac_mid -le $ac_hi; then
8396 ac_lo= ac_hi=
8397 break
8398 fi
8399 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 done
8403else
8404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008405sed 's/^/| /' conftest.$ac_ext >&5
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407ac_lo= ac_hi=
8408fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008409rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008410fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412# Binary search between lo and hi bounds.
8413while test "x$ac_lo" != "x$ac_hi"; do
8414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008416/* confdefs.h. */
8417_ACEOF
8418cat confdefs.h >>conftest.$ac_ext
8419cat >>conftest.$ac_ext <<_ACEOF
8420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008421$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
8425static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8426test_array [0] = 0
8427
8428 ;
8429 return 0;
8430}
8431_ACEOF
8432rm -f conftest.$ac_objext
8433if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008434 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008436 grep -v '^ *+' conftest.er1 >conftest.err
8437 rm -f conftest.er1
8438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8440 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008441 { ac_try='test -z "$ac_c_werror_flag"
8442 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8444 (eval $ac_try) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); }; } &&
8448 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8450 (eval $ac_try) 2>&5
8451 ac_status=$?
8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8453 (exit $ac_status); }; }; then
8454 ac_hi=$ac_mid
8455else
8456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008457sed 's/^/| /' conftest.$ac_ext >&5
8458
Martin v. Löwis11437992002-04-12 09:54:03 +00008459ac_lo=`expr '(' $ac_mid ')' + 1`
8460fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008462done
8463case $ac_lo in
8464?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008465'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8466See \`config.log' for more details." >&5
8467echo "$as_me: error: cannot compute sizeof (double), 77
8468See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 { (exit 1); exit 1; }; } ;;
8470esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008471else
8472 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008473 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8474See \`config.log' for more details." >&5
8475echo "$as_me: error: cannot run test program while cross compiling
8476See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008478else
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008480/* confdefs.h. */
8481_ACEOF
8482cat confdefs.h >>conftest.$ac_ext
8483cat >>conftest.$ac_ext <<_ACEOF
8484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008485$ac_includes_default
8486long longval () { return (long) (sizeof (double)); }
8487unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008488#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008489#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008490int
8491main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008492{
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
8494 FILE *f = fopen ("conftest.val", "w");
8495 if (! f)
8496 exit (1);
8497 if (((long) (sizeof (double))) < 0)
8498 {
8499 long i = longval ();
8500 if (i != ((long) (sizeof (double))))
8501 exit (1);
8502 fprintf (f, "%ld\n", i);
8503 }
8504 else
8505 {
8506 unsigned long i = ulongval ();
8507 if (i != ((long) (sizeof (double))))
8508 exit (1);
8509 fprintf (f, "%lu\n", i);
8510 }
8511 exit (ferror (f) || fclose (f) != 0);
8512
8513 ;
8514 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008515}
Martin v. Löwis11437992002-04-12 09:54:03 +00008516_ACEOF
8517rm -f conftest$ac_exeext
8518if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8519 (eval $ac_link) 2>&5
8520 ac_status=$?
8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8524 (eval $ac_try) 2>&5
8525 ac_status=$?
8526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527 (exit $ac_status); }; }; then
8528 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008529else
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 echo "$as_me: program exited with status $ac_status" >&5
8531echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008532sed 's/^/| /' conftest.$ac_ext >&5
8533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008535{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8536See \`config.log' for more details." >&5
8537echo "$as_me: error: cannot compute sizeof (double), 77
8538See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 { (exit 1); exit 1; }; }
8540fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008541rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
8543fi
8544rm -f conftest.val
8545else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008546 ac_cv_sizeof_double=0
8547fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008548fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008549echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8550echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8551cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554
8555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556echo "$as_me:$LINENO: checking for fpos_t" >&5
8557echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8558if test "${ac_cv_type_fpos_t+set}" = set; then
8559 echo $ECHO_N "(cached) $ECHO_C" >&6
8560else
8561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008562/* confdefs.h. */
8563_ACEOF
8564cat confdefs.h >>conftest.$ac_ext
8565cat >>conftest.$ac_ext <<_ACEOF
8566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008568int
8569main ()
8570{
8571if ((fpos_t *) 0)
8572 return 0;
8573if (sizeof (fpos_t))
8574 return 0;
8575 ;
8576 return 0;
8577}
8578_ACEOF
8579rm -f conftest.$ac_objext
8580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008581 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008583 grep -v '^ *+' conftest.er1 >conftest.err
8584 rm -f conftest.er1
8585 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008588 { ac_try='test -z "$ac_c_werror_flag"
8589 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008590 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8591 (eval $ac_try) 2>&5
8592 ac_status=$?
8593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8594 (exit $ac_status); }; } &&
8595 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8597 (eval $ac_try) 2>&5
8598 ac_status=$?
8599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8600 (exit $ac_status); }; }; then
8601 ac_cv_type_fpos_t=yes
8602else
8603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008604sed 's/^/| /' conftest.$ac_ext >&5
8605
Martin v. Löwis11437992002-04-12 09:54:03 +00008606ac_cv_type_fpos_t=no
8607fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008608rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
8610echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8611echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8612
8613echo "$as_me:$LINENO: checking size of fpos_t" >&5
8614echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8615if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8616 echo $ECHO_N "(cached) $ECHO_C" >&6
8617else
8618 if test "$ac_cv_type_fpos_t" = yes; then
8619 # The cast to unsigned long works around a bug in the HP C Compiler
8620 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8621 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8622 # This bug is HP SR number 8606223364.
8623 if test "$cross_compiling" = yes; then
8624 # Depending upon the size, compute the lo and hi bounds.
8625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008626/* confdefs.h. */
8627_ACEOF
8628cat confdefs.h >>conftest.$ac_ext
8629cat >>conftest.$ac_ext <<_ACEOF
8630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008631$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008632int
8633main ()
8634{
8635static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8636test_array [0] = 0
8637
8638 ;
8639 return 0;
8640}
8641_ACEOF
8642rm -f conftest.$ac_objext
8643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008644 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008646 grep -v '^ *+' conftest.er1 >conftest.err
8647 rm -f conftest.er1
8648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8650 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008651 { ac_try='test -z "$ac_c_werror_flag"
8652 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654 (eval $ac_try) 2>&5
8655 ac_status=$?
8656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657 (exit $ac_status); }; } &&
8658 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8660 (eval $ac_try) 2>&5
8661 ac_status=$?
8662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); }; }; then
8664 ac_lo=0 ac_mid=0
8665 while :; do
8666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* confdefs.h. */
8668_ACEOF
8669cat confdefs.h >>conftest.$ac_ext
8670cat >>conftest.$ac_ext <<_ACEOF
8671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
8675{
8676static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8677test_array [0] = 0
8678
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683rm -f conftest.$ac_objext
8684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008685 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008687 grep -v '^ *+' conftest.er1 >conftest.err
8688 rm -f conftest.er1
8689 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008692 { ac_try='test -z "$ac_c_werror_flag"
8693 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8695 (eval $ac_try) 2>&5
8696 ac_status=$?
8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8698 (exit $ac_status); }; } &&
8699 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8701 (eval $ac_try) 2>&5
8702 ac_status=$?
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); }; }; then
8705 ac_hi=$ac_mid; break
8706else
8707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008708sed 's/^/| /' conftest.$ac_ext >&5
8709
Martin v. Löwis11437992002-04-12 09:54:03 +00008710ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008711 if test $ac_lo -le $ac_mid; then
8712 ac_lo= ac_hi=
8713 break
8714 fi
8715 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008716fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 done
8719else
8720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008721sed 's/^/| /' conftest.$ac_ext >&5
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008729$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008730int
8731main ()
8732{
8733static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8734test_array [0] = 0
8735
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740rm -f conftest.$ac_objext
8741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008742 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008744 grep -v '^ *+' conftest.er1 >conftest.err
8745 rm -f conftest.er1
8746 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8748 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008749 { ac_try='test -z "$ac_c_werror_flag"
8750 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8752 (eval $ac_try) 2>&5
8753 ac_status=$?
8754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8755 (exit $ac_status); }; } &&
8756 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8758 (eval $ac_try) 2>&5
8759 ac_status=$?
8760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8761 (exit $ac_status); }; }; then
8762 ac_hi=-1 ac_mid=-1
8763 while :; do
8764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008765/* confdefs.h. */
8766_ACEOF
8767cat confdefs.h >>conftest.$ac_ext
8768cat >>conftest.$ac_ext <<_ACEOF
8769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008770$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008771int
8772main ()
8773{
8774static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8775test_array [0] = 0
8776
8777 ;
8778 return 0;
8779}
8780_ACEOF
8781rm -f conftest.$ac_objext
8782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008785 grep -v '^ *+' conftest.er1 >conftest.err
8786 rm -f conftest.er1
8787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008790 { ac_try='test -z "$ac_c_werror_flag"
8791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8793 (eval $ac_try) 2>&5
8794 ac_status=$?
8795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796 (exit $ac_status); }; } &&
8797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799 (eval $ac_try) 2>&5
8800 ac_status=$?
8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); }; }; then
8803 ac_lo=$ac_mid; break
8804else
8805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Martin v. Löwis11437992002-04-12 09:54:03 +00008808ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008809 if test $ac_mid -le $ac_hi; then
8810 ac_lo= ac_hi=
8811 break
8812 fi
8813 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 done
8817else
8818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008819sed 's/^/| /' conftest.$ac_ext >&5
8820
Martin v. Löwis11437992002-04-12 09:54:03 +00008821ac_lo= ac_hi=
8822fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008823rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008824fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008826# Binary search between lo and hi bounds.
8827while test "x$ac_lo" != "x$ac_hi"; do
8828 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008830/* confdefs.h. */
8831_ACEOF
8832cat confdefs.h >>conftest.$ac_ext
8833cat >>conftest.$ac_ext <<_ACEOF
8834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008836int
8837main ()
8838{
8839static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8840test_array [0] = 0
8841
8842 ;
8843 return 0;
8844}
8845_ACEOF
8846rm -f conftest.$ac_objext
8847if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008848 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008850 grep -v '^ *+' conftest.er1 >conftest.err
8851 rm -f conftest.er1
8852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008855 { ac_try='test -z "$ac_c_werror_flag"
8856 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8858 (eval $ac_try) 2>&5
8859 ac_status=$?
8860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8861 (exit $ac_status); }; } &&
8862 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8864 (eval $ac_try) 2>&5
8865 ac_status=$?
8866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8867 (exit $ac_status); }; }; then
8868 ac_hi=$ac_mid
8869else
8870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008871sed 's/^/| /' conftest.$ac_ext >&5
8872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873ac_lo=`expr '(' $ac_mid ')' + 1`
8874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008875rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008876done
8877case $ac_lo in
8878?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008879'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8880See \`config.log' for more details." >&5
8881echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8882See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 { (exit 1); exit 1; }; } ;;
8884esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008885else
8886 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008887 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8888See \`config.log' for more details." >&5
8889echo "$as_me: error: cannot run test program while cross compiling
8890See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008892else
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
8900long longval () { return (long) (sizeof (fpos_t)); }
8901unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008902#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008903#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008904int
8905main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008906{
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
8908 FILE *f = fopen ("conftest.val", "w");
8909 if (! f)
8910 exit (1);
8911 if (((long) (sizeof (fpos_t))) < 0)
8912 {
8913 long i = longval ();
8914 if (i != ((long) (sizeof (fpos_t))))
8915 exit (1);
8916 fprintf (f, "%ld\n", i);
8917 }
8918 else
8919 {
8920 unsigned long i = ulongval ();
8921 if (i != ((long) (sizeof (fpos_t))))
8922 exit (1);
8923 fprintf (f, "%lu\n", i);
8924 }
8925 exit (ferror (f) || fclose (f) != 0);
8926
8927 ;
8928 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008929}
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
8931rm -f conftest$ac_exeext
8932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8933 (eval $ac_link) 2>&5
8934 ac_status=$?
8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8938 (eval $ac_try) 2>&5
8939 ac_status=$?
8940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8941 (exit $ac_status); }; }; then
8942 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008943else
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 echo "$as_me: program exited with status $ac_status" >&5
8945echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008946sed 's/^/| /' conftest.$ac_ext >&5
8947
Martin v. Löwis11437992002-04-12 09:54:03 +00008948( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008949{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8950See \`config.log' for more details." >&5
8951echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8952See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 { (exit 1); exit 1; }; }
8954fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008955rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008956fi
8957fi
8958rm -f conftest.val
8959else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008960 ac_cv_sizeof_fpos_t=0
8961fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008963echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8964echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8965cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008966#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008967_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008968
Michael W. Hudson54241132001-12-07 15:38:26 +00008969
8970
Martin v. Löwis11437992002-04-12 09:54:03 +00008971echo "$as_me:$LINENO: checking for long long support" >&5
8972echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008973have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* confdefs.h. */
8976_ACEOF
8977cat confdefs.h >>conftest.$ac_ext
8978cat >>conftest.$ac_ext <<_ACEOF
8979/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008980
Martin v. Löwis11437992002-04-12 09:54:03 +00008981int
8982main ()
8983{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008984long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ;
8986 return 0;
8987}
8988_ACEOF
8989rm -f conftest.$ac_objext
8990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008991 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008993 grep -v '^ *+' conftest.er1 >conftest.err
8994 rm -f conftest.er1
8995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8997 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008998 { ac_try='test -z "$ac_c_werror_flag"
8999 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; } &&
9005 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9007 (eval $ac_try) 2>&5
9008 ac_status=$?
9009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9010 (exit $ac_status); }; }; then
9011
9012
9013cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009014#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009015_ACEOF
9016
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009017 have_long_long=yes
9018
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009019else
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009021sed 's/^/| /' conftest.$ac_ext >&5
9022
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009023fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009025echo "$as_me:$LINENO: result: $have_long_long" >&5
9026echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009027if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009028echo "$as_me:$LINENO: checking for long long" >&5
9029echo $ECHO_N "checking for long long... $ECHO_C" >&6
9030if test "${ac_cv_type_long_long+set}" = set; then
9031 echo $ECHO_N "(cached) $ECHO_C" >&6
9032else
9033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009034/* confdefs.h. */
9035_ACEOF
9036cat confdefs.h >>conftest.$ac_ext
9037cat >>conftest.$ac_ext <<_ACEOF
9038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009039$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009040int
9041main ()
9042{
9043if ((long long *) 0)
9044 return 0;
9045if (sizeof (long long))
9046 return 0;
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051rm -f conftest.$ac_objext
9052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009053 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009055 grep -v '^ *+' conftest.er1 >conftest.err
9056 rm -f conftest.er1
9057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9059 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009060 { ac_try='test -z "$ac_c_werror_flag"
9061 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; } &&
9067 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9069 (eval $ac_try) 2>&5
9070 ac_status=$?
9071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9072 (exit $ac_status); }; }; then
9073 ac_cv_type_long_long=yes
9074else
9075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009076sed 's/^/| /' conftest.$ac_ext >&5
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078ac_cv_type_long_long=no
9079fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009080rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009081fi
9082echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9083echo "${ECHO_T}$ac_cv_type_long_long" >&6
9084
9085echo "$as_me:$LINENO: checking size of long long" >&5
9086echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9087if test "${ac_cv_sizeof_long_long+set}" = set; then
9088 echo $ECHO_N "(cached) $ECHO_C" >&6
9089else
9090 if test "$ac_cv_type_long_long" = yes; then
9091 # The cast to unsigned long works around a bug in the HP C Compiler
9092 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9093 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9094 # This bug is HP SR number 8606223364.
9095 if test "$cross_compiling" = yes; then
9096 # Depending upon the size, compute the lo and hi bounds.
9097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009098/* confdefs.h. */
9099_ACEOF
9100cat confdefs.h >>conftest.$ac_ext
9101cat >>conftest.$ac_ext <<_ACEOF
9102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009104int
9105main ()
9106{
9107static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9108test_array [0] = 0
9109
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114rm -f conftest.$ac_objext
9115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009118 grep -v '^ *+' conftest.er1 >conftest.err
9119 rm -f conftest.er1
9120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009123 { ac_try='test -z "$ac_c_werror_flag"
9124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9126 (eval $ac_try) 2>&5
9127 ac_status=$?
9128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9129 (exit $ac_status); }; } &&
9130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9132 (eval $ac_try) 2>&5
9133 ac_status=$?
9134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); }; }; then
9136 ac_lo=0 ac_mid=0
9137 while :; do
9138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009144$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009145int
9146main ()
9147{
9148static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9149test_array [0] = 0
9150
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155rm -f conftest.$ac_objext
9156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009157 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009159 grep -v '^ *+' conftest.er1 >conftest.err
9160 rm -f conftest.er1
9161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009164 { ac_try='test -z "$ac_c_werror_flag"
9165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9167 (eval $ac_try) 2>&5
9168 ac_status=$?
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); }; } &&
9171 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9173 (eval $ac_try) 2>&5
9174 ac_status=$?
9175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); }; }; then
9177 ac_hi=$ac_mid; break
9178else
9179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009180sed 's/^/| /' conftest.$ac_ext >&5
9181
Martin v. Löwis11437992002-04-12 09:54:03 +00009182ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009183 if test $ac_lo -le $ac_mid; then
9184 ac_lo= ac_hi=
9185 break
9186 fi
9187 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009188fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 done
9191else
9192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009193sed 's/^/| /' conftest.$ac_ext >&5
9194
Martin v. Löwis11437992002-04-12 09:54:03 +00009195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* confdefs.h. */
9197_ACEOF
9198cat confdefs.h >>conftest.$ac_ext
9199cat >>conftest.$ac_ext <<_ACEOF
9200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009202int
9203main ()
9204{
9205static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9206test_array [0] = 0
9207
9208 ;
9209 return 0;
9210}
9211_ACEOF
9212rm -f conftest.$ac_objext
9213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009214 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009216 grep -v '^ *+' conftest.er1 >conftest.err
9217 rm -f conftest.er1
9218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9220 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009221 { ac_try='test -z "$ac_c_werror_flag"
9222 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9224 (eval $ac_try) 2>&5
9225 ac_status=$?
9226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9227 (exit $ac_status); }; } &&
9228 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9230 (eval $ac_try) 2>&5
9231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); }; }; then
9234 ac_hi=-1 ac_mid=-1
9235 while :; do
9236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* confdefs.h. */
9238_ACEOF
9239cat confdefs.h >>conftest.$ac_ext
9240cat >>conftest.$ac_ext <<_ACEOF
9241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009242$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009243int
9244main ()
9245{
9246static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9247test_array [0] = 0
9248
9249 ;
9250 return 0;
9251}
9252_ACEOF
9253rm -f conftest.$ac_objext
9254if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009255 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009257 grep -v '^ *+' conftest.er1 >conftest.err
9258 rm -f conftest.er1
9259 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009262 { ac_try='test -z "$ac_c_werror_flag"
9263 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9265 (eval $ac_try) 2>&5
9266 ac_status=$?
9267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9268 (exit $ac_status); }; } &&
9269 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9271 (eval $ac_try) 2>&5
9272 ac_status=$?
9273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9274 (exit $ac_status); }; }; then
9275 ac_lo=$ac_mid; break
9276else
9277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009278sed 's/^/| /' conftest.$ac_ext >&5
9279
Martin v. Löwis11437992002-04-12 09:54:03 +00009280ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009281 if test $ac_mid -le $ac_hi; then
9282 ac_lo= ac_hi=
9283 break
9284 fi
9285 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 done
9289else
9290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009291sed 's/^/| /' conftest.$ac_ext >&5
9292
Martin v. Löwis11437992002-04-12 09:54:03 +00009293ac_lo= ac_hi=
9294fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009296fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009297rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009298# Binary search between lo and hi bounds.
9299while test "x$ac_lo" != "x$ac_hi"; do
9300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9301 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009302/* confdefs.h. */
9303_ACEOF
9304cat confdefs.h >>conftest.$ac_ext
9305cat >>conftest.$ac_ext <<_ACEOF
9306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009307$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009308int
9309main ()
9310{
9311static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9312test_array [0] = 0
9313
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext
9319if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009320 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009322 grep -v '^ *+' conftest.er1 >conftest.err
9323 rm -f conftest.er1
9324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009327 { ac_try='test -z "$ac_c_werror_flag"
9328 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9330 (eval $ac_try) 2>&5
9331 ac_status=$?
9332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9333 (exit $ac_status); }; } &&
9334 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9336 (eval $ac_try) 2>&5
9337 ac_status=$?
9338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9339 (exit $ac_status); }; }; then
9340 ac_hi=$ac_mid
9341else
9342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009343sed 's/^/| /' conftest.$ac_ext >&5
9344
Martin v. Löwis11437992002-04-12 09:54:03 +00009345ac_lo=`expr '(' $ac_mid ')' + 1`
9346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009347rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009348done
9349case $ac_lo in
9350?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009351'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9352See \`config.log' for more details." >&5
9353echo "$as_me: error: cannot compute sizeof (long long), 77
9354See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 { (exit 1); exit 1; }; } ;;
9356esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009357else
9358 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009359 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9360See \`config.log' for more details." >&5
9361echo "$as_me: error: cannot run test program while cross compiling
9362See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009364else
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* confdefs.h. */
9367_ACEOF
9368cat confdefs.h >>conftest.$ac_ext
9369cat >>conftest.$ac_ext <<_ACEOF
9370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009371$ac_includes_default
9372long longval () { return (long) (sizeof (long long)); }
9373unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009374#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009375#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009376int
9377main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009378{
Martin v. Löwis11437992002-04-12 09:54:03 +00009379
9380 FILE *f = fopen ("conftest.val", "w");
9381 if (! f)
9382 exit (1);
9383 if (((long) (sizeof (long long))) < 0)
9384 {
9385 long i = longval ();
9386 if (i != ((long) (sizeof (long long))))
9387 exit (1);
9388 fprintf (f, "%ld\n", i);
9389 }
9390 else
9391 {
9392 unsigned long i = ulongval ();
9393 if (i != ((long) (sizeof (long long))))
9394 exit (1);
9395 fprintf (f, "%lu\n", i);
9396 }
9397 exit (ferror (f) || fclose (f) != 0);
9398
9399 ;
9400 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009401}
Martin v. Löwis11437992002-04-12 09:54:03 +00009402_ACEOF
9403rm -f conftest$ac_exeext
9404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9405 (eval $ac_link) 2>&5
9406 ac_status=$?
9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9410 (eval $ac_try) 2>&5
9411 ac_status=$?
9412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9413 (exit $ac_status); }; }; then
9414 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009415else
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 echo "$as_me: program exited with status $ac_status" >&5
9417echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009418sed 's/^/| /' conftest.$ac_ext >&5
9419
Martin v. Löwis11437992002-04-12 09:54:03 +00009420( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009421{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9422See \`config.log' for more details." >&5
9423echo "$as_me: error: cannot compute sizeof (long long), 77
9424See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 { (exit 1); exit 1; }; }
9426fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009427rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009428fi
9429fi
9430rm -f conftest.val
9431else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009432 ac_cv_sizeof_long_long=0
9433fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009435echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9436echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9437cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009438#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009439_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009440
Michael W. Hudson54241132001-12-07 15:38:26 +00009441
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009442fi
9443
Martin v. Löwis11437992002-04-12 09:54:03 +00009444echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9445echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009446have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009448/* confdefs.h. */
9449_ACEOF
9450cat confdefs.h >>conftest.$ac_ext
9451cat >>conftest.$ac_ext <<_ACEOF
9452/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009453
Martin v. Löwis11437992002-04-12 09:54:03 +00009454int
9455main ()
9456{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009457uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009458 ;
9459 return 0;
9460}
9461_ACEOF
9462rm -f conftest.$ac_objext
9463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009464 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009466 grep -v '^ *+' conftest.er1 >conftest.err
9467 rm -f conftest.er1
9468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009471 { ac_try='test -z "$ac_c_werror_flag"
9472 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; } &&
9478 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480 (eval $ac_try) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); }; }; then
9484
9485
9486cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009487#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009488_ACEOF
9489
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009490 have_uintptr_t=yes
9491
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009492else
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009494sed 's/^/| /' conftest.$ac_ext >&5
9495
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009496fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009498echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9499echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009500if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009501echo "$as_me:$LINENO: checking for uintptr_t" >&5
9502echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9503if test "${ac_cv_type_uintptr_t+set}" = set; then
9504 echo $ECHO_N "(cached) $ECHO_C" >&6
9505else
9506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* confdefs.h. */
9508_ACEOF
9509cat confdefs.h >>conftest.$ac_ext
9510cat >>conftest.$ac_ext <<_ACEOF
9511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009513int
9514main ()
9515{
9516if ((uintptr_t *) 0)
9517 return 0;
9518if (sizeof (uintptr_t))
9519 return 0;
9520 ;
9521 return 0;
9522}
9523_ACEOF
9524rm -f conftest.$ac_objext
9525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009526 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009528 grep -v '^ *+' conftest.er1 >conftest.err
9529 rm -f conftest.er1
9530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009533 { ac_try='test -z "$ac_c_werror_flag"
9534 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9536 (eval $ac_try) 2>&5
9537 ac_status=$?
9538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9539 (exit $ac_status); }; } &&
9540 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9542 (eval $ac_try) 2>&5
9543 ac_status=$?
9544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9545 (exit $ac_status); }; }; then
9546 ac_cv_type_uintptr_t=yes
9547else
9548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009549sed 's/^/| /' conftest.$ac_ext >&5
9550
Martin v. Löwis11437992002-04-12 09:54:03 +00009551ac_cv_type_uintptr_t=no
9552fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009553rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009554fi
9555echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9556echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9557
9558echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9559echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9560if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9561 echo $ECHO_N "(cached) $ECHO_C" >&6
9562else
9563 if test "$ac_cv_type_uintptr_t" = yes; then
9564 # The cast to unsigned long works around a bug in the HP C Compiler
9565 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9566 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9567 # This bug is HP SR number 8606223364.
9568 if test "$cross_compiling" = yes; then
9569 # Depending upon the size, compute the lo and hi bounds.
9570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009571/* confdefs.h. */
9572_ACEOF
9573cat confdefs.h >>conftest.$ac_ext
9574cat >>conftest.$ac_ext <<_ACEOF
9575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009576$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009577int
9578main ()
9579{
9580static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9581test_array [0] = 0
9582
9583 ;
9584 return 0;
9585}
9586_ACEOF
9587rm -f conftest.$ac_objext
9588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 grep -v '^ *+' conftest.er1 >conftest.err
9592 rm -f conftest.er1
9593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009596 { ac_try='test -z "$ac_c_werror_flag"
9597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9599 (eval $ac_try) 2>&5
9600 ac_status=$?
9601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9602 (exit $ac_status); }; } &&
9603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9605 (eval $ac_try) 2>&5
9606 ac_status=$?
9607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); }; }; then
9609 ac_lo=0 ac_mid=0
9610 while :; do
9611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009612/* confdefs.h. */
9613_ACEOF
9614cat confdefs.h >>conftest.$ac_ext
9615cat >>conftest.$ac_ext <<_ACEOF
9616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
9621static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9622test_array [0] = 0
9623
9624 ;
9625 return 0;
9626}
9627_ACEOF
9628rm -f conftest.$ac_objext
9629if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009630 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009632 grep -v '^ *+' conftest.er1 >conftest.err
9633 rm -f conftest.er1
9634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9636 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009637 { ac_try='test -z "$ac_c_werror_flag"
9638 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9640 (eval $ac_try) 2>&5
9641 ac_status=$?
9642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9643 (exit $ac_status); }; } &&
9644 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9646 (eval $ac_try) 2>&5
9647 ac_status=$?
9648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_hi=$ac_mid; break
9651else
9652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009653sed 's/^/| /' conftest.$ac_ext >&5
9654
Martin v. Löwis11437992002-04-12 09:54:03 +00009655ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009656 if test $ac_lo -le $ac_mid; then
9657 ac_lo= ac_hi=
9658 break
9659 fi
9660 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 done
9664else
9665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009666sed 's/^/| /' conftest.$ac_ext >&5
9667
Martin v. Löwis11437992002-04-12 09:54:03 +00009668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009675int
9676main ()
9677{
9678static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9679test_array [0] = 0
9680
9681 ;
9682 return 0;
9683}
9684_ACEOF
9685rm -f conftest.$ac_objext
9686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009687 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009689 grep -v '^ *+' conftest.er1 >conftest.err
9690 rm -f conftest.er1
9691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009694 { ac_try='test -z "$ac_c_werror_flag"
9695 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9697 (eval $ac_try) 2>&5
9698 ac_status=$?
9699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9700 (exit $ac_status); }; } &&
9701 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9703 (eval $ac_try) 2>&5
9704 ac_status=$?
9705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9706 (exit $ac_status); }; }; then
9707 ac_hi=-1 ac_mid=-1
9708 while :; do
9709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
9719static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
9727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009728 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009735 { ac_try='test -z "$ac_c_werror_flag"
9736 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738 (eval $ac_try) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); }; } &&
9742 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9744 (eval $ac_try) 2>&5
9745 ac_status=$?
9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747 (exit $ac_status); }; }; then
9748 ac_lo=$ac_mid; break
9749else
9750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009754 if test $ac_mid -le $ac_hi; then
9755 ac_lo= ac_hi=
9756 break
9757 fi
9758 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 done
9762else
9763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009764sed 's/^/| /' conftest.$ac_ext >&5
9765
Martin v. Löwis11437992002-04-12 09:54:03 +00009766ac_lo= ac_hi=
9767fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009768rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771# Binary search between lo and hi bounds.
9772while test "x$ac_lo" != "x$ac_hi"; do
9773 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009775/* confdefs.h. */
9776_ACEOF
9777cat confdefs.h >>conftest.$ac_ext
9778cat >>conftest.$ac_ext <<_ACEOF
9779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009781int
9782main ()
9783{
9784static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9785test_array [0] = 0
9786
9787 ;
9788 return 0;
9789}
9790_ACEOF
9791rm -f conftest.$ac_objext
9792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009793 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 grep -v '^ *+' conftest.er1 >conftest.err
9796 rm -f conftest.er1
9797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9799 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009800 { ac_try='test -z "$ac_c_werror_flag"
9801 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9803 (eval $ac_try) 2>&5
9804 ac_status=$?
9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806 (exit $ac_status); }; } &&
9807 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9809 (eval $ac_try) 2>&5
9810 ac_status=$?
9811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9812 (exit $ac_status); }; }; then
9813 ac_hi=$ac_mid
9814else
9815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009816sed 's/^/| /' conftest.$ac_ext >&5
9817
Martin v. Löwis11437992002-04-12 09:54:03 +00009818ac_lo=`expr '(' $ac_mid ')' + 1`
9819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009820rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009821done
9822case $ac_lo in
9823?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009824'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9825See \`config.log' for more details." >&5
9826echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9827See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 { (exit 1); exit 1; }; } ;;
9829esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009830else
9831 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009832 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9833See \`config.log' for more details." >&5
9834echo "$as_me: error: cannot run test program while cross compiling
9835See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009837else
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* confdefs.h. */
9840_ACEOF
9841cat confdefs.h >>conftest.$ac_ext
9842cat >>conftest.$ac_ext <<_ACEOF
9843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844$ac_includes_default
9845long longval () { return (long) (sizeof (uintptr_t)); }
9846unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009849int
9850main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009851{
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
9853 FILE *f = fopen ("conftest.val", "w");
9854 if (! f)
9855 exit (1);
9856 if (((long) (sizeof (uintptr_t))) < 0)
9857 {
9858 long i = longval ();
9859 if (i != ((long) (sizeof (uintptr_t))))
9860 exit (1);
9861 fprintf (f, "%ld\n", i);
9862 }
9863 else
9864 {
9865 unsigned long i = ulongval ();
9866 if (i != ((long) (sizeof (uintptr_t))))
9867 exit (1);
9868 fprintf (f, "%lu\n", i);
9869 }
9870 exit (ferror (f) || fclose (f) != 0);
9871
9872 ;
9873 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009874}
Martin v. Löwis11437992002-04-12 09:54:03 +00009875_ACEOF
9876rm -f conftest$ac_exeext
9877if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9878 (eval $ac_link) 2>&5
9879 ac_status=$?
9880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009888else
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 echo "$as_me: program exited with status $ac_status" >&5
9890echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009891sed 's/^/| /' conftest.$ac_ext >&5
9892
Martin v. Löwis11437992002-04-12 09:54:03 +00009893( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009894{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9895See \`config.log' for more details." >&5
9896echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9897See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009898 { (exit 1); exit 1; }; }
9899fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009900rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901fi
9902fi
9903rm -f conftest.val
9904else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009905 ac_cv_sizeof_uintptr_t=0
9906fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009907fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009908echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9909echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9910cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009911#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009913
Michael W. Hudson54241132001-12-07 15:38:26 +00009914
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009915fi
9916
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009917# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009918echo "$as_me:$LINENO: checking size of off_t" >&5
9919echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9920if test "${ac_cv_sizeof_off_t+set}" = set; then
9921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009922else
9923 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009924 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* confdefs.h. */
9928_ACEOF
9929cat confdefs.h >>conftest.$ac_ext
9930cat >>conftest.$ac_ext <<_ACEOF
9931/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009932#include <stdio.h>
9933#include <sys/types.h>
9934main()
9935{
9936 FILE *f=fopen("conftestval", "w");
9937 if (!f) exit(1);
9938 fprintf(f, "%d\n", sizeof(off_t));
9939 exit(0);
9940}
Martin v. Löwis11437992002-04-12 09:54:03 +00009941_ACEOF
9942rm -f conftest$ac_exeext
9943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9944 (eval $ac_link) 2>&5
9945 ac_status=$?
9946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9949 (eval $ac_try) 2>&5
9950 ac_status=$?
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009953 ac_cv_sizeof_off_t=`cat conftestval`
9954else
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 echo "$as_me: program exited with status $ac_status" >&5
9956echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009957sed 's/^/| /' conftest.$ac_ext >&5
9958
Martin v. Löwis11437992002-04-12 09:54:03 +00009959( exit $ac_status )
9960ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009962rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009963fi
9964
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009965fi
9966
Martin v. Löwis11437992002-04-12 09:54:03 +00009967echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9968echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9969
9970cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009971#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009973
Michael W. Hudson54241132001-12-07 15:38:26 +00009974
Martin v. Löwis11437992002-04-12 09:54:03 +00009975echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9976echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009977if test "$have_long_long" = yes -a \
9978 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9979 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009980
Martin v. Löwis11437992002-04-12 09:54:03 +00009981cat >>confdefs.h <<\_ACEOF
9982#define HAVE_LARGEFILE_SUPPORT 1
9983_ACEOF
9984
9985 echo "$as_me:$LINENO: result: yes" >&5
9986echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009987else
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 echo "$as_me:$LINENO: result: no" >&5
9989echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009990fi
9991
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009992# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009993echo "$as_me:$LINENO: checking size of time_t" >&5
9994echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9995if test "${ac_cv_sizeof_time_t+set}" = set; then
9996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009997else
9998 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009999 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010000else
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010002/* confdefs.h. */
10003_ACEOF
10004cat confdefs.h >>conftest.$ac_ext
10005cat >>conftest.$ac_ext <<_ACEOF
10006/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010007#include <stdio.h>
10008#include <time.h>
10009main()
10010{
10011 FILE *f=fopen("conftestval", "w");
10012 if (!f) exit(1);
10013 fprintf(f, "%d\n", sizeof(time_t));
10014 exit(0);
10015}
Martin v. Löwis11437992002-04-12 09:54:03 +000010016_ACEOF
10017rm -f conftest$ac_exeext
10018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10019 (eval $ac_link) 2>&5
10020 ac_status=$?
10021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10024 (eval $ac_try) 2>&5
10025 ac_status=$?
10026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10027 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010028 ac_cv_sizeof_time_t=`cat conftestval`
10029else
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 echo "$as_me: program exited with status $ac_status" >&5
10031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010032sed 's/^/| /' conftest.$ac_ext >&5
10033
Martin v. Löwis11437992002-04-12 09:54:03 +000010034( exit $ac_status )
10035ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010036fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010037rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010038fi
10039
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010040fi
10041
Martin v. Löwis11437992002-04-12 09:54:03 +000010042echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10043echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10044
10045cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010046#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010047_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010048
Michael W. Hudson54241132001-12-07 15:38:26 +000010049
10050
Trent Mick635f6fb2000-08-23 21:33:05 +000010051# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010052ac_save_cc="$CC"
10053if test "$ac_cv_kpthread" = "yes"
10054then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010055elif test "$ac_cv_kthread" = "yes"
10056then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010057elif test "$ac_cv_pthread" = "yes"
10058then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010060echo "$as_me:$LINENO: checking for pthread_t" >&5
10061echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010062have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010064/* confdefs.h. */
10065_ACEOF
10066cat confdefs.h >>conftest.$ac_ext
10067cat >>conftest.$ac_ext <<_ACEOF
10068/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010069#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010070int
10071main ()
10072{
Guido van Rossum12580492000-09-24 16:47:19 +000010073pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
10079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010087 { ac_try='test -z "$ac_c_werror_flag"
10088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; } &&
10094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10097 ac_status=$?
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010100 have_pthread_t=yes
10101else
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010103sed 's/^/| /' conftest.$ac_ext >&5
10104
Trent Mick635f6fb2000-08-23 21:33:05 +000010105fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010106rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010107echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10108echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010109if test "$have_pthread_t" = yes ; then
10110 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010111 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10112echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10113 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010115else
10116 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010117 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010118else
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010120/* confdefs.h. */
10121_ACEOF
10122cat confdefs.h >>conftest.$ac_ext
10123cat >>conftest.$ac_ext <<_ACEOF
10124/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010125#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010126#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010127 main()
10128 {
10129 FILE *f=fopen("conftestval", "w");
10130 if (!f) exit(1);
10131 fprintf(f, "%d\n", sizeof(pthread_t));
10132 exit(0);
10133 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010134_ACEOF
10135rm -f conftest$ac_exeext
10136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10137 (eval $ac_link) 2>&5
10138 ac_status=$?
10139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10142 (eval $ac_try) 2>&5
10143 ac_status=$?
10144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10145 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010146 ac_cv_sizeof_pthread_t=`cat conftestval`
10147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 echo "$as_me: program exited with status $ac_status" >&5
10149echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010150sed 's/^/| /' conftest.$ac_ext >&5
10151
Martin v. Löwis11437992002-04-12 09:54:03 +000010152( exit $ac_status )
10153ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010155rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010156fi
10157
Trent Mick635f6fb2000-08-23 21:33:05 +000010158fi
10159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10161echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10162
10163cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010164#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010165_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010166
10167fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010168CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010169
Martin v. Löwis11437992002-04-12 09:54:03 +000010170echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10171echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010172# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10173if test "${enable_toolbox_glue+set}" = set; then
10174 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010175
Martin v. Löwis11437992002-04-12 09:54:03 +000010176fi;
Jack Jansene578a632001-08-15 01:27:14 +000010177
10178if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010179then
Jack Jansene578a632001-08-15 01:27:14 +000010180 case $ac_sys_system/$ac_sys_release in
10181 Darwin/*)
10182 enable_toolbox_glue="yes";;
10183 *)
10184 enable_toolbox_glue="no";;
10185 esac
10186fi
10187case "$enable_toolbox_glue" in
10188yes)
Jack Jansene578a632001-08-15 01:27:14 +000010189 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010190 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
10192cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010193#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010195
10196 ;;
10197*)
Jack Jansene578a632001-08-15 01:27:14 +000010198 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010199 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010200 ;;
10201esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010202echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10203echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010204
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010205
10206case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010207 Darwin/[01234567].*)
10208 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10209 ;;
10210 Darwin/*)
10211 OTHER_LIBTOOL_OPT=""
10212 ;;
10213esac
10214
10215
10216case $ac_sys_system/$ac_sys_release in
10217 Darwin/[01234567].*)
10218 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010219 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010220 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010221 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010222 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10223 if test ${gcc_version} '<' 4.0
10224 then
10225 LIBTOOL_CRUFT="-lcc_dynamic"
10226 else
10227 LIBTOOL_CRUFT=""
10228 fi
10229 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010230 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010231 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010232esac
10233
Martin v. Löwis11437992002-04-12 09:54:03 +000010234echo "$as_me:$LINENO: checking for --enable-framework" >&5
10235echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010236if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010237then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010238 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010239 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010240 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010241
Martin v. Löwis11437992002-04-12 09:54:03 +000010242cat >>confdefs.h <<\_ACEOF
10243#define WITH_NEXT_FRAMEWORK 1
10244_ACEOF
10245
10246 echo "$as_me:$LINENO: result: yes" >&5
10247echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010248else
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 echo "$as_me:$LINENO: result: no" >&5
10250echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010251fi
10252
Martin v. Löwis11437992002-04-12 09:54:03 +000010253echo "$as_me:$LINENO: checking for dyld" >&5
10254echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010255case $ac_sys_system/$ac_sys_release in
10256 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010257
Martin v. Löwis11437992002-04-12 09:54:03 +000010258cat >>confdefs.h <<\_ACEOF
10259#define WITH_DYLD 1
10260_ACEOF
10261
10262 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10263echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010264 ;;
10265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 echo "$as_me:$LINENO: result: no" >&5
10267echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010268 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010269esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010270
Guido van Rossum0a516c91994-09-12 10:58:40 +000010271# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
10274
10275
10276
Guido van Rossum0a516c91994-09-12 10:58:40 +000010277# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010278# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010279echo "$as_me:$LINENO: checking SO" >&5
10280echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010281if test -z "$SO"
10282then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010283 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010284 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010285 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010286 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010287 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010288else
10289 # this might also be a termcap variable, see #610332
10290 echo
10291 echo '====================================================================='
10292 echo '+ +'
10293 echo '+ WARNING: You have set SO in your environment. +'
10294 echo '+ Do you really mean to change the extension for shared libraries? +'
10295 echo '+ Continuing in 10 seconds to let you to ponder. +'
10296 echo '+ +'
10297 echo '====================================================================='
10298 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010300echo "$as_me:$LINENO: result: $SO" >&5
10301echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010302# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010303# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010304# (Shared libraries in this instance are shared modules to be loaded into
10305# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010306echo "$as_me:$LINENO: checking LDSHARED" >&5
10307echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010308if test -z "$LDSHARED"
10309then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010310 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010311 AIX*)
10312 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010313 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010314 ;;
10315 BeOS*)
10316 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010317 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010318 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010319 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010320 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010322 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010323 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010324 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010325 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010326 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010327 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010328 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010329 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10330 if test "$enable_framework" ; then
10331 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010332 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10333 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010334 else
10335 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010336 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010337 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010338 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010339 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10340 if test "$enable_framework" ; then
10341 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010342 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10343 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010344 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010345 # No framework, use the Python app as bundle-loader
10346 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010347 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010348 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010349 Darwin/*)
10350 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10351 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010352 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010353 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010354 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010355 then
10356 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10357 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010358 else
10359 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10360 if test "$enable_framework" ; then
10361 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010362 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10363 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010364 else
10365 # No framework, use the Python app as bundle-loader
10366 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10367 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10368 fi
10369 fi
10370 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010371 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010372 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010373 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010374 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010375 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010376 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010377 else
10378 LDSHARED="ld -Bshareable ${LDFLAGS}"
10379 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010380 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010381 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010382 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010383 then LDSHARED='$(CC) -shared'
10384 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010385 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010386 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010387 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010388 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010389 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010390 *) LDSHARED="ld";;
10391 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010393echo "$as_me:$LINENO: result: $LDSHARED" >&5
10394echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010395BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010396# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010397# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010398echo "$as_me:$LINENO: checking CCSHARED" >&5
10399echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010400if test -z "$CCSHARED"
10401then
Guido van Rossum07397971997-04-29 21:49:50 +000010402 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010403 SunOS*) if test "$GCC" = yes;
10404 then CCSHARED="-fPIC";
10405 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010406 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010407 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010408 else CCSHARED="+z";
10409 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010410 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010411 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010412 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010413 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010414 if test "$GCC" = "yes"
10415 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010417 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010418 SCO_SV*)
10419 if test "$GCC" = "yes"
10420 then CCSHARED="-fPIC"
10421 else CCSHARED="-Kpic -belf"
10422 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010423 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010424 IRIX*/6*) case $CC in
10425 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010426 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010427 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010428 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010429 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010430fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010431echo "$as_me:$LINENO: result: $CCSHARED" >&5
10432echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010433# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010434# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010435echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10436echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010437if test -z "$LINKFORSHARED"
10438then
Guido van Rossum07397971997-04-29 21:49:50 +000010439 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010440 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010441 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010442 LINKFORSHARED="-Wl,-E -Wl,+s";;
10443# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010444 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010445 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010446 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010448 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10449 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010450 # not used by the core itself but which needs to be in the core so
10451 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010452 # -prebind is no longer used, because it actually seems to give a
10453 # slowdown in stead of a speedup, maybe due to the large number of
10454 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010455
10456 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010457 if test "$enable_framework"
10458 then
Jack Jansenda49e192005-01-07 13:08:22 +000010459 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010460 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010461 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010462 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010463 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010464 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010466 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10467 then
10468 LINKFORSHARED="-Wl,--export-dynamic"
10469 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010470 SunOS/5*) case $CC in
10471 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010472 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010473 then
10474 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010475 fi;;
10476 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010477 CYGWIN*)
10478 if test $enable_shared = "no"
10479 then
10480 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10481 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010482 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010483fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010484echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10485echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010486
Michael W. Hudson54241132001-12-07 15:38:26 +000010487
Martin v. Löwis11437992002-04-12 09:54:03 +000010488echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10489echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010490if test ! "$LIBRARY" = "$LDLIBRARY"
10491then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010492 case $ac_sys_system in
10493 CYGWIN*)
10494 # Cygwin needs CCSHARED when building extension DLLs
10495 # but not when building the interpreter DLL.
10496 CFLAGSFORSHARED='';;
10497 *)
10498 CFLAGSFORSHARED='$(CCSHARED)'
10499 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010501echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10502echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010503
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010504# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10505# library (with --enable-shared).
10506# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010507# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10508# if it is not required, since it creates a dependency of the shared library
10509# to LIBS. This, in turn, means that applications linking the shared libpython
10510# don't need to link LIBS explicitly. The default should be only changed
10511# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010512
10513echo "$as_me:$LINENO: checking SHLIBS" >&5
10514echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10515case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010516 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010517 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010518esac
10519echo "$as_me:$LINENO: result: $SHLIBS" >&5
10520echo "${ECHO_T}$SHLIBS" >&6
10521
10522
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010524
10525echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10526echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10527if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010529else
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010531LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* confdefs.h. */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538
Guido van Rossum48bdbfc1996-05-28 22:53:48 +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 Rossum48bdbfc1996-05-28 22:53:48 +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 dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546int
10547main ()
10548{
10549dlopen ();
10550 ;
10551 return 0;
10552}
10553_ACEOF
10554rm -f conftest.$ac_objext conftest$ac_exeext
10555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010556 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010558 grep -v '^ *+' conftest.er1 >conftest.err
10559 rm -f conftest.er1
10560 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10562 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010563 { ac_try='test -z "$ac_c_werror_flag"
10564 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10566 (eval $ac_try) 2>&5
10567 ac_status=$?
10568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10569 (exit $ac_status); }; } &&
10570 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10572 (eval $ac_try) 2>&5
10573 ac_status=$?
10574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10575 (exit $ac_status); }; }; then
10576 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Martin v. Löwis11437992002-04-12 09:54:03 +000010581ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010583rm -f conftest.err conftest.$ac_objext \
10584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010585LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010587echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10588echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10589if test $ac_cv_lib_dl_dlopen = yes; then
10590 cat >>confdefs.h <<_ACEOF
10591#define HAVE_LIBDL 1
10592_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010593
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010594 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010595
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010596fi
10597 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
10599echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10600echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10601if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010605LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* confdefs.h. */
10608_ACEOF
10609cat confdefs.h >>conftest.$ac_ext
10610cat >>conftest.$ac_ext <<_ACEOF
10611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010612
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010613/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010614#ifdef __cplusplus
10615extern "C"
10616#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010617/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 builtin and then its argument prototype would still apply. */
10619char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010620int
10621main ()
10622{
10623shl_load ();
10624 ;
10625 return 0;
10626}
10627_ACEOF
10628rm -f conftest.$ac_objext conftest$ac_exeext
10629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010630 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010632 grep -v '^ *+' conftest.er1 >conftest.err
10633 rm -f conftest.er1
10634 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10636 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010637 { ac_try='test -z "$ac_c_werror_flag"
10638 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10640 (eval $ac_try) 2>&5
10641 ac_status=$?
10642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643 (exit $ac_status); }; } &&
10644 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10646 (eval $ac_try) 2>&5
10647 ac_status=$?
10648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10649 (exit $ac_status); }; }; then
10650 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010653sed 's/^/| /' conftest.$ac_ext >&5
10654
Martin v. Löwis11437992002-04-12 09:54:03 +000010655ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010656fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010657rm -f conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010659LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010660fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010661echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10662echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10663if test $ac_cv_lib_dld_shl_load = yes; then
10664 cat >>confdefs.h <<_ACEOF
10665#define HAVE_LIBDLD 1
10666_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010667
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010668 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670fi
10671 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010672
10673# only check for sem_ini if thread support is requested
10674if test "$with_threads" = "yes" -o -z "$with_threads"; then
10675 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010676echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10677if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010679else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010680 ac_func_search_save_LIBS=$LIBS
10681ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* confdefs.h. */
10684_ACEOF
10685cat confdefs.h >>conftest.$ac_ext
10686cat >>conftest.$ac_ext <<_ACEOF
10687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010689/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690#ifdef __cplusplus
10691extern "C"
10692#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 builtin and then its argument prototype would still apply. */
10695char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010696int
10697main ()
10698{
10699sem_init ();
10700 ;
10701 return 0;
10702}
10703_ACEOF
10704rm -f conftest.$ac_objext conftest$ac_exeext
10705if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010706 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010708 grep -v '^ *+' conftest.er1 >conftest.err
10709 rm -f conftest.er1
10710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10712 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010713 { ac_try='test -z "$ac_c_werror_flag"
10714 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010715 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10716 (eval $ac_try) 2>&5
10717 ac_status=$?
10718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10719 (exit $ac_status); }; } &&
10720 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10722 (eval $ac_try) 2>&5
10723 ac_status=$?
10724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10725 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010726 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010727else
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010729sed 's/^/| /' conftest.$ac_ext >&5
10730
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010731fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010732rm -f conftest.err conftest.$ac_objext \
10733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010734if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010735 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010736 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010738/* confdefs.h. */
10739_ACEOF
10740cat confdefs.h >>conftest.$ac_ext
10741cat >>conftest.$ac_ext <<_ACEOF
10742/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010743
10744/* Override any gcc2 internal prototype to avoid an error. */
10745#ifdef __cplusplus
10746extern "C"
10747#endif
10748/* We use char because int might match the return type of a gcc2
10749 builtin and then its argument prototype would still apply. */
10750char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010751int
10752main ()
10753{
10754sem_init ();
10755 ;
10756 return 0;
10757}
Martin v. Löwis11437992002-04-12 09:54:03 +000010758_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010759rm -f conftest.$ac_objext conftest$ac_exeext
10760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010761 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010763 grep -v '^ *+' conftest.er1 >conftest.err
10764 rm -f conftest.er1
10765 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10767 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010768 { ac_try='test -z "$ac_c_werror_flag"
10769 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10771 (eval $ac_try) 2>&5
10772 ac_status=$?
10773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10774 (exit $ac_status); }; } &&
10775 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10777 (eval $ac_try) 2>&5
10778 ac_status=$?
10779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10780 (exit $ac_status); }; }; then
10781 ac_cv_search_sem_init="-l$ac_lib"
10782break
10783else
10784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010785sed 's/^/| /' conftest.$ac_ext >&5
10786
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010787fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010788rm -f conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010790 done
10791fi
10792LIBS=$ac_func_search_save_LIBS
10793fi
10794echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10795echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10796if test "$ac_cv_search_sem_init" != no; then
10797 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010798
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010799fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010800 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010801 # posix4 on Solaris 2.6
10802 # pthread (first!) on Linux
10803fi
10804
Martin v. Löwis19d17342003-06-14 21:03:05 +000010805# check if we need libintl for locale functions
10806echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10807echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10808if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10809 echo $ECHO_N "(cached) $ECHO_C" >&6
10810else
10811 ac_check_lib_save_LIBS=$LIBS
10812LIBS="-lintl $LIBS"
10813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* confdefs.h. */
10815_ACEOF
10816cat confdefs.h >>conftest.$ac_ext
10817cat >>conftest.$ac_ext <<_ACEOF
10818/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010819
10820/* Override any gcc2 internal prototype to avoid an error. */
10821#ifdef __cplusplus
10822extern "C"
10823#endif
10824/* We use char because int might match the return type of a gcc2
10825 builtin and then its argument prototype would still apply. */
10826char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010827int
10828main ()
10829{
10830textdomain ();
10831 ;
10832 return 0;
10833}
10834_ACEOF
10835rm -f conftest.$ac_objext conftest$ac_exeext
10836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010837 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010839 grep -v '^ *+' conftest.er1 >conftest.err
10840 rm -f conftest.er1
10841 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10843 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010844 { ac_try='test -z "$ac_c_werror_flag"
10845 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10847 (eval $ac_try) 2>&5
10848 ac_status=$?
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); }; } &&
10851 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); }; }; then
10857 ac_cv_lib_intl_textdomain=yes
10858else
10859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010860sed 's/^/| /' conftest.$ac_ext >&5
10861
Martin v. Löwis19d17342003-06-14 21:03:05 +000010862ac_cv_lib_intl_textdomain=no
10863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010864rm -f conftest.err conftest.$ac_objext \
10865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010866LIBS=$ac_check_lib_save_LIBS
10867fi
10868echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10869echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10870if test $ac_cv_lib_intl_textdomain = yes; then
10871
10872cat >>confdefs.h <<\_ACEOF
10873#define WITH_LIBINTL 1
10874_ACEOF
10875
10876fi
10877
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010878
10879# checks for system dependent C++ extensions support
10880case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010881 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10882echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010889#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010890int
10891main ()
10892{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010893loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 ;
10895 return 0;
10896}
10897_ACEOF
10898rm -f conftest.$ac_objext conftest$ac_exeext
10899if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010900 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010902 grep -v '^ *+' conftest.er1 >conftest.err
10903 rm -f conftest.er1
10904 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10906 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010907 { ac_try='test -z "$ac_c_werror_flag"
10908 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10910 (eval $ac_try) 2>&5
10911 ac_status=$?
10912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913 (exit $ac_status); }; } &&
10914 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10916 (eval $ac_try) 2>&5
10917 ac_status=$?
10918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10919 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921cat >>confdefs.h <<\_ACEOF
10922#define AIX_GENUINE_CPLUSPLUS 1
10923_ACEOF
10924
10925 echo "$as_me:$LINENO: result: yes" >&5
10926echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010927else
Martin v. Löwis11437992002-04-12 09:54:03 +000010928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010929sed 's/^/| /' conftest.$ac_ext >&5
10930
Martin v. Löwis11437992002-04-12 09:54:03 +000010931echo "$as_me:$LINENO: result: no" >&5
10932echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010933fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010934rm -f conftest.err conftest.$ac_objext \
10935 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010936 *) ;;
10937esac
10938
Guido van Rossum70c7f481998-03-26 18:44:10 +000010939# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010940# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010941echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10942echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10943if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010945else
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010947LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010949/* confdefs.h. */
10950_ACEOF
10951cat confdefs.h >>conftest.$ac_ext
10952cat >>conftest.$ac_ext <<_ACEOF
10953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010954
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010955/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956#ifdef __cplusplus
10957extern "C"
10958#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010959/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 builtin and then its argument prototype would still apply. */
10961char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010962int
10963main ()
10964{
10965t_open ();
10966 ;
10967 return 0;
10968}
10969_ACEOF
10970rm -f conftest.$ac_objext conftest$ac_exeext
10971if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010972 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010974 grep -v '^ *+' conftest.er1 >conftest.err
10975 rm -f conftest.er1
10976 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10978 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010979 { ac_try='test -z "$ac_c_werror_flag"
10980 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10982 (eval $ac_try) 2>&5
10983 ac_status=$?
10984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10985 (exit $ac_status); }; } &&
10986 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10988 (eval $ac_try) 2>&5
10989 ac_status=$?
10990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10991 (exit $ac_status); }; }; then
10992 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010993else
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010995sed 's/^/| /' conftest.$ac_ext >&5
10996
Martin v. Löwis11437992002-04-12 09:54:03 +000010997ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010998fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010999rm -f conftest.err conftest.$ac_objext \
11000 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011001LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011002fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011003echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11004echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11005if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011006 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011007fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011008 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011009echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11010echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11011if test "${ac_cv_lib_socket_socket+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011013else
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011015LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011017/* confdefs.h. */
11018_ACEOF
11019cat confdefs.h >>conftest.$ac_ext
11020cat >>conftest.$ac_ext <<_ACEOF
11021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011022
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011023/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011024#ifdef __cplusplus
11025extern "C"
11026#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 builtin and then its argument prototype would still apply. */
11029char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011030int
11031main ()
11032{
11033socket ();
11034 ;
11035 return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext conftest$ac_exeext
11039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011040 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011042 grep -v '^ *+' conftest.er1 >conftest.err
11043 rm -f conftest.er1
11044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011047 { ac_try='test -z "$ac_c_werror_flag"
11048 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11050 (eval $ac_try) 2>&5
11051 ac_status=$?
11052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11053 (exit $ac_status); }; } &&
11054 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11056 (eval $ac_try) 2>&5
11057 ac_status=$?
11058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059 (exit $ac_status); }; }; then
11060 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011061else
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011063sed 's/^/| /' conftest.$ac_ext >&5
11064
Martin v. Löwis11437992002-04-12 09:54:03 +000011065ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011066fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011067rm -f conftest.err conftest.$ac_objext \
11068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011069LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011071echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11072echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11073if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011074 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011075fi
11076 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011077
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011078case "$ac_sys_system" in
11079BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011080echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11081echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11082if test "${ac_cv_lib_net_socket+set}" = set; then
11083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011084else
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011086LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011088/* confdefs.h. */
11089_ACEOF
11090cat confdefs.h >>conftest.$ac_ext
11091cat >>conftest.$ac_ext <<_ACEOF
11092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011093
Guido van Rossumad678af1998-10-02 14:42:15 +000011094/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011095#ifdef __cplusplus
11096extern "C"
11097#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011098/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011099 builtin and then its argument prototype would still apply. */
11100char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011101int
11102main ()
11103{
11104socket ();
11105 ;
11106 return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext conftest$ac_exeext
11110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011111 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011113 grep -v '^ *+' conftest.er1 >conftest.err
11114 rm -f conftest.er1
11115 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011118 { ac_try='test -z "$ac_c_werror_flag"
11119 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11121 (eval $ac_try) 2>&5
11122 ac_status=$?
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11124 (exit $ac_status); }; } &&
11125 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11127 (eval $ac_try) 2>&5
11128 ac_status=$?
11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11130 (exit $ac_status); }; }; then
11131 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011132else
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011134sed 's/^/| /' conftest.$ac_ext >&5
11135
Martin v. Löwis11437992002-04-12 09:54:03 +000011136ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011137fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011138rm -f conftest.err conftest.$ac_objext \
11139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011140LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011142echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11143echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11144if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011146fi
11147 # BeOS
11148;;
11149esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151echo "$as_me:$LINENO: checking for --with-libs" >&5
11152echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11153
Guido van Rossuma68acba1996-07-31 17:36:39 +000011154# Check whether --with-libs or --without-libs was given.
11155if test "${with_libs+set}" = set; then
11156 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011157
11158echo "$as_me:$LINENO: result: $withval" >&5
11159echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011160LIBS="$withval $LIBS"
11161
11162else
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 echo "$as_me:$LINENO: result: no" >&5
11164echo "${ECHO_T}no" >&6
11165fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011166
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011167# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011168
11169
Martin v. Löwis11437992002-04-12 09:54:03 +000011170echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11171echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11172
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011173# Check whether --with-signal-module or --without-signal-module was given.
11174if test "${with_signal_module+set}" = set; then
11175 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011176
Martin v. Löwis11437992002-04-12 09:54:03 +000011177fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011178
11179if test -z "$with_signal_module"
11180then with_signal_module="yes"
11181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011182echo "$as_me:$LINENO: result: $with_signal_module" >&5
11183echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011184
11185if test "${with_signal_module}" = "yes"; then
11186 USE_SIGNAL_MODULE=""
11187 SIGNAL_OBJS=""
11188else
11189 USE_SIGNAL_MODULE="#"
11190 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11191fi
11192
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011193# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011194
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011195USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11198echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11199
Guido van Rossumec2f0731997-01-22 20:54:01 +000011200
11201# Check whether --with-dec-threads or --without-dec-threads was given.
11202if test "${with_dec_threads+set}" = set; then
11203 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
11205echo "$as_me:$LINENO: result: $withval" >&5
11206echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011207LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011208if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011209 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011210fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011211else
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 echo "$as_me:$LINENO: result: no" >&5
11213echo "${ECHO_T}no" >&6
11214fi;
11215
11216# Templates for things AC_DEFINEd more than once.
11217# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011218
11219
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
11221
11222
11223
11224
11225echo "$as_me:$LINENO: checking for --with-threads" >&5
11226echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11227
Guido van Rossumec2f0731997-01-22 20:54:01 +000011228# Check whether --with-threads or --without-threads was given.
11229if test "${with_threads+set}" = set; then
11230 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011231
Martin v. Löwis11437992002-04-12 09:54:03 +000011232fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011233
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011234# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011235
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011236# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011237if test "${with_thread+set}" = set; then
11238 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011239 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011240fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011241
11242if test -z "$with_threads"
11243then with_threads="yes"
11244fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011245echo "$as_me:$LINENO: result: $with_threads" >&5
11246echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011247
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011248
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011249if test "$with_threads" = "no"
11250then
11251 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011252elif test "$ac_cv_pthread_is_default" = yes
11253then
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011255#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011256_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011257
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011258 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011260#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011261_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011262
11263 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011265elif test "$ac_cv_kpthread" = "yes"
11266then
11267 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011268 if test "$ac_cv_cxx_thread" = "yes"; then
11269 CXX="$CXX -Kpthread"
11270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011271 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011273_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011275 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011276 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011277elif test "$ac_cv_kthread" = "yes"
11278then
11279 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011280 if test "$ac_cv_cxx_thread" = "yes"; then
11281 CXX="$CXX -Kthread"
11282 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011283 cat >>confdefs.h <<\_ACEOF
11284#define WITH_THREAD 1
11285_ACEOF
11286
11287 posix_threads=yes
11288 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011289elif test "$ac_cv_pthread" = "yes"
11290then
11291 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011292 if test "$ac_cv_cxx_thread" = "yes"; then
11293 CXX="$CXX -pthread"
11294 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011295 cat >>confdefs.h <<\_ACEOF
11296#define WITH_THREAD 1
11297_ACEOF
11298
11299 posix_threads=yes
11300 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011301else
11302 if test ! -z "$with_threads" -a -d "$with_threads"
11303 then LDFLAGS="$LDFLAGS -L$with_threads"
11304 fi
11305 if test ! -z "$withval" -a -d "$withval"
11306 then LDFLAGS="$LDFLAGS -L$withval"
11307 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011308
11309 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011310 # define _POSIX_THREADS in unistd.h. Some apparently don't
11311 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11313echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011315/* confdefs.h. */
11316_ACEOF
11317cat confdefs.h >>conftest.$ac_ext
11318cat >>conftest.$ac_ext <<_ACEOF
11319/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011321#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011322#ifdef _POSIX_THREADS
11323yes
11324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
11326_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011328 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011329 unistd_defines_pthreads=yes
11330else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011331 unistd_defines_pthreads=no
11332fi
11333rm -f conftest*
11334
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11336echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011339#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011340_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011341
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 if test "${ac_cv_header_cthreads_h+set}" = set; then
11343 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11344echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11345if test "${ac_cv_header_cthreads_h+set}" = set; then
11346 echo $ECHO_N "(cached) $ECHO_C" >&6
11347fi
11348echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11349echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 # Is the header compilable?
11352echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11353echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011360$ac_includes_default
11361#include <cthreads.h>
11362_ACEOF
11363rm -f conftest.$ac_objext
11364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011365 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011367 grep -v '^ *+' conftest.er1 >conftest.err
11368 rm -f conftest.er1
11369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11371 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011372 { ac_try='test -z "$ac_c_werror_flag"
11373 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11375 (eval $ac_try) 2>&5
11376 ac_status=$?
11377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11378 (exit $ac_status); }; } &&
11379 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11381 (eval $ac_try) 2>&5
11382 ac_status=$?
11383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); }; }; then
11385 ac_header_compiler=yes
11386else
11387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011388sed 's/^/| /' conftest.$ac_ext >&5
11389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390ac_header_compiler=no
11391fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011392rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011393echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11394echo "${ECHO_T}$ac_header_compiler" >&6
11395
11396# Is the header present?
11397echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11398echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11399cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* confdefs.h. */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011405#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011406_ACEOF
11407if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11408 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11409 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011410 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 rm -f conftest.er1
11412 cat conftest.err >&5
11413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11414 (exit $ac_status); } >/dev/null; then
11415 if test -s conftest.err; then
11416 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011417 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 else
11419 ac_cpp_err=
11420 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011421else
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 ac_cpp_err=yes
11423fi
11424if test -z "$ac_cpp_err"; then
11425 ac_header_preproc=yes
11426else
11427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011428sed 's/^/| /' conftest.$ac_ext >&5
11429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011431fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011432rm -f conftest.err conftest.$ac_ext
11433echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11434echo "${ECHO_T}$ac_header_preproc" >&6
11435
11436# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011437case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11438 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11440echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011441 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11442echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11443 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011444 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011445 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011446 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11447echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011448 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11449echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11450 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11451echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11452 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11453echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011454 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11455echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011456 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11457echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011458 (
11459 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011460## ------------------------------------------------ ##
11461## Report this to http://www.python.org/python-bugs ##
11462## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011463_ASBOX
11464 ) |
11465 sed "s/^/$as_me: WARNING: /" >&2
11466 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011467esac
11468echo "$as_me:$LINENO: checking for cthreads.h" >&5
11469echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11470if test "${ac_cv_header_cthreads_h+set}" = set; then
11471 echo $ECHO_N "(cached) $ECHO_C" >&6
11472else
11473 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011475echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11476echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11477
11478fi
11479if test $ac_cv_header_cthreads_h = yes; then
11480 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011481#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011482_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011483
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011485#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011486_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
11489cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011490#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011491_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011492
11493 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011494 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011495else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011496
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11498 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11499echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11500if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11501 echo $ECHO_N "(cached) $ECHO_C" >&6
11502fi
11503echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11504echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011505else
Martin v. Löwis11437992002-04-12 09:54:03 +000011506 # Is the header compilable?
11507echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11508echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* confdefs.h. */
11511_ACEOF
11512cat confdefs.h >>conftest.$ac_ext
11513cat >>conftest.$ac_ext <<_ACEOF
11514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011515$ac_includes_default
11516#include <mach/cthreads.h>
11517_ACEOF
11518rm -f conftest.$ac_objext
11519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011520 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011522 grep -v '^ *+' conftest.er1 >conftest.err
11523 rm -f conftest.er1
11524 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11526 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011527 { ac_try='test -z "$ac_c_werror_flag"
11528 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11530 (eval $ac_try) 2>&5
11531 ac_status=$?
11532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11533 (exit $ac_status); }; } &&
11534 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11536 (eval $ac_try) 2>&5
11537 ac_status=$?
11538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11539 (exit $ac_status); }; }; then
11540 ac_header_compiler=yes
11541else
11542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011543sed 's/^/| /' conftest.$ac_ext >&5
11544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545ac_header_compiler=no
11546fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011548echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11549echo "${ECHO_T}$ac_header_compiler" >&6
11550
11551# Is the header present?
11552echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11553echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011555/* confdefs.h. */
11556_ACEOF
11557cat confdefs.h >>conftest.$ac_ext
11558cat >>conftest.$ac_ext <<_ACEOF
11559/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011560#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011561_ACEOF
11562if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11563 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11564 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011565 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 rm -f conftest.er1
11567 cat conftest.err >&5
11568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11569 (exit $ac_status); } >/dev/null; then
11570 if test -s conftest.err; then
11571 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011572 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 else
11574 ac_cpp_err=
11575 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011576else
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ac_cpp_err=yes
11578fi
11579if test -z "$ac_cpp_err"; then
11580 ac_header_preproc=yes
11581else
11582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011583sed 's/^/| /' conftest.$ac_ext >&5
11584
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011586fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011587rm -f conftest.err conftest.$ac_ext
11588echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11589echo "${ECHO_T}$ac_header_preproc" >&6
11590
11591# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011592case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11593 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11595echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011596 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11597echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11598 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011599 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011600 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011601 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11602echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011603 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11604echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11605 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11606echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11607 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11608echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011609 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11610echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011611 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11612echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011613 (
11614 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011615## ------------------------------------------------ ##
11616## Report this to http://www.python.org/python-bugs ##
11617## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011618_ASBOX
11619 ) |
11620 sed "s/^/$as_me: WARNING: /" >&2
11621 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011622esac
11623echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11624echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11625if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11626 echo $ECHO_N "(cached) $ECHO_C" >&6
11627else
11628 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011629fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011630echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11631echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11632
11633fi
11634if test $ac_cv_header_mach_cthreads_h = yes; then
11635 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011636#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011637_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011638
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011640#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011641_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011642
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
11644cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011645#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011646_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011647
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011648 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011649else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011650
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: checking for --with-pth" >&5
11652echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11653
11654# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011655if test "${with_pth+set}" = set; then
11656 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011657 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011658echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011659 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011660#define WITH_THREAD 1
11661_ACEOF
11662
11663
11664cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011665#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011666_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011667
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011668 LIBS="-lpth $LIBS"
11669 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011670else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011671 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011672echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011673
11674 # Just looking for pthread_create in libpthread is not enough:
11675 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11676 # So we really have to include pthread.h, and then link.
11677 _libs=$LIBS
11678 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11680echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* confdefs.h. */
11683_ACEOF
11684cat confdefs.h >>conftest.$ac_ext
11685cat >>conftest.$ac_ext <<_ACEOF
11686/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011687#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011688
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011689void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011690int
11691main ()
11692{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011693
11694pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011695 ;
11696 return 0;
11697}
11698_ACEOF
11699rm -f conftest.$ac_objext conftest$ac_exeext
11700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011701 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011703 grep -v '^ *+' conftest.er1 >conftest.err
11704 rm -f conftest.er1
11705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011708 { ac_try='test -z "$ac_c_werror_flag"
11709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11711 (eval $ac_try) 2>&5
11712 ac_status=$?
11713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11714 (exit $ac_status); }; } &&
11715 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11717 (eval $ac_try) 2>&5
11718 ac_status=$?
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); }; }; then
11721
11722 echo "$as_me:$LINENO: result: yes" >&5
11723echo "${ECHO_T}yes" >&6
11724 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011725#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011726_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011727
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011728 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011729 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011730else
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011732sed 's/^/| /' conftest.$ac_ext >&5
11733
Martin v. Löwis11437992002-04-12 09:54:03 +000011734
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011735 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11737echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11738if test "${ac_cv_func_pthread_detach+set}" = set; then
11739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011740else
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011742/* confdefs.h. */
11743_ACEOF
11744cat confdefs.h >>conftest.$ac_ext
11745cat >>conftest.$ac_ext <<_ACEOF
11746/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011747/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011748 which can conflict with char pthread_detach (); below.
11749 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011750 <limits.h> exists even on freestanding compilers. Under hpux,
11751 including <limits.h> includes <sys/time.h> and causes problems
11752 checking for functions defined therein. */
11753#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011754# include <limits.h>
11755#else
11756# include <assert.h>
11757#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011758/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011759#ifdef __cplusplus
11760extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011761{
Martin v. Löwis11437992002-04-12 09:54:03 +000011762#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011763/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011764 builtin and then its argument prototype would still apply. */
11765char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011766/* The GNU C library defines this for functions which it implements
11767 to always fail with ENOSYS. Some functions are actually named
11768 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011769#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011770choke me
11771#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011772char (*f) () = pthread_detach;
11773#endif
11774#ifdef __cplusplus
11775}
Guido van Rossumad678af1998-10-02 14:42:15 +000011776#endif
11777
Skip Montanaro6dead952003-09-25 14:50:04 +000011778int
11779main ()
11780{
11781return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext conftest$ac_exeext
11787if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011788 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011795 { ac_try='test -z "$ac_c_werror_flag"
11796 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11798 (eval $ac_try) 2>&5
11799 ac_status=$?
11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11801 (exit $ac_status); }; } &&
11802 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11804 (eval $ac_try) 2>&5
11805 ac_status=$?
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11807 (exit $ac_status); }; }; then
11808 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011809else
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011811sed 's/^/| /' conftest.$ac_ext >&5
11812
Martin v. Löwis11437992002-04-12 09:54:03 +000011813ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011815rm -f conftest.err conftest.$ac_objext \
11816 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011818echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11819echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11820if test $ac_cv_func_pthread_detach = yes; then
11821 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011822#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011823_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011824
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011825 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011826 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011827else
Guido van Rossumad678af1998-10-02 14:42:15 +000011828
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011829 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11830 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11831echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11832if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11833 echo $ECHO_N "(cached) $ECHO_C" >&6
11834fi
11835echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11836echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11837else
11838 # Is the header compilable?
11839echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11840echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011842/* confdefs.h. */
11843_ACEOF
11844cat confdefs.h >>conftest.$ac_ext
11845cat >>conftest.$ac_ext <<_ACEOF
11846/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011847$ac_includes_default
11848#include <atheos/threads.h>
11849_ACEOF
11850rm -f conftest.$ac_objext
11851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011852 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011854 grep -v '^ *+' conftest.er1 >conftest.err
11855 rm -f conftest.er1
11856 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11858 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011859 { ac_try='test -z "$ac_c_werror_flag"
11860 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11862 (eval $ac_try) 2>&5
11863 ac_status=$?
11864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11865 (exit $ac_status); }; } &&
11866 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11868 (eval $ac_try) 2>&5
11869 ac_status=$?
11870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11871 (exit $ac_status); }; }; then
11872 ac_header_compiler=yes
11873else
11874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011875sed 's/^/| /' conftest.$ac_ext >&5
11876
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011877ac_header_compiler=no
11878fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011880echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11881echo "${ECHO_T}$ac_header_compiler" >&6
11882
11883# Is the header present?
11884echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11885echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011892#include <atheos/threads.h>
11893_ACEOF
11894if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11895 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11896 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011897 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011898 rm -f conftest.er1
11899 cat conftest.err >&5
11900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11901 (exit $ac_status); } >/dev/null; then
11902 if test -s conftest.err; then
11903 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011904 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011905 else
11906 ac_cpp_err=
11907 fi
11908else
11909 ac_cpp_err=yes
11910fi
11911if test -z "$ac_cpp_err"; then
11912 ac_header_preproc=yes
11913else
11914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011915sed 's/^/| /' conftest.$ac_ext >&5
11916
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011917 ac_header_preproc=no
11918fi
11919rm -f conftest.err conftest.$ac_ext
11920echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11921echo "${ECHO_T}$ac_header_preproc" >&6
11922
11923# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011924case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11925 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011926 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11927echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011928 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11929echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11930 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011931 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011932 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011933 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11934echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011935 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11936echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11937 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11938echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11939 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11940echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011941 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11942echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011943 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11944echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011945 (
11946 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011947## ------------------------------------------------ ##
11948## Report this to http://www.python.org/python-bugs ##
11949## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011950_ASBOX
11951 ) |
11952 sed "s/^/$as_me: WARNING: /" >&2
11953 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011954esac
11955echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11956echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11957if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11958 echo $ECHO_N "(cached) $ECHO_C" >&6
11959else
11960 ac_cv_header_atheos_threads_h=$ac_header_preproc
11961fi
11962echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11963echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11964
11965fi
11966if test $ac_cv_header_atheos_threads_h = yes; then
11967 cat >>confdefs.h <<\_ACEOF
11968#define WITH_THREAD 1
11969_ACEOF
11970
11971
11972cat >>confdefs.h <<\_ACEOF
11973#define ATHEOS_THREADS 1
11974_ACEOF
11975
11976 THREADOBJ="Python/thread.o"
11977else
11978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11980 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11981echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11982if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11983 echo $ECHO_N "(cached) $ECHO_C" >&6
11984fi
11985echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11986echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011987else
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 # Is the header compilable?
11989echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11990echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011992/* confdefs.h. */
11993_ACEOF
11994cat confdefs.h >>conftest.$ac_ext
11995cat >>conftest.$ac_ext <<_ACEOF
11996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011997$ac_includes_default
11998#include <kernel/OS.h>
11999_ACEOF
12000rm -f conftest.$ac_objext
12001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012002 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012004 grep -v '^ *+' conftest.er1 >conftest.err
12005 rm -f conftest.er1
12006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12008 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012009 { ac_try='test -z "$ac_c_werror_flag"
12010 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12013 ac_status=$?
12014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12015 (exit $ac_status); }; } &&
12016 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12018 (eval $ac_try) 2>&5
12019 ac_status=$?
12020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12021 (exit $ac_status); }; }; then
12022 ac_header_compiler=yes
12023else
12024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012025sed 's/^/| /' conftest.$ac_ext >&5
12026
Martin v. Löwis11437992002-04-12 09:54:03 +000012027ac_header_compiler=no
12028fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012030echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12031echo "${ECHO_T}$ac_header_compiler" >&6
12032
12033# Is the header present?
12034echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12035echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* confdefs.h. */
12038_ACEOF
12039cat confdefs.h >>conftest.$ac_ext
12040cat >>conftest.$ac_ext <<_ACEOF
12041/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012042#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012043_ACEOF
12044if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12045 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12046 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012047 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012048 rm -f conftest.er1
12049 cat conftest.err >&5
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } >/dev/null; then
12052 if test -s conftest.err; then
12053 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012054 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 else
12056 ac_cpp_err=
12057 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012058else
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 ac_cpp_err=yes
12060fi
12061if test -z "$ac_cpp_err"; then
12062 ac_header_preproc=yes
12063else
12064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012068fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012069rm -f conftest.err conftest.$ac_ext
12070echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12071echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012072
Martin v. Löwis11437992002-04-12 09:54:03 +000012073# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012074case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12075 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12077echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012078 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12079echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12080 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012081 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012082 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012083 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12084echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012085 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12086echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12087 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12088echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12089 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12090echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012091 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12092echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12094echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012095 (
12096 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012097## ------------------------------------------------ ##
12098## Report this to http://www.python.org/python-bugs ##
12099## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012100_ASBOX
12101 ) |
12102 sed "s/^/$as_me: WARNING: /" >&2
12103 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012104esac
12105echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12106echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12107if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12108 echo $ECHO_N "(cached) $ECHO_C" >&6
12109else
12110 ac_cv_header_kernel_OS_h=$ac_header_preproc
12111fi
12112echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12113echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12114
12115fi
12116if test $ac_cv_header_kernel_OS_h = yes; then
12117 cat >>confdefs.h <<\_ACEOF
12118#define WITH_THREAD 1
12119_ACEOF
12120
12121
12122cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012123#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012125
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012126 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012127else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12130echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12131if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133else
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012135LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* confdefs.h. */
12138_ACEOF
12139cat confdefs.h >>conftest.$ac_ext
12140cat >>conftest.$ac_ext <<_ACEOF
12141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Greg Steinadf63d62000-07-05 10:38:09 +000012143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012144#ifdef __cplusplus
12145extern "C"
12146#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012147/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 builtin and then its argument prototype would still apply. */
12149char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012150int
12151main ()
12152{
12153pthread_create ();
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext conftest$ac_exeext
12159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012160 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012162 grep -v '^ *+' conftest.er1 >conftest.err
12163 rm -f conftest.er1
12164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012167 { ac_try='test -z "$ac_c_werror_flag"
12168 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12170 (eval $ac_try) 2>&5
12171 ac_status=$?
12172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12173 (exit $ac_status); }; } &&
12174 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12176 (eval $ac_try) 2>&5
12177 ac_status=$?
12178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12179 (exit $ac_status); }; }; then
12180 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012181else
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012183sed 's/^/| /' conftest.$ac_ext >&5
12184
Martin v. Löwis11437992002-04-12 09:54:03 +000012185ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012186fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012187rm -f conftest.err conftest.$ac_objext \
12188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012189LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012191echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12192echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12193if test $ac_cv_lib_pthreads_pthread_create = yes; then
12194 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012195#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012196_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012199 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012200 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012201else
Greg Steinadf63d62000-07-05 10:38:09 +000012202
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12204echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12205if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12206 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012207else
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012209LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012210cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012216
Guido van Rossum49545951997-12-02 19:28:29 +000012217/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012218#ifdef __cplusplus
12219extern "C"
12220#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 builtin and then its argument prototype would still apply. */
12223char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012224int
12225main ()
12226{
12227pthread_create ();
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext conftest$ac_exeext
12233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012234 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012236 grep -v '^ *+' conftest.er1 >conftest.err
12237 rm -f conftest.er1
12238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12240 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012241 { ac_try='test -z "$ac_c_werror_flag"
12242 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12244 (eval $ac_try) 2>&5
12245 ac_status=$?
12246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12247 (exit $ac_status); }; } &&
12248 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12250 (eval $ac_try) 2>&5
12251 ac_status=$?
12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253 (exit $ac_status); }; }; then
12254 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012255else
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012257sed 's/^/| /' conftest.$ac_ext >&5
12258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012260fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012261rm -f conftest.err conftest.$ac_objext \
12262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012265echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12266echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12267if test $ac_cv_lib_c_r_pthread_create = yes; then
12268 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012269#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012271
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012272 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012273 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012274 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012275else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012276
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12278echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12279if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012281else
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012283LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012285/* confdefs.h. */
12286_ACEOF
12287cat confdefs.h >>conftest.$ac_ext
12288cat >>conftest.$ac_ext <<_ACEOF
12289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012290
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012292#ifdef __cplusplus
12293extern "C"
12294#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012295/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 builtin and then its argument prototype would still apply. */
12297char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012298int
12299main ()
12300{
12301__pthread_create_system ();
12302 ;
12303 return 0;
12304}
12305_ACEOF
12306rm -f conftest.$ac_objext conftest$ac_exeext
12307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012308 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012310 grep -v '^ *+' conftest.er1 >conftest.err
12311 rm -f conftest.er1
12312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12314 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012315 { ac_try='test -z "$ac_c_werror_flag"
12316 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12318 (eval $ac_try) 2>&5
12319 ac_status=$?
12320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12321 (exit $ac_status); }; } &&
12322 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12324 (eval $ac_try) 2>&5
12325 ac_status=$?
12326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12327 (exit $ac_status); }; }; then
12328 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012329else
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012331sed 's/^/| /' conftest.$ac_ext >&5
12332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012334fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012335rm -f conftest.err conftest.$ac_objext \
12336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012339echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12340echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12341if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012344_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012346 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012347 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012348 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012349else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012350
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12352echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12353if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012355else
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012357LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012359/* confdefs.h. */
12360_ACEOF
12361cat confdefs.h >>conftest.$ac_ext
12362cat >>conftest.$ac_ext <<_ACEOF
12363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Guido van Rossumb93a8621998-05-07 13:27:32 +000012365/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012366#ifdef __cplusplus
12367extern "C"
12368#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012369/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 builtin and then its argument prototype would still apply. */
12371char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012372int
12373main ()
12374{
12375pthread_create ();
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380rm -f conftest.$ac_objext conftest$ac_exeext
12381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012382 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012384 grep -v '^ *+' conftest.er1 >conftest.err
12385 rm -f conftest.er1
12386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12388 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012389 { ac_try='test -z "$ac_c_werror_flag"
12390 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12392 (eval $ac_try) 2>&5
12393 ac_status=$?
12394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12395 (exit $ac_status); }; } &&
12396 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12398 (eval $ac_try) 2>&5
12399 ac_status=$?
12400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12401 (exit $ac_status); }; }; then
12402 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012403else
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012405sed 's/^/| /' conftest.$ac_ext >&5
12406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012408fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012409rm -f conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012411LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012412fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012413echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12414echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12415if test $ac_cv_lib_cma_pthread_create = yes; then
12416 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012417#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012418_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012419
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012420 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012421 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012422 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012423else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012424
Martin v. Löwis130fb172001-07-19 11:00:41 +000012425 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012426fi
12427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012429fi
12430
Guido van Rossum0be3e491997-05-22 20:33:33 +000012431fi
12432
Guido van Rossum49545951997-12-02 19:28:29 +000012433fi
12434
Guido van Rossumb93a8621998-05-07 13:27:32 +000012435fi
12436
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012437
Michael W. Hudson54241132001-12-07 15:38:26 +000012438fi
12439
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012440
12441fi
12442
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012443fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012444rm -f conftest.err conftest.$ac_objext \
12445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012446fi;
12447fi
12448
12449
12450fi
12451
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012452
Michael W. Hudson54241132001-12-07 15:38:26 +000012453
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12455echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12456if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458else
Martin v. Löwis11437992002-04-12 09:54:03 +000012459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012460LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012462/* confdefs.h. */
12463_ACEOF
12464cat confdefs.h >>conftest.$ac_ext
12465cat >>conftest.$ac_ext <<_ACEOF
12466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012468/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469#ifdef __cplusplus
12470extern "C"
12471#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012472/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 builtin and then its argument prototype would still apply. */
12474char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012475int
12476main ()
12477{
12478usconfig ();
12479 ;
12480 return 0;
12481}
12482_ACEOF
12483rm -f conftest.$ac_objext conftest$ac_exeext
12484if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012485 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012487 grep -v '^ *+' conftest.er1 >conftest.err
12488 rm -f conftest.er1
12489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012492 { ac_try='test -z "$ac_c_werror_flag"
12493 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12495 (eval $ac_try) 2>&5
12496 ac_status=$?
12497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12498 (exit $ac_status); }; } &&
12499 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); }; }; then
12505 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506else
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012508sed 's/^/| /' conftest.$ac_ext >&5
12509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012511fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012512rm -f conftest.err conftest.$ac_objext \
12513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012516echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12517echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12518if test $ac_cv_lib_mpc_usconfig = yes; then
12519 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012520#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012521_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012522
Martin v. Löwis130fb172001-07-19 11:00:41 +000012523 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012524 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012525 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012526fi
12527
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012528
Neal Norwitza978ab02002-11-02 16:58:05 +000012529 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12531echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12532if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534else
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012536LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012538/* confdefs.h. */
12539_ACEOF
12540cat confdefs.h >>conftest.$ac_ext
12541cat >>conftest.$ac_ext <<_ACEOF
12542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012544/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012545#ifdef __cplusplus
12546extern "C"
12547#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012548/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 builtin and then its argument prototype would still apply. */
12550char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
12554thr_create ();
12555 ;
12556 return 0;
12557}
12558_ACEOF
12559rm -f conftest.$ac_objext conftest$ac_exeext
12560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012561 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012563 grep -v '^ *+' conftest.er1 >conftest.err
12564 rm -f conftest.er1
12565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012568 { ac_try='test -z "$ac_c_werror_flag"
12569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12571 (eval $ac_try) 2>&5
12572 ac_status=$?
12573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12574 (exit $ac_status); }; } &&
12575 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12577 (eval $ac_try) 2>&5
12578 ac_status=$?
12579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580 (exit $ac_status); }; }; then
12581 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012582else
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012584sed 's/^/| /' conftest.$ac_ext >&5
12585
Martin v. Löwis11437992002-04-12 09:54:03 +000012586ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012588rm -f conftest.err conftest.$ac_objext \
12589 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012590LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012592echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12593echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12594if test $ac_cv_lib_thread_thr_create = yes; then
12595 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012596#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012597_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012599 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012600 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012601 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012602fi
12603
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012604 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012605
Martin v. Löwis130fb172001-07-19 11:00:41 +000012606 if test "$USE_THREAD_MODULE" != "#"
12607 then
12608 # If the above checks didn't disable threads, (at least) OSF1
12609 # needs this '-threads' argument during linking.
12610 case $ac_sys_system in
12611 OSF1) LDLAST=-threads;;
12612 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012613 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012614fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012615
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012616if test "$posix_threads" = "yes"; then
12617 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012618
12619cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012620#define _POSIX_THREADS 1
12621_ACEOF
12622
12623 fi
12624
12625 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12626 case $ac_sys_system/$ac_sys_release in
12627 SunOS/5.6)
12628cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012629#define HAVE_PTHREAD_DESTRUCTOR 1
12630_ACEOF
12631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012632 ;;
12633 SunOS/5.8)
12634cat >>confdefs.h <<\_ACEOF
12635#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12636_ACEOF
12637
12638 ;;
12639 esac
12640
12641 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12642echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12643 if test "${ac_cv_pthread_system_supported+set}" = set; then
12644 echo $ECHO_N "(cached) $ECHO_C" >&6
12645else
12646 if test "$cross_compiling" = yes; then
12647 ac_cv_pthread_system_supported=no
12648else
12649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* confdefs.h. */
12651_ACEOF
12652cat confdefs.h >>conftest.$ac_ext
12653cat >>conftest.$ac_ext <<_ACEOF
12654/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012655#include <pthread.h>
12656 void *foo(void *parm) {
12657 return NULL;
12658 }
12659 main() {
12660 pthread_attr_t attr;
12661 pthread_t id;
12662 if (pthread_attr_init(&attr)) exit(-1);
12663 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12664 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12665 exit(0);
12666 }
12667_ACEOF
12668rm -f conftest$ac_exeext
12669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12670 (eval $ac_link) 2>&5
12671 ac_status=$?
12672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12675 (eval $ac_try) 2>&5
12676 ac_status=$?
12677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12678 (exit $ac_status); }; }; then
12679 ac_cv_pthread_system_supported=yes
12680else
12681 echo "$as_me: program exited with status $ac_status" >&5
12682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012683sed 's/^/| /' conftest.$ac_ext >&5
12684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012685( exit $ac_status )
12686ac_cv_pthread_system_supported=no
12687fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012688rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012689fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012690
Guido van Rossum627b2d71993-12-24 10:39:16 +000012691fi
12692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012693 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12694echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12695 if test "$ac_cv_pthread_system_supported" = "yes"; then
12696
12697cat >>confdefs.h <<\_ACEOF
12698#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12699_ACEOF
12700
12701 fi
12702
12703for ac_func in pthread_sigmask
12704do
12705as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12706echo "$as_me:$LINENO: checking for $ac_func" >&5
12707echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12708if eval "test \"\${$as_ac_var+set}\" = set"; then
12709 echo $ECHO_N "(cached) $ECHO_C" >&6
12710else
12711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* confdefs.h. */
12713_ACEOF
12714cat confdefs.h >>conftest.$ac_ext
12715cat >>conftest.$ac_ext <<_ACEOF
12716/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012717/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012718 which can conflict with char $ac_func (); below.
12719 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012720 <limits.h> exists even on freestanding compilers. Under hpux,
12721 including <limits.h> includes <sys/time.h> and causes problems
12722 checking for functions defined therein. */
12723#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012724# include <limits.h>
12725#else
12726# include <assert.h>
12727#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012728/* Override any gcc2 internal prototype to avoid an error. */
12729#ifdef __cplusplus
12730extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012731{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012732#endif
12733/* We use char because int might match the return type of a gcc2
12734 builtin and then its argument prototype would still apply. */
12735char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012736/* The GNU C library defines this for functions which it implements
12737 to always fail with ENOSYS. Some functions are actually named
12738 something starting with __ and the normal name is an alias. */
12739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12740choke me
12741#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012742char (*f) () = $ac_func;
12743#endif
12744#ifdef __cplusplus
12745}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012746#endif
12747
Skip Montanaro6dead952003-09-25 14:50:04 +000012748int
12749main ()
12750{
12751return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012752 ;
12753 return 0;
12754}
12755_ACEOF
12756rm -f conftest.$ac_objext conftest$ac_exeext
12757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012758 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 grep -v '^ *+' conftest.er1 >conftest.err
12761 rm -f conftest.er1
12762 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12764 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012765 { ac_try='test -z "$ac_c_werror_flag"
12766 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); }; } &&
12772 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12774 (eval $ac_try) 2>&5
12775 ac_status=$?
12776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777 (exit $ac_status); }; }; then
12778 eval "$as_ac_var=yes"
12779else
12780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012781sed 's/^/| /' conftest.$ac_ext >&5
12782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012783eval "$as_ac_var=no"
12784fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012785rm -f conftest.err conftest.$ac_objext \
12786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012787fi
12788echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12789echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12790if test `eval echo '${'$as_ac_var'}'` = yes; then
12791 cat >>confdefs.h <<_ACEOF
12792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12793_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012794 case $ac_sys_system in
12795 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012796
Jason Tishlerfac083d2003-07-22 15:20:49 +000012797cat >>confdefs.h <<\_ACEOF
12798#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12799_ACEOF
12800
12801 ;;
12802 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012803fi
12804done
12805
12806fi
12807
12808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012809# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
12811
12812echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12813echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012814# Check whether --enable-ipv6 or --disable-ipv6 was given.
12815if test "${enable_ipv6+set}" = set; then
12816 enableval="$enable_ipv6"
12817 case "$enableval" in
12818 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012819 echo "$as_me:$LINENO: result: no" >&5
12820echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012821 ipv6=no
12822 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 *) echo "$as_me:$LINENO: result: yes" >&5
12824echo "${ECHO_T}yes" >&6
12825 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012826#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012827_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012828
12829 ipv6=yes
12830 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012832else
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012834 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 echo "$as_me:$LINENO: result: no" >&5
12836echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012837 ipv6=no
12838
12839else
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012841/* confdefs.h. */
12842_ACEOF
12843cat confdefs.h >>conftest.$ac_ext
12844cat >>conftest.$ac_ext <<_ACEOF
12845/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012846 /* AF_INET6 available check */
12847#include <sys/types.h>
12848#include <sys/socket.h>
12849main()
12850{
12851 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12852 exit(1);
12853 else
12854 exit(0);
12855}
12856
Martin v. Löwis11437992002-04-12 09:54:03 +000012857_ACEOF
12858rm -f conftest$ac_exeext
12859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12860 (eval $ac_link) 2>&5
12861 ac_status=$?
12862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); }; }; then
12869 echo "$as_me:$LINENO: result: yes" >&5
12870echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012871 ipv6=yes
12872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 echo "$as_me: program exited with status $ac_status" >&5
12874echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012875sed 's/^/| /' conftest.$ac_ext >&5
12876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877( exit $ac_status )
12878echo "$as_me:$LINENO: result: no" >&5
12879echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012880 ipv6=no
12881fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012882rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012883fi
12884
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012885if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12887echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012889/* confdefs.h. */
12890_ACEOF
12891cat confdefs.h >>conftest.$ac_ext
12892cat >>conftest.$ac_ext <<_ACEOF
12893/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012894#include <sys/types.h>
12895#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012896int
12897main ()
12898{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012899struct sockaddr_in6 x;
12900x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ;
12902 return 0;
12903}
12904_ACEOF
12905rm -f conftest.$ac_objext
12906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012907 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012909 grep -v '^ *+' conftest.er1 >conftest.err
12910 rm -f conftest.er1
12911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12913 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012914 { ac_try='test -z "$ac_c_werror_flag"
12915 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12917 (eval $ac_try) 2>&5
12918 ac_status=$?
12919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12920 (exit $ac_status); }; } &&
12921 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12923 (eval $ac_try) 2>&5
12924 ac_status=$?
12925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12926 (exit $ac_status); }; }; then
12927 echo "$as_me:$LINENO: result: yes" >&5
12928echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012929 ipv6=yes
12930else
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012932sed 's/^/| /' conftest.$ac_ext >&5
12933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934echo "$as_me:$LINENO: result: no" >&5
12935echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012936 ipv6=no
12937fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012938rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012939fi
12940
12941if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012943#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012944_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012945
12946fi
12947
Martin v. Löwis11437992002-04-12 09:54:03 +000012948fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012949
12950ipv6type=unknown
12951ipv6lib=none
12952ipv6trylibc=no
12953
12954if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12956echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012957 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12958 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012959 case $i in
12960 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* confdefs.h. */
12963_ACEOF
12964cat confdefs.h >>conftest.$ac_ext
12965cat >>conftest.$ac_ext <<_ACEOF
12966/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012968#include <netinet/in.h>
12969#ifdef IPV6_INRIA_VERSION
12970yes
12971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012974 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012975 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012976fi
12977rm -f conftest*
12978
12979 ;;
12980 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012982/* confdefs.h. */
12983_ACEOF
12984cat confdefs.h >>conftest.$ac_ext
12985cat >>conftest.$ac_ext <<_ACEOF
12986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012988#include <netinet/in.h>
12989#ifdef __KAME__
12990yes
12991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012994 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012995 ipv6type=$i;
12996 ipv6lib=inet6
12997 ipv6libdir=/usr/local/v6/lib
12998 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012999fi
13000rm -f conftest*
13001
13002 ;;
13003 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* confdefs.h. */
13006_ACEOF
13007cat confdefs.h >>conftest.$ac_ext
13008cat >>conftest.$ac_ext <<_ACEOF
13009/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013011#include <features.h>
13012#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13013yes
13014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013015_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013017 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013018 ipv6type=$i;
13019 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013020fi
13021rm -f conftest*
13022
13023 ;;
13024 linux-inet6)
13025 if test -d /usr/inet6; then
13026 ipv6type=$i
13027 ipv6lib=inet6
13028 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013029 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013030 fi
13031 ;;
13032 solaris)
13033 if test -f /etc/netconfig; then
13034 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13035 ipv6type=$i
13036 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013037 fi
13038 fi
13039 ;;
13040 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013042/* confdefs.h. */
13043_ACEOF
13044cat confdefs.h >>conftest.$ac_ext
13045cat >>conftest.$ac_ext <<_ACEOF
13046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013048#include <sys/param.h>
13049#ifdef _TOSHIBA_INET6
13050yes
13051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013054 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013055 ipv6type=$i;
13056 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013057 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013058fi
13059rm -f conftest*
13060
13061 ;;
13062 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013064/* confdefs.h. */
13065_ACEOF
13066cat confdefs.h >>conftest.$ac_ext
13067cat >>conftest.$ac_ext <<_ACEOF
13068/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013070#include </usr/local/v6/include/sys/v6config.h>
13071#ifdef __V6D__
13072yes
13073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013074_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013076 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013077 ipv6type=$i;
13078 ipv6lib=v6;
13079 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013080 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013081fi
13082rm -f conftest*
13083
13084 ;;
13085 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* confdefs.h. */
13088_ACEOF
13089cat confdefs.h >>conftest.$ac_ext
13090cat >>conftest.$ac_ext <<_ACEOF
13091/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013092
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013093#include <sys/param.h>
13094#ifdef _ZETA_MINAMI_INET6
13095yes
13096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013097_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013099 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013100 ipv6type=$i;
13101 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013102 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013103fi
13104rm -f conftest*
13105
13106 ;;
13107 esac
13108 if test "$ipv6type" != "unknown"; then
13109 break
13110 fi
13111 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 echo "$as_me:$LINENO: result: $ipv6type" >&5
13113echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013114fi
13115
13116if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13117 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13118 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13119 echo "using lib$ipv6lib"
13120 else
13121 if test $ipv6trylibc = "yes"; then
13122 echo "using libc"
13123 else
13124 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13125 echo "You need to fetch lib$ipv6lib.a from appropriate"
13126 echo 'ipv6 kit and compile beforehand.'
13127 exit 1
13128 fi
13129 fi
13130fi
13131
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013132# Check for --with-doc-strings
13133echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13134echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13135
13136# Check whether --with-doc-strings or --without-doc-strings was given.
13137if test "${with_doc_strings+set}" = set; then
13138 withval="$with_doc_strings"
13139
13140fi;
13141
13142if test -z "$with_doc_strings"
13143then with_doc_strings="yes"
13144fi
13145if test "$with_doc_strings" != "no"
13146then
13147
13148cat >>confdefs.h <<\_ACEOF
13149#define WITH_DOC_STRINGS 1
13150_ACEOF
13151
13152fi
13153echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13154echo "${ECHO_T}$with_doc_strings" >&6
13155
Neil Schemenauera35c6882001-02-27 04:45:05 +000013156# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013157echo "$as_me:$LINENO: checking for --with-tsc" >&5
13158echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13159
13160# Check whether --with-tsc or --without-tsc was given.
13161if test "${with_tsc+set}" = set; then
13162 withval="$with_tsc"
13163
13164if test "$withval" != no
13165then
13166
13167cat >>confdefs.h <<\_ACEOF
13168#define WITH_TSC 1
13169_ACEOF
13170
13171 echo "$as_me:$LINENO: result: yes" >&5
13172echo "${ECHO_T}yes" >&6
13173else echo "$as_me:$LINENO: result: no" >&5
13174echo "${ECHO_T}no" >&6
13175fi
13176else
13177 echo "$as_me:$LINENO: result: no" >&5
13178echo "${ECHO_T}no" >&6
13179fi;
13180
13181# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013182echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13183echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13184
Neil Schemenauera35c6882001-02-27 04:45:05 +000013185# Check whether --with-pymalloc or --without-pymalloc was given.
13186if test "${with_pymalloc+set}" = set; then
13187 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013188
Martin v. Löwis11437992002-04-12 09:54:03 +000013189fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013190
Neil Schemenauer16c22972002-03-22 15:34:49 +000013191if test -z "$with_pymalloc"
13192then with_pymalloc="yes"
13193fi
13194if test "$with_pymalloc" != "no"
13195then
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
13197cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013198#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013199_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013200
13201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013202echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13203echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013204
Barry Warsawef82cd72000-06-30 16:21:01 +000013205# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013206echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13207echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13208
Barry Warsawef82cd72000-06-30 16:21:01 +000013209# Check whether --with-wctype-functions or --without-wctype-functions was given.
13210if test "${with_wctype_functions+set}" = set; then
13211 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Barry Warsawef82cd72000-06-30 16:21:01 +000013213if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013214then
13215
13216cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013217#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013218_ACEOF
13219
13220 echo "$as_me:$LINENO: result: yes" >&5
13221echo "${ECHO_T}yes" >&6
13222else echo "$as_me:$LINENO: result: no" >&5
13223echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013224fi
13225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 echo "$as_me:$LINENO: result: no" >&5
13227echo "${ECHO_T}no" >&6
13228fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013229
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013230# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013231
Guido van Rossum98935bf2001-09-05 19:13:16 +000013232DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013233
Guido van Rossume97ee181999-12-20 21:27:22 +000013234# the dlopen() function means we might want to use dynload_shlib.o. some
13235# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
Thomas Wouters3a584202000-08-05 23:28:51 +000013237for ac_func in dlopen
13238do
Martin v. Löwis11437992002-04-12 09:54:03 +000013239as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13240echo "$as_me:$LINENO: checking for $ac_func" >&5
13241echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13242if eval "test \"\${$as_ac_var+set}\" = set"; then
13243 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013244else
Martin v. Löwis11437992002-04-12 09:54:03 +000013245 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013246/* confdefs.h. */
13247_ACEOF
13248cat confdefs.h >>conftest.$ac_ext
13249cat >>conftest.$ac_ext <<_ACEOF
13250/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013251/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013252 which can conflict with char $ac_func (); below.
13253 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013254 <limits.h> exists even on freestanding compilers. Under hpux,
13255 including <limits.h> includes <sys/time.h> and causes problems
13256 checking for functions defined therein. */
13257#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013258# include <limits.h>
13259#else
13260# include <assert.h>
13261#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013262/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013263#ifdef __cplusplus
13264extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013265{
Martin v. Löwis11437992002-04-12 09:54:03 +000013266#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013267/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 builtin and then its argument prototype would still apply. */
13269char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013270/* The GNU C library defines this for functions which it implements
13271 to always fail with ENOSYS. Some functions are actually named
13272 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013273#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013274choke me
13275#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013276char (*f) () = $ac_func;
13277#endif
13278#ifdef __cplusplus
13279}
Guido van Rossume97ee181999-12-20 21:27:22 +000013280#endif
13281
Skip Montanaro6dead952003-09-25 14:50:04 +000013282int
13283main ()
13284{
13285return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013286 ;
13287 return 0;
13288}
13289_ACEOF
13290rm -f conftest.$ac_objext conftest$ac_exeext
13291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013292 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013294 grep -v '^ *+' conftest.er1 >conftest.err
13295 rm -f conftest.er1
13296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13298 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013299 { ac_try='test -z "$ac_c_werror_flag"
13300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13302 (eval $ac_try) 2>&5
13303 ac_status=$?
13304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13305 (exit $ac_status); }; } &&
13306 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13308 (eval $ac_try) 2>&5
13309 ac_status=$?
13310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13311 (exit $ac_status); }; }; then
13312 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013313else
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013315sed 's/^/| /' conftest.$ac_ext >&5
13316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013319rm -f conftest.err conftest.$ac_objext \
13320 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013322echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13323echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13324if test `eval echo '${'$as_ac_var'}'` = yes; then
13325 cat >>confdefs.h <<_ACEOF
13326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13327_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013328
Guido van Rossume97ee181999-12-20 21:27:22 +000013329fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013330done
Guido van Rossume97ee181999-12-20 21:27:22 +000013331
Michael W. Hudson54241132001-12-07 15:38:26 +000013332
Guido van Rossume97ee181999-12-20 21:27:22 +000013333# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13334# loading of modules.
13335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13337echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013338if test -z "$DYNLOADFILE"
13339then
13340 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013341 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13342 if test "$ac_cv_func_dlopen" = yes
13343 then DYNLOADFILE="dynload_shlib.o"
13344 else DYNLOADFILE="dynload_aix.o"
13345 fi
13346 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013347 BeOS*) DYNLOADFILE="dynload_beos.o";;
13348 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013349 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013350 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013351 *)
13352 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13353 # out any dynamic loading
13354 if test "$ac_cv_func_dlopen" = yes
13355 then DYNLOADFILE="dynload_shlib.o"
13356 else DYNLOADFILE="dynload_stub.o"
13357 fi
13358 ;;
13359 esac
13360fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013361echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13362echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013363if test "$DYNLOADFILE" != "dynload_stub.o"
13364then
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
13366cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013367#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013368_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013369
13370fi
13371
Neil Schemenauer4e425612001-06-19 15:44:15 +000013372# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13373
Michael W. Hudson54241132001-12-07 15:38:26 +000013374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13376echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013377if test -z "$MACHDEP_OBJS"
13378then
Jack Jansene578a632001-08-15 01:27:14 +000013379 MACHDEP_OBJS=$extra_machdep_objs
13380else
13381 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013382fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013383echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13384echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013385
Guido van Rossum627b2d71993-12-24 10:39:16 +000013386# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
Martin v. Löwisd6320502004-08-12 13:45:08 +000013458
Martin v. Löwisc3001752005-01-23 09:27:24 +000013459
13460
Martin v. Löwisd6320502004-08-12 13:45:08 +000013461for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13462 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013463 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013464 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013465 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013466 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013467 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013468 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013469 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013470 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013471 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013472 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473do
Martin v. Löwis11437992002-04-12 09:54:03 +000013474as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13475echo "$as_me:$LINENO: checking for $ac_func" >&5
13476echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13477if eval "test \"\${$as_ac_var+set}\" = set"; then
13478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479else
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013481/* confdefs.h. */
13482_ACEOF
13483cat confdefs.h >>conftest.$ac_ext
13484cat >>conftest.$ac_ext <<_ACEOF
13485/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013487 which can conflict with char $ac_func (); below.
13488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013489 <limits.h> exists even on freestanding compilers. Under hpux,
13490 including <limits.h> includes <sys/time.h> and causes problems
13491 checking for functions defined therein. */
13492#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013493# include <limits.h>
13494#else
13495# include <assert.h>
13496#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013497/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013498#ifdef __cplusplus
13499extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013500{
Martin v. Löwis11437992002-04-12 09:54:03 +000013501#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013502/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 builtin and then its argument prototype would still apply. */
13504char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013505/* The GNU C library defines this for functions which it implements
13506 to always fail with ENOSYS. Some functions are actually named
13507 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013508#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013509choke me
13510#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013511char (*f) () = $ac_func;
13512#endif
13513#ifdef __cplusplus
13514}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013515#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516
Skip Montanaro6dead952003-09-25 14:50:04 +000013517int
13518main ()
13519{
13520return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 ;
13522 return 0;
13523}
13524_ACEOF
13525rm -f conftest.$ac_objext conftest$ac_exeext
13526if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013527 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013529 grep -v '^ *+' conftest.er1 >conftest.err
13530 rm -f conftest.er1
13531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013534 { ac_try='test -z "$ac_c_werror_flag"
13535 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13538 ac_status=$?
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540 (exit $ac_status); }; } &&
13541 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13543 (eval $ac_try) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); }; }; then
13547 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013548else
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013550sed 's/^/| /' conftest.$ac_ext >&5
13551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013553fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554rm -f conftest.err conftest.$ac_objext \
13555 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013557echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13558echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13559if test `eval echo '${'$as_ac_var'}'` = yes; then
13560 cat >>confdefs.h <<_ACEOF
13561#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13562_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013564fi
13565done
13566
Michael W. Hudson54241132001-12-07 15:38:26 +000013567
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013568# For some functions, having a definition is not sufficient, since
13569# we want to take their address.
13570echo "$as_me:$LINENO: checking for chroot" >&5
13571echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013573/* confdefs.h. */
13574_ACEOF
13575cat confdefs.h >>conftest.$ac_ext
13576cat >>conftest.$ac_ext <<_ACEOF
13577/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013578#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013579int
13580main ()
13581{
13582void *x=chroot
13583 ;
13584 return 0;
13585}
13586_ACEOF
13587rm -f conftest.$ac_objext
13588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013591 grep -v '^ *+' conftest.er1 >conftest.err
13592 rm -f conftest.er1
13593 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013596 { ac_try='test -z "$ac_c_werror_flag"
13597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13599 (eval $ac_try) 2>&5
13600 ac_status=$?
13601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13602 (exit $ac_status); }; } &&
13603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13605 (eval $ac_try) 2>&5
13606 ac_status=$?
13607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13608 (exit $ac_status); }; }; then
13609
13610cat >>confdefs.h <<\_ACEOF
13611#define HAVE_CHROOT 1
13612_ACEOF
13613
13614 echo "$as_me:$LINENO: result: yes" >&5
13615echo "${ECHO_T}yes" >&6
13616else
13617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013618sed 's/^/| /' conftest.$ac_ext >&5
13619
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013620echo "$as_me:$LINENO: result: no" >&5
13621echo "${ECHO_T}no" >&6
13622
13623fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013625echo "$as_me:$LINENO: checking for link" >&5
13626echo $ECHO_N "checking for link... $ECHO_C" >&6
13627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* confdefs.h. */
13629_ACEOF
13630cat confdefs.h >>conftest.$ac_ext
13631cat >>conftest.$ac_ext <<_ACEOF
13632/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013633#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013634int
13635main ()
13636{
13637void *x=link
13638 ;
13639 return 0;
13640}
13641_ACEOF
13642rm -f conftest.$ac_objext
13643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013644 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013646 grep -v '^ *+' conftest.er1 >conftest.err
13647 rm -f conftest.er1
13648 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013651 { ac_try='test -z "$ac_c_werror_flag"
13652 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13654 (eval $ac_try) 2>&5
13655 ac_status=$?
13656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13657 (exit $ac_status); }; } &&
13658 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13660 (eval $ac_try) 2>&5
13661 ac_status=$?
13662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13663 (exit $ac_status); }; }; then
13664
13665cat >>confdefs.h <<\_ACEOF
13666#define HAVE_LINK 1
13667_ACEOF
13668
13669 echo "$as_me:$LINENO: result: yes" >&5
13670echo "${ECHO_T}yes" >&6
13671else
13672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013673sed 's/^/| /' conftest.$ac_ext >&5
13674
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013675echo "$as_me:$LINENO: result: no" >&5
13676echo "${ECHO_T}no" >&6
13677
13678fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013680echo "$as_me:$LINENO: checking for symlink" >&5
13681echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13682cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* confdefs.h. */
13684_ACEOF
13685cat confdefs.h >>conftest.$ac_ext
13686cat >>conftest.$ac_ext <<_ACEOF
13687/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013688#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013689int
13690main ()
13691{
13692void *x=symlink
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697rm -f conftest.$ac_objext
13698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013699 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013701 grep -v '^ *+' conftest.er1 >conftest.err
13702 rm -f conftest.er1
13703 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013706 { ac_try='test -z "$ac_c_werror_flag"
13707 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013708 { (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); }; } &&
13713 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); }; }; then
13719
13720cat >>confdefs.h <<\_ACEOF
13721#define HAVE_SYMLINK 1
13722_ACEOF
13723
13724 echo "$as_me:$LINENO: result: yes" >&5
13725echo "${ECHO_T}yes" >&6
13726else
13727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013728sed 's/^/| /' conftest.$ac_ext >&5
13729
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013730echo "$as_me:$LINENO: result: no" >&5
13731echo "${ECHO_T}no" >&6
13732
13733fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013734rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013735echo "$as_me:$LINENO: checking for fchdir" >&5
13736echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013738/* confdefs.h. */
13739_ACEOF
13740cat confdefs.h >>conftest.$ac_ext
13741cat >>conftest.$ac_ext <<_ACEOF
13742/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013743#include <unistd.h>
13744int
13745main ()
13746{
13747void *x=fchdir
13748 ;
13749 return 0;
13750}
13751_ACEOF
13752rm -f conftest.$ac_objext
13753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013754 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013756 grep -v '^ *+' conftest.er1 >conftest.err
13757 rm -f conftest.er1
13758 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13760 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013761 { ac_try='test -z "$ac_c_werror_flag"
13762 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13764 (eval $ac_try) 2>&5
13765 ac_status=$?
13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); }; } &&
13768 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13771 ac_status=$?
13772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773 (exit $ac_status); }; }; then
13774
13775cat >>confdefs.h <<\_ACEOF
13776#define HAVE_FCHDIR 1
13777_ACEOF
13778
13779 echo "$as_me:$LINENO: result: yes" >&5
13780echo "${ECHO_T}yes" >&6
13781else
13782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013783sed 's/^/| /' conftest.$ac_ext >&5
13784
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013785echo "$as_me:$LINENO: result: no" >&5
13786echo "${ECHO_T}no" >&6
13787
13788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013790echo "$as_me:$LINENO: checking for fsync" >&5
13791echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* confdefs.h. */
13794_ACEOF
13795cat confdefs.h >>conftest.$ac_ext
13796cat >>conftest.$ac_ext <<_ACEOF
13797/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013798#include <unistd.h>
13799int
13800main ()
13801{
13802void *x=fsync
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013809 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013816 { ac_try='test -z "$ac_c_werror_flag"
13817 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13819 (eval $ac_try) 2>&5
13820 ac_status=$?
13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822 (exit $ac_status); }; } &&
13823 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13825 (eval $ac_try) 2>&5
13826 ac_status=$?
13827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13828 (exit $ac_status); }; }; then
13829
13830cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013831#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013832_ACEOF
13833
13834 echo "$as_me:$LINENO: result: yes" >&5
13835echo "${ECHO_T}yes" >&6
13836else
13837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013838sed 's/^/| /' conftest.$ac_ext >&5
13839
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013840echo "$as_me:$LINENO: result: no" >&5
13841echo "${ECHO_T}no" >&6
13842
13843fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013844rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013845echo "$as_me:$LINENO: checking for fdatasync" >&5
13846echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013853#include <unistd.h>
13854int
13855main ()
13856{
13857void *x=fdatasync
13858 ;
13859 return 0;
13860}
13861_ACEOF
13862rm -f conftest.$ac_objext
13863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013864 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 grep -v '^ *+' conftest.er1 >conftest.err
13867 rm -f conftest.er1
13868 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013871 { ac_try='test -z "$ac_c_werror_flag"
13872 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13874 (eval $ac_try) 2>&5
13875 ac_status=$?
13876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877 (exit $ac_status); }; } &&
13878 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880 (eval $ac_try) 2>&5
13881 ac_status=$?
13882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883 (exit $ac_status); }; }; then
13884
13885cat >>confdefs.h <<\_ACEOF
13886#define HAVE_FDATASYNC 1
13887_ACEOF
13888
13889 echo "$as_me:$LINENO: result: yes" >&5
13890echo "${ECHO_T}yes" >&6
13891else
13892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013893sed 's/^/| /' conftest.$ac_ext >&5
13894
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013895echo "$as_me:$LINENO: result: no" >&5
13896echo "${ECHO_T}no" >&6
13897
13898fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013900
Martin v. Löwisd5843682002-11-21 20:41:28 +000013901# On some systems (eg. FreeBSD 5), we would find a definition of the
13902# functions ctermid_r, setgroups in the library, but no prototype
13903# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13904# address to avoid compiler warnings and potential miscompilations
13905# because of the missing prototypes.
13906
13907echo "$as_me:$LINENO: checking for ctermid_r" >&5
13908echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013910/* confdefs.h. */
13911_ACEOF
13912cat confdefs.h >>conftest.$ac_ext
13913cat >>conftest.$ac_ext <<_ACEOF
13914/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013915
13916#include "confdefs.h"
13917#include <stdio.h>
13918
Martin v. Löwisd5843682002-11-21 20:41:28 +000013919int
13920main ()
13921{
13922void* p = ctermid_r
13923 ;
13924 return 0;
13925}
13926_ACEOF
13927rm -f conftest.$ac_objext
13928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013929 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013931 grep -v '^ *+' conftest.er1 >conftest.err
13932 rm -f conftest.er1
13933 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13935 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013936 { ac_try='test -z "$ac_c_werror_flag"
13937 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13939 (eval $ac_try) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); }; } &&
13943 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }; then
13949
13950cat >>confdefs.h <<\_ACEOF
13951#define HAVE_CTERMID_R 1
13952_ACEOF
13953
13954 echo "$as_me:$LINENO: result: yes" >&5
13955echo "${ECHO_T}yes" >&6
13956else
13957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013958sed 's/^/| /' conftest.$ac_ext >&5
13959
Martin v. Löwisd5843682002-11-21 20:41:28 +000013960echo "$as_me:$LINENO: result: no" >&5
13961echo "${ECHO_T}no" >&6
13962
13963fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013964rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013965
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013966echo "$as_me:$LINENO: checking for flock" >&5
13967echo $ECHO_N "checking for flock... $ECHO_C" >&6
13968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013969/* confdefs.h. */
13970_ACEOF
13971cat confdefs.h >>conftest.$ac_ext
13972cat >>conftest.$ac_ext <<_ACEOF
13973/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013974
13975#include "confdefs.h"
13976#include <sys/file.h>
13977
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013978int
13979main ()
13980{
13981void* p = flock
13982 ;
13983 return 0;
13984}
13985_ACEOF
13986rm -f conftest.$ac_objext
13987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 grep -v '^ *+' conftest.er1 >conftest.err
13991 rm -f conftest.er1
13992 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013995 { ac_try='test -z "$ac_c_werror_flag"
13996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13998 (eval $ac_try) 2>&5
13999 ac_status=$?
14000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14001 (exit $ac_status); }; } &&
14002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14004 (eval $ac_try) 2>&5
14005 ac_status=$?
14006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14007 (exit $ac_status); }; }; then
14008
14009cat >>confdefs.h <<\_ACEOF
14010#define HAVE_FLOCK 1
14011_ACEOF
14012
14013 echo "$as_me:$LINENO: result: yes" >&5
14014echo "${ECHO_T}yes" >&6
14015else
14016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014017sed 's/^/| /' conftest.$ac_ext >&5
14018
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014019echo "$as_me:$LINENO: result: no" >&5
14020echo "${ECHO_T}no" >&6
14021
14022fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014024
14025echo "$as_me:$LINENO: checking for getpagesize" >&5
14026echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014028/* confdefs.h. */
14029_ACEOF
14030cat confdefs.h >>conftest.$ac_ext
14031cat >>conftest.$ac_ext <<_ACEOF
14032/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014033
14034#include "confdefs.h"
14035#include <unistd.h>
14036
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014037int
14038main ()
14039{
14040void* p = getpagesize
14041 ;
14042 return 0;
14043}
14044_ACEOF
14045rm -f conftest.$ac_objext
14046if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014049 grep -v '^ *+' conftest.er1 >conftest.err
14050 rm -f conftest.er1
14051 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014054 { ac_try='test -z "$ac_c_werror_flag"
14055 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14057 (eval $ac_try) 2>&5
14058 ac_status=$?
14059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14060 (exit $ac_status); }; } &&
14061 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14063 (eval $ac_try) 2>&5
14064 ac_status=$?
14065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14066 (exit $ac_status); }; }; then
14067
14068cat >>confdefs.h <<\_ACEOF
14069#define HAVE_GETPAGESIZE 1
14070_ACEOF
14071
14072 echo "$as_me:$LINENO: result: yes" >&5
14073echo "${ECHO_T}yes" >&6
14074else
14075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014076sed 's/^/| /' conftest.$ac_ext >&5
14077
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014078echo "$as_me:$LINENO: result: no" >&5
14079echo "${ECHO_T}no" >&6
14080
14081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014083
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014084for ac_prog in true
14085do
14086 # Extract the first word of "$ac_prog", so it can be a program name with args.
14087set dummy $ac_prog; ac_word=$2
14088echo "$as_me:$LINENO: checking for $ac_word" >&5
14089echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14090if test "${ac_cv_prog_TRUE+set}" = set; then
14091 echo $ECHO_N "(cached) $ECHO_C" >&6
14092else
14093 if test -n "$TRUE"; then
14094 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14095else
14096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14097for as_dir in $PATH
14098do
14099 IFS=$as_save_IFS
14100 test -z "$as_dir" && as_dir=.
14101 for ac_exec_ext in '' $ac_executable_extensions; do
14102 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14103 ac_cv_prog_TRUE="$ac_prog"
14104 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14105 break 2
14106 fi
14107done
14108done
14109
14110fi
14111fi
14112TRUE=$ac_cv_prog_TRUE
14113if test -n "$TRUE"; then
14114 echo "$as_me:$LINENO: result: $TRUE" >&5
14115echo "${ECHO_T}$TRUE" >&6
14116else
14117 echo "$as_me:$LINENO: result: no" >&5
14118echo "${ECHO_T}no" >&6
14119fi
14120
14121 test -n "$TRUE" && break
14122done
14123test -n "$TRUE" || TRUE="/bin/true"
14124
14125
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014126echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14127echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14128if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14129 echo $ECHO_N "(cached) $ECHO_C" >&6
14130else
14131 ac_check_lib_save_LIBS=$LIBS
14132LIBS="-lc $LIBS"
14133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014134/* confdefs.h. */
14135_ACEOF
14136cat confdefs.h >>conftest.$ac_ext
14137cat >>conftest.$ac_ext <<_ACEOF
14138/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014139
14140/* Override any gcc2 internal prototype to avoid an error. */
14141#ifdef __cplusplus
14142extern "C"
14143#endif
14144/* We use char because int might match the return type of a gcc2
14145 builtin and then its argument prototype would still apply. */
14146char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014147int
14148main ()
14149{
14150inet_aton ();
14151 ;
14152 return 0;
14153}
14154_ACEOF
14155rm -f conftest.$ac_objext conftest$ac_exeext
14156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014157 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014159 grep -v '^ *+' conftest.er1 >conftest.err
14160 rm -f conftest.er1
14161 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014164 { ac_try='test -z "$ac_c_werror_flag"
14165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14167 (eval $ac_try) 2>&5
14168 ac_status=$?
14169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14170 (exit $ac_status); }; } &&
14171 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14173 (eval $ac_try) 2>&5
14174 ac_status=$?
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); }; }; then
14177 ac_cv_lib_c_inet_aton=yes
14178else
14179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014180sed 's/^/| /' conftest.$ac_ext >&5
14181
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014182ac_cv_lib_c_inet_aton=no
14183fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014184rm -f conftest.err conftest.$ac_objext \
14185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014186LIBS=$ac_check_lib_save_LIBS
14187fi
14188echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14189echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14190if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014191 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014192else
14193
14194echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14195echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14196if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14197 echo $ECHO_N "(cached) $ECHO_C" >&6
14198else
14199 ac_check_lib_save_LIBS=$LIBS
14200LIBS="-lresolv $LIBS"
14201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014202/* confdefs.h. */
14203_ACEOF
14204cat confdefs.h >>conftest.$ac_ext
14205cat >>conftest.$ac_ext <<_ACEOF
14206/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014207
14208/* Override any gcc2 internal prototype to avoid an error. */
14209#ifdef __cplusplus
14210extern "C"
14211#endif
14212/* We use char because int might match the return type of a gcc2
14213 builtin and then its argument prototype would still apply. */
14214char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014215int
14216main ()
14217{
14218inet_aton ();
14219 ;
14220 return 0;
14221}
14222_ACEOF
14223rm -f conftest.$ac_objext conftest$ac_exeext
14224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014225 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014227 grep -v '^ *+' conftest.er1 >conftest.err
14228 rm -f conftest.er1
14229 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14231 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014232 { ac_try='test -z "$ac_c_werror_flag"
14233 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14235 (eval $ac_try) 2>&5
14236 ac_status=$?
14237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14238 (exit $ac_status); }; } &&
14239 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14241 (eval $ac_try) 2>&5
14242 ac_status=$?
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); }; }; then
14245 ac_cv_lib_resolv_inet_aton=yes
14246else
14247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014248sed 's/^/| /' conftest.$ac_ext >&5
14249
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014250ac_cv_lib_resolv_inet_aton=no
14251fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014252rm -f conftest.err conftest.$ac_objext \
14253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014254LIBS=$ac_check_lib_save_LIBS
14255fi
14256echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14257echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14258if test $ac_cv_lib_resolv_inet_aton = yes; then
14259 cat >>confdefs.h <<_ACEOF
14260#define HAVE_LIBRESOLV 1
14261_ACEOF
14262
14263 LIBS="-lresolv $LIBS"
14264
14265fi
14266
14267
14268fi
14269
14270
Martin v. Löwise9416172003-05-03 10:12:45 +000014271echo "$as_me:$LINENO: checking for hstrerror" >&5
14272echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014274/* confdefs.h. */
14275_ACEOF
14276cat confdefs.h >>conftest.$ac_ext
14277cat >>conftest.$ac_ext <<_ACEOF
14278/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014279
14280#include "confdefs.h"
14281#include <netdb.h>
14282
Martin v. Löwise9416172003-05-03 10:12:45 +000014283int
14284main ()
14285{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014286void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014287 ;
14288 return 0;
14289}
14290_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014291rm -f conftest.$ac_objext conftest$ac_exeext
14292if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014293 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 grep -v '^ *+' conftest.er1 >conftest.err
14296 rm -f conftest.er1
14297 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014300 { ac_try='test -z "$ac_c_werror_flag"
14301 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14303 (eval $ac_try) 2>&5
14304 ac_status=$?
14305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14306 (exit $ac_status); }; } &&
14307 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14309 (eval $ac_try) 2>&5
14310 ac_status=$?
14311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14312 (exit $ac_status); }; }; then
14313
14314cat >>confdefs.h <<\_ACEOF
14315#define HAVE_HSTRERROR 1
14316_ACEOF
14317
14318 echo "$as_me:$LINENO: result: yes" >&5
14319echo "${ECHO_T}yes" >&6
14320else
14321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014322sed 's/^/| /' conftest.$ac_ext >&5
14323
Martin v. Löwise9416172003-05-03 10:12:45 +000014324echo "$as_me:$LINENO: result: no" >&5
14325echo "${ECHO_T}no" >&6
14326
14327fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014328rm -f conftest.err conftest.$ac_objext \
14329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014330
14331echo "$as_me:$LINENO: checking for inet_aton" >&5
14332echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014334/* confdefs.h. */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014339
14340#include "confdefs.h"
14341#include <sys/socket.h>
14342#include <netinet/in.h>
14343#include <arpa/inet.h>
14344
Martin v. Löwise9416172003-05-03 10:12:45 +000014345int
14346main ()
14347{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014348void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014349 ;
14350 return 0;
14351}
14352_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014353rm -f conftest.$ac_objext conftest$ac_exeext
14354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014357 grep -v '^ *+' conftest.er1 >conftest.err
14358 rm -f conftest.er1
14359 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14361 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014362 { ac_try='test -z "$ac_c_werror_flag"
14363 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14365 (eval $ac_try) 2>&5
14366 ac_status=$?
14367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368 (exit $ac_status); }; } &&
14369 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14371 (eval $ac_try) 2>&5
14372 ac_status=$?
14373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14374 (exit $ac_status); }; }; then
14375
14376cat >>confdefs.h <<\_ACEOF
14377#define HAVE_INET_ATON 1
14378_ACEOF
14379
14380 echo "$as_me:$LINENO: result: yes" >&5
14381echo "${ECHO_T}yes" >&6
14382else
14383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014384sed 's/^/| /' conftest.$ac_ext >&5
14385
Martin v. Löwise9416172003-05-03 10:12:45 +000014386echo "$as_me:$LINENO: result: no" >&5
14387echo "${ECHO_T}no" >&6
14388
14389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014390rm -f conftest.err conftest.$ac_objext \
14391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014392
14393echo "$as_me:$LINENO: checking for inet_pton" >&5
14394echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014396/* confdefs.h. */
14397_ACEOF
14398cat confdefs.h >>conftest.$ac_ext
14399cat >>conftest.$ac_ext <<_ACEOF
14400/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014401
14402#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014403#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014404#include <sys/socket.h>
14405#include <netinet/in.h>
14406#include <arpa/inet.h>
14407
Martin v. Löwise9416172003-05-03 10:12:45 +000014408int
14409main ()
14410{
14411void* p = inet_pton
14412 ;
14413 return 0;
14414}
14415_ACEOF
14416rm -f conftest.$ac_objext
14417if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014420 grep -v '^ *+' conftest.er1 >conftest.err
14421 rm -f conftest.er1
14422 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14424 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014425 { ac_try='test -z "$ac_c_werror_flag"
14426 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14428 (eval $ac_try) 2>&5
14429 ac_status=$?
14430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14431 (exit $ac_status); }; } &&
14432 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14434 (eval $ac_try) 2>&5
14435 ac_status=$?
14436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437 (exit $ac_status); }; }; then
14438
14439cat >>confdefs.h <<\_ACEOF
14440#define HAVE_INET_PTON 1
14441_ACEOF
14442
14443 echo "$as_me:$LINENO: result: yes" >&5
14444echo "${ECHO_T}yes" >&6
14445else
14446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014447sed 's/^/| /' conftest.$ac_ext >&5
14448
Martin v. Löwise9416172003-05-03 10:12:45 +000014449echo "$as_me:$LINENO: result: no" >&5
14450echo "${ECHO_T}no" >&6
14451
14452fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014454
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014455# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014456echo "$as_me:$LINENO: checking for setgroups" >&5
14457echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14458cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014464
14465#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014466#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014467#ifdef HAVE_GRP_H
14468#include <grp.h>
14469#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014470
Martin v. Löwisd5843682002-11-21 20:41:28 +000014471int
14472main ()
14473{
14474void* p = setgroups
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479rm -f conftest.$ac_objext
14480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014481 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014483 grep -v '^ *+' conftest.er1 >conftest.err
14484 rm -f conftest.er1
14485 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14487 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014488 { ac_try='test -z "$ac_c_werror_flag"
14489 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14491 (eval $ac_try) 2>&5
14492 ac_status=$?
14493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14494 (exit $ac_status); }; } &&
14495 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14497 (eval $ac_try) 2>&5
14498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); }; }; then
14501
14502cat >>confdefs.h <<\_ACEOF
14503#define HAVE_SETGROUPS 1
14504_ACEOF
14505
14506 echo "$as_me:$LINENO: result: yes" >&5
14507echo "${ECHO_T}yes" >&6
14508else
14509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014510sed 's/^/| /' conftest.$ac_ext >&5
14511
Martin v. Löwisd5843682002-11-21 20:41:28 +000014512echo "$as_me:$LINENO: result: no" >&5
14513echo "${ECHO_T}no" >&6
14514
14515fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014517
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014518# check for openpty and forkpty
14519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014521for ac_func in openpty
14522do
Martin v. Löwis11437992002-04-12 09:54:03 +000014523as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14524echo "$as_me:$LINENO: checking for $ac_func" >&5
14525echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14526if eval "test \"\${$as_ac_var+set}\" = set"; then
14527 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014528else
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014530/* confdefs.h. */
14531_ACEOF
14532cat confdefs.h >>conftest.$ac_ext
14533cat >>conftest.$ac_ext <<_ACEOF
14534/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014535/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014536 which can conflict with char $ac_func (); below.
14537 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014538 <limits.h> exists even on freestanding compilers. Under hpux,
14539 including <limits.h> includes <sys/time.h> and causes problems
14540 checking for functions defined therein. */
14541#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014542# include <limits.h>
14543#else
14544# include <assert.h>
14545#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014546/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014547#ifdef __cplusplus
14548extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014549{
Martin v. Löwis11437992002-04-12 09:54:03 +000014550#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014551/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 builtin and then its argument prototype would still apply. */
14553char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014554/* The GNU C library defines this for functions which it implements
14555 to always fail with ENOSYS. Some functions are actually named
14556 something starting with __ and the normal name is an alias. */
14557#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14558choke me
14559#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014560char (*f) () = $ac_func;
14561#endif
14562#ifdef __cplusplus
14563}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014564#endif
14565
Skip Montanaro6dead952003-09-25 14:50:04 +000014566int
14567main ()
14568{
14569return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014570 ;
14571 return 0;
14572}
14573_ACEOF
14574rm -f conftest.$ac_objext conftest$ac_exeext
14575if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014576 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014578 grep -v '^ *+' conftest.er1 >conftest.err
14579 rm -f conftest.er1
14580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14582 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014583 { ac_try='test -z "$ac_c_werror_flag"
14584 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14586 (eval $ac_try) 2>&5
14587 ac_status=$?
14588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14589 (exit $ac_status); }; } &&
14590 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14592 (eval $ac_try) 2>&5
14593 ac_status=$?
14594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); }; }; then
14596 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014597else
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014599sed 's/^/| /' conftest.$ac_ext >&5
14600
Martin v. Löwis11437992002-04-12 09:54:03 +000014601eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014602fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014603rm -f conftest.err conftest.$ac_objext \
14604 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014605fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014606echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14607echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14608if test `eval echo '${'$as_ac_var'}'` = yes; then
14609 cat >>confdefs.h <<_ACEOF
14610#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14611_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014612
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014613else
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14615echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14616if test "${ac_cv_lib_util_openpty+set}" = set; then
14617 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014618else
Martin v. Löwis11437992002-04-12 09:54:03 +000014619 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014620LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014622/* confdefs.h. */
14623_ACEOF
14624cat confdefs.h >>conftest.$ac_ext
14625cat >>conftest.$ac_ext <<_ACEOF
14626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014627
Fred Drake8cef4cf2000-06-28 16:40:38 +000014628/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014629#ifdef __cplusplus
14630extern "C"
14631#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014632/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 builtin and then its argument prototype would still apply. */
14634char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014635int
14636main ()
14637{
14638openpty ();
14639 ;
14640 return 0;
14641}
14642_ACEOF
14643rm -f conftest.$ac_objext conftest$ac_exeext
14644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014645 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014647 grep -v '^ *+' conftest.er1 >conftest.err
14648 rm -f conftest.er1
14649 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014652 { ac_try='test -z "$ac_c_werror_flag"
14653 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14655 (eval $ac_try) 2>&5
14656 ac_status=$?
14657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658 (exit $ac_status); }; } &&
14659 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14661 (eval $ac_try) 2>&5
14662 ac_status=$?
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664 (exit $ac_status); }; }; then
14665 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014668sed 's/^/| /' conftest.$ac_ext >&5
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014671fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672rm -f conftest.err conftest.$ac_objext \
14673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014674LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014676echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14677echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14678if test $ac_cv_lib_util_openpty = yes; then
14679 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014680#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014681_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014682 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014683fi
14684
14685fi
14686done
14687
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Fred Drake8cef4cf2000-06-28 16:40:38 +000014689for ac_func in forkpty
14690do
Martin v. Löwis11437992002-04-12 09:54:03 +000014691as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14692echo "$as_me:$LINENO: checking for $ac_func" >&5
14693echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14694if eval "test \"\${$as_ac_var+set}\" = set"; then
14695 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014696else
Martin v. Löwis11437992002-04-12 09:54:03 +000014697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014698/* confdefs.h. */
14699_ACEOF
14700cat confdefs.h >>conftest.$ac_ext
14701cat >>conftest.$ac_ext <<_ACEOF
14702/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014703/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014704 which can conflict with char $ac_func (); below.
14705 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014706 <limits.h> exists even on freestanding compilers. Under hpux,
14707 including <limits.h> includes <sys/time.h> and causes problems
14708 checking for functions defined therein. */
14709#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014710# include <limits.h>
14711#else
14712# include <assert.h>
14713#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014714/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014715#ifdef __cplusplus
14716extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014717{
Martin v. Löwis11437992002-04-12 09:54:03 +000014718#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014719/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014720 builtin and then its argument prototype would still apply. */
14721char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014722/* The GNU C library defines this for functions which it implements
14723 to always fail with ENOSYS. Some functions are actually named
14724 something starting with __ and the normal name is an alias. */
14725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14726choke me
14727#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014728char (*f) () = $ac_func;
14729#endif
14730#ifdef __cplusplus
14731}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014732#endif
14733
Skip Montanaro6dead952003-09-25 14:50:04 +000014734int
14735main ()
14736{
14737return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 ;
14739 return 0;
14740}
14741_ACEOF
14742rm -f conftest.$ac_objext conftest$ac_exeext
14743if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014744 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014746 grep -v '^ *+' conftest.er1 >conftest.err
14747 rm -f conftest.er1
14748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014751 { ac_try='test -z "$ac_c_werror_flag"
14752 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14754 (eval $ac_try) 2>&5
14755 ac_status=$?
14756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14757 (exit $ac_status); }; } &&
14758 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14760 (eval $ac_try) 2>&5
14761 ac_status=$?
14762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14763 (exit $ac_status); }; }; then
14764 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014765else
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014767sed 's/^/| /' conftest.$ac_ext >&5
14768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014771rm -f conftest.err conftest.$ac_objext \
14772 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14775echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14776if test `eval echo '${'$as_ac_var'}'` = yes; then
14777 cat >>confdefs.h <<_ACEOF
14778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14779_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014780
Fred Drake8cef4cf2000-06-28 16:40:38 +000014781else
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14783echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14784if test "${ac_cv_lib_util_forkpty+set}" = set; then
14785 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014786else
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014788LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014790/* confdefs.h. */
14791_ACEOF
14792cat confdefs.h >>conftest.$ac_ext
14793cat >>conftest.$ac_ext <<_ACEOF
14794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Fred Drake8cef4cf2000-06-28 16:40:38 +000014796/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014797#ifdef __cplusplus
14798extern "C"
14799#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014800/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 builtin and then its argument prototype would still apply. */
14802char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014803int
14804main ()
14805{
14806forkpty ();
14807 ;
14808 return 0;
14809}
14810_ACEOF
14811rm -f conftest.$ac_objext conftest$ac_exeext
14812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014813 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014815 grep -v '^ *+' conftest.er1 >conftest.err
14816 rm -f conftest.er1
14817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14819 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014820 { ac_try='test -z "$ac_c_werror_flag"
14821 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14823 (eval $ac_try) 2>&5
14824 ac_status=$?
14825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); }; } &&
14827 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14829 (eval $ac_try) 2>&5
14830 ac_status=$?
14831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14832 (exit $ac_status); }; }; then
14833 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014834else
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014836sed 's/^/| /' conftest.$ac_ext >&5
14837
Martin v. Löwis11437992002-04-12 09:54:03 +000014838ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014839fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014840rm -f conftest.err conftest.$ac_objext \
14841 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014842LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014843fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014844echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14845echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14846if test $ac_cv_lib_util_forkpty = yes; then
14847 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014848#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014849_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014850 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014851fi
14852
14853fi
14854done
14855
Jack Jansendd19cf82001-12-06 22:36:17 +000014856
Michael W. Hudson54241132001-12-07 15:38:26 +000014857# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
14859
14860
14861
14862
14863
Fred Drake8cef4cf2000-06-28 16:40:38 +000014864for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14865do
Martin v. Löwis11437992002-04-12 09:54:03 +000014866as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14867echo "$as_me:$LINENO: checking for $ac_func" >&5
14868echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14869if eval "test \"\${$as_ac_var+set}\" = set"; then
14870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014871else
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014873/* confdefs.h. */
14874_ACEOF
14875cat confdefs.h >>conftest.$ac_ext
14876cat >>conftest.$ac_ext <<_ACEOF
14877/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014878/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014879 which can conflict with char $ac_func (); below.
14880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014881 <limits.h> exists even on freestanding compilers. Under hpux,
14882 including <limits.h> includes <sys/time.h> and causes problems
14883 checking for functions defined therein. */
14884#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014885# include <limits.h>
14886#else
14887# include <assert.h>
14888#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014889/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014890#ifdef __cplusplus
14891extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014892{
Martin v. Löwis11437992002-04-12 09:54:03 +000014893#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014894/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 builtin and then its argument prototype would still apply. */
14896char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014897/* The GNU C library defines this for functions which it implements
14898 to always fail with ENOSYS. Some functions are actually named
14899 something starting with __ and the normal name is an alias. */
14900#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14901choke me
14902#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014903char (*f) () = $ac_func;
14904#endif
14905#ifdef __cplusplus
14906}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014907#endif
14908
Skip Montanaro6dead952003-09-25 14:50:04 +000014909int
14910main ()
14911{
14912return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ;
14914 return 0;
14915}
14916_ACEOF
14917rm -f conftest.$ac_objext conftest$ac_exeext
14918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014919 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 grep -v '^ *+' conftest.er1 >conftest.err
14922 rm -f conftest.er1
14923 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014926 { ac_try='test -z "$ac_c_werror_flag"
14927 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014928 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14929 (eval $ac_try) 2>&5
14930 ac_status=$?
14931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14932 (exit $ac_status); }; } &&
14933 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14935 (eval $ac_try) 2>&5
14936 ac_status=$?
14937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14938 (exit $ac_status); }; }; then
14939 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014940else
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014942sed 's/^/| /' conftest.$ac_ext >&5
14943
Martin v. Löwis11437992002-04-12 09:54:03 +000014944eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014945fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014946rm -f conftest.err conftest.$ac_objext \
14947 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14950echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14951if test `eval echo '${'$as_ac_var'}'` = yes; then
14952 cat >>confdefs.h <<_ACEOF
14953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14954_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014956fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014957done
14958
Michael W. Hudson54241132001-12-07 15:38:26 +000014959
Martin v. Löwis11437992002-04-12 09:54:03 +000014960
14961
14962
14963
14964
Martin v. Löwis1142de32002-03-29 16:28:31 +000014965for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014966do
Martin v. Löwis11437992002-04-12 09:54:03 +000014967as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14968echo "$as_me:$LINENO: checking for $ac_func" >&5
14969echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14970if eval "test \"\${$as_ac_var+set}\" = set"; then
14971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014974/* confdefs.h. */
14975_ACEOF
14976cat confdefs.h >>conftest.$ac_ext
14977cat >>conftest.$ac_ext <<_ACEOF
14978/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014979/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014980 which can conflict with char $ac_func (); below.
14981 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014982 <limits.h> exists even on freestanding compilers. Under hpux,
14983 including <limits.h> includes <sys/time.h> and causes problems
14984 checking for functions defined therein. */
14985#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014986# include <limits.h>
14987#else
14988# include <assert.h>
14989#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014990/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014991#ifdef __cplusplus
14992extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014993{
Martin v. Löwis11437992002-04-12 09:54:03 +000014994#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014995/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 builtin and then its argument prototype would still apply. */
14997char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014998/* The GNU C library defines this for functions which it implements
14999 to always fail with ENOSYS. Some functions are actually named
15000 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015001#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015002choke me
15003#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015004char (*f) () = $ac_func;
15005#endif
15006#ifdef __cplusplus
15007}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015008#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009
Skip Montanaro6dead952003-09-25 14:50:04 +000015010int
15011main ()
15012{
15013return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 ;
15015 return 0;
15016}
15017_ACEOF
15018rm -f conftest.$ac_objext conftest$ac_exeext
15019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015020 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 grep -v '^ *+' conftest.er1 >conftest.err
15023 rm -f conftest.er1
15024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015027 { ac_try='test -z "$ac_c_werror_flag"
15028 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15030 (eval $ac_try) 2>&5
15031 ac_status=$?
15032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); }; } &&
15034 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15036 (eval $ac_try) 2>&5
15037 ac_status=$?
15038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039 (exit $ac_status); }; }; then
15040 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015041else
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015043sed 's/^/| /' conftest.$ac_ext >&5
15044
Martin v. Löwis11437992002-04-12 09:54:03 +000015045eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015047rm -f conftest.err conftest.$ac_objext \
15048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015050echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15051echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15052if test `eval echo '${'$as_ac_var'}'` = yes; then
15053 cat >>confdefs.h <<_ACEOF
15054#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15055_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015056
Martin v. Löwis1142de32002-03-29 16:28:31 +000015057else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015058 case $LIBOBJS in
15059 "$ac_func.$ac_objext" | \
15060 *" $ac_func.$ac_objext" | \
15061 "$ac_func.$ac_objext "* | \
15062 *" $ac_func.$ac_objext "* ) ;;
15063 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15064esac
15065
Martin v. Löwis1142de32002-03-29 16:28:31 +000015066fi
15067done
15068
15069
Martin v. Löwis11437992002-04-12 09:54:03 +000015070
Martin v. Löwis1142de32002-03-29 16:28:31 +000015071for ac_func in getpgrp
15072do
Martin v. Löwis11437992002-04-12 09:54:03 +000015073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15074echo "$as_me:$LINENO: checking for $ac_func" >&5
15075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15076if eval "test \"\${$as_ac_var+set}\" = set"; then
15077 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015078else
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015080/* confdefs.h. */
15081_ACEOF
15082cat confdefs.h >>conftest.$ac_ext
15083cat >>conftest.$ac_ext <<_ACEOF
15084/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015085/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015086 which can conflict with char $ac_func (); below.
15087 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015088 <limits.h> exists even on freestanding compilers. Under hpux,
15089 including <limits.h> includes <sys/time.h> and causes problems
15090 checking for functions defined therein. */
15091#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015092# include <limits.h>
15093#else
15094# include <assert.h>
15095#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015097#ifdef __cplusplus
15098extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015099{
Martin v. Löwis11437992002-04-12 09:54:03 +000015100#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015101/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 builtin and then its argument prototype would still apply. */
15103char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015104/* The GNU C library defines this for functions which it implements
15105 to always fail with ENOSYS. Some functions are actually named
15106 something starting with __ and the normal name is an alias. */
15107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15108choke me
15109#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015110char (*f) () = $ac_func;
15111#endif
15112#ifdef __cplusplus
15113}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015114#endif
15115
Skip Montanaro6dead952003-09-25 14:50:04 +000015116int
15117main ()
15118{
15119return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 ;
15121 return 0;
15122}
15123_ACEOF
15124rm -f conftest.$ac_objext conftest$ac_exeext
15125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015126 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 grep -v '^ *+' conftest.er1 >conftest.err
15129 rm -f conftest.er1
15130 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015133 { ac_try='test -z "$ac_c_werror_flag"
15134 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15136 (eval $ac_try) 2>&5
15137 ac_status=$?
15138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15139 (exit $ac_status); }; } &&
15140 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15142 (eval $ac_try) 2>&5
15143 ac_status=$?
15144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15145 (exit $ac_status); }; }; then
15146 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015147else
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015149sed 's/^/| /' conftest.$ac_ext >&5
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015152fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015153rm -f conftest.err conftest.$ac_objext \
15154 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015156echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15157echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15158if test `eval echo '${'$as_ac_var'}'` = yes; then
15159 cat >>confdefs.h <<_ACEOF
15160#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15161_ACEOF
15162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015163/* confdefs.h. */
15164_ACEOF
15165cat confdefs.h >>conftest.$ac_ext
15166cat >>conftest.$ac_ext <<_ACEOF
15167/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015168#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015169int
15170main ()
15171{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015172getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ;
15174 return 0;
15175}
15176_ACEOF
15177rm -f conftest.$ac_objext
15178if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015179 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 grep -v '^ *+' conftest.er1 >conftest.err
15182 rm -f conftest.er1
15183 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015186 { ac_try='test -z "$ac_c_werror_flag"
15187 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15189 (eval $ac_try) 2>&5
15190 ac_status=$?
15191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15192 (exit $ac_status); }; } &&
15193 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15195 (eval $ac_try) 2>&5
15196 ac_status=$?
15197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15198 (exit $ac_status); }; }; then
15199
15200cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015201#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015202_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015203
Martin v. Löwis11437992002-04-12 09:54:03 +000015204
Guido van Rossumf78abae1997-01-21 22:02:36 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015207sed 's/^/| /' conftest.$ac_ext >&5
15208
Guido van Rossum627b2d71993-12-24 10:39:16 +000015209fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015211
Guido van Rossum627b2d71993-12-24 10:39:16 +000015212fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015213done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214
Jack Jansen150753c2003-03-29 22:07:47 +000015215
15216for ac_func in setpgrp
15217do
15218as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15219echo "$as_me:$LINENO: checking for $ac_func" >&5
15220echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15221if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015223else
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* confdefs.h. */
15226_ACEOF
15227cat confdefs.h >>conftest.$ac_ext
15228cat >>conftest.$ac_ext <<_ACEOF
15229/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015230/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015231 which can conflict with char $ac_func (); below.
15232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015233 <limits.h> exists even on freestanding compilers. Under hpux,
15234 including <limits.h> includes <sys/time.h> and causes problems
15235 checking for functions defined therein. */
15236#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015237# include <limits.h>
15238#else
15239# include <assert.h>
15240#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015241/* Override any gcc2 internal prototype to avoid an error. */
15242#ifdef __cplusplus
15243extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015244{
Martin v. Löwis11437992002-04-12 09:54:03 +000015245#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015246/* We use char because int might match the return type of a gcc2
15247 builtin and then its argument prototype would still apply. */
15248char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015249/* The GNU C library defines this for functions which it implements
15250 to always fail with ENOSYS. Some functions are actually named
15251 something starting with __ and the normal name is an alias. */
15252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15253choke me
15254#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015255char (*f) () = $ac_func;
15256#endif
15257#ifdef __cplusplus
15258}
Jack Jansen150753c2003-03-29 22:07:47 +000015259#endif
15260
Skip Montanaro6dead952003-09-25 14:50:04 +000015261int
15262main ()
15263{
15264return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ;
15266 return 0;
15267}
15268_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015269rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015270if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015273 grep -v '^ *+' conftest.er1 >conftest.err
15274 rm -f conftest.er1
15275 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015277 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015278 { ac_try='test -z "$ac_c_werror_flag"
15279 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15281 (eval $ac_try) 2>&5
15282 ac_status=$?
15283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15284 (exit $ac_status); }; } &&
15285 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15287 (eval $ac_try) 2>&5
15288 ac_status=$?
15289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15290 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015291 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015292else
Jack Jansen150753c2003-03-29 22:07:47 +000015293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015294sed 's/^/| /' conftest.$ac_ext >&5
15295
Jack Jansen150753c2003-03-29 22:07:47 +000015296eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015297fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015298rm -f conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015300fi
Jack Jansen150753c2003-03-29 22:07:47 +000015301echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15302echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15303if test `eval echo '${'$as_ac_var'}'` = yes; then
15304 cat >>confdefs.h <<_ACEOF
15305#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15306_ACEOF
15307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015308/* confdefs.h. */
15309_ACEOF
15310cat confdefs.h >>conftest.$ac_ext
15311cat >>conftest.$ac_ext <<_ACEOF
15312/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015313#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015314int
15315main ()
15316{
15317setpgrp(0,0);
15318 ;
15319 return 0;
15320}
15321_ACEOF
15322rm -f conftest.$ac_objext
15323if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015324 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015326 grep -v '^ *+' conftest.er1 >conftest.err
15327 rm -f conftest.er1
15328 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015331 { ac_try='test -z "$ac_c_werror_flag"
15332 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15334 (eval $ac_try) 2>&5
15335 ac_status=$?
15336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15337 (exit $ac_status); }; } &&
15338 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340 (eval $ac_try) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015346#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015347_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015348
Jack Jansen150753c2003-03-29 22:07:47 +000015349
15350else
15351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015352sed 's/^/| /' conftest.$ac_ext >&5
15353
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015356
15357fi
15358done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015359
Martin v. Löwis11437992002-04-12 09:54:03 +000015360
Thomas Wouters3a584202000-08-05 23:28:51 +000015361for ac_func in gettimeofday
15362do
Martin v. Löwis11437992002-04-12 09:54:03 +000015363as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15364echo "$as_me:$LINENO: checking for $ac_func" >&5
15365echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15366if eval "test \"\${$as_ac_var+set}\" = set"; then
15367 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015368else
Martin v. Löwis11437992002-04-12 09:54:03 +000015369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015370/* confdefs.h. */
15371_ACEOF
15372cat confdefs.h >>conftest.$ac_ext
15373cat >>conftest.$ac_ext <<_ACEOF
15374/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015375/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015376 which can conflict with char $ac_func (); below.
15377 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015378 <limits.h> exists even on freestanding compilers. Under hpux,
15379 including <limits.h> includes <sys/time.h> and causes problems
15380 checking for functions defined therein. */
15381#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015382# include <limits.h>
15383#else
15384# include <assert.h>
15385#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015386/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015387#ifdef __cplusplus
15388extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015389{
Martin v. Löwis11437992002-04-12 09:54:03 +000015390#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015391/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 builtin and then its argument prototype would still apply. */
15393char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015394/* The GNU C library defines this for functions which it implements
15395 to always fail with ENOSYS. Some functions are actually named
15396 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015397#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015398choke me
15399#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015400char (*f) () = $ac_func;
15401#endif
15402#ifdef __cplusplus
15403}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015404#endif
15405
Skip Montanaro6dead952003-09-25 14:50:04 +000015406int
15407main ()
15408{
15409return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext conftest$ac_exeext
15415if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015416 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015418 grep -v '^ *+' conftest.er1 >conftest.err
15419 rm -f conftest.er1
15420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15422 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015423 { ac_try='test -z "$ac_c_werror_flag"
15424 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15426 (eval $ac_try) 2>&5
15427 ac_status=$?
15428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15429 (exit $ac_status); }; } &&
15430 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15432 (eval $ac_try) 2>&5
15433 ac_status=$?
15434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15435 (exit $ac_status); }; }; then
15436 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015437else
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015439sed 's/^/| /' conftest.$ac_ext >&5
15440
Martin v. Löwis11437992002-04-12 09:54:03 +000015441eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015442fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015443rm -f conftest.err conftest.$ac_objext \
15444 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015445fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015446echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15447echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15448if test `eval echo '${'$as_ac_var'}'` = yes; then
15449 cat >>confdefs.h <<_ACEOF
15450#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15451_ACEOF
15452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015453/* confdefs.h. */
15454_ACEOF
15455cat confdefs.h >>conftest.$ac_ext
15456cat >>conftest.$ac_ext <<_ACEOF
15457/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015458#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015459int
15460main ()
15461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015462gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015463 ;
15464 return 0;
15465}
15466_ACEOF
15467rm -f conftest.$ac_objext
15468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015469 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015471 grep -v '^ *+' conftest.er1 >conftest.err
15472 rm -f conftest.er1
15473 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015476 { ac_try='test -z "$ac_c_werror_flag"
15477 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15479 (eval $ac_try) 2>&5
15480 ac_status=$?
15481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15482 (exit $ac_status); }; } &&
15483 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15485 (eval $ac_try) 2>&5
15486 ac_status=$?
15487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15488 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015489 :
15490else
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015492sed 's/^/| /' conftest.$ac_ext >&5
15493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494
15495cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015496#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015497_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015498
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Guido van Rossum627b2d71993-12-24 10:39:16 +000015500fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015502
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015503fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015504done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015505
Michael W. Hudson54241132001-12-07 15:38:26 +000015506
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015507echo "$as_me:$LINENO: checking for major" >&5
15508echo $ECHO_N "checking for major... $ECHO_C" >&6
15509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015510/* confdefs.h. */
15511_ACEOF
15512cat confdefs.h >>conftest.$ac_ext
15513cat >>conftest.$ac_ext <<_ACEOF
15514/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015515
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015516#if defined(MAJOR_IN_MKDEV)
15517#include <sys/mkdev.h>
15518#elif defined(MAJOR_IN_SYSMACROS)
15519#include <sys/sysmacros.h>
15520#else
15521#include <sys/types.h>
15522#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015523
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015524int
15525main ()
15526{
15527
15528 makedev(major(0),minor(0));
15529
15530 ;
15531 return 0;
15532}
15533_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015534rm -f conftest.$ac_objext conftest$ac_exeext
15535if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015536 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015538 grep -v '^ *+' conftest.er1 >conftest.err
15539 rm -f conftest.er1
15540 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15542 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015543 { ac_try='test -z "$ac_c_werror_flag"
15544 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15546 (eval $ac_try) 2>&5
15547 ac_status=$?
15548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15549 (exit $ac_status); }; } &&
15550 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15552 (eval $ac_try) 2>&5
15553 ac_status=$?
15554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15555 (exit $ac_status); }; }; then
15556
15557
15558cat >>confdefs.h <<\_ACEOF
15559#define HAVE_DEVICE_MACROS 1
15560_ACEOF
15561
15562 echo "$as_me:$LINENO: result: yes" >&5
15563echo "${ECHO_T}yes" >&6
15564
15565else
15566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015567sed 's/^/| /' conftest.$ac_ext >&5
15568
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015569
15570 echo "$as_me:$LINENO: result: no" >&5
15571echo "${ECHO_T}no" >&6
15572
15573fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015574rm -f conftest.err conftest.$ac_objext \
15575 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015576
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015577# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015578# for [no]getaddrinfo in netdb.h.
15579echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15580echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015582/* confdefs.h. */
15583_ACEOF
15584cat confdefs.h >>conftest.$ac_ext
15585cat >>conftest.$ac_ext <<_ACEOF
15586/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015587
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015588#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015589#include <sys/socket.h>
15590#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015591#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015592
Martin v. Löwis11437992002-04-12 09:54:03 +000015593int
15594main ()
15595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015596
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015597getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015598
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 ;
15600 return 0;
15601}
15602_ACEOF
15603rm -f conftest.$ac_objext conftest$ac_exeext
15604if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015605 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015607 grep -v '^ *+' conftest.er1 >conftest.err
15608 rm -f conftest.er1
15609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15611 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015612 { ac_try='test -z "$ac_c_werror_flag"
15613 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15615 (eval $ac_try) 2>&5
15616 ac_status=$?
15617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15618 (exit $ac_status); }; } &&
15619 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15621 (eval $ac_try) 2>&5
15622 ac_status=$?
15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15624 (exit $ac_status); }; }; then
15625
15626echo "$as_me:$LINENO: result: yes" >&5
15627echo "${ECHO_T}yes" >&6
15628echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15629echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015630if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 echo "$as_me:$LINENO: result: buggy" >&5
15632echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015633buggygetaddrinfo=yes
15634else
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* confdefs.h. */
15637_ACEOF
15638cat confdefs.h >>conftest.$ac_ext
15639cat >>conftest.$ac_ext <<_ACEOF
15640/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015641
15642#include <sys/types.h>
15643#include <netdb.h>
15644#include <string.h>
15645#include <sys/socket.h>
15646#include <netinet/in.h>
15647
15648main()
15649{
15650 int passive, gaierr, inet4 = 0, inet6 = 0;
15651 struct addrinfo hints, *ai, *aitop;
15652 char straddr[INET6_ADDRSTRLEN], strport[16];
15653
15654 for (passive = 0; passive <= 1; passive++) {
15655 memset(&hints, 0, sizeof(hints));
15656 hints.ai_family = AF_UNSPEC;
15657 hints.ai_flags = passive ? AI_PASSIVE : 0;
15658 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015659 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015660 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15661 (void)gai_strerror(gaierr);
15662 goto bad;
15663 }
15664 for (ai = aitop; ai; ai = ai->ai_next) {
15665 if (ai->ai_addr == NULL ||
15666 ai->ai_addrlen == 0 ||
15667 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15668 straddr, sizeof(straddr), strport, sizeof(strport),
15669 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15670 goto bad;
15671 }
15672 switch (ai->ai_family) {
15673 case AF_INET:
15674 if (strcmp(strport, "54321") != 0) {
15675 goto bad;
15676 }
15677 if (passive) {
15678 if (strcmp(straddr, "0.0.0.0") != 0) {
15679 goto bad;
15680 }
15681 } else {
15682 if (strcmp(straddr, "127.0.0.1") != 0) {
15683 goto bad;
15684 }
15685 }
15686 inet4++;
15687 break;
15688 case AF_INET6:
15689 if (strcmp(strport, "54321") != 0) {
15690 goto bad;
15691 }
15692 if (passive) {
15693 if (strcmp(straddr, "::") != 0) {
15694 goto bad;
15695 }
15696 } else {
15697 if (strcmp(straddr, "::1") != 0) {
15698 goto bad;
15699 }
15700 }
15701 inet6++;
15702 break;
15703 case AF_UNSPEC:
15704 goto bad;
15705 break;
15706 default:
15707 /* another family support? */
15708 break;
15709 }
15710 }
15711 }
15712
15713 if (!(inet4 == 0 || inet4 == 2))
15714 goto bad;
15715 if (!(inet6 == 0 || inet6 == 2))
15716 goto bad;
15717
15718 if (aitop)
15719 freeaddrinfo(aitop);
15720 exit(0);
15721
15722 bad:
15723 if (aitop)
15724 freeaddrinfo(aitop);
15725 exit(1);
15726}
15727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728_ACEOF
15729rm -f conftest$ac_exeext
15730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15731 (eval $ac_link) 2>&5
15732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15736 (eval $ac_try) 2>&5
15737 ac_status=$?
15738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15739 (exit $ac_status); }; }; then
15740 echo "$as_me:$LINENO: result: good" >&5
15741echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015742buggygetaddrinfo=no
15743else
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 echo "$as_me: program exited with status $ac_status" >&5
15745echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015746sed 's/^/| /' conftest.$ac_ext >&5
15747
Martin v. Löwis11437992002-04-12 09:54:03 +000015748( exit $ac_status )
15749echo "$as_me:$LINENO: result: buggy" >&5
15750echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015751buggygetaddrinfo=yes
15752fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015753rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015754fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015755else
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015757sed 's/^/| /' conftest.$ac_ext >&5
15758
Martin v. Löwis11437992002-04-12 09:54:03 +000015759
15760echo "$as_me:$LINENO: result: no" >&5
15761echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015762buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015763
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015764fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015765rm -f conftest.err conftest.$ac_objext \
15766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015767
15768if test "$buggygetaddrinfo" = "yes"; then
15769 if test "$ipv6" = "yes"; then
15770 echo 'Fatal: You must get working getaddrinfo() function.'
15771 echo ' or you can specify "--disable-ipv6"'.
15772 exit 1
15773 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015774else
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
15776cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015777#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015778_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015779
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015780fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015781
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015782for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015783do
Martin v. Löwis11437992002-04-12 09:54:03 +000015784as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15785echo "$as_me:$LINENO: checking for $ac_func" >&5
15786echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15787if eval "test \"\${$as_ac_var+set}\" = set"; then
15788 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015789else
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015791/* confdefs.h. */
15792_ACEOF
15793cat confdefs.h >>conftest.$ac_ext
15794cat >>conftest.$ac_ext <<_ACEOF
15795/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015796/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 which can conflict with char $ac_func (); below.
15798 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015799 <limits.h> exists even on freestanding compilers. Under hpux,
15800 including <limits.h> includes <sys/time.h> and causes problems
15801 checking for functions defined therein. */
15802#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015803# include <limits.h>
15804#else
15805# include <assert.h>
15806#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015807/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015808#ifdef __cplusplus
15809extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015810{
Martin v. Löwis11437992002-04-12 09:54:03 +000015811#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015812/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 builtin and then its argument prototype would still apply. */
15814char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015815/* The GNU C library defines this for functions which it implements
15816 to always fail with ENOSYS. Some functions are actually named
15817 something starting with __ and the normal name is an alias. */
15818#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15819choke me
15820#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015821char (*f) () = $ac_func;
15822#endif
15823#ifdef __cplusplus
15824}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015825#endif
15826
Skip Montanaro6dead952003-09-25 14:50:04 +000015827int
15828main ()
15829{
15830return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015831 ;
15832 return 0;
15833}
15834_ACEOF
15835rm -f conftest.$ac_objext conftest$ac_exeext
15836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015837 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015839 grep -v '^ *+' conftest.er1 >conftest.err
15840 rm -f conftest.er1
15841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15843 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015844 { ac_try='test -z "$ac_c_werror_flag"
15845 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15847 (eval $ac_try) 2>&5
15848 ac_status=$?
15849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15850 (exit $ac_status); }; } &&
15851 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15853 (eval $ac_try) 2>&5
15854 ac_status=$?
15855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856 (exit $ac_status); }; }; then
15857 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015858else
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015860sed 's/^/| /' conftest.$ac_ext >&5
15861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015864rm -f conftest.err conftest.$ac_objext \
15865 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015866fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015867echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15868echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15869if test `eval echo '${'$as_ac_var'}'` = yes; then
15870 cat >>confdefs.h <<_ACEOF
15871#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15872_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015873
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015874fi
15875done
15876
Michael W. Hudson54241132001-12-07 15:38:26 +000015877
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015878# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015879echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15880echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15881if test "${ac_cv_header_time+set}" = set; then
15882 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015883else
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015885/* confdefs.h. */
15886_ACEOF
15887cat confdefs.h >>conftest.$ac_ext
15888cat >>conftest.$ac_ext <<_ACEOF
15889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015890#include <sys/types.h>
15891#include <sys/time.h>
15892#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894int
15895main ()
15896{
15897if ((struct tm *) 0)
15898return 0;
15899 ;
15900 return 0;
15901}
15902_ACEOF
15903rm -f conftest.$ac_objext
15904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015905 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907 grep -v '^ *+' conftest.er1 >conftest.err
15908 rm -f conftest.er1
15909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15911 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015912 { ac_try='test -z "$ac_c_werror_flag"
15913 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15915 (eval $ac_try) 2>&5
15916 ac_status=$?
15917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15918 (exit $ac_status); }; } &&
15919 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15921 (eval $ac_try) 2>&5
15922 ac_status=$?
15923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15924 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015925 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015926else
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015928sed 's/^/| /' conftest.$ac_ext >&5
15929
Martin v. Löwis11437992002-04-12 09:54:03 +000015930ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015931fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015932rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015934echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15935echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015936if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015937
15938cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015939#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015940_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015941
15942fi
15943
Martin v. Löwis11437992002-04-12 09:54:03 +000015944echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15945echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15946if test "${ac_cv_struct_tm+set}" = set; then
15947 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015948else
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015950/* confdefs.h. */
15951_ACEOF
15952cat confdefs.h >>conftest.$ac_ext
15953cat >>conftest.$ac_ext <<_ACEOF
15954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015955#include <sys/types.h>
15956#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
Martin v. Löwis11437992002-04-12 09:54:03 +000015958int
15959main ()
15960{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015961struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ;
15963 return 0;
15964}
15965_ACEOF
15966rm -f conftest.$ac_objext
15967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015970 grep -v '^ *+' conftest.er1 >conftest.err
15971 rm -f conftest.er1
15972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015975 { ac_try='test -z "$ac_c_werror_flag"
15976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15978 (eval $ac_try) 2>&5
15979 ac_status=$?
15980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15981 (exit $ac_status); }; } &&
15982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15984 (eval $ac_try) 2>&5
15985 ac_status=$?
15986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15987 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015988 ac_cv_struct_tm=time.h
15989else
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015991sed 's/^/| /' conftest.$ac_ext >&5
15992
Martin v. Löwis11437992002-04-12 09:54:03 +000015993ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015996fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015997echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15998echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015999if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
16001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016002#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016004
16005fi
16006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16008echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16009if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16010 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016011else
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016013/* confdefs.h. */
16014_ACEOF
16015cat confdefs.h >>conftest.$ac_ext
16016cat >>conftest.$ac_ext <<_ACEOF
16017/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016018#include <sys/types.h>
16019#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
16021
Martin v. Löwis11437992002-04-12 09:54:03 +000016022int
16023main ()
16024{
16025static struct tm ac_aggr;
16026if (ac_aggr.tm_zone)
16027return 0;
16028 ;
16029 return 0;
16030}
16031_ACEOF
16032rm -f conftest.$ac_objext
16033if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016034 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 grep -v '^ *+' conftest.er1 >conftest.err
16037 rm -f conftest.er1
16038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16040 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016041 { ac_try='test -z "$ac_c_werror_flag"
16042 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16044 (eval $ac_try) 2>&5
16045 ac_status=$?
16046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16047 (exit $ac_status); }; } &&
16048 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16050 (eval $ac_try) 2>&5
16051 ac_status=$?
16052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16053 (exit $ac_status); }; }; then
16054 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016055else
Martin v. Löwis11437992002-04-12 09:54:03 +000016056 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016057sed 's/^/| /' conftest.$ac_ext >&5
16058
16059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016060/* confdefs.h. */
16061_ACEOF
16062cat confdefs.h >>conftest.$ac_ext
16063cat >>conftest.$ac_ext <<_ACEOF
16064/* end confdefs.h. */
16065#include <sys/types.h>
16066#include <$ac_cv_struct_tm>
16067
16068
16069int
16070main ()
16071{
16072static struct tm ac_aggr;
16073if (sizeof ac_aggr.tm_zone)
16074return 0;
16075 ;
16076 return 0;
16077}
16078_ACEOF
16079rm -f conftest.$ac_objext
16080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016081 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016083 grep -v '^ *+' conftest.er1 >conftest.err
16084 rm -f conftest.er1
16085 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16087 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016088 { ac_try='test -z "$ac_c_werror_flag"
16089 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16091 (eval $ac_try) 2>&5
16092 ac_status=$?
16093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16094 (exit $ac_status); }; } &&
16095 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16097 (eval $ac_try) 2>&5
16098 ac_status=$?
16099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16100 (exit $ac_status); }; }; then
16101 ac_cv_member_struct_tm_tm_zone=yes
16102else
16103 echo "$as_me: failed program was:" >&5
16104sed 's/^/| /' conftest.$ac_ext >&5
16105
Martin v. Löwis11437992002-04-12 09:54:03 +000016106ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016107fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016108rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016109fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016110rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016112echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16113echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16114if test $ac_cv_member_struct_tm_tm_zone = yes; then
16115
16116cat >>confdefs.h <<_ACEOF
16117#define HAVE_STRUCT_TM_TM_ZONE 1
16118_ACEOF
16119
16120
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016121fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016122
Martin v. Löwis11437992002-04-12 09:54:03 +000016123if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16124
16125cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016126#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016127_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016128
16129else
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 echo "$as_me:$LINENO: checking for tzname" >&5
16131echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16132if test "${ac_cv_var_tzname+set}" = set; then
16133 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016134else
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016136/* confdefs.h. */
16137_ACEOF
16138cat confdefs.h >>conftest.$ac_ext
16139cat >>conftest.$ac_ext <<_ACEOF
16140/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016141#include <time.h>
16142#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016143extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016145
Martin v. Löwis11437992002-04-12 09:54:03 +000016146int
16147main ()
16148{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016149atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext conftest$ac_exeext
16155if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016156 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016158 grep -v '^ *+' conftest.er1 >conftest.err
16159 rm -f conftest.er1
16160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16162 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016163 { ac_try='test -z "$ac_c_werror_flag"
16164 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16166 (eval $ac_try) 2>&5
16167 ac_status=$?
16168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16169 (exit $ac_status); }; } &&
16170 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16172 (eval $ac_try) 2>&5
16173 ac_status=$?
16174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016176 ac_cv_var_tzname=yes
16177else
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016179sed 's/^/| /' conftest.$ac_ext >&5
16180
Martin v. Löwis11437992002-04-12 09:54:03 +000016181ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016183rm -f conftest.err conftest.$ac_objext \
16184 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016186echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16187echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016188 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
16190cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016191#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016192_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016193
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016194 fi
16195fi
16196
Martin v. Löwis11437992002-04-12 09:54:03 +000016197echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16198echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16199if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16200 echo $ECHO_N "(cached) $ECHO_C" >&6
16201else
16202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016203/* confdefs.h. */
16204_ACEOF
16205cat confdefs.h >>conftest.$ac_ext
16206cat >>conftest.$ac_ext <<_ACEOF
16207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016209int
16210main ()
16211{
16212static struct stat ac_aggr;
16213if (ac_aggr.st_rdev)
16214return 0;
16215 ;
16216 return 0;
16217}
16218_ACEOF
16219rm -f conftest.$ac_objext
16220if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016221 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016223 grep -v '^ *+' conftest.er1 >conftest.err
16224 rm -f conftest.er1
16225 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16227 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016228 { ac_try='test -z "$ac_c_werror_flag"
16229 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16231 (eval $ac_try) 2>&5
16232 ac_status=$?
16233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16234 (exit $ac_status); }; } &&
16235 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16237 (eval $ac_try) 2>&5
16238 ac_status=$?
16239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16240 (exit $ac_status); }; }; then
16241 ac_cv_member_struct_stat_st_rdev=yes
16242else
16243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016244sed 's/^/| /' conftest.$ac_ext >&5
16245
16246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016247/* confdefs.h. */
16248_ACEOF
16249cat confdefs.h >>conftest.$ac_ext
16250cat >>conftest.$ac_ext <<_ACEOF
16251/* end confdefs.h. */
16252$ac_includes_default
16253int
16254main ()
16255{
16256static struct stat ac_aggr;
16257if (sizeof ac_aggr.st_rdev)
16258return 0;
16259 ;
16260 return 0;
16261}
16262_ACEOF
16263rm -f conftest.$ac_objext
16264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016265 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016267 grep -v '^ *+' conftest.er1 >conftest.err
16268 rm -f conftest.er1
16269 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16271 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016272 { ac_try='test -z "$ac_c_werror_flag"
16273 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16275 (eval $ac_try) 2>&5
16276 ac_status=$?
16277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16278 (exit $ac_status); }; } &&
16279 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16281 (eval $ac_try) 2>&5
16282 ac_status=$?
16283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16284 (exit $ac_status); }; }; then
16285 ac_cv_member_struct_stat_st_rdev=yes
16286else
16287 echo "$as_me: failed program was:" >&5
16288sed 's/^/| /' conftest.$ac_ext >&5
16289
Martin v. Löwis11437992002-04-12 09:54:03 +000016290ac_cv_member_struct_stat_st_rdev=no
16291fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016293fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016296echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16297echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16298if test $ac_cv_member_struct_stat_st_rdev = yes; then
16299
16300cat >>confdefs.h <<_ACEOF
16301#define HAVE_STRUCT_STAT_ST_RDEV 1
16302_ACEOF
16303
16304
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016305fi
16306
Martin v. Löwis11437992002-04-12 09:54:03 +000016307echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16308echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16309if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016311else
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016313/* confdefs.h. */
16314_ACEOF
16315cat confdefs.h >>conftest.$ac_ext
16316cat >>conftest.$ac_ext <<_ACEOF
16317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016318$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016319int
16320main ()
16321{
16322static struct stat ac_aggr;
16323if (ac_aggr.st_blksize)
16324return 0;
16325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext
16330if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016331 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016333 grep -v '^ *+' conftest.er1 >conftest.err
16334 rm -f conftest.er1
16335 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16337 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016338 { ac_try='test -z "$ac_c_werror_flag"
16339 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16341 (eval $ac_try) 2>&5
16342 ac_status=$?
16343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344 (exit $ac_status); }; } &&
16345 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16347 (eval $ac_try) 2>&5
16348 ac_status=$?
16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350 (exit $ac_status); }; }; then
16351 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016352else
Martin v. Löwis11437992002-04-12 09:54:03 +000016353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016354sed 's/^/| /' conftest.$ac_ext >&5
16355
16356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016357/* confdefs.h. */
16358_ACEOF
16359cat confdefs.h >>conftest.$ac_ext
16360cat >>conftest.$ac_ext <<_ACEOF
16361/* end confdefs.h. */
16362$ac_includes_default
16363int
16364main ()
16365{
16366static struct stat ac_aggr;
16367if (sizeof ac_aggr.st_blksize)
16368return 0;
16369 ;
16370 return 0;
16371}
16372_ACEOF
16373rm -f conftest.$ac_objext
16374if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016375 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016377 grep -v '^ *+' conftest.er1 >conftest.err
16378 rm -f conftest.er1
16379 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016382 { ac_try='test -z "$ac_c_werror_flag"
16383 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16385 (eval $ac_try) 2>&5
16386 ac_status=$?
16387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16388 (exit $ac_status); }; } &&
16389 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16391 (eval $ac_try) 2>&5
16392 ac_status=$?
16393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16394 (exit $ac_status); }; }; then
16395 ac_cv_member_struct_stat_st_blksize=yes
16396else
16397 echo "$as_me: failed program was:" >&5
16398sed 's/^/| /' conftest.$ac_ext >&5
16399
Martin v. Löwis11437992002-04-12 09:54:03 +000016400ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016401fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016403fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016406echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16407echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16408if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016409
Martin v. Löwis11437992002-04-12 09:54:03 +000016410cat >>confdefs.h <<_ACEOF
16411#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16412_ACEOF
16413
16414
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016415fi
16416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16418echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16419if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16420 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016421else
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016423/* confdefs.h. */
16424_ACEOF
16425cat confdefs.h >>conftest.$ac_ext
16426cat >>conftest.$ac_ext <<_ACEOF
16427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016428$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016429int
16430main ()
16431{
16432static struct stat ac_aggr;
16433if (ac_aggr.st_blocks)
16434return 0;
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439rm -f conftest.$ac_objext
16440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016443 grep -v '^ *+' conftest.er1 >conftest.err
16444 rm -f conftest.er1
16445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16447 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016448 { ac_try='test -z "$ac_c_werror_flag"
16449 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16451 (eval $ac_try) 2>&5
16452 ac_status=$?
16453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454 (exit $ac_status); }; } &&
16455 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16457 (eval $ac_try) 2>&5
16458 ac_status=$?
16459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16460 (exit $ac_status); }; }; then
16461 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016462else
Martin v. Löwis11437992002-04-12 09:54:03 +000016463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016464sed 's/^/| /' conftest.$ac_ext >&5
16465
16466cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016467/* confdefs.h. */
16468_ACEOF
16469cat confdefs.h >>conftest.$ac_ext
16470cat >>conftest.$ac_ext <<_ACEOF
16471/* end confdefs.h. */
16472$ac_includes_default
16473int
16474main ()
16475{
16476static struct stat ac_aggr;
16477if (sizeof ac_aggr.st_blocks)
16478return 0;
16479 ;
16480 return 0;
16481}
16482_ACEOF
16483rm -f conftest.$ac_objext
16484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016485 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016487 grep -v '^ *+' conftest.er1 >conftest.err
16488 rm -f conftest.er1
16489 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016492 { ac_try='test -z "$ac_c_werror_flag"
16493 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16495 (eval $ac_try) 2>&5
16496 ac_status=$?
16497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498 (exit $ac_status); }; } &&
16499 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16501 (eval $ac_try) 2>&5
16502 ac_status=$?
16503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504 (exit $ac_status); }; }; then
16505 ac_cv_member_struct_stat_st_blocks=yes
16506else
16507 echo "$as_me: failed program was:" >&5
16508sed 's/^/| /' conftest.$ac_ext >&5
16509
Martin v. Löwis11437992002-04-12 09:54:03 +000016510ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016511fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016516echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16517echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16518if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016519
Martin v. Löwis11437992002-04-12 09:54:03 +000016520cat >>confdefs.h <<_ACEOF
16521#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16522_ACEOF
16523
16524
16525cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016526#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016527_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016528
16529else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016530 case $LIBOBJS in
16531 "fileblocks.$ac_objext" | \
16532 *" fileblocks.$ac_objext" | \
16533 "fileblocks.$ac_objext "* | \
16534 *" fileblocks.$ac_objext "* ) ;;
16535 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16536esac
16537
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016538fi
16539
Michael W. Hudson54241132001-12-07 15:38:26 +000016540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541
16542echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16543echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16544if test "${ac_cv_header_time_altzone+set}" = set; then
16545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016546else
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016548/* confdefs.h. */
16549_ACEOF
16550cat confdefs.h >>conftest.$ac_ext
16551cat >>conftest.$ac_ext <<_ACEOF
16552/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016553#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016554int
16555main ()
16556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016557return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ;
16559 return 0;
16560}
16561_ACEOF
16562rm -f conftest.$ac_objext
16563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016564 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016566 grep -v '^ *+' conftest.er1 >conftest.err
16567 rm -f conftest.er1
16568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016571 { ac_try='test -z "$ac_c_werror_flag"
16572 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16574 (eval $ac_try) 2>&5
16575 ac_status=$?
16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16577 (exit $ac_status); }; } &&
16578 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16580 (eval $ac_try) 2>&5
16581 ac_status=$?
16582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16583 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016584 ac_cv_header_time_altzone=yes
16585else
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016590fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016591rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016592fi
16593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16595echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016596if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016597
16598cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016599#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016600_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016601
16602fi
16603
Guido van Rossumda88dad1995-01-26 00:46:29 +000016604was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016605echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16606echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016608/* confdefs.h. */
16609_ACEOF
16610cat confdefs.h >>conftest.$ac_ext
16611cat >>conftest.$ac_ext <<_ACEOF
16612/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016613
16614#include <sys/types.h>
16615#include <sys/select.h>
16616#include <sys/time.h>
16617
Martin v. Löwis11437992002-04-12 09:54:03 +000016618int
16619main ()
16620{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016621;
Martin v. Löwis11437992002-04-12 09:54:03 +000016622 ;
16623 return 0;
16624}
16625_ACEOF
16626rm -f conftest.$ac_objext
16627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016628 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016630 grep -v '^ *+' conftest.er1 >conftest.err
16631 rm -f conftest.er1
16632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16634 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016635 { ac_try='test -z "$ac_c_werror_flag"
16636 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16638 (eval $ac_try) 2>&5
16639 ac_status=$?
16640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641 (exit $ac_status); }; } &&
16642 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16644 (eval $ac_try) 2>&5
16645 ac_status=$?
16646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16647 (exit $ac_status); }; }; then
16648
16649
16650cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016651#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016652_ACEOF
16653
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016654 was_it_defined=yes
16655
Guido van Rossumf78abae1997-01-21 22:02:36 +000016656else
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016658sed 's/^/| /' conftest.$ac_ext >&5
16659
Guido van Rossum7f43da71994-08-01 12:15:30 +000016660fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016662echo "$as_me:$LINENO: result: $was_it_defined" >&5
16663echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016664
Martin v. Löwis11437992002-04-12 09:54:03 +000016665echo "$as_me:$LINENO: checking for addrinfo" >&5
16666echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16667if test "${ac_cv_struct_addrinfo+set}" = set; then
16668 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016669else
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016671/* confdefs.h. */
16672_ACEOF
16673cat confdefs.h >>conftest.$ac_ext
16674cat >>conftest.$ac_ext <<_ACEOF
16675/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016676
16677# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016678int
16679main ()
16680{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016681struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016682 ;
16683 return 0;
16684}
16685_ACEOF
16686rm -f conftest.$ac_objext
16687if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016688 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016690 grep -v '^ *+' conftest.er1 >conftest.err
16691 rm -f conftest.er1
16692 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16694 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016695 { ac_try='test -z "$ac_c_werror_flag"
16696 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16698 (eval $ac_try) 2>&5
16699 ac_status=$?
16700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16701 (exit $ac_status); }; } &&
16702 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16704 (eval $ac_try) 2>&5
16705 ac_status=$?
16706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16707 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016708 ac_cv_struct_addrinfo=yes
16709else
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016711sed 's/^/| /' conftest.$ac_ext >&5
16712
Martin v. Löwis11437992002-04-12 09:54:03 +000016713ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016714fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016715rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016716fi
16717
Martin v. Löwis11437992002-04-12 09:54:03 +000016718echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16719echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016720if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
16722cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016723#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016724_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016725
16726fi
16727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16729echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16730if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16731 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016732else
Martin v. Löwis11437992002-04-12 09:54:03 +000016733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016739
16740# include <sys/types.h>
16741# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016742int
16743main ()
16744{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016745struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ;
16747 return 0;
16748}
16749_ACEOF
16750rm -f conftest.$ac_objext
16751if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016752 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 grep -v '^ *+' conftest.er1 >conftest.err
16755 rm -f conftest.er1
16756 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16758 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016759 { ac_try='test -z "$ac_c_werror_flag"
16760 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16762 (eval $ac_try) 2>&5
16763 ac_status=$?
16764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16765 (exit $ac_status); }; } &&
16766 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16768 (eval $ac_try) 2>&5
16769 ac_status=$?
16770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016772 ac_cv_struct_sockaddr_storage=yes
16773else
Martin v. Löwis11437992002-04-12 09:54:03 +000016774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016775sed 's/^/| /' conftest.$ac_ext >&5
16776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016778fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016779rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016780fi
16781
Martin v. Löwis11437992002-04-12 09:54:03 +000016782echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16783echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016784if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016787#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016788_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016789
16790fi
16791
Guido van Rossum627b2d71993-12-24 10:39:16 +000016792# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016793
Michael W. Hudson54241132001-12-07 15:38:26 +000016794
Martin v. Löwis11437992002-04-12 09:54:03 +000016795echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16796echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16797if test "${ac_cv_c_char_unsigned+set}" = set; then
16798 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016799else
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016801/* confdefs.h. */
16802_ACEOF
16803cat confdefs.h >>conftest.$ac_ext
16804cat >>conftest.$ac_ext <<_ACEOF
16805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016806$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016807int
16808main ()
16809{
16810static int test_array [1 - 2 * !(((char) -1) < 0)];
16811test_array [0] = 0
16812
16813 ;
16814 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016815}
Martin v. Löwis11437992002-04-12 09:54:03 +000016816_ACEOF
16817rm -f conftest.$ac_objext
16818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016819 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016821 grep -v '^ *+' conftest.er1 >conftest.err
16822 rm -f conftest.er1
16823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16825 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016826 { ac_try='test -z "$ac_c_werror_flag"
16827 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16829 (eval $ac_try) 2>&5
16830 ac_status=$?
16831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); }; } &&
16833 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835 (eval $ac_try) 2>&5
16836 ac_status=$?
16837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016839 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016840else
16841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016842sed 's/^/| /' conftest.$ac_ext >&5
16843
Martin v. Löwis11437992002-04-12 09:54:03 +000016844ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016845fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016847fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016848echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16849echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016850if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016852#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016853_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854
16855fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016856
Martin v. Löwis11437992002-04-12 09:54:03 +000016857echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16858echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16859if test "${ac_cv_c_const+set}" = set; then
16860 echo $ECHO_N "(cached) $ECHO_C" >&6
16861else
16862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016863/* confdefs.h. */
16864_ACEOF
16865cat confdefs.h >>conftest.$ac_ext
16866cat >>conftest.$ac_ext <<_ACEOF
16867/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016868
Martin v. Löwis11437992002-04-12 09:54:03 +000016869int
16870main ()
16871{
16872/* FIXME: Include the comments suggested by Paul. */
16873#ifndef __cplusplus
16874 /* Ultrix mips cc rejects this. */
16875 typedef int charset[2];
16876 const charset x;
16877 /* SunOS 4.1.1 cc rejects this. */
16878 char const *const *ccp;
16879 char **p;
16880 /* NEC SVR4.0.2 mips cc rejects this. */
16881 struct point {int x, y;};
16882 static struct point const zero = {0,0};
16883 /* AIX XL C 1.02.0.0 rejects this.
16884 It does not let you subtract one const X* pointer from another in
16885 an arm of an if-expression whose if-part is not a constant
16886 expression */
16887 const char *g = "string";
16888 ccp = &g + (g ? g-g : 0);
16889 /* HPUX 7.0 cc rejects these. */
16890 ++ccp;
16891 p = (char**) ccp;
16892 ccp = (char const *const *) p;
16893 { /* SCO 3.2v4 cc rejects this. */
16894 char *t;
16895 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016896
Martin v. Löwis11437992002-04-12 09:54:03 +000016897 *t++ = 0;
16898 }
16899 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16900 int x[] = {25, 17};
16901 const int *foo = &x[0];
16902 ++foo;
16903 }
16904 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16905 typedef const int *iptr;
16906 iptr p = 0;
16907 ++p;
16908 }
16909 { /* AIX XL C 1.02.0.0 rejects this saying
16910 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16911 struct s { int j; const int *ap[3]; };
16912 struct s *b; b->j = 5;
16913 }
16914 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16915 const int foo = 10;
16916 }
16917#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016918
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 ;
16920 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016921}
Martin v. Löwis11437992002-04-12 09:54:03 +000016922_ACEOF
16923rm -f conftest.$ac_objext
16924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016925 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016927 grep -v '^ *+' conftest.er1 >conftest.err
16928 rm -f conftest.er1
16929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016932 { ac_try='test -z "$ac_c_werror_flag"
16933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16935 (eval $ac_try) 2>&5
16936 ac_status=$?
16937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16938 (exit $ac_status); }; } &&
16939 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16942 ac_status=$?
16943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16944 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016945 ac_cv_c_const=yes
16946else
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016948sed 's/^/| /' conftest.$ac_ext >&5
16949
Martin v. Löwis11437992002-04-12 09:54:03 +000016950ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016954echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16955echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016956if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016957
16958cat >>confdefs.h <<\_ACEOF
16959#define const
16960_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016961
16962fi
16963
Michael W. Hudson54241132001-12-07 15:38:26 +000016964
Guido van Rossumda88dad1995-01-26 00:46:29 +000016965works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016966echo "$as_me:$LINENO: checking for working volatile" >&5
16967echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016969/* confdefs.h. */
16970_ACEOF
16971cat confdefs.h >>conftest.$ac_ext
16972cat >>conftest.$ac_ext <<_ACEOF
16973/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016974
Martin v. Löwis11437992002-04-12 09:54:03 +000016975int
16976main ()
16977{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016978volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 ;
16980 return 0;
16981}
16982_ACEOF
16983rm -f conftest.$ac_objext
16984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016987 grep -v '^ *+' conftest.er1 >conftest.err
16988 rm -f conftest.er1
16989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16991 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016992 { ac_try='test -z "$ac_c_werror_flag"
16993 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16995 (eval $ac_try) 2>&5
16996 ac_status=$?
16997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16998 (exit $ac_status); }; } &&
16999 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17001 (eval $ac_try) 2>&5
17002 ac_status=$?
17003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017005 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017006else
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017008sed 's/^/| /' conftest.$ac_ext >&5
17009
Martin v. Löwis11437992002-04-12 09:54:03 +000017010
17011cat >>confdefs.h <<\_ACEOF
17012#define volatile
17013_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017014
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017015
Guido van Rossum627b2d71993-12-24 10:39:16 +000017016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017018echo "$as_me:$LINENO: result: $works" >&5
17019echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017020
Guido van Rossumda88dad1995-01-26 00:46:29 +000017021works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017022echo "$as_me:$LINENO: checking for working signed char" >&5
17023echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017025/* confdefs.h. */
17026_ACEOF
17027cat confdefs.h >>conftest.$ac_ext
17028cat >>conftest.$ac_ext <<_ACEOF
17029/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017030
Martin v. Löwis11437992002-04-12 09:54:03 +000017031int
17032main ()
17033{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017034signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 ;
17036 return 0;
17037}
17038_ACEOF
17039rm -f conftest.$ac_objext
17040if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017041 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017043 grep -v '^ *+' conftest.er1 >conftest.err
17044 rm -f conftest.er1
17045 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17047 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017048 { ac_try='test -z "$ac_c_werror_flag"
17049 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17051 (eval $ac_try) 2>&5
17052 ac_status=$?
17053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17054 (exit $ac_status); }; } &&
17055 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17057 (eval $ac_try) 2>&5
17058 ac_status=$?
17059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17060 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017061 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017062else
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017064sed 's/^/| /' conftest.$ac_ext >&5
17065
Martin v. Löwis11437992002-04-12 09:54:03 +000017066
17067cat >>confdefs.h <<\_ACEOF
17068#define signed
17069_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017070
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017071
Guido van Rossum7f43da71994-08-01 12:15:30 +000017072fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017073rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017074echo "$as_me:$LINENO: result: $works" >&5
17075echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017076
Guido van Rossumda88dad1995-01-26 00:46:29 +000017077have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017078echo "$as_me:$LINENO: checking for prototypes" >&5
17079echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017086int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017087int
17088main ()
17089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017090return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 ;
17092 return 0;
17093}
17094_ACEOF
17095rm -f conftest.$ac_objext
17096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017104 { ac_try='test -z "$ac_c_werror_flag"
17105 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17107 (eval $ac_try) 2>&5
17108 ac_status=$?
17109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110 (exit $ac_status); }; } &&
17111 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17114 ac_status=$?
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116 (exit $ac_status); }; }; then
17117
17118
17119cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017120#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017121_ACEOF
17122
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017123 have_prototypes=yes
17124
Guido van Rossumf78abae1997-01-21 22:02:36 +000017125else
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017127sed 's/^/| /' conftest.$ac_ext >&5
17128
Guido van Rossum7f43da71994-08-01 12:15:30 +000017129fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017131echo "$as_me:$LINENO: result: $have_prototypes" >&5
17132echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017133
Guido van Rossumda88dad1995-01-26 00:46:29 +000017134works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017135echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17136echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017143
17144#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017145int foo(int x, ...) {
17146 va_list va;
17147 va_start(va, x);
17148 va_arg(va, int);
17149 va_arg(va, char *);
17150 va_arg(va, double);
17151 return 0;
17152}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017153
Martin v. Löwis11437992002-04-12 09:54:03 +000017154int
17155main ()
17156{
Guido van Rossum90eea071996-08-30 20:58:57 +000017157return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 ;
17159 return 0;
17160}
17161_ACEOF
17162rm -f conftest.$ac_objext
17163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017164 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017166 grep -v '^ *+' conftest.er1 >conftest.err
17167 rm -f conftest.er1
17168 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017171 { ac_try='test -z "$ac_c_werror_flag"
17172 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17174 (eval $ac_try) 2>&5
17175 ac_status=$?
17176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17177 (exit $ac_status); }; } &&
17178 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17180 (eval $ac_try) 2>&5
17181 ac_status=$?
17182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17183 (exit $ac_status); }; }; then
17184
17185
17186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017187#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017188_ACEOF
17189
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017190 works=yes
17191
Guido van Rossumf78abae1997-01-21 22:02:36 +000017192else
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017194sed 's/^/| /' conftest.$ac_ext >&5
17195
Guido van Rossum627b2d71993-12-24 10:39:16 +000017196fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017197rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017198echo "$as_me:$LINENO: result: $works" >&5
17199echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017200
Martin v. Löwisd6320502004-08-12 13:45:08 +000017201# check for socketpair
17202echo "$as_me:$LINENO: checking for socketpair" >&5
17203echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17204cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017205/* confdefs.h. */
17206_ACEOF
17207cat confdefs.h >>conftest.$ac_ext
17208cat >>conftest.$ac_ext <<_ACEOF
17209/* end confdefs.h. */
17210
17211#include <sys/types.h>
17212#include <sys/socket.h>
17213
17214int
17215main ()
17216{
17217void *x=socketpair
17218 ;
17219 return 0;
17220}
17221_ACEOF
17222rm -f conftest.$ac_objext
17223if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017224 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017226 grep -v '^ *+' conftest.er1 >conftest.err
17227 rm -f conftest.er1
17228 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017231 { ac_try='test -z "$ac_c_werror_flag"
17232 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17234 (eval $ac_try) 2>&5
17235 ac_status=$?
17236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17237 (exit $ac_status); }; } &&
17238 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17240 (eval $ac_try) 2>&5
17241 ac_status=$?
17242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17243 (exit $ac_status); }; }; then
17244
17245cat >>confdefs.h <<\_ACEOF
17246#define HAVE_SOCKETPAIR 1
17247_ACEOF
17248
17249 echo "$as_me:$LINENO: result: yes" >&5
17250echo "${ECHO_T}yes" >&6
17251else
17252 echo "$as_me: failed program was:" >&5
17253sed 's/^/| /' conftest.$ac_ext >&5
17254
17255echo "$as_me:$LINENO: result: no" >&5
17256echo "${ECHO_T}no" >&6
17257
17258fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017260
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017261# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017262echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17263echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17264cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017270#include <sys/types.h>
17271#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017272int
17273main ()
17274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017275struct sockaddr x;
17276x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 ;
17278 return 0;
17279}
17280_ACEOF
17281rm -f conftest.$ac_objext
17282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017283 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017285 grep -v '^ *+' conftest.er1 >conftest.err
17286 rm -f conftest.er1
17287 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017290 { ac_try='test -z "$ac_c_werror_flag"
17291 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17293 (eval $ac_try) 2>&5
17294 ac_status=$?
17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296 (exit $ac_status); }; } &&
17297 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17299 (eval $ac_try) 2>&5
17300 ac_status=$?
17301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17302 (exit $ac_status); }; }; then
17303 echo "$as_me:$LINENO: result: yes" >&5
17304echo "${ECHO_T}yes" >&6
17305
17306cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017307#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017308_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017309
17310else
Martin v. Löwis11437992002-04-12 09:54:03 +000017311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017312sed 's/^/| /' conftest.$ac_ext >&5
17313
Martin v. Löwis11437992002-04-12 09:54:03 +000017314echo "$as_me:$LINENO: result: no" >&5
17315echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017316fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017318
Guido van Rossumda88dad1995-01-26 00:46:29 +000017319va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017320echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17321echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017323/* confdefs.h. */
17324_ACEOF
17325cat confdefs.h >>conftest.$ac_ext
17326cat >>conftest.$ac_ext <<_ACEOF
17327/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017328
17329#ifdef HAVE_STDARG_PROTOTYPES
17330#include <stdarg.h>
17331#else
17332#include <varargs.h>
17333#endif
17334
Martin v. Löwis11437992002-04-12 09:54:03 +000017335int
17336main ()
17337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017338va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 ;
17340 return 0;
17341}
17342_ACEOF
17343rm -f conftest.$ac_objext
17344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017345 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017347 grep -v '^ *+' conftest.er1 >conftest.err
17348 rm -f conftest.er1
17349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017352 { ac_try='test -z "$ac_c_werror_flag"
17353 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17355 (eval $ac_try) 2>&5
17356 ac_status=$?
17357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358 (exit $ac_status); }; } &&
17359 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17361 (eval $ac_try) 2>&5
17362 ac_status=$?
17363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17364 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017365 :
17366else
Martin v. Löwis11437992002-04-12 09:54:03 +000017367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017368sed 's/^/| /' conftest.$ac_ext >&5
17369
Martin v. Löwis11437992002-04-12 09:54:03 +000017370
17371
17372cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017373#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017374_ACEOF
17375
Guido van Rossumda88dad1995-01-26 00:46:29 +000017376 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017378fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017379rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017380echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17381echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017383# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017384
17385
17386
17387echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17388echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17389if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17390 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017391else
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017393/* confdefs.h. */
17394_ACEOF
17395cat confdefs.h >>conftest.$ac_ext
17396cat >>conftest.$ac_ext <<_ACEOF
17397/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017398/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017399 which can conflict with char gethostbyname_r (); below.
17400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017401 <limits.h> exists even on freestanding compilers. Under hpux,
17402 including <limits.h> includes <sys/time.h> and causes problems
17403 checking for functions defined therein. */
17404#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017405# include <limits.h>
17406#else
17407# include <assert.h>
17408#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017409/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017410#ifdef __cplusplus
17411extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017412{
Martin v. Löwis11437992002-04-12 09:54:03 +000017413#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017414/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 builtin and then its argument prototype would still apply. */
17416char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017417/* The GNU C library defines this for functions which it implements
17418 to always fail with ENOSYS. Some functions are actually named
17419 something starting with __ and the normal name is an alias. */
17420#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17421choke me
17422#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017423char (*f) () = gethostbyname_r;
17424#endif
17425#ifdef __cplusplus
17426}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017427#endif
17428
Skip Montanaro6dead952003-09-25 14:50:04 +000017429int
17430main ()
17431{
17432return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ;
17434 return 0;
17435}
17436_ACEOF
17437rm -f conftest.$ac_objext conftest$ac_exeext
17438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017439 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017441 grep -v '^ *+' conftest.er1 >conftest.err
17442 rm -f conftest.er1
17443 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17445 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017446 { ac_try='test -z "$ac_c_werror_flag"
17447 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17449 (eval $ac_try) 2>&5
17450 ac_status=$?
17451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17452 (exit $ac_status); }; } &&
17453 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17455 (eval $ac_try) 2>&5
17456 ac_status=$?
17457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17458 (exit $ac_status); }; }; then
17459 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017460else
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017462sed 's/^/| /' conftest.$ac_ext >&5
17463
Martin v. Löwis11437992002-04-12 09:54:03 +000017464ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017465fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017466rm -f conftest.err conftest.$ac_objext \
17467 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017469echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17470echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17471if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017472
Martin v. Löwis11437992002-04-12 09:54:03 +000017473 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017474#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017475_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17478echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017479 OLD_CFLAGS=$CFLAGS
17480 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017482/* confdefs.h. */
17483_ACEOF
17484cat confdefs.h >>conftest.$ac_ext
17485cat >>conftest.$ac_ext <<_ACEOF
17486/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017487
17488# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017489
Martin v. Löwis11437992002-04-12 09:54:03 +000017490int
17491main ()
17492{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017493
17494 char *name;
17495 struct hostent *he, *res;
17496 char buffer[2048];
17497 int buflen = 2048;
17498 int h_errnop;
17499
17500 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
17502 ;
17503 return 0;
17504}
17505_ACEOF
17506rm -f conftest.$ac_objext
17507if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017508 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017510 grep -v '^ *+' conftest.er1 >conftest.err
17511 rm -f conftest.er1
17512 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17514 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017515 { ac_try='test -z "$ac_c_werror_flag"
17516 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17518 (eval $ac_try) 2>&5
17519 ac_status=$?
17520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521 (exit $ac_status); }; } &&
17522 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17524 (eval $ac_try) 2>&5
17525 ac_status=$?
17526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17527 (exit $ac_status); }; }; then
17528
17529 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017530#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017531_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017532
Martin v. Löwis11437992002-04-12 09:54:03 +000017533
17534cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017535#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017536_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017537
Martin v. Löwis11437992002-04-12 09:54:03 +000017538 echo "$as_me:$LINENO: result: yes" >&5
17539echo "${ECHO_T}yes" >&6
17540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017541else
Martin v. Löwis11437992002-04-12 09:54:03 +000017542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017543sed 's/^/| /' conftest.$ac_ext >&5
17544
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
17546 echo "$as_me:$LINENO: result: no" >&5
17547echo "${ECHO_T}no" >&6
17548 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17549echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017551/* confdefs.h. */
17552_ACEOF
17553cat confdefs.h >>conftest.$ac_ext
17554cat >>conftest.$ac_ext <<_ACEOF
17555/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017556
17557# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017558
Martin v. Löwis11437992002-04-12 09:54:03 +000017559int
17560main ()
17561{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017562
17563 char *name;
17564 struct hostent *he;
17565 char buffer[2048];
17566 int buflen = 2048;
17567 int h_errnop;
17568
17569 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017570
17571 ;
17572 return 0;
17573}
17574_ACEOF
17575rm -f conftest.$ac_objext
17576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017577 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017579 grep -v '^ *+' conftest.er1 >conftest.err
17580 rm -f conftest.er1
17581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017584 { ac_try='test -z "$ac_c_werror_flag"
17585 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587 (eval $ac_try) 2>&5
17588 ac_status=$?
17589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590 (exit $ac_status); }; } &&
17591 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17593 (eval $ac_try) 2>&5
17594 ac_status=$?
17595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17596 (exit $ac_status); }; }; then
17597
17598 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017599#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017600_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017601
Martin v. Löwis11437992002-04-12 09:54:03 +000017602
17603cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017604#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017605_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 echo "$as_me:$LINENO: result: yes" >&5
17608echo "${ECHO_T}yes" >&6
17609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017610else
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017612sed 's/^/| /' conftest.$ac_ext >&5
17613
Martin v. Löwis11437992002-04-12 09:54:03 +000017614
17615 echo "$as_me:$LINENO: result: no" >&5
17616echo "${ECHO_T}no" >&6
17617 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17618echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017620/* confdefs.h. */
17621_ACEOF
17622cat confdefs.h >>conftest.$ac_ext
17623cat >>conftest.$ac_ext <<_ACEOF
17624/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017625
17626# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
Martin v. Löwis11437992002-04-12 09:54:03 +000017628int
17629main ()
17630{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017631
17632 char *name;
17633 struct hostent *he;
17634 struct hostent_data data;
17635
17636 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017637
17638 ;
17639 return 0;
17640}
17641_ACEOF
17642rm -f conftest.$ac_objext
17643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017644 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017646 grep -v '^ *+' conftest.er1 >conftest.err
17647 rm -f conftest.er1
17648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017651 { ac_try='test -z "$ac_c_werror_flag"
17652 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17654 (eval $ac_try) 2>&5
17655 ac_status=$?
17656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657 (exit $ac_status); }; } &&
17658 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17660 (eval $ac_try) 2>&5
17661 ac_status=$?
17662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17663 (exit $ac_status); }; }; then
17664
17665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017666#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017667_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017668
Martin v. Löwis11437992002-04-12 09:54:03 +000017669
17670cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017671#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017673
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 echo "$as_me:$LINENO: result: yes" >&5
17675echo "${ECHO_T}yes" >&6
17676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017677else
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017679sed 's/^/| /' conftest.$ac_ext >&5
17680
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
17682 echo "$as_me:$LINENO: result: no" >&5
17683echo "${ECHO_T}no" >&6
17684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017685fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017687
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017688fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017689rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017691fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017693 CFLAGS=$OLD_CFLAGS
17694
17695else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697
17698for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017699do
Martin v. Löwis11437992002-04-12 09:54:03 +000017700as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17701echo "$as_me:$LINENO: checking for $ac_func" >&5
17702echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17703if eval "test \"\${$as_ac_var+set}\" = set"; then
17704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017705else
Martin v. Löwis11437992002-04-12 09:54:03 +000017706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017707/* confdefs.h. */
17708_ACEOF
17709cat confdefs.h >>conftest.$ac_ext
17710cat >>conftest.$ac_ext <<_ACEOF
17711/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017712/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017713 which can conflict with char $ac_func (); below.
17714 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017715 <limits.h> exists even on freestanding compilers. Under hpux,
17716 including <limits.h> includes <sys/time.h> and causes problems
17717 checking for functions defined therein. */
17718#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017719# include <limits.h>
17720#else
17721# include <assert.h>
17722#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017723/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017724#ifdef __cplusplus
17725extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017726{
Martin v. Löwis11437992002-04-12 09:54:03 +000017727#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017728/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 builtin and then its argument prototype would still apply. */
17730char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017731/* The GNU C library defines this for functions which it implements
17732 to always fail with ENOSYS. Some functions are actually named
17733 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017734#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017735choke me
17736#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017737char (*f) () = $ac_func;
17738#endif
17739#ifdef __cplusplus
17740}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017741#endif
17742
Skip Montanaro6dead952003-09-25 14:50:04 +000017743int
17744main ()
17745{
17746return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 ;
17748 return 0;
17749}
17750_ACEOF
17751rm -f conftest.$ac_objext conftest$ac_exeext
17752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017753 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017755 grep -v '^ *+' conftest.er1 >conftest.err
17756 rm -f conftest.er1
17757 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17759 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017760 { ac_try='test -z "$ac_c_werror_flag"
17761 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17763 (eval $ac_try) 2>&5
17764 ac_status=$?
17765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17766 (exit $ac_status); }; } &&
17767 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17769 (eval $ac_try) 2>&5
17770 ac_status=$?
17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17772 (exit $ac_status); }; }; then
17773 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017774else
Martin v. Löwis11437992002-04-12 09:54:03 +000017775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017776sed 's/^/| /' conftest.$ac_ext >&5
17777
Martin v. Löwis11437992002-04-12 09:54:03 +000017778eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017779fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017780rm -f conftest.err conftest.$ac_objext \
17781 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017783echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17784echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17785if test `eval echo '${'$as_ac_var'}'` = yes; then
17786 cat >>confdefs.h <<_ACEOF
17787#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17788_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017789
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017790fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017791done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017792
Michael W. Hudson54241132001-12-07 15:38:26 +000017793
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017794fi
17795
Michael W. Hudson54241132001-12-07 15:38:26 +000017796
17797
17798
17799
17800
17801
Guido van Rossum627b2d71993-12-24 10:39:16 +000017802# checks for system services
17803# (none yet)
17804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017805# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017806echo "$as_me:$LINENO: checking for __fpu_control" >&5
17807echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17808if test "${ac_cv_func___fpu_control+set}" = set; then
17809 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017810else
Martin v. Löwis11437992002-04-12 09:54:03 +000017811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017812/* confdefs.h. */
17813_ACEOF
17814cat confdefs.h >>conftest.$ac_ext
17815cat >>conftest.$ac_ext <<_ACEOF
17816/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017817/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017818 which can conflict with char __fpu_control (); below.
17819 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017820 <limits.h> exists even on freestanding compilers. Under hpux,
17821 including <limits.h> includes <sys/time.h> and causes problems
17822 checking for functions defined therein. */
17823#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017824# include <limits.h>
17825#else
17826# include <assert.h>
17827#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017828/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017829#ifdef __cplusplus
17830extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017831{
Martin v. Löwis11437992002-04-12 09:54:03 +000017832#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017834 builtin and then its argument prototype would still apply. */
17835char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017836/* The GNU C library defines this for functions which it implements
17837 to always fail with ENOSYS. Some functions are actually named
17838 something starting with __ and the normal name is an alias. */
17839#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17840choke me
17841#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017842char (*f) () = __fpu_control;
17843#endif
17844#ifdef __cplusplus
17845}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017846#endif
17847
Skip Montanaro6dead952003-09-25 14:50:04 +000017848int
17849main ()
17850{
17851return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 ;
17853 return 0;
17854}
17855_ACEOF
17856rm -f conftest.$ac_objext conftest$ac_exeext
17857if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017858 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017860 grep -v '^ *+' conftest.er1 >conftest.err
17861 rm -f conftest.er1
17862 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17864 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017865 { ac_try='test -z "$ac_c_werror_flag"
17866 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17868 (eval $ac_try) 2>&5
17869 ac_status=$?
17870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17871 (exit $ac_status); }; } &&
17872 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17874 (eval $ac_try) 2>&5
17875 ac_status=$?
17876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17877 (exit $ac_status); }; }; then
17878 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017879else
Martin v. Löwis11437992002-04-12 09:54:03 +000017880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017881sed 's/^/| /' conftest.$ac_ext >&5
17882
Martin v. Löwis11437992002-04-12 09:54:03 +000017883ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017884fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017885rm -f conftest.err conftest.$ac_objext \
17886 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017887fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017888echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
17889echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
17890if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017891 :
17892else
Martin v. Löwis11437992002-04-12 09:54:03 +000017893
17894echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
17895echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
17896if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
17897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017898else
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017900LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017901cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017902/* confdefs.h. */
17903_ACEOF
17904cat confdefs.h >>conftest.$ac_ext
17905cat >>conftest.$ac_ext <<_ACEOF
17906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017908/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017909#ifdef __cplusplus
17910extern "C"
17911#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017912/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 builtin and then its argument prototype would still apply. */
17914char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017915int
17916main ()
17917{
17918__fpu_control ();
17919 ;
17920 return 0;
17921}
17922_ACEOF
17923rm -f conftest.$ac_objext conftest$ac_exeext
17924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017925 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 grep -v '^ *+' conftest.er1 >conftest.err
17928 rm -f conftest.er1
17929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17931 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017932 { ac_try='test -z "$ac_c_werror_flag"
17933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17935 (eval $ac_try) 2>&5
17936 ac_status=$?
17937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17938 (exit $ac_status); }; } &&
17939 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17941 (eval $ac_try) 2>&5
17942 ac_status=$?
17943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17944 (exit $ac_status); }; }; then
17945 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017946else
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017948sed 's/^/| /' conftest.$ac_ext >&5
17949
Martin v. Löwis11437992002-04-12 09:54:03 +000017950ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017952rm -f conftest.err conftest.$ac_objext \
17953 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017954LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017955fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017956echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17957echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17958if test $ac_cv_lib_ieee___fpu_control = yes; then
17959 cat >>confdefs.h <<_ACEOF
17960#define HAVE_LIBIEEE 1
17961_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017963 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017964
Guido van Rossum627b2d71993-12-24 10:39:16 +000017965fi
17966
Michael W. Hudson54241132001-12-07 15:38:26 +000017967
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017968fi
17969
Michael W. Hudson54241132001-12-07 15:38:26 +000017970
Guido van Rossum7f253911997-05-09 02:42:48 +000017971# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017972echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17973echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17974
Guido van Rossum7f253911997-05-09 02:42:48 +000017975# Check whether --with-fpectl or --without-fpectl was given.
17976if test "${with_fpectl+set}" = set; then
17977 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017978
Guido van Rossum7f253911997-05-09 02:42:48 +000017979if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017980then
17981
17982cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017983#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017984_ACEOF
17985
17986 echo "$as_me:$LINENO: result: yes" >&5
17987echo "${ECHO_T}yes" >&6
17988else echo "$as_me:$LINENO: result: no" >&5
17989echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017990fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017991else
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 echo "$as_me:$LINENO: result: no" >&5
17993echo "${ECHO_T}no" >&6
17994fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017995
Guido van Rossum7f43da71994-08-01 12:15:30 +000017996# check for --with-libm=...
17997
Guido van Rossum563e7081996-09-10 18:20:48 +000017998case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017999Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018000BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018001*) LIBM=-lm
18002esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018003echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18004echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018006# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018007if test "${with_libm+set}" = set; then
18008 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018009
Guido van Rossum7f253911997-05-09 02:42:48 +000018010if test "$withval" = no
18011then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18013echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018014elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018015then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18017echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18018else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18019echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18020 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018021fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018022else
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18024echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18025fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018026
18027# check for --with-libc=...
18028
Martin v. Löwis11437992002-04-12 09:54:03 +000018029echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18030echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018032# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018033if test "${with_libc+set}" = set; then
18034 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018035
Guido van Rossum7f253911997-05-09 02:42:48 +000018036if test "$withval" = no
18037then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18039echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018040elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018041then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18043echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18044else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18045echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18046 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018047fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018048else
Martin v. Löwis11437992002-04-12 09:54:03 +000018049 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18050echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18051fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018052
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018053# check for hypot() in math library
18054LIBS_SAVE=$LIBS
18055LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018056
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018057for ac_func in hypot
18058do
Martin v. Löwis11437992002-04-12 09:54:03 +000018059as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18060echo "$as_me:$LINENO: checking for $ac_func" >&5
18061echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18062if eval "test \"\${$as_ac_var+set}\" = set"; then
18063 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018064else
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018066/* confdefs.h. */
18067_ACEOF
18068cat confdefs.h >>conftest.$ac_ext
18069cat >>conftest.$ac_ext <<_ACEOF
18070/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018071/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018072 which can conflict with char $ac_func (); below.
18073 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018074 <limits.h> exists even on freestanding compilers. Under hpux,
18075 including <limits.h> includes <sys/time.h> and causes problems
18076 checking for functions defined therein. */
18077#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018078# include <limits.h>
18079#else
18080# include <assert.h>
18081#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018082/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018083#ifdef __cplusplus
18084extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018085{
Martin v. Löwis11437992002-04-12 09:54:03 +000018086#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018087/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 builtin and then its argument prototype would still apply. */
18089char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018090/* The GNU C library defines this for functions which it implements
18091 to always fail with ENOSYS. Some functions are actually named
18092 something starting with __ and the normal name is an alias. */
18093#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18094choke me
18095#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018096char (*f) () = $ac_func;
18097#endif
18098#ifdef __cplusplus
18099}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018100#endif
18101
Skip Montanaro6dead952003-09-25 14:50:04 +000018102int
18103main ()
18104{
18105return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 ;
18107 return 0;
18108}
18109_ACEOF
18110rm -f conftest.$ac_objext conftest$ac_exeext
18111if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018112 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114 grep -v '^ *+' conftest.er1 >conftest.err
18115 rm -f conftest.er1
18116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18118 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018119 { ac_try='test -z "$ac_c_werror_flag"
18120 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18122 (eval $ac_try) 2>&5
18123 ac_status=$?
18124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18125 (exit $ac_status); }; } &&
18126 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18128 (eval $ac_try) 2>&5
18129 ac_status=$?
18130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131 (exit $ac_status); }; }; then
18132 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018133else
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018135sed 's/^/| /' conftest.$ac_ext >&5
18136
Martin v. Löwis11437992002-04-12 09:54:03 +000018137eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018138fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018139rm -f conftest.err conftest.$ac_objext \
18140 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018141fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018142echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18143echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18144if test `eval echo '${'$as_ac_var'}'` = yes; then
18145 cat >>confdefs.h <<_ACEOF
18146#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18147_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018148
Michael W. Hudson54241132001-12-07 15:38:26 +000018149else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018150 case $LIBOBJS in
18151 "$ac_func.$ac_objext" | \
18152 *" $ac_func.$ac_objext" | \
18153 "$ac_func.$ac_objext "* | \
18154 *" $ac_func.$ac_objext "* ) ;;
18155 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18156esac
18157
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018158fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018159done
18160
Michael W. Hudson54241132001-12-07 15:38:26 +000018161
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018162LIBS=$LIBS_SAVE
18163
Guido van Rossumef2255b2000-03-10 22:30:29 +000018164# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018165if test "${ac_cv_header_wchar_h+set}" = set; then
18166 echo "$as_me:$LINENO: checking for wchar.h" >&5
18167echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18168if test "${ac_cv_header_wchar_h+set}" = set; then
18169 echo $ECHO_N "(cached) $ECHO_C" >&6
18170fi
18171echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18172echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018173else
Martin v. Löwis11437992002-04-12 09:54:03 +000018174 # Is the header compilable?
18175echo "$as_me:$LINENO: checking wchar.h usability" >&5
18176echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018183$ac_includes_default
18184#include <wchar.h>
18185_ACEOF
18186rm -f conftest.$ac_objext
18187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018188 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018190 grep -v '^ *+' conftest.er1 >conftest.err
18191 rm -f conftest.er1
18192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18194 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018195 { ac_try='test -z "$ac_c_werror_flag"
18196 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18198 (eval $ac_try) 2>&5
18199 ac_status=$?
18200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18201 (exit $ac_status); }; } &&
18202 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18204 (eval $ac_try) 2>&5
18205 ac_status=$?
18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18207 (exit $ac_status); }; }; then
18208 ac_header_compiler=yes
18209else
18210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018211sed 's/^/| /' conftest.$ac_ext >&5
18212
Martin v. Löwis11437992002-04-12 09:54:03 +000018213ac_header_compiler=no
18214fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018216echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18217echo "${ECHO_T}$ac_header_compiler" >&6
18218
18219# Is the header present?
18220echo "$as_me:$LINENO: checking wchar.h presence" >&5
18221echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018223/* confdefs.h. */
18224_ACEOF
18225cat confdefs.h >>conftest.$ac_ext
18226cat >>conftest.$ac_ext <<_ACEOF
18227/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018228#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018229_ACEOF
18230if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18231 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18232 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018233 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018234 rm -f conftest.er1
18235 cat conftest.err >&5
18236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237 (exit $ac_status); } >/dev/null; then
18238 if test -s conftest.err; then
18239 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018240 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018241 else
18242 ac_cpp_err=
18243 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018244else
Martin v. Löwis11437992002-04-12 09:54:03 +000018245 ac_cpp_err=yes
18246fi
18247if test -z "$ac_cpp_err"; then
18248 ac_header_preproc=yes
18249else
18250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018251sed 's/^/| /' conftest.$ac_ext >&5
18252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018254fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018255rm -f conftest.err conftest.$ac_ext
18256echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18257echo "${ECHO_T}$ac_header_preproc" >&6
18258
18259# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18261 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18263echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018264 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18265echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18266 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018267 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018269 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18270echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018271 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18272echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18273 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18274echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18275 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18276echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018277 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18278echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018279 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18280echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018281 (
18282 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018283## ------------------------------------------------ ##
18284## Report this to http://www.python.org/python-bugs ##
18285## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018286_ASBOX
18287 ) |
18288 sed "s/^/$as_me: WARNING: /" >&2
18289 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018290esac
18291echo "$as_me:$LINENO: checking for wchar.h" >&5
18292echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18293if test "${ac_cv_header_wchar_h+set}" = set; then
18294 echo $ECHO_N "(cached) $ECHO_C" >&6
18295else
18296 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018298echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18299echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18300
18301fi
18302if test $ac_cv_header_wchar_h = yes; then
18303
18304
18305cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018306#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018307_ACEOF
18308
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018309 wchar_h="yes"
18310
Guido van Rossumef2255b2000-03-10 22:30:29 +000018311else
Martin v. Löwis11437992002-04-12 09:54:03 +000018312 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018313
18314fi
18315
Michael W. Hudson54241132001-12-07 15:38:26 +000018316
Martin v. Löwis11437992002-04-12 09:54:03 +000018317
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018318# determine wchar_t size
18319if test "$wchar_h" = yes
18320then
Martin v. Löwis11437992002-04-12 09:54:03 +000018321 echo "$as_me:$LINENO: checking for wchar_t" >&5
18322echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18323if test "${ac_cv_type_wchar_t+set}" = set; then
18324 echo $ECHO_N "(cached) $ECHO_C" >&6
18325else
18326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018327/* confdefs.h. */
18328_ACEOF
18329cat confdefs.h >>conftest.$ac_ext
18330cat >>conftest.$ac_ext <<_ACEOF
18331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018332#include <wchar.h>
18333
Martin v. Löwis11437992002-04-12 09:54:03 +000018334int
18335main ()
18336{
18337if ((wchar_t *) 0)
18338 return 0;
18339if (sizeof (wchar_t))
18340 return 0;
18341 ;
18342 return 0;
18343}
18344_ACEOF
18345rm -f conftest.$ac_objext
18346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018347 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018349 grep -v '^ *+' conftest.er1 >conftest.err
18350 rm -f conftest.er1
18351 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18353 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018354 { ac_try='test -z "$ac_c_werror_flag"
18355 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18357 (eval $ac_try) 2>&5
18358 ac_status=$?
18359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18360 (exit $ac_status); }; } &&
18361 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18363 (eval $ac_try) 2>&5
18364 ac_status=$?
18365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18366 (exit $ac_status); }; }; then
18367 ac_cv_type_wchar_t=yes
18368else
18369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018370sed 's/^/| /' conftest.$ac_ext >&5
18371
Martin v. Löwis11437992002-04-12 09:54:03 +000018372ac_cv_type_wchar_t=no
18373fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018375fi
18376echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18377echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18378
18379echo "$as_me:$LINENO: checking size of wchar_t" >&5
18380echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18381if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18382 echo $ECHO_N "(cached) $ECHO_C" >&6
18383else
18384 if test "$ac_cv_type_wchar_t" = yes; then
18385 # The cast to unsigned long works around a bug in the HP C Compiler
18386 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18387 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18388 # This bug is HP SR number 8606223364.
18389 if test "$cross_compiling" = yes; then
18390 # Depending upon the size, compute the lo and hi bounds.
18391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018392/* confdefs.h. */
18393_ACEOF
18394cat confdefs.h >>conftest.$ac_ext
18395cat >>conftest.$ac_ext <<_ACEOF
18396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018397#include <wchar.h>
18398
Martin v. Löwis11437992002-04-12 09:54:03 +000018399int
18400main ()
18401{
18402static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18403test_array [0] = 0
18404
18405 ;
18406 return 0;
18407}
18408_ACEOF
18409rm -f conftest.$ac_objext
18410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018413 grep -v '^ *+' conftest.er1 >conftest.err
18414 rm -f conftest.er1
18415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18417 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018418 { ac_try='test -z "$ac_c_werror_flag"
18419 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18421 (eval $ac_try) 2>&5
18422 ac_status=$?
18423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18424 (exit $ac_status); }; } &&
18425 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18427 (eval $ac_try) 2>&5
18428 ac_status=$?
18429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18430 (exit $ac_status); }; }; then
18431 ac_lo=0 ac_mid=0
18432 while :; do
18433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018434/* confdefs.h. */
18435_ACEOF
18436cat confdefs.h >>conftest.$ac_ext
18437cat >>conftest.$ac_ext <<_ACEOF
18438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018439#include <wchar.h>
18440
Martin v. Löwis11437992002-04-12 09:54:03 +000018441int
18442main ()
18443{
18444static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18445test_array [0] = 0
18446
18447 ;
18448 return 0;
18449}
18450_ACEOF
18451rm -f conftest.$ac_objext
18452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018453 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018455 grep -v '^ *+' conftest.er1 >conftest.err
18456 rm -f conftest.er1
18457 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18459 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018460 { ac_try='test -z "$ac_c_werror_flag"
18461 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18463 (eval $ac_try) 2>&5
18464 ac_status=$?
18465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18466 (exit $ac_status); }; } &&
18467 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18469 (eval $ac_try) 2>&5
18470 ac_status=$?
18471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18472 (exit $ac_status); }; }; then
18473 ac_hi=$ac_mid; break
18474else
18475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018476sed 's/^/| /' conftest.$ac_ext >&5
18477
Martin v. Löwis11437992002-04-12 09:54:03 +000018478ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018479 if test $ac_lo -le $ac_mid; then
18480 ac_lo= ac_hi=
18481 break
18482 fi
18483 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018484fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 done
18487else
18488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018489sed 's/^/| /' conftest.$ac_ext >&5
18490
Martin v. Löwis11437992002-04-12 09:54:03 +000018491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018492/* confdefs.h. */
18493_ACEOF
18494cat confdefs.h >>conftest.$ac_ext
18495cat >>conftest.$ac_ext <<_ACEOF
18496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018497#include <wchar.h>
18498
Martin v. Löwis11437992002-04-12 09:54:03 +000018499int
18500main ()
18501{
18502static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18503test_array [0] = 0
18504
18505 ;
18506 return 0;
18507}
18508_ACEOF
18509rm -f conftest.$ac_objext
18510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018511 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18517 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018518 { ac_try='test -z "$ac_c_werror_flag"
18519 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18521 (eval $ac_try) 2>&5
18522 ac_status=$?
18523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18524 (exit $ac_status); }; } &&
18525 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18527 (eval $ac_try) 2>&5
18528 ac_status=$?
18529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18530 (exit $ac_status); }; }; then
18531 ac_hi=-1 ac_mid=-1
18532 while :; do
18533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018534/* confdefs.h. */
18535_ACEOF
18536cat confdefs.h >>conftest.$ac_ext
18537cat >>conftest.$ac_ext <<_ACEOF
18538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018539#include <wchar.h>
18540
Martin v. Löwis11437992002-04-12 09:54:03 +000018541int
18542main ()
18543{
18544static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18545test_array [0] = 0
18546
18547 ;
18548 return 0;
18549}
18550_ACEOF
18551rm -f conftest.$ac_objext
18552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018553 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018555 grep -v '^ *+' conftest.er1 >conftest.err
18556 rm -f conftest.er1
18557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18559 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018560 { ac_try='test -z "$ac_c_werror_flag"
18561 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18563 (eval $ac_try) 2>&5
18564 ac_status=$?
18565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18566 (exit $ac_status); }; } &&
18567 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18569 (eval $ac_try) 2>&5
18570 ac_status=$?
18571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18572 (exit $ac_status); }; }; then
18573 ac_lo=$ac_mid; break
18574else
18575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018576sed 's/^/| /' conftest.$ac_ext >&5
18577
Martin v. Löwis11437992002-04-12 09:54:03 +000018578ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018579 if test $ac_mid -le $ac_hi; then
18580 ac_lo= ac_hi=
18581 break
18582 fi
18583 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018584fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 done
18587else
18588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018589sed 's/^/| /' conftest.$ac_ext >&5
18590
Martin v. Löwis11437992002-04-12 09:54:03 +000018591ac_lo= ac_hi=
18592fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018594fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018595rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018596# Binary search between lo and hi bounds.
18597while test "x$ac_lo" != "x$ac_hi"; do
18598 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018600/* confdefs.h. */
18601_ACEOF
18602cat confdefs.h >>conftest.$ac_ext
18603cat >>conftest.$ac_ext <<_ACEOF
18604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018605#include <wchar.h>
18606
Martin v. Löwis11437992002-04-12 09:54:03 +000018607int
18608main ()
18609{
18610static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18611test_array [0] = 0
18612
18613 ;
18614 return 0;
18615}
18616_ACEOF
18617rm -f conftest.$ac_objext
18618if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018619 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018621 grep -v '^ *+' conftest.er1 >conftest.err
18622 rm -f conftest.er1
18623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18625 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018626 { ac_try='test -z "$ac_c_werror_flag"
18627 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18629 (eval $ac_try) 2>&5
18630 ac_status=$?
18631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18632 (exit $ac_status); }; } &&
18633 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18635 (eval $ac_try) 2>&5
18636 ac_status=$?
18637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18638 (exit $ac_status); }; }; then
18639 ac_hi=$ac_mid
18640else
18641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018642sed 's/^/| /' conftest.$ac_ext >&5
18643
Martin v. Löwis11437992002-04-12 09:54:03 +000018644ac_lo=`expr '(' $ac_mid ')' + 1`
18645fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018646rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018647done
18648case $ac_lo in
18649?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018650'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18651See \`config.log' for more details." >&5
18652echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18653See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 { (exit 1); exit 1; }; } ;;
18655esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018656else
18657 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000018658 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18659See \`config.log' for more details." >&5
18660echo "$as_me: error: cannot run test program while cross compiling
18661See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018663else
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018665/* confdefs.h. */
18666_ACEOF
18667cat confdefs.h >>conftest.$ac_ext
18668cat >>conftest.$ac_ext <<_ACEOF
18669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018670#include <wchar.h>
18671
18672long longval () { return (long) (sizeof (wchar_t)); }
18673unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018674#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018675#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018676int
18677main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018678{
Martin v. Löwis11437992002-04-12 09:54:03 +000018679
18680 FILE *f = fopen ("conftest.val", "w");
18681 if (! f)
18682 exit (1);
18683 if (((long) (sizeof (wchar_t))) < 0)
18684 {
18685 long i = longval ();
18686 if (i != ((long) (sizeof (wchar_t))))
18687 exit (1);
18688 fprintf (f, "%ld\n", i);
18689 }
18690 else
18691 {
18692 unsigned long i = ulongval ();
18693 if (i != ((long) (sizeof (wchar_t))))
18694 exit (1);
18695 fprintf (f, "%lu\n", i);
18696 }
18697 exit (ferror (f) || fclose (f) != 0);
18698
18699 ;
18700 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018701}
Martin v. Löwis11437992002-04-12 09:54:03 +000018702_ACEOF
18703rm -f conftest$ac_exeext
18704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18705 (eval $ac_link) 2>&5
18706 ac_status=$?
18707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18710 (eval $ac_try) 2>&5
18711 ac_status=$?
18712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18713 (exit $ac_status); }; }; then
18714 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018715else
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 echo "$as_me: program exited with status $ac_status" >&5
18717echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018718sed 's/^/| /' conftest.$ac_ext >&5
18719
Martin v. Löwis11437992002-04-12 09:54:03 +000018720( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018721{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18722See \`config.log' for more details." >&5
18723echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18724See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018725 { (exit 1); exit 1; }; }
18726fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018727rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018728fi
18729fi
18730rm -f conftest.val
18731else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018732 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018733fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018734fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018735echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18736echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18737cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018738#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018739_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018740
Michael W. Hudson54241132001-12-07 15:38:26 +000018741
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018742fi
18743
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018744echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18745echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18746have_ucs4_tcl=no
18747cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018748/* confdefs.h. */
18749_ACEOF
18750cat confdefs.h >>conftest.$ac_ext
18751cat >>conftest.$ac_ext <<_ACEOF
18752/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018753
18754#include <tcl.h>
18755#if TCL_UTF_MAX != 6
18756# error "NOT UCS4_TCL"
18757#endif
18758int
18759main ()
18760{
18761
18762 ;
18763 return 0;
18764}
18765_ACEOF
18766rm -f conftest.$ac_objext
18767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018768 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018770 grep -v '^ *+' conftest.er1 >conftest.err
18771 rm -f conftest.er1
18772 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18774 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018775 { ac_try='test -z "$ac_c_werror_flag"
18776 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18778 (eval $ac_try) 2>&5
18779 ac_status=$?
18780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18781 (exit $ac_status); }; } &&
18782 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18784 (eval $ac_try) 2>&5
18785 ac_status=$?
18786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18787 (exit $ac_status); }; }; then
18788
18789
18790cat >>confdefs.h <<\_ACEOF
18791#define HAVE_UCS4_TCL 1
18792_ACEOF
18793
18794 have_ucs4_tcl=yes
18795
18796else
18797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018798sed 's/^/| /' conftest.$ac_ext >&5
18799
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018800fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018802echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18803echo "${ECHO_T}$have_ucs4_tcl" >&6
18804
Skip Montanaro6dead952003-09-25 14:50:04 +000018805# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018806if test "$wchar_h" = yes
18807then
18808 # check whether wchar_t is signed or not
18809 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18810echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18811 if test "${ac_cv_wchar_t_signed+set}" = set; then
18812 echo $ECHO_N "(cached) $ECHO_C" >&6
18813else
18814
18815 if test "$cross_compiling" = yes; then
18816 ac_cv_wchar_t_signed=yes
18817else
18818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018819/* confdefs.h. */
18820_ACEOF
18821cat confdefs.h >>conftest.$ac_ext
18822cat >>conftest.$ac_ext <<_ACEOF
18823/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018824
18825 #include <wchar.h>
18826 int main()
18827 {
18828 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18829 }
18830
18831_ACEOF
18832rm -f conftest$ac_exeext
18833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18834 (eval $ac_link) 2>&5
18835 ac_status=$?
18836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18839 (eval $ac_try) 2>&5
18840 ac_status=$?
18841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18842 (exit $ac_status); }; }; then
18843 ac_cv_wchar_t_signed=yes
18844else
18845 echo "$as_me: program exited with status $ac_status" >&5
18846echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018847sed 's/^/| /' conftest.$ac_ext >&5
18848
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018849( exit $ac_status )
18850ac_cv_wchar_t_signed=no
18851fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018852rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018853fi
18854fi
18855
18856 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18857echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18858fi
18859
Martin v. Löwis11437992002-04-12 09:54:03 +000018860echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18861echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018862# Check whether --enable-unicode or --disable-unicode was given.
18863if test "${enable_unicode+set}" = set; then
18864 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018865
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018866else
18867 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018868fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018869
18870if test $enable_unicode = yes
18871then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018872 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018873 case "$have_ucs4_tcl" in
18874 yes) enable_unicode="ucs4"
18875 ;;
18876 *) enable_unicode="ucs2"
18877 ;;
18878 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018879fi
18880
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018881
18882
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018883case "$enable_unicode" in
18884ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018885 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018886#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018887_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018888
18889 ;;
18890ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000018891 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018892#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000018893_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018894
18895 ;;
18896esac
18897
Michael W. Hudson54241132001-12-07 15:38:26 +000018898
Martin v. Löwis11437992002-04-12 09:54:03 +000018899
18900
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018901
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018902if test "$enable_unicode" = "no"
18903then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018904 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000018905 echo "$as_me:$LINENO: result: not used" >&5
18906echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018907else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018908 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000018909
18910cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018911#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018912_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018913
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018914
18915 # wchar_t is only usable if it maps to an unsigned type
18916 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000018917 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018918 then
18919 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018920
Martin v. Löwis11437992002-04-12 09:54:03 +000018921cat >>confdefs.h <<\_ACEOF
18922#define HAVE_USABLE_WCHAR_T 1
18923_ACEOF
18924
18925 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018926#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018927_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018928
18929 elif test "$ac_cv_sizeof_short" = "$unicode_size"
18930 then
18931 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018933#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000018934_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018935
18936 elif test "$ac_cv_sizeof_long" = "$unicode_size"
18937 then
18938 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000018939 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018940#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000018941_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018942
18943 else
18944 PY_UNICODE_TYPE="no type found"
18945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
18947echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018948fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018949
18950# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018951echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
18952echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
18953if test "${ac_cv_c_bigendian+set}" = set; then
18954 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018955else
Martin v. Löwis11437992002-04-12 09:54:03 +000018956 # See if sys/param.h defines the BYTE_ORDER macro.
18957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018958/* confdefs.h. */
18959_ACEOF
18960cat confdefs.h >>conftest.$ac_ext
18961cat >>conftest.$ac_ext <<_ACEOF
18962/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018963#include <sys/types.h>
18964#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018965
Martin v. Löwis11437992002-04-12 09:54:03 +000018966int
18967main ()
18968{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018969#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
18970 bogus endian macros
18971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018972
18973 ;
18974 return 0;
18975}
18976_ACEOF
18977rm -f conftest.$ac_objext
18978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018979 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018981 grep -v '^ *+' conftest.er1 >conftest.err
18982 rm -f conftest.er1
18983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18985 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018986 { ac_try='test -z "$ac_c_werror_flag"
18987 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18989 (eval $ac_try) 2>&5
18990 ac_status=$?
18991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992 (exit $ac_status); }; } &&
18993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18995 (eval $ac_try) 2>&5
18996 ac_status=$?
18997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018999 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019001/* confdefs.h. */
19002_ACEOF
19003cat confdefs.h >>conftest.$ac_ext
19004cat >>conftest.$ac_ext <<_ACEOF
19005/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019006#include <sys/types.h>
19007#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019008
Martin v. Löwis11437992002-04-12 09:54:03 +000019009int
19010main ()
19011{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019012#if BYTE_ORDER != BIG_ENDIAN
19013 not big endian
19014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019015
19016 ;
19017 return 0;
19018}
19019_ACEOF
19020rm -f conftest.$ac_objext
19021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019022 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019024 grep -v '^ *+' conftest.er1 >conftest.err
19025 rm -f conftest.er1
19026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19028 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019029 { ac_try='test -z "$ac_c_werror_flag"
19030 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19032 (eval $ac_try) 2>&5
19033 ac_status=$?
19034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19035 (exit $ac_status); }; } &&
19036 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19038 (eval $ac_try) 2>&5
19039 ac_status=$?
19040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19041 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019042 ac_cv_c_bigendian=yes
19043else
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019045sed 's/^/| /' conftest.$ac_ext >&5
19046
Martin v. Löwis11437992002-04-12 09:54:03 +000019047ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019048fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019050else
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019052sed 's/^/| /' conftest.$ac_ext >&5
19053
Martin v. Löwis11437992002-04-12 09:54:03 +000019054# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019055if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019056 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 ac_cv_c_bigendian=unknown
19058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019059/* confdefs.h. */
19060_ACEOF
19061cat confdefs.h >>conftest.$ac_ext
19062cat >>conftest.$ac_ext <<_ACEOF
19063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019064short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19065short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19066void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19067short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19068short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19069void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019070int
19071main ()
19072{
19073 _ascii (); _ebcdic ();
19074 ;
19075 return 0;
19076}
19077_ACEOF
19078rm -f conftest.$ac_objext
19079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019082 grep -v '^ *+' conftest.er1 >conftest.err
19083 rm -f conftest.er1
19084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019087 { ac_try='test -z "$ac_c_werror_flag"
19088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19090 (eval $ac_try) 2>&5
19091 ac_status=$?
19092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19093 (exit $ac_status); }; } &&
19094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19096 (eval $ac_try) 2>&5
19097 ac_status=$?
19098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19099 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019100 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019101 ac_cv_c_bigendian=yes
19102fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019103if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 if test "$ac_cv_c_bigendian" = unknown; then
19105 ac_cv_c_bigendian=no
19106 else
19107 # finding both strings is unlikely to happen, but who knows?
19108 ac_cv_c_bigendian=unknown
19109 fi
19110fi
19111else
19112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019113sed 's/^/| /' conftest.$ac_ext >&5
19114
Martin v. Löwis11437992002-04-12 09:54:03 +000019115fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019117else
19118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019119/* confdefs.h. */
19120_ACEOF
19121cat confdefs.h >>conftest.$ac_ext
19122cat >>conftest.$ac_ext <<_ACEOF
19123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019124int
19125main ()
19126{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019127 /* Are we little or big endian? From Harbison&Steele. */
19128 union
19129 {
19130 long l;
19131 char c[sizeof (long)];
19132 } u;
19133 u.l = 1;
19134 exit (u.c[sizeof (long) - 1] == 1);
19135}
Martin v. Löwis11437992002-04-12 09:54:03 +000019136_ACEOF
19137rm -f conftest$ac_exeext
19138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19139 (eval $ac_link) 2>&5
19140 ac_status=$?
19141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19144 (eval $ac_try) 2>&5
19145 ac_status=$?
19146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19147 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019148 ac_cv_c_bigendian=no
19149else
Martin v. Löwis11437992002-04-12 09:54:03 +000019150 echo "$as_me: program exited with status $ac_status" >&5
19151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019152sed 's/^/| /' conftest.$ac_ext >&5
19153
Martin v. Löwis11437992002-04-12 09:54:03 +000019154( exit $ac_status )
19155ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019157rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019161fi
19162echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19163echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19164case $ac_cv_c_bigendian in
19165 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019166
Martin v. Löwis11437992002-04-12 09:54:03 +000019167cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019168#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019169_ACEOF
19170 ;;
19171 no)
19172 ;;
19173 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019174 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019175presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019176echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019177presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19178 { (exit 1); exit 1; }; } ;;
19179esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019180
Michael W. Hudson54241132001-12-07 15:38:26 +000019181
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019182# Check whether right shifting a negative integer extends the sign bit
19183# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019184echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19185echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19186if test "${ac_cv_rshift_extends_sign+set}" = set; then
19187 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019188else
Martin v. Löwis11437992002-04-12 09:54:03 +000019189
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019190if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019191 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019192else
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019194/* confdefs.h. */
19195_ACEOF
19196cat confdefs.h >>conftest.$ac_ext
19197cat >>conftest.$ac_ext <<_ACEOF
19198/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019199
19200int main()
19201{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019202 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019203}
19204
Martin v. Löwis11437992002-04-12 09:54:03 +000019205_ACEOF
19206rm -f conftest$ac_exeext
19207if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19208 (eval $ac_link) 2>&5
19209 ac_status=$?
19210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19213 (eval $ac_try) 2>&5
19214 ac_status=$?
19215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19216 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019217 ac_cv_rshift_extends_sign=yes
19218else
Martin v. Löwis11437992002-04-12 09:54:03 +000019219 echo "$as_me: program exited with status $ac_status" >&5
19220echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019221sed 's/^/| /' conftest.$ac_ext >&5
19222
Martin v. Löwis11437992002-04-12 09:54:03 +000019223( exit $ac_status )
19224ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019225fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019226rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019227fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019228fi
19229
Martin v. Löwis11437992002-04-12 09:54:03 +000019230echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19231echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019232if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019233then
Martin v. Löwis11437992002-04-12 09:54:03 +000019234
19235cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019236#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019237_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019238
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019239fi
19240
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019241# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019242echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19243echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19244if test "${ac_cv_have_getc_unlocked+set}" = set; then
19245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019246else
Martin v. Löwis11437992002-04-12 09:54:03 +000019247
19248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019249/* confdefs.h. */
19250_ACEOF
19251cat confdefs.h >>conftest.$ac_ext
19252cat >>conftest.$ac_ext <<_ACEOF
19253/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019254#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019255int
19256main ()
19257{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019258
19259 FILE *f = fopen("/dev/null", "r");
19260 flockfile(f);
19261 getc_unlocked(f);
19262 funlockfile(f);
19263
Martin v. Löwis11437992002-04-12 09:54:03 +000019264 ;
19265 return 0;
19266}
19267_ACEOF
19268rm -f conftest.$ac_objext conftest$ac_exeext
19269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019270 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019272 grep -v '^ *+' conftest.er1 >conftest.err
19273 rm -f conftest.er1
19274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19276 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019277 { ac_try='test -z "$ac_c_werror_flag"
19278 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19280 (eval $ac_try) 2>&5
19281 ac_status=$?
19282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19283 (exit $ac_status); }; } &&
19284 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19286 (eval $ac_try) 2>&5
19287 ac_status=$?
19288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19289 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019290 ac_cv_have_getc_unlocked=yes
19291else
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019293sed 's/^/| /' conftest.$ac_ext >&5
19294
Martin v. Löwis11437992002-04-12 09:54:03 +000019295ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019296fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019297rm -f conftest.err conftest.$ac_objext \
19298 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019299fi
19300
Martin v. Löwis11437992002-04-12 09:54:03 +000019301echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19302echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019303if test "$ac_cv_have_getc_unlocked" = yes
19304then
Martin v. Löwis11437992002-04-12 09:54:03 +000019305
19306cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019307#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019308_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019309
19310fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019311
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019312# check for readline 2.1
19313echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19314echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19315if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19316 echo $ECHO_N "(cached) $ECHO_C" >&6
19317else
19318 ac_check_lib_save_LIBS=$LIBS
19319LIBS="-lreadline -ltermcap $LIBS"
19320cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019321/* confdefs.h. */
19322_ACEOF
19323cat confdefs.h >>conftest.$ac_ext
19324cat >>conftest.$ac_ext <<_ACEOF
19325/* end confdefs.h. */
19326
19327/* Override any gcc2 internal prototype to avoid an error. */
19328#ifdef __cplusplus
19329extern "C"
19330#endif
19331/* We use char because int might match the return type of a gcc2
19332 builtin and then its argument prototype would still apply. */
19333char rl_callback_handler_install ();
19334int
19335main ()
19336{
19337rl_callback_handler_install ();
19338 ;
19339 return 0;
19340}
19341_ACEOF
19342rm -f conftest.$ac_objext conftest$ac_exeext
19343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019344 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019346 grep -v '^ *+' conftest.er1 >conftest.err
19347 rm -f conftest.er1
19348 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019351 { ac_try='test -z "$ac_c_werror_flag"
19352 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19354 (eval $ac_try) 2>&5
19355 ac_status=$?
19356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19357 (exit $ac_status); }; } &&
19358 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19360 (eval $ac_try) 2>&5
19361 ac_status=$?
19362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19363 (exit $ac_status); }; }; then
19364 ac_cv_lib_readline_rl_callback_handler_install=yes
19365else
19366 echo "$as_me: failed program was:" >&5
19367sed 's/^/| /' conftest.$ac_ext >&5
19368
19369ac_cv_lib_readline_rl_callback_handler_install=no
19370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019371rm -f conftest.err conftest.$ac_objext \
19372 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019373LIBS=$ac_check_lib_save_LIBS
19374fi
19375echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19376echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19377if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19378
19379cat >>confdefs.h <<\_ACEOF
19380#define HAVE_RL_CALLBACK 1
19381_ACEOF
19382
19383fi
19384
19385
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019386# check for readline 2.2
19387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019388/* confdefs.h. */
19389_ACEOF
19390cat confdefs.h >>conftest.$ac_ext
19391cat >>conftest.$ac_ext <<_ACEOF
19392/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019393#include <readline/readline.h>
19394_ACEOF
19395if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19396 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19397 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019398 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019399 rm -f conftest.er1
19400 cat conftest.err >&5
19401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19402 (exit $ac_status); } >/dev/null; then
19403 if test -s conftest.err; then
19404 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019405 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019406 else
19407 ac_cpp_err=
19408 fi
19409else
19410 ac_cpp_err=yes
19411fi
19412if test -z "$ac_cpp_err"; then
19413 have_readline=yes
19414else
19415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019416sed 's/^/| /' conftest.$ac_ext >&5
19417
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019418 have_readline=no
19419fi
19420rm -f conftest.err conftest.$ac_ext
19421if test $have_readline = yes
19422then
19423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019424/* confdefs.h. */
19425_ACEOF
19426cat confdefs.h >>conftest.$ac_ext
19427cat >>conftest.$ac_ext <<_ACEOF
19428/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019429#include <readline/readline.h>
19430
19431_ACEOF
19432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019433 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019434
19435cat >>confdefs.h <<\_ACEOF
19436#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19437_ACEOF
19438
19439fi
19440rm -f conftest*
19441
19442fi
19443
Martin v. Löwis0daad592001-09-30 21:09:59 +000019444# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019445echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19446echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19447if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19448 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019449else
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019451LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019453/* confdefs.h. */
19454_ACEOF
19455cat confdefs.h >>conftest.$ac_ext
19456cat >>conftest.$ac_ext <<_ACEOF
19457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019458
Guido van Rossum353ae582001-07-10 16:45:32 +000019459/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019460#ifdef __cplusplus
19461extern "C"
19462#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019463/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 builtin and then its argument prototype would still apply. */
19465char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019466int
19467main ()
19468{
19469rl_pre_input_hook ();
19470 ;
19471 return 0;
19472}
19473_ACEOF
19474rm -f conftest.$ac_objext conftest$ac_exeext
19475if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019476 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478 grep -v '^ *+' conftest.er1 >conftest.err
19479 rm -f conftest.er1
19480 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19482 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019483 { ac_try='test -z "$ac_c_werror_flag"
19484 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19486 (eval $ac_try) 2>&5
19487 ac_status=$?
19488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19489 (exit $ac_status); }; } &&
19490 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19492 (eval $ac_try) 2>&5
19493 ac_status=$?
19494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19495 (exit $ac_status); }; }; then
19496 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019497else
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019499sed 's/^/| /' conftest.$ac_ext >&5
19500
Martin v. Löwis11437992002-04-12 09:54:03 +000019501ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019502fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019503rm -f conftest.err conftest.$ac_objext \
19504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019505LIBS=$ac_check_lib_save_LIBS
19506fi
19507echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19508echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19509if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019510
Martin v. Löwis11437992002-04-12 09:54:03 +000019511cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019512#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019513_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019514
Martin v. Löwis0daad592001-09-30 21:09:59 +000019515fi
19516
Michael W. Hudson54241132001-12-07 15:38:26 +000019517
Martin v. Löwis0daad592001-09-30 21:09:59 +000019518# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019519echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19520echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19521if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19522 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019523else
Martin v. Löwis11437992002-04-12 09:54:03 +000019524 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019525LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019527/* confdefs.h. */
19528_ACEOF
19529cat confdefs.h >>conftest.$ac_ext
19530cat >>conftest.$ac_ext <<_ACEOF
19531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019532
Martin v. Löwis0daad592001-09-30 21:09:59 +000019533/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019534#ifdef __cplusplus
19535extern "C"
19536#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019537/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 builtin and then its argument prototype would still apply. */
19539char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019540int
19541main ()
19542{
19543rl_completion_matches ();
19544 ;
19545 return 0;
19546}
19547_ACEOF
19548rm -f conftest.$ac_objext conftest$ac_exeext
19549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019550 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019552 grep -v '^ *+' conftest.er1 >conftest.err
19553 rm -f conftest.er1
19554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19556 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019557 { ac_try='test -z "$ac_c_werror_flag"
19558 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19560 (eval $ac_try) 2>&5
19561 ac_status=$?
19562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19563 (exit $ac_status); }; } &&
19564 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19566 (eval $ac_try) 2>&5
19567 ac_status=$?
19568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19569 (exit $ac_status); }; }; then
19570 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019571else
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019573sed 's/^/| /' conftest.$ac_ext >&5
19574
Martin v. Löwis11437992002-04-12 09:54:03 +000019575ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019576fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019577rm -f conftest.err conftest.$ac_objext \
19578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019579LIBS=$ac_check_lib_save_LIBS
19580fi
19581echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19582echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19583if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019584
Martin v. Löwis11437992002-04-12 09:54:03 +000019585cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019586#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019587_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019588
Guido van Rossum353ae582001-07-10 16:45:32 +000019589fi
19590
Jack Jansendd19cf82001-12-06 22:36:17 +000019591
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019592# also in readline 4.2
19593cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
19599#include <readline/readline.h>
19600_ACEOF
19601if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19602 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19603 ac_status=$?
19604 grep -v '^ *+' conftest.er1 >conftest.err
19605 rm -f conftest.er1
19606 cat conftest.err >&5
19607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19608 (exit $ac_status); } >/dev/null; then
19609 if test -s conftest.err; then
19610 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019611 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019612 else
19613 ac_cpp_err=
19614 fi
19615else
19616 ac_cpp_err=yes
19617fi
19618if test -z "$ac_cpp_err"; then
19619 have_readline=yes
19620else
19621 echo "$as_me: failed program was:" >&5
19622sed 's/^/| /' conftest.$ac_ext >&5
19623
19624 have_readline=no
19625fi
19626rm -f conftest.err conftest.$ac_ext
19627if test $have_readline = yes
19628then
19629 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019630/* confdefs.h. */
19631_ACEOF
19632cat confdefs.h >>conftest.$ac_ext
19633cat >>conftest.$ac_ext <<_ACEOF
19634/* end confdefs.h. */
19635#include <readline/readline.h>
19636
19637_ACEOF
19638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19639 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19640
19641cat >>confdefs.h <<\_ACEOF
19642#define HAVE_RL_CATCH_SIGNAL 1
19643_ACEOF
19644
19645fi
19646rm -f conftest*
19647
19648fi
19649
Martin v. Löwis11437992002-04-12 09:54:03 +000019650echo "$as_me:$LINENO: checking for broken nice()" >&5
19651echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19652if test "${ac_cv_broken_nice+set}" = set; then
19653 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019654else
Martin v. Löwis11437992002-04-12 09:54:03 +000019655
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019656if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019657 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019658else
Martin v. Löwis11437992002-04-12 09:54:03 +000019659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019660/* confdefs.h. */
19661_ACEOF
19662cat confdefs.h >>conftest.$ac_ext
19663cat >>conftest.$ac_ext <<_ACEOF
19664/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019665
19666int main()
19667{
19668 int val1 = nice(1);
19669 if (val1 != -1 && val1 == nice(2))
19670 exit(0);
19671 exit(1);
19672}
19673
Martin v. Löwis11437992002-04-12 09:54:03 +000019674_ACEOF
19675rm -f conftest$ac_exeext
19676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19677 (eval $ac_link) 2>&5
19678 ac_status=$?
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19682 (eval $ac_try) 2>&5
19683 ac_status=$?
19684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19685 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019686 ac_cv_broken_nice=yes
19687else
Martin v. Löwis11437992002-04-12 09:54:03 +000019688 echo "$as_me: program exited with status $ac_status" >&5
19689echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019690sed 's/^/| /' conftest.$ac_ext >&5
19691
Martin v. Löwis11437992002-04-12 09:54:03 +000019692( exit $ac_status )
19693ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019694fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019695rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019696fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019697fi
19698
Martin v. Löwis11437992002-04-12 09:54:03 +000019699echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19700echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019701if test "$ac_cv_broken_nice" = yes
19702then
Martin v. Löwis11437992002-04-12 09:54:03 +000019703
19704cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019705#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019706_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019707
19708fi
19709
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019710echo "$as_me:$LINENO: checking for broken poll()" >&5
19711echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19712if test "$cross_compiling" = yes; then
19713 ac_cv_broken_poll=no
19714else
19715 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019716/* confdefs.h. */
19717_ACEOF
19718cat confdefs.h >>conftest.$ac_ext
19719cat >>conftest.$ac_ext <<_ACEOF
19720/* end confdefs.h. */
19721
19722#include <poll.h>
19723
19724int main (void)
19725 {
19726 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19727
19728 close (42);
19729
19730 int poll_test = poll (&poll_struct, 1, 0);
19731
19732 if (poll_test < 0)
19733 {
19734 exit(0);
19735 }
19736 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19737 {
19738 exit(0);
19739 }
19740 else
19741 {
19742 exit(1);
19743 }
19744 }
19745
19746_ACEOF
19747rm -f conftest$ac_exeext
19748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19749 (eval $ac_link) 2>&5
19750 ac_status=$?
19751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19754 (eval $ac_try) 2>&5
19755 ac_status=$?
19756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19757 (exit $ac_status); }; }; then
19758 ac_cv_broken_poll=yes
19759else
19760 echo "$as_me: program exited with status $ac_status" >&5
19761echo "$as_me: failed program was:" >&5
19762sed 's/^/| /' conftest.$ac_ext >&5
19763
19764( exit $ac_status )
19765ac_cv_broken_poll=no
19766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019768fi
19769echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19770echo "${ECHO_T}$ac_cv_broken_poll" >&6
19771if test "$ac_cv_broken_poll" = yes
19772then
19773
19774cat >>confdefs.h <<\_ACEOF
19775#define HAVE_BROKEN_POLL 1
19776_ACEOF
19777
19778fi
19779
Brett Cannon43802422005-02-10 20:48:03 +000019780# Before we can test tzset, we need to check if struct tm has a tm_zone
Martin v. Löwis1d459062005-03-14 21:23:33 +000019781# (which is not required by ISO C or UNIX spec) and/or if we support
19782# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000019783echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19784echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19785if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19786 echo $ECHO_N "(cached) $ECHO_C" >&6
19787else
19788 cat >conftest.$ac_ext <<_ACEOF
19789/* confdefs.h. */
19790_ACEOF
19791cat confdefs.h >>conftest.$ac_ext
19792cat >>conftest.$ac_ext <<_ACEOF
19793/* end confdefs.h. */
19794#include <sys/types.h>
19795#include <$ac_cv_struct_tm>
19796
19797
19798int
19799main ()
19800{
19801static struct tm ac_aggr;
19802if (ac_aggr.tm_zone)
19803return 0;
19804 ;
19805 return 0;
19806}
19807_ACEOF
19808rm -f conftest.$ac_objext
19809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19810 (eval $ac_compile) 2>conftest.er1
19811 ac_status=$?
19812 grep -v '^ *+' conftest.er1 >conftest.err
19813 rm -f conftest.er1
19814 cat conftest.err >&5
19815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19816 (exit $ac_status); } &&
19817 { ac_try='test -z "$ac_c_werror_flag"
19818 || test ! -s conftest.err'
19819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19820 (eval $ac_try) 2>&5
19821 ac_status=$?
19822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19823 (exit $ac_status); }; } &&
19824 { ac_try='test -s conftest.$ac_objext'
19825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19826 (eval $ac_try) 2>&5
19827 ac_status=$?
19828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19829 (exit $ac_status); }; }; then
19830 ac_cv_member_struct_tm_tm_zone=yes
19831else
19832 echo "$as_me: failed program was:" >&5
19833sed 's/^/| /' conftest.$ac_ext >&5
19834
19835cat >conftest.$ac_ext <<_ACEOF
19836/* confdefs.h. */
19837_ACEOF
19838cat confdefs.h >>conftest.$ac_ext
19839cat >>conftest.$ac_ext <<_ACEOF
19840/* end confdefs.h. */
19841#include <sys/types.h>
19842#include <$ac_cv_struct_tm>
19843
19844
19845int
19846main ()
19847{
19848static struct tm ac_aggr;
19849if (sizeof ac_aggr.tm_zone)
19850return 0;
19851 ;
19852 return 0;
19853}
19854_ACEOF
19855rm -f conftest.$ac_objext
19856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19857 (eval $ac_compile) 2>conftest.er1
19858 ac_status=$?
19859 grep -v '^ *+' conftest.er1 >conftest.err
19860 rm -f conftest.er1
19861 cat conftest.err >&5
19862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19863 (exit $ac_status); } &&
19864 { ac_try='test -z "$ac_c_werror_flag"
19865 || test ! -s conftest.err'
19866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19867 (eval $ac_try) 2>&5
19868 ac_status=$?
19869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19870 (exit $ac_status); }; } &&
19871 { ac_try='test -s conftest.$ac_objext'
19872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19873 (eval $ac_try) 2>&5
19874 ac_status=$?
19875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19876 (exit $ac_status); }; }; then
19877 ac_cv_member_struct_tm_tm_zone=yes
19878else
19879 echo "$as_me: failed program was:" >&5
19880sed 's/^/| /' conftest.$ac_ext >&5
19881
19882ac_cv_member_struct_tm_tm_zone=no
19883fi
19884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19885fi
19886rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19887fi
19888echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19889echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
19890if test $ac_cv_member_struct_tm_tm_zone = yes; then
19891
19892cat >>confdefs.h <<_ACEOF
19893#define HAVE_STRUCT_TM_TM_ZONE 1
19894_ACEOF
19895
19896
19897fi
19898
19899if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19900
19901cat >>confdefs.h <<\_ACEOF
19902#define HAVE_TM_ZONE 1
19903_ACEOF
19904
19905else
19906 echo "$as_me:$LINENO: checking for tzname" >&5
19907echo $ECHO_N "checking for tzname... $ECHO_C" >&6
19908if test "${ac_cv_var_tzname+set}" = set; then
19909 echo $ECHO_N "(cached) $ECHO_C" >&6
19910else
19911 cat >conftest.$ac_ext <<_ACEOF
19912/* confdefs.h. */
19913_ACEOF
19914cat confdefs.h >>conftest.$ac_ext
19915cat >>conftest.$ac_ext <<_ACEOF
19916/* end confdefs.h. */
19917#include <time.h>
19918#ifndef tzname /* For SGI. */
19919extern char *tzname[]; /* RS6000 and others reject char **tzname. */
19920#endif
19921
19922int
19923main ()
19924{
19925atoi(*tzname);
19926 ;
19927 return 0;
19928}
19929_ACEOF
19930rm -f conftest.$ac_objext conftest$ac_exeext
19931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19932 (eval $ac_link) 2>conftest.er1
19933 ac_status=$?
19934 grep -v '^ *+' conftest.er1 >conftest.err
19935 rm -f conftest.er1
19936 cat conftest.err >&5
19937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19938 (exit $ac_status); } &&
19939 { ac_try='test -z "$ac_c_werror_flag"
19940 || test ! -s conftest.err'
19941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19942 (eval $ac_try) 2>&5
19943 ac_status=$?
19944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19945 (exit $ac_status); }; } &&
19946 { ac_try='test -s conftest$ac_exeext'
19947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19948 (eval $ac_try) 2>&5
19949 ac_status=$?
19950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19951 (exit $ac_status); }; }; then
19952 ac_cv_var_tzname=yes
19953else
19954 echo "$as_me: failed program was:" >&5
19955sed 's/^/| /' conftest.$ac_ext >&5
19956
19957ac_cv_var_tzname=no
19958fi
19959rm -f conftest.err conftest.$ac_objext \
19960 conftest$ac_exeext conftest.$ac_ext
19961fi
19962echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19963echo "${ECHO_T}$ac_cv_var_tzname" >&6
19964 if test $ac_cv_var_tzname = yes; then
19965
19966cat >>confdefs.h <<\_ACEOF
19967#define HAVE_TZNAME 1
19968_ACEOF
19969
19970 fi
19971fi
19972
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019973
Martin v. Löwis1d459062005-03-14 21:23:33 +000019974# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019975echo "$as_me:$LINENO: checking for working tzset()" >&5
19976echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
19977if test "${ac_cv_working_tzset+set}" = set; then
19978 echo $ECHO_N "(cached) $ECHO_C" >&6
19979else
19980
19981if test "$cross_compiling" = yes; then
19982 ac_cv_working_tzset=no
19983else
19984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019985/* confdefs.h. */
19986_ACEOF
19987cat confdefs.h >>conftest.$ac_ext
19988cat >>conftest.$ac_ext <<_ACEOF
19989/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019990
19991#include <stdlib.h>
19992#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000019993#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000019994
19995#if HAVE_TZNAME
19996extern char *tzname[];
19997#endif
19998
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019999int main()
20000{
Brett Cannon18367812003-09-19 00:59:16 +000020001 /* Note that we need to ensure that not only does tzset(3)
20002 do 'something' with localtime, but it works as documented
20003 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020004 This includes making sure that tzname is set properly if
20005 tm->tm_zone does not exist since it is the alternative way
20006 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020007
20008 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020009 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020010 */
20011
Martin v. Löwis1d459062005-03-14 21:23:33 +000020012 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020013 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20014
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020015 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020016 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020017 if (localtime(&groundhogday)->tm_hour != 0)
20018 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020019#if HAVE_TZNAME
20020 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20021 if (strcmp(tzname[0], "UTC") ||
20022 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20023 exit(1);
20024#endif
Brett Cannon18367812003-09-19 00:59:16 +000020025
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020026 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020027 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020028 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020029 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020030#if HAVE_TZNAME
20031 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20032 exit(1);
20033#endif
Brett Cannon18367812003-09-19 00:59:16 +000020034
20035 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20036 tzset();
20037 if (localtime(&groundhogday)->tm_hour != 11)
20038 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020039#if HAVE_TZNAME
20040 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20041 exit(1);
20042#endif
20043
20044#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020045 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20046 exit(1);
20047 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20048 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020049#endif
Brett Cannon18367812003-09-19 00:59:16 +000020050
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020051 exit(0);
20052}
20053
20054_ACEOF
20055rm -f conftest$ac_exeext
20056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20057 (eval $ac_link) 2>&5
20058 ac_status=$?
20059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20062 (eval $ac_try) 2>&5
20063 ac_status=$?
20064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20065 (exit $ac_status); }; }; then
20066 ac_cv_working_tzset=yes
20067else
20068 echo "$as_me: program exited with status $ac_status" >&5
20069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020070sed 's/^/| /' conftest.$ac_ext >&5
20071
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020072( exit $ac_status )
20073ac_cv_working_tzset=no
20074fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020075rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020076fi
20077fi
20078
20079echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20080echo "${ECHO_T}$ac_cv_working_tzset" >&6
20081if test "$ac_cv_working_tzset" = yes
20082then
20083
20084cat >>confdefs.h <<\_ACEOF
20085#define HAVE_WORKING_TZSET 1
20086_ACEOF
20087
20088fi
20089
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020090# Look for subsecond timestamps in struct stat
20091echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20092echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20093if test "${ac_cv_stat_tv_nsec+set}" = set; then
20094 echo $ECHO_N "(cached) $ECHO_C" >&6
20095else
20096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020097/* confdefs.h. */
20098_ACEOF
20099cat confdefs.h >>conftest.$ac_ext
20100cat >>conftest.$ac_ext <<_ACEOF
20101/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020102#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020103int
20104main ()
20105{
20106
20107struct stat st;
20108st.st_mtim.tv_nsec = 1;
20109
20110 ;
20111 return 0;
20112}
20113_ACEOF
20114rm -f conftest.$ac_objext
20115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020118 grep -v '^ *+' conftest.er1 >conftest.err
20119 rm -f conftest.er1
20120 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020123 { ac_try='test -z "$ac_c_werror_flag"
20124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20126 (eval $ac_try) 2>&5
20127 ac_status=$?
20128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20129 (exit $ac_status); }; } &&
20130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20132 (eval $ac_try) 2>&5
20133 ac_status=$?
20134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20135 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020136 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020137else
20138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020139sed 's/^/| /' conftest.$ac_ext >&5
20140
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020141ac_cv_stat_tv_nsec=no
20142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020144fi
20145
20146echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20147echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20148if test "$ac_cv_stat_tv_nsec" = yes
20149then
20150
20151cat >>confdefs.h <<\_ACEOF
20152#define HAVE_STAT_TV_NSEC 1
20153_ACEOF
20154
20155fi
20156
Jack Jansen666b1e72001-10-31 12:11:48 +000020157# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020158echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20159echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20160if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20161 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020162else
Martin v. Löwis11437992002-04-12 09:54:03 +000020163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020164/* confdefs.h. */
20165_ACEOF
20166cat confdefs.h >>conftest.$ac_ext
20167cat >>conftest.$ac_ext <<_ACEOF
20168/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020169#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020170int
20171main ()
20172{
Jack Jansen666b1e72001-10-31 12:11:48 +000020173
20174 int rtn;
20175 rtn = mvwdelch(0,0,0);
20176
Martin v. Löwis11437992002-04-12 09:54:03 +000020177 ;
20178 return 0;
20179}
20180_ACEOF
20181rm -f conftest.$ac_objext
20182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020183 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020185 grep -v '^ *+' conftest.er1 >conftest.err
20186 rm -f conftest.er1
20187 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20189 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020190 { ac_try='test -z "$ac_c_werror_flag"
20191 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20193 (eval $ac_try) 2>&5
20194 ac_status=$?
20195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20196 (exit $ac_status); }; } &&
20197 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20199 (eval $ac_try) 2>&5
20200 ac_status=$?
20201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20202 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020203 ac_cv_mvwdelch_is_expression=yes
20204else
Martin v. Löwis11437992002-04-12 09:54:03 +000020205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020206sed 's/^/| /' conftest.$ac_ext >&5
20207
Martin v. Löwis11437992002-04-12 09:54:03 +000020208ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020209fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020211fi
20212
Martin v. Löwis11437992002-04-12 09:54:03 +000020213echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20214echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020215
20216if test "$ac_cv_mvwdelch_is_expression" = yes
20217then
Martin v. Löwis11437992002-04-12 09:54:03 +000020218
20219cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020220#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020221_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020222
20223fi
20224
Martin v. Löwis11437992002-04-12 09:54:03 +000020225echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20226echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20227if test "${ac_cv_window_has_flags+set}" = set; then
20228 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020229else
Martin v. Löwis11437992002-04-12 09:54:03 +000020230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020231/* confdefs.h. */
20232_ACEOF
20233cat confdefs.h >>conftest.$ac_ext
20234cat >>conftest.$ac_ext <<_ACEOF
20235/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020236#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020237int
20238main ()
20239{
Jack Jansen666b1e72001-10-31 12:11:48 +000020240
20241 WINDOW *w;
20242 w->_flags = 0;
20243
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 ;
20245 return 0;
20246}
20247_ACEOF
20248rm -f conftest.$ac_objext
20249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020252 grep -v '^ *+' conftest.er1 >conftest.err
20253 rm -f conftest.er1
20254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20256 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020257 { ac_try='test -z "$ac_c_werror_flag"
20258 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20260 (eval $ac_try) 2>&5
20261 ac_status=$?
20262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20263 (exit $ac_status); }; } &&
20264 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20266 (eval $ac_try) 2>&5
20267 ac_status=$?
20268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20269 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020270 ac_cv_window_has_flags=yes
20271else
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020273sed 's/^/| /' conftest.$ac_ext >&5
20274
Martin v. Löwis11437992002-04-12 09:54:03 +000020275ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020276fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020278fi
20279
Martin v. Löwis11437992002-04-12 09:54:03 +000020280echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20281echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020282
Jack Jansen666b1e72001-10-31 12:11:48 +000020283
20284if test "$ac_cv_window_has_flags" = yes
20285then
Martin v. Löwis11437992002-04-12 09:54:03 +000020286
20287cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020288#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020289_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020290
20291fi
20292
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020293echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20294echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20295
20296if test -e /dev/ptmx
20297then
20298 echo "$as_me:$LINENO: result: yes" >&5
20299echo "${ECHO_T}yes" >&6
20300
20301cat >>confdefs.h <<\_ACEOF
20302#define HAVE_DEV_PTMX 1
20303_ACEOF
20304
20305else
20306 echo "$as_me:$LINENO: result: no" >&5
20307echo "${ECHO_T}no" >&6
20308fi
20309
Neal Norwitz865400f2003-03-21 01:42:58 +000020310echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20311echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20312
20313if test -e /dev/ptc
20314then
20315 echo "$as_me:$LINENO: result: yes" >&5
20316echo "${ECHO_T}yes" >&6
20317
20318cat >>confdefs.h <<\_ACEOF
20319#define HAVE_DEV_PTC 1
20320_ACEOF
20321
20322else
20323 echo "$as_me:$LINENO: result: no" >&5
20324echo "${ECHO_T}no" >&6
20325fi
20326
Martin v. Löwis11437992002-04-12 09:54:03 +000020327echo "$as_me:$LINENO: checking for socklen_t" >&5
20328echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20329if test "${ac_cv_type_socklen_t+set}" = set; then
20330 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020331else
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020333/* confdefs.h. */
20334_ACEOF
20335cat confdefs.h >>conftest.$ac_ext
20336cat >>conftest.$ac_ext <<_ACEOF
20337/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020338
20339#ifdef HAVE_SYS_TYPES_H
20340#include <sys/types.h>
20341#endif
20342#ifdef HAVE_SYS_SOCKET_H
20343#include <sys/socket.h>
20344#endif
20345
20346
Martin v. Löwis11437992002-04-12 09:54:03 +000020347int
20348main ()
20349{
20350if ((socklen_t *) 0)
20351 return 0;
20352if (sizeof (socklen_t))
20353 return 0;
20354 ;
20355 return 0;
20356}
20357_ACEOF
20358rm -f conftest.$ac_objext
20359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020360 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020362 grep -v '^ *+' conftest.er1 >conftest.err
20363 rm -f conftest.er1
20364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20366 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020367 { ac_try='test -z "$ac_c_werror_flag"
20368 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20370 (eval $ac_try) 2>&5
20371 ac_status=$?
20372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20373 (exit $ac_status); }; } &&
20374 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20376 (eval $ac_try) 2>&5
20377 ac_status=$?
20378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20379 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020380 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020381else
Martin v. Löwis11437992002-04-12 09:54:03 +000020382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020383sed 's/^/| /' conftest.$ac_ext >&5
20384
Martin v. Löwis11437992002-04-12 09:54:03 +000020385ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020386fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020388fi
20389echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20390echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20391if test $ac_cv_type_socklen_t = yes; then
20392 :
20393else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020394
Martin v. Löwis01c04012002-11-11 14:58:44 +000020395cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020396#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020397_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020398
20399fi
20400
Michael W. Hudson54241132001-12-07 15:38:26 +000020401
Michael W. Hudson54241132001-12-07 15:38:26 +000020402
20403
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020404for h in `(cd $srcdir;echo Python/thread_*.h)`
20405do
20406 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20407done
20408
Michael W. Hudson54241132001-12-07 15:38:26 +000020409
Jack Jansen0b06be72002-06-21 14:48:38 +000020410SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020411echo "$as_me:$LINENO: checking for build directories" >&5
20412echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020413for dir in $SRCDIRS; do
20414 if test ! -d $dir; then
20415 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020416 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020417done
Martin v. Löwis11437992002-04-12 09:54:03 +000020418echo "$as_me:$LINENO: result: done" >&5
20419echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020420
Guido van Rossum627b2d71993-12-24 10:39:16 +000020421# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020422 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020423
Martin v. Löwis11437992002-04-12 09:54:03 +000020424cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020425# This file is a shell script that caches the results of configure
20426# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020427# scripts and configure runs, see configure's option --config-cache.
20428# It is not useful on other systems. If it contains results you don't
20429# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020430#
Martin v. Löwis11437992002-04-12 09:54:03 +000020431# config.status only pays attention to the cache file if you give it
20432# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020433#
Skip Montanaro6dead952003-09-25 14:50:04 +000020434# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020435# loading this file, other *unset* `ac_cv_foo' will be assigned the
20436# following values.
20437
20438_ACEOF
20439
Guido van Rossumf78abae1997-01-21 22:02:36 +000020440# The following way of writing the cache mishandles newlines in values,
20441# but we know of no workaround that is simple, portable, and efficient.
20442# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020443# Ultrix sh set writes to stderr and can't be redirected directly,
20444# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020445{
20446 (set) 2>&1 |
20447 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20448 *ac_space=\ *)
20449 # `set' does not quote correctly, so add quotes (double-quote
20450 # substitution turns \\\\ into \\, and sed turns \\ into \).
20451 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020452 "s/'/'\\\\''/g;
20453 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020454 ;;
20455 *)
20456 # `set' quotes correctly as required by POSIX, so do not add quotes.
20457 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020458 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 ;;
20460 esac;
20461} |
20462 sed '
20463 t clear
20464 : clear
20465 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20466 t end
20467 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20468 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020469if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020470 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20472 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020473 else
20474 echo "not updating unwritable cache $cache_file"
20475 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020476fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020477rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020478
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020479test "x$prefix" = xNONE && prefix=$ac_default_prefix
20480# Let make expand exec_prefix.
20481test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020482
Martin v. Löwis11437992002-04-12 09:54:03 +000020483# VPATH may cause trouble with some makes, so we remove $(srcdir),
20484# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20485# trailing colons and then remove the whole line if VPATH becomes empty
20486# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020487if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020488 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020489s/:*\$(srcdir):*/:/;
20490s/:*\${srcdir}:*/:/;
20491s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020492s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020493s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020494s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020495}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020496fi
20497
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020498DEFS=-DHAVE_CONFIG_H
20499
Skip Montanaro6dead952003-09-25 14:50:04 +000020500ac_libobjs=
20501ac_ltlibobjs=
20502for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20503 # 1. Remove the extension, and $U if already installed.
20504 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020505 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020506 # 2. Add them.
20507 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20508 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20509done
20510LIBOBJS=$ac_libobjs
20511
20512LTLIBOBJS=$ac_ltlibobjs
20513
20514
Martin v. Löwis11437992002-04-12 09:54:03 +000020515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020516: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020517ac_clean_files_save=$ac_clean_files
20518ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20519{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20520echo "$as_me: creating $CONFIG_STATUS" >&6;}
20521cat >$CONFIG_STATUS <<_ACEOF
20522#! $SHELL
20523# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020524# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020525# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020526# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020527
Martin v. Löwis11437992002-04-12 09:54:03 +000020528debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020529ac_cs_recheck=false
20530ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020531SHELL=\${CONFIG_SHELL-$SHELL}
20532_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020533
Martin v. Löwis11437992002-04-12 09:54:03 +000020534cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020535## --------------------- ##
20536## M4sh Initialization. ##
20537## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020538
Martin v. Löwis11437992002-04-12 09:54:03 +000020539# Be Bourne compatible
20540if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20541 emulate sh
20542 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020543 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20544 # is contrary to our usage. Disable this feature.
20545 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020546elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20547 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020548fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020549DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020550
Martin v. Löwis11437992002-04-12 09:54:03 +000020551# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020552if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020553 as_unset=unset
20554else
20555 as_unset=false
20556fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020557
Skip Montanaro6dead952003-09-25 14:50:04 +000020558
20559# Work around bugs in pre-3.0 UWIN ksh.
20560$as_unset ENV MAIL MAILPATH
20561PS1='$ '
20562PS2='> '
20563PS4='+ '
20564
20565# NLS nuisances.
20566for as_var in \
20567 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20568 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20569 LC_TELEPHONE LC_TIME
20570do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020571 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020572 eval $as_var=C; export $as_var
20573 else
20574 $as_unset $as_var
20575 fi
20576done
20577
20578# Required to use basename.
20579if expr a : '\(a\)' >/dev/null 2>&1; then
20580 as_expr=expr
20581else
20582 as_expr=false
20583fi
20584
20585if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20586 as_basename=basename
20587else
20588 as_basename=false
20589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020590
20591
20592# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020593as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020594$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20595 X"$0" : 'X\(//\)$' \| \
20596 X"$0" : 'X\(/\)$' \| \
20597 . : '\(.\)' 2>/dev/null ||
20598echo X/"$0" |
20599 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20600 /^X\/\(\/\/\)$/{ s//\1/; q; }
20601 /^X\/\(\/\).*/{ s//\1/; q; }
20602 s/.*/./; q'`
20603
Skip Montanaro6dead952003-09-25 14:50:04 +000020604
Martin v. Löwis11437992002-04-12 09:54:03 +000020605# PATH needs CR, and LINENO needs CR and PATH.
20606# Avoid depending upon Character Ranges.
20607as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20608as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20609as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20610as_cr_digits='0123456789'
20611as_cr_alnum=$as_cr_Letters$as_cr_digits
20612
20613# The user is always right.
20614if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020615 echo "#! /bin/sh" >conf$$.sh
20616 echo "exit 0" >>conf$$.sh
20617 chmod +x conf$$.sh
20618 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020619 PATH_SEPARATOR=';'
20620 else
20621 PATH_SEPARATOR=:
20622 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020623 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020624fi
20625
20626
20627 as_lineno_1=$LINENO
20628 as_lineno_2=$LINENO
20629 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20630 test "x$as_lineno_1" != "x$as_lineno_2" &&
20631 test "x$as_lineno_3" = "x$as_lineno_2" || {
20632 # Find who we are. Look in the path if we contain no path at all
20633 # relative or not.
20634 case $0 in
20635 *[\\/]* ) as_myself=$0 ;;
20636 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20637for as_dir in $PATH
20638do
20639 IFS=$as_save_IFS
20640 test -z "$as_dir" && as_dir=.
20641 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20642done
20643
20644 ;;
20645 esac
20646 # We did not find ourselves, most probably we were run as `sh COMMAND'
20647 # in which case we are not to be found in the path.
20648 if test "x$as_myself" = x; then
20649 as_myself=$0
20650 fi
20651 if test ! -f "$as_myself"; then
20652 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20653echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20654 { (exit 1); exit 1; }; }
20655 fi
20656 case $CONFIG_SHELL in
20657 '')
20658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20659for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20660do
20661 IFS=$as_save_IFS
20662 test -z "$as_dir" && as_dir=.
20663 for as_base in sh bash ksh sh5; do
20664 case $as_dir in
20665 /*)
20666 if ("$as_dir/$as_base" -c '
20667 as_lineno_1=$LINENO
20668 as_lineno_2=$LINENO
20669 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20670 test "x$as_lineno_1" != "x$as_lineno_2" &&
20671 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020672 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20673 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020674 CONFIG_SHELL=$as_dir/$as_base
20675 export CONFIG_SHELL
20676 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20677 fi;;
20678 esac
20679 done
20680done
20681;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020682 esac
20683
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20685 # uniformly replaced by the line number. The first 'sed' inserts a
20686 # line-number line before each line; the second 'sed' does the real
20687 # work. The second script uses 'N' to pair each line-number line
20688 # with the numbered line, and appends trailing '-' during
20689 # substitution so that $LINENO is not a special case at line end.
20690 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20691 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20692 sed '=' <$as_myself |
20693 sed '
20694 N
20695 s,$,-,
20696 : loop
20697 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20698 t loop
20699 s,-$,,
20700 s,^['$as_cr_digits']*\n,,
20701 ' >$as_me.lineno &&
20702 chmod +x $as_me.lineno ||
20703 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20704echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20705 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020706
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 # Don't try to exec as it changes $[0], causing all sort of problems
20708 # (the dirname of $[0] is not the place where we might find the
20709 # original and so on. Autoconf is especially sensible to this).
20710 . ./$as_me.lineno
20711 # Exit status is that of the last command.
20712 exit
20713}
20714
20715
20716case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20717 *c*,-n*) ECHO_N= ECHO_C='
20718' ECHO_T=' ' ;;
20719 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20720 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20721esac
20722
20723if expr a : '\(a\)' >/dev/null 2>&1; then
20724 as_expr=expr
20725else
20726 as_expr=false
20727fi
20728
20729rm -f conf$$ conf$$.exe conf$$.file
20730echo >conf$$.file
20731if ln -s conf$$.file conf$$ 2>/dev/null; then
20732 # We could just check for DJGPP; but this test a) works b) is more generic
20733 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20734 if test -f conf$$.exe; then
20735 # Don't use ln at all; we don't have any links
20736 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020737 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 as_ln_s='ln -s'
20739 fi
20740elif ln conf$$.file conf$$ 2>/dev/null; then
20741 as_ln_s=ln
20742else
20743 as_ln_s='cp -p'
20744fi
20745rm -f conf$$ conf$$.exe conf$$.file
20746
Skip Montanaro6dead952003-09-25 14:50:04 +000020747if mkdir -p . 2>/dev/null; then
20748 as_mkdir_p=:
20749else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020750 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020751 as_mkdir_p=false
20752fi
20753
Martin v. Löwis11437992002-04-12 09:54:03 +000020754as_executable_p="test -f"
20755
20756# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020757as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020758
20759# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020760as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020761
20762
20763# IFS
20764# We need space, tab and new line, in precisely that order.
20765as_nl='
20766'
20767IFS=" $as_nl"
20768
20769# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020770$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020771
20772exec 6>&1
20773
20774# Open the log real soon, to keep \$[0] and so on meaningful, and to
20775# report actual input values of CONFIG_FILES etc. instead of their
20776# values after options handling. Logging --version etc. is OK.
20777exec 5>>config.log
20778{
20779 echo
20780 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20781## Running $as_me. ##
20782_ASBOX
20783} >&5
20784cat >&5 <<_CSEOF
20785
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020786This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020787generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020788
20789 CONFIG_FILES = $CONFIG_FILES
20790 CONFIG_HEADERS = $CONFIG_HEADERS
20791 CONFIG_LINKS = $CONFIG_LINKS
20792 CONFIG_COMMANDS = $CONFIG_COMMANDS
20793 $ $0 $@
20794
20795_CSEOF
20796echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20797echo >&5
20798_ACEOF
20799
20800# Files that config.status was made for.
20801if test -n "$ac_config_files"; then
20802 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20803fi
20804
20805if test -n "$ac_config_headers"; then
20806 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20807fi
20808
20809if test -n "$ac_config_links"; then
20810 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20811fi
20812
20813if test -n "$ac_config_commands"; then
20814 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20815fi
20816
20817cat >>$CONFIG_STATUS <<\_ACEOF
20818
20819ac_cs_usage="\
20820\`$as_me' instantiates files from templates according to the
20821current configuration.
20822
20823Usage: $0 [OPTIONS] [FILE]...
20824
20825 -h, --help print this help, then exit
20826 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020827 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020828 -d, --debug don't remove temporary files
20829 --recheck update $as_me by reconfiguring in the same conditions
20830 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020831 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020832 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020833 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020834
20835Configuration files:
20836$config_files
20837
20838Configuration headers:
20839$config_headers
20840
20841Report bugs to <bug-autoconf@gnu.org>."
20842_ACEOF
20843
20844cat >>$CONFIG_STATUS <<_ACEOF
20845ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020846python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020847configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20849
Skip Montanarof0d5f792004-08-15 14:08:23 +000020850Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020851This config.status script is free software; the Free Software Foundation
20852gives unlimited permission to copy, distribute and modify it."
20853srcdir=$srcdir
20854INSTALL="$INSTALL"
20855_ACEOF
20856
20857cat >>$CONFIG_STATUS <<\_ACEOF
20858# If no file are specified by the user, then we need to provide default
20859# value. By we need to know if files were specified by the user.
20860ac_need_defaults=:
20861while test $# != 0
20862do
20863 case $1 in
20864 --*=*)
20865 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20866 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020867 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020869 -*)
20870 ac_option=$1
20871 ac_optarg=$2
20872 ac_shift=shift
20873 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 *) # This is not an option, so the user has probably given explicit
20875 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020876 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 ac_need_defaults=false;;
20878 esac
20879
Skip Montanaro6dead952003-09-25 14:50:04 +000020880 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020881 # Handling of the options.
20882_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020883cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020884 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20885 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 --version | --vers* | -V )
20887 echo "$ac_cs_version"; exit 0 ;;
20888 --he | --h)
20889 # Conflict between --help and --header
20890 { { echo "$as_me:$LINENO: error: ambiguous option: $1
20891Try \`$0 --help' for more information." >&5
20892echo "$as_me: error: ambiguous option: $1
20893Try \`$0 --help' for more information." >&2;}
20894 { (exit 1); exit 1; }; };;
20895 --help | --hel | -h )
20896 echo "$ac_cs_usage"; exit 0 ;;
20897 --debug | --d* | -d )
20898 debug=: ;;
20899 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020900 $ac_shift
20901 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020902 ac_need_defaults=false;;
20903 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020904 $ac_shift
20905 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020906 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020907 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20908 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20909 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020910
20911 # This is an error.
20912 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20913Try \`$0 --help' for more information." >&5
20914echo "$as_me: error: unrecognized option: $1
20915Try \`$0 --help' for more information." >&2;}
20916 { (exit 1); exit 1; }; } ;;
20917
20918 *) ac_config_targets="$ac_config_targets $1" ;;
20919
20920 esac
20921 shift
20922done
20923
Skip Montanaro6dead952003-09-25 14:50:04 +000020924ac_configure_extra_args=
20925
20926if $ac_cs_silent; then
20927 exec 6>/dev/null
20928 ac_configure_extra_args="$ac_configure_extra_args --silent"
20929fi
20930
20931_ACEOF
20932cat >>$CONFIG_STATUS <<_ACEOF
20933if \$ac_cs_recheck; then
20934 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20935 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20936fi
20937
Martin v. Löwis11437992002-04-12 09:54:03 +000020938_ACEOF
20939
20940
20941
20942
20943
20944cat >>$CONFIG_STATUS <<\_ACEOF
20945for ac_config_target in $ac_config_targets
20946do
20947 case "$ac_config_target" in
20948 # Handling of arguments.
20949 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
20950 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
20951 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20952 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20953echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20954 { (exit 1); exit 1; }; };;
20955 esac
20956done
20957
20958# If the user did not use the arguments to specify the items to instantiate,
20959# then the envvar interface is used. Set only those that are not.
20960# We use the long form for the default assignment because of an extremely
20961# bizarre bug on SunOS 4.1.3.
20962if $ac_need_defaults; then
20963 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20964 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20965fi
20966
Skip Montanaro6dead952003-09-25 14:50:04 +000020967# Have a temporary directory for convenience. Make it in the build tree
20968# simply because there is no reason to put it here, and in addition,
20969# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000020970# Create a temporary directory, and hook for its removal unless debugging.
20971$debug ||
20972{
20973 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20974 trap '{ (exit 1); exit 1; }' 1 2 13 15
20975}
20976
20977# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020978
Martin v. Löwis11437992002-04-12 09:54:03 +000020979{
Skip Montanaro6dead952003-09-25 14:50:04 +000020980 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020981 test -n "$tmp" && test -d "$tmp"
20982} ||
20983{
Skip Montanaro6dead952003-09-25 14:50:04 +000020984 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000020985 (umask 077 && mkdir $tmp)
20986} ||
20987{
Skip Montanaro6dead952003-09-25 14:50:04 +000020988 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 { (exit 1); exit 1; }
20990}
20991
20992_ACEOF
20993
20994cat >>$CONFIG_STATUS <<_ACEOF
20995
20996#
20997# CONFIG_FILES section.
20998#
20999
21000# No need to generate the scripts if there are no CONFIG_FILES.
21001# This happens for instance when ./config.status config.h
21002if test -n "\$CONFIG_FILES"; then
21003 # Protect against being on the right side of a sed subst in config.status.
21004 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21005 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21006s,@SHELL@,$SHELL,;t t
21007s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21008s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21009s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21010s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21011s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21012s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21013s,@exec_prefix@,$exec_prefix,;t t
21014s,@prefix@,$prefix,;t t
21015s,@program_transform_name@,$program_transform_name,;t t
21016s,@bindir@,$bindir,;t t
21017s,@sbindir@,$sbindir,;t t
21018s,@libexecdir@,$libexecdir,;t t
21019s,@datadir@,$datadir,;t t
21020s,@sysconfdir@,$sysconfdir,;t t
21021s,@sharedstatedir@,$sharedstatedir,;t t
21022s,@localstatedir@,$localstatedir,;t t
21023s,@libdir@,$libdir,;t t
21024s,@includedir@,$includedir,;t t
21025s,@oldincludedir@,$oldincludedir,;t t
21026s,@infodir@,$infodir,;t t
21027s,@mandir@,$mandir,;t t
21028s,@build_alias@,$build_alias,;t t
21029s,@host_alias@,$host_alias,;t t
21030s,@target_alias@,$target_alias,;t t
21031s,@DEFS@,$DEFS,;t t
21032s,@ECHO_C@,$ECHO_C,;t t
21033s,@ECHO_N@,$ECHO_N,;t t
21034s,@ECHO_T@,$ECHO_T,;t t
21035s,@LIBS@,$LIBS,;t t
21036s,@VERSION@,$VERSION,;t t
21037s,@SOVERSION@,$SOVERSION,;t t
21038s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21039s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21040s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21041s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21042s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21043s,@MACHDEP@,$MACHDEP,;t t
21044s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021045s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021046s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021047s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021048s,@CXX@,$CXX,;t t
21049s,@MAINOBJ@,$MAINOBJ,;t t
21050s,@EXEEXT@,$EXEEXT,;t t
21051s,@CC@,$CC,;t t
21052s,@CFLAGS@,$CFLAGS,;t t
21053s,@LDFLAGS@,$LDFLAGS,;t t
21054s,@CPPFLAGS@,$CPPFLAGS,;t t
21055s,@ac_ct_CC@,$ac_ct_CC,;t t
21056s,@OBJEXT@,$OBJEXT,;t t
21057s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021058s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021059s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21060s,@LIBRARY@,$LIBRARY,;t t
21061s,@LDLIBRARY@,$LDLIBRARY,;t t
21062s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21063s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21064s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21065s,@INSTSONAME@,$INSTSONAME,;t t
21066s,@RUNSHARED@,$RUNSHARED,;t t
21067s,@LINKCC@,$LINKCC,;t t
21068s,@RANLIB@,$RANLIB,;t t
21069s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21070s,@AR@,$AR,;t t
21071s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21072s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21073s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21074s,@LN@,$LN,;t t
21075s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021076s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021077s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021078s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21079s,@SO@,$SO,;t t
21080s,@LDSHARED@,$LDSHARED,;t t
21081s,@BLDSHARED@,$BLDSHARED,;t t
21082s,@CCSHARED@,$CCSHARED,;t t
21083s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21084s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021085s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021086s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21087s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21088s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21089s,@LDLAST@,$LDLAST,;t t
21090s,@THREADOBJ@,$THREADOBJ,;t t
21091s,@DLINCLDIR@,$DLINCLDIR,;t t
21092s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21093s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021094s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021095s,@LIBOBJS@,$LIBOBJS,;t t
21096s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21097s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21098s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21099s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21100s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21101s,@LIBM@,$LIBM,;t t
21102s,@LIBC@,$LIBC,;t t
21103s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21104s,@THREADHEADERS@,$THREADHEADERS,;t t
21105s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021106s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021107CEOF
21108
21109_ACEOF
21110
21111 cat >>$CONFIG_STATUS <<\_ACEOF
21112 # Split the substitutions into bite-sized pieces for seds with
21113 # small command number limits, like on Digital OSF/1 and HP-UX.
21114 ac_max_sed_lines=48
21115 ac_sed_frag=1 # Number of current file.
21116 ac_beg=1 # First line for current file.
21117 ac_end=$ac_max_sed_lines # Line after last line for current file.
21118 ac_more_lines=:
21119 ac_sed_cmds=
21120 while $ac_more_lines; do
21121 if test $ac_beg -gt 1; then
21122 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21123 else
21124 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21125 fi
21126 if test ! -s $tmp/subs.frag; then
21127 ac_more_lines=false
21128 else
21129 # The purpose of the label and of the branching condition is to
21130 # speed up the sed processing (if there are no `@' at all, there
21131 # is no need to browse any of the substitutions).
21132 # These are the two extra sed commands mentioned above.
21133 (echo ':t
21134 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21135 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021136 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021137 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021138 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 fi
21140 ac_sed_frag=`expr $ac_sed_frag + 1`
21141 ac_beg=$ac_end
21142 ac_end=`expr $ac_end + $ac_max_sed_lines`
21143 fi
21144 done
21145 if test -z "$ac_sed_cmds"; then
21146 ac_sed_cmds=cat
21147 fi
21148fi # test -n "$CONFIG_FILES"
21149
21150_ACEOF
21151cat >>$CONFIG_STATUS <<\_ACEOF
21152for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21153 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21154 case $ac_file in
21155 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 cat >$tmp/stdin
21157 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21158 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021159 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021160 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 * ) ac_file_in=$ac_file.in ;;
21162 esac
21163
21164 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21165 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21166$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021167 X"$ac_file" : 'X\(//\)[^/]' \| \
21168 X"$ac_file" : 'X\(//\)$' \| \
21169 X"$ac_file" : 'X\(/\)' \| \
21170 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021171echo X"$ac_file" |
21172 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21173 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21174 /^X\(\/\/\)$/{ s//\1/; q; }
21175 /^X\(\/\).*/{ s//\1/; q; }
21176 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021177 { if $as_mkdir_p; then
21178 mkdir -p "$ac_dir"
21179 else
21180 as_dir="$ac_dir"
21181 as_dirs=
21182 while test ! -d "$as_dir"; do
21183 as_dirs="$as_dir $as_dirs"
21184 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21185$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021186 X"$as_dir" : 'X\(//\)[^/]' \| \
21187 X"$as_dir" : 'X\(//\)$' \| \
21188 X"$as_dir" : 'X\(/\)' \| \
21189 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021190echo X"$as_dir" |
21191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21192 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21193 /^X\(\/\/\)$/{ s//\1/; q; }
21194 /^X\(\/\).*/{ s//\1/; q; }
21195 s/.*/./; q'`
21196 done
21197 test ! -n "$as_dirs" || mkdir $as_dirs
21198 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21199echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21200 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021201
21202 ac_builddir=.
21203
21204if test "$ac_dir" != .; then
21205 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21206 # A "../" for each directory in $ac_dir_suffix.
21207 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21208else
21209 ac_dir_suffix= ac_top_builddir=
21210fi
21211
21212case $srcdir in
21213 .) # No --srcdir option. We are building in place.
21214 ac_srcdir=.
21215 if test -z "$ac_top_builddir"; then
21216 ac_top_srcdir=.
21217 else
21218 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21219 fi ;;
21220 [\\/]* | ?:[\\/]* ) # Absolute path.
21221 ac_srcdir=$srcdir$ac_dir_suffix;
21222 ac_top_srcdir=$srcdir ;;
21223 *) # Relative path.
21224 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21225 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21226esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021227
21228# Do not use `cd foo && pwd` to compute absolute paths, because
21229# the directories may not exist.
21230case `pwd` in
21231.) ac_abs_builddir="$ac_dir";;
21232*)
21233 case "$ac_dir" in
21234 .) ac_abs_builddir=`pwd`;;
21235 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21236 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21237 esac;;
21238esac
21239case $ac_abs_builddir in
21240.) ac_abs_top_builddir=${ac_top_builddir}.;;
21241*)
21242 case ${ac_top_builddir}. in
21243 .) ac_abs_top_builddir=$ac_abs_builddir;;
21244 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21245 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21246 esac;;
21247esac
21248case $ac_abs_builddir in
21249.) ac_abs_srcdir=$ac_srcdir;;
21250*)
21251 case $ac_srcdir in
21252 .) ac_abs_srcdir=$ac_abs_builddir;;
21253 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21254 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21255 esac;;
21256esac
21257case $ac_abs_builddir in
21258.) ac_abs_top_srcdir=$ac_top_srcdir;;
21259*)
21260 case $ac_top_srcdir in
21261 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21262 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21263 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21264 esac;;
21265esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021266
21267
21268 case $INSTALL in
21269 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21270 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21271 esac
21272
Brett Cannon43802422005-02-10 20:48:03 +000021273 if test x"$ac_file" != x-; then
21274 { echo "$as_me:$LINENO: creating $ac_file" >&5
21275echo "$as_me: creating $ac_file" >&6;}
21276 rm -f "$ac_file"
21277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 # Let's still pretend it is `configure' which instantiates (i.e., don't
21279 # use $as_me), people would be surprised to read:
21280 # /* config.h. Generated by config.status. */
21281 if test x"$ac_file" = x-; then
21282 configure_input=
21283 else
21284 configure_input="$ac_file. "
21285 fi
21286 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021287 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021288
21289 # First look for the input files in the build tree, otherwise in the
21290 # src tree.
21291 ac_file_inputs=`IFS=:
21292 for f in $ac_file_in; do
21293 case $f in
21294 -) echo $tmp/stdin ;;
21295 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021296 # Absolute (can't be DOS-style, as IFS=:)
21297 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021298echo "$as_me: error: cannot find input file: $f" >&2;}
21299 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021300 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021302 if test -f "$f"; then
21303 # Build tree
21304 echo "$f"
21305 elif test -f "$srcdir/$f"; then
21306 # Source tree
21307 echo "$srcdir/$f"
21308 else
21309 # /dev/null tree
21310 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021311echo "$as_me: error: cannot find input file: $f" >&2;}
21312 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021313 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021314 esac
21315 done` || { (exit 1); exit 1; }
21316_ACEOF
21317cat >>$CONFIG_STATUS <<_ACEOF
21318 sed "$ac_vpsub
21319$extrasub
21320_ACEOF
21321cat >>$CONFIG_STATUS <<\_ACEOF
21322:t
21323/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21324s,@configure_input@,$configure_input,;t t
21325s,@srcdir@,$ac_srcdir,;t t
21326s,@abs_srcdir@,$ac_abs_srcdir,;t t
21327s,@top_srcdir@,$ac_top_srcdir,;t t
21328s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21329s,@builddir@,$ac_builddir,;t t
21330s,@abs_builddir@,$ac_abs_builddir,;t t
21331s,@top_builddir@,$ac_top_builddir,;t t
21332s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21333s,@INSTALL@,$ac_INSTALL,;t t
21334" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21335 rm -f $tmp/stdin
21336 if test x"$ac_file" != x-; then
21337 mv $tmp/out $ac_file
21338 else
21339 cat $tmp/out
21340 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021341 fi
21342
Martin v. Löwis11437992002-04-12 09:54:03 +000021343done
21344_ACEOF
21345cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021346
Martin v. Löwis11437992002-04-12 09:54:03 +000021347#
21348# CONFIG_HEADER section.
21349#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021350
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021351# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21352# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021353#
21354# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021355ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21356ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021357ac_dC=' '
21358ac_dD=',;t'
21359# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021360ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021361ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021362ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021363ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021364
Martin v. Löwis11437992002-04-12 09:54:03 +000021365for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021366 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 case $ac_file in
21368 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021369 cat >$tmp/stdin
21370 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21371 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021372 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021373 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021374 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021375 esac
21376
Martin v. Löwis11437992002-04-12 09:54:03 +000021377 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21378echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021379
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 # First look for the input files in the build tree, otherwise in the
21381 # src tree.
21382 ac_file_inputs=`IFS=:
21383 for f in $ac_file_in; do
21384 case $f in
21385 -) echo $tmp/stdin ;;
21386 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021387 # Absolute (can't be DOS-style, as IFS=:)
21388 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021389echo "$as_me: error: cannot find input file: $f" >&2;}
21390 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021391 # Do quote $f, to prevent DOS paths from being IFS'd.
21392 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021393 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021394 if test -f "$f"; then
21395 # Build tree
21396 echo "$f"
21397 elif test -f "$srcdir/$f"; then
21398 # Source tree
21399 echo "$srcdir/$f"
21400 else
21401 # /dev/null tree
21402 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021403echo "$as_me: error: cannot find input file: $f" >&2;}
21404 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021405 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021406 esac
21407 done` || { (exit 1); exit 1; }
21408 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021409 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021410
Martin v. Löwis11437992002-04-12 09:54:03 +000021411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021412
Martin v. Löwis11437992002-04-12 09:54:03 +000021413# Transform confdefs.h into two sed scripts, `conftest.defines' and
21414# `conftest.undefs', that substitutes the proper values into
21415# config.h.in to produce config.h. The first handles `#define'
21416# templates, and the second `#undef' templates.
21417# And first: Protect against being on the right side of a sed subst in
21418# config.status. Protect against being in an unquoted here document
21419# in config.status.
21420rm -f conftest.defines conftest.undefs
21421# Using a here document instead of a string reduces the quoting nightmare.
21422# Putting comments in sed scripts is not portable.
21423#
21424# `end' is used to avoid that the second main sed command (meant for
21425# 0-ary CPP macros) applies to n-ary macro definitions.
21426# See the Autoconf documentation for `clear'.
21427cat >confdef2sed.sed <<\_ACEOF
21428s/[\\&,]/\\&/g
21429s,[\\$`],\\&,g
21430t clear
21431: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021432s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021433t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021435: end
21436_ACEOF
21437# If some macros were called several times there might be several times
21438# the same #defines, which is useless. Nevertheless, we may not want to
21439# sort them, since we want the *last* AC-DEFINE to be honored.
21440uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21441sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21442rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021443
21444# This sed command replaces #undef with comments. This is necessary, for
21445# example, in the case of _POSIX_SOURCE, which is predefined and required
21446# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021447cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021448s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021449_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021450
Martin v. Löwis11437992002-04-12 09:54:03 +000021451# Break up conftest.defines because some shells have a limit on the size
21452# of here documents, and old seds have small limits too (100 cmds).
21453echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021454echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021455echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21456echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021457rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021458while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021459do
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 # Write a limited-size here document to $tmp/defines.sed.
21461 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21462 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021463 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021464 # Work around the forget-to-reset-the-flag bug.
21465 echo 't clr' >>$CONFIG_STATUS
21466 echo ': clr' >>$CONFIG_STATUS
21467 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021468 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021469 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21470 rm -f $tmp/in
21471 mv $tmp/out $tmp/in
21472' >>$CONFIG_STATUS
21473 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21474 rm -f conftest.defines
21475 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021476done
Martin v. Löwis11437992002-04-12 09:54:03 +000021477rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021478echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021479echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021480
Martin v. Löwis11437992002-04-12 09:54:03 +000021481# Break up conftest.undefs because some shells have a limit on the size
21482# of here documents, and old seds have small limits too (100 cmds).
21483echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21484rm -f conftest.tail
21485while grep . conftest.undefs >/dev/null
21486do
21487 # Write a limited-size here document to $tmp/undefs.sed.
21488 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21489 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021490 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021491 # Work around the forget-to-reset-the-flag bug.
21492 echo 't clr' >>$CONFIG_STATUS
21493 echo ': clr' >>$CONFIG_STATUS
21494 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21495 echo 'CEOF
21496 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21497 rm -f $tmp/in
21498 mv $tmp/out $tmp/in
21499' >>$CONFIG_STATUS
21500 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21501 rm -f conftest.undefs
21502 mv conftest.tail conftest.undefs
21503done
21504rm -f conftest.undefs
21505
21506cat >>$CONFIG_STATUS <<\_ACEOF
21507 # Let's still pretend it is `configure' which instantiates (i.e., don't
21508 # use $as_me), people would be surprised to read:
21509 # /* config.h. Generated by config.status. */
21510 if test x"$ac_file" = x-; then
21511 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021512 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021513 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021515 cat $tmp/in >>$tmp/config.h
21516 rm -f $tmp/in
21517 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021518 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021519 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21520echo "$as_me: $ac_file is unchanged" >&6;}
21521 else
21522 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21523$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021524 X"$ac_file" : 'X\(//\)[^/]' \| \
21525 X"$ac_file" : 'X\(//\)$' \| \
21526 X"$ac_file" : 'X\(/\)' \| \
21527 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021528echo X"$ac_file" |
21529 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21530 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21531 /^X\(\/\/\)$/{ s//\1/; q; }
21532 /^X\(\/\).*/{ s//\1/; q; }
21533 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021534 { if $as_mkdir_p; then
21535 mkdir -p "$ac_dir"
21536 else
21537 as_dir="$ac_dir"
21538 as_dirs=
21539 while test ! -d "$as_dir"; do
21540 as_dirs="$as_dir $as_dirs"
21541 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21542$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021543 X"$as_dir" : 'X\(//\)[^/]' \| \
21544 X"$as_dir" : 'X\(//\)$' \| \
21545 X"$as_dir" : 'X\(/\)' \| \
21546 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021547echo X"$as_dir" |
21548 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21549 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21550 /^X\(\/\/\)$/{ s//\1/; q; }
21551 /^X\(\/\).*/{ s//\1/; q; }
21552 s/.*/./; q'`
21553 done
21554 test ! -n "$as_dirs" || mkdir $as_dirs
21555 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21556echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21557 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021558
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 rm -f $ac_file
21560 mv $tmp/config.h $ac_file
21561 fi
21562 else
21563 cat $tmp/config.h
21564 rm -f $tmp/config.h
21565 fi
21566done
21567_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021568
Martin v. Löwis11437992002-04-12 09:54:03 +000021569cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021570
Martin v. Löwis11437992002-04-12 09:54:03 +000021571{ (exit 0); exit 0; }
21572_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021573chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021574ac_clean_files=$ac_clean_files_save
21575
21576
21577# configure is writing to config.log, and then calls config.status.
21578# config.status does its own redirection, appending to config.log.
21579# Unfortunately, on DOS this fails, as config.log is still kept open
21580# by configure, so config.status won't be able to write to it; its
21581# output is simply discarded. So we exec the FD to /dev/null,
21582# effectively closing config.log, so it can be properly (re)opened and
21583# appended to by config.status. When coming back to configure, we
21584# need to make the FD available again.
21585if test "$no_create" != yes; then
21586 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021587 ac_config_status_args=
21588 test "$silent" = yes &&
21589 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021591 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 exec 5>>config.log
21593 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21594 # would make configure fail if this is the last instruction.
21595 $ac_cs_success || { (exit 1); exit 1; }
21596fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021597
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021598
21599echo "creating Setup"
21600if test ! -f Modules/Setup
21601then
21602 cp $srcdir/Modules/Setup.dist Modules/Setup
21603fi
21604
21605echo "creating Setup.local"
21606if test ! -f Modules/Setup.local
21607then
21608 echo "# Edit this file for local setup changes" >Modules/Setup.local
21609fi
21610
21611echo "creating Makefile"
21612$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21613 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021614 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021615mv config.c Modules