blob: 2e45be0a7649a71d243388a4e5a83c34d0350f48 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Hye-Shik Chang5f937a72005-06-02 13:09:30 +00002# From configure.in Revision: 1.484 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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öwisfd1c69e2004-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 Ward57c9a662000-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 Ward57c9a662000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +000011247
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011248
Barry Warsawc0d24d82000-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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016417echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16418echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16419if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16420 echo $ECHO_N "(cached) $ECHO_C" >&6
16421else
16422 cat >conftest.$ac_ext <<_ACEOF
16423/* confdefs.h. */
16424_ACEOF
16425cat confdefs.h >>conftest.$ac_ext
16426cat >>conftest.$ac_ext <<_ACEOF
16427/* end confdefs.h. */
16428$ac_includes_default
16429int
16430main ()
16431{
16432static struct stat ac_aggr;
16433if (ac_aggr.st_flags)
16434return 0;
16435 ;
16436 return 0;
16437}
16438_ACEOF
16439rm -f conftest.$ac_objext
16440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16441 (eval $ac_compile) 2>conftest.er1
16442 ac_status=$?
16443 grep -v '^ *+' conftest.er1 >conftest.err
16444 rm -f conftest.er1
16445 cat conftest.err >&5
16446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16447 (exit $ac_status); } &&
16448 { ac_try='test -z "$ac_c_werror_flag"
16449 || test ! -s conftest.err'
16450 { (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'
16456 { (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_flags=yes
16462else
16463 echo "$as_me: failed program was:" >&5
16464sed 's/^/| /' conftest.$ac_ext >&5
16465
16466cat >conftest.$ac_ext <<_ACEOF
16467/* 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_flags)
16478return 0;
16479 ;
16480 return 0;
16481}
16482_ACEOF
16483rm -f conftest.$ac_objext
16484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16485 (eval $ac_compile) 2>conftest.er1
16486 ac_status=$?
16487 grep -v '^ *+' conftest.er1 >conftest.err
16488 rm -f conftest.er1
16489 cat conftest.err >&5
16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491 (exit $ac_status); } &&
16492 { ac_try='test -z "$ac_c_werror_flag"
16493 || test ! -s conftest.err'
16494 { (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'
16500 { (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_flags=yes
16506else
16507 echo "$as_me: failed program was:" >&5
16508sed 's/^/| /' conftest.$ac_ext >&5
16509
16510ac_cv_member_struct_stat_st_flags=no
16511fi
16512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16513fi
16514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16515fi
16516echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16517echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16518if test $ac_cv_member_struct_stat_st_flags = yes; then
16519
16520cat >>confdefs.h <<_ACEOF
16521#define HAVE_STRUCT_STAT_ST_FLAGS 1
16522_ACEOF
16523
16524
16525fi
16526
Martin v. Löwis11437992002-04-12 09:54:03 +000016527echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16528echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16529if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016531else
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016533/* confdefs.h. */
16534_ACEOF
16535cat confdefs.h >>conftest.$ac_ext
16536cat >>conftest.$ac_ext <<_ACEOF
16537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016538$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016539int
16540main ()
16541{
16542static struct stat ac_aggr;
16543if (ac_aggr.st_blocks)
16544return 0;
16545 ;
16546 return 0;
16547}
16548_ACEOF
16549rm -f conftest.$ac_objext
16550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016551 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016553 grep -v '^ *+' conftest.er1 >conftest.err
16554 rm -f conftest.er1
16555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016558 { ac_try='test -z "$ac_c_werror_flag"
16559 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16561 (eval $ac_try) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); }; } &&
16565 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16567 (eval $ac_try) 2>&5
16568 ac_status=$?
16569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16570 (exit $ac_status); }; }; then
16571 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016572else
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016574sed 's/^/| /' conftest.$ac_ext >&5
16575
16576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016577/* confdefs.h. */
16578_ACEOF
16579cat confdefs.h >>conftest.$ac_ext
16580cat >>conftest.$ac_ext <<_ACEOF
16581/* end confdefs.h. */
16582$ac_includes_default
16583int
16584main ()
16585{
16586static struct stat ac_aggr;
16587if (sizeof ac_aggr.st_blocks)
16588return 0;
16589 ;
16590 return 0;
16591}
16592_ACEOF
16593rm -f conftest.$ac_objext
16594if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016597 grep -v '^ *+' conftest.er1 >conftest.err
16598 rm -f conftest.er1
16599 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16601 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016602 { ac_try='test -z "$ac_c_werror_flag"
16603 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16605 (eval $ac_try) 2>&5
16606 ac_status=$?
16607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16608 (exit $ac_status); }; } &&
16609 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16611 (eval $ac_try) 2>&5
16612 ac_status=$?
16613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614 (exit $ac_status); }; }; then
16615 ac_cv_member_struct_stat_st_blocks=yes
16616else
16617 echo "$as_me: failed program was:" >&5
16618sed 's/^/| /' conftest.$ac_ext >&5
16619
Martin v. Löwis11437992002-04-12 09:54:03 +000016620ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016621fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016622rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016623fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016625fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016626echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16627echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16628if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016629
Martin v. Löwis11437992002-04-12 09:54:03 +000016630cat >>confdefs.h <<_ACEOF
16631#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16632_ACEOF
16633
16634
16635cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016636#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016637_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016638
16639else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016640 case $LIBOBJS in
16641 "fileblocks.$ac_objext" | \
16642 *" fileblocks.$ac_objext" | \
16643 "fileblocks.$ac_objext "* | \
16644 *" fileblocks.$ac_objext "* ) ;;
16645 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16646esac
16647
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016648fi
16649
Michael W. Hudson54241132001-12-07 15:38:26 +000016650
Martin v. Löwis11437992002-04-12 09:54:03 +000016651
16652echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16653echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16654if test "${ac_cv_header_time_altzone+set}" = set; then
16655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016656else
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016658/* confdefs.h. */
16659_ACEOF
16660cat confdefs.h >>conftest.$ac_ext
16661cat >>conftest.$ac_ext <<_ACEOF
16662/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016663#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016664int
16665main ()
16666{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016667return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 ;
16669 return 0;
16670}
16671_ACEOF
16672rm -f conftest.$ac_objext
16673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016674 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016676 grep -v '^ *+' conftest.er1 >conftest.err
16677 rm -f conftest.er1
16678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16680 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016681 { ac_try='test -z "$ac_c_werror_flag"
16682 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16684 (eval $ac_try) 2>&5
16685 ac_status=$?
16686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16687 (exit $ac_status); }; } &&
16688 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16690 (eval $ac_try) 2>&5
16691 ac_status=$?
16692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016694 ac_cv_header_time_altzone=yes
16695else
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016697sed 's/^/| /' conftest.$ac_ext >&5
16698
Martin v. Löwis11437992002-04-12 09:54:03 +000016699ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016700fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016702fi
16703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16705echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016706if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016707
16708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016709#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016711
16712fi
16713
Guido van Rossumda88dad1995-01-26 00:46:29 +000016714was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016715echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16716echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16717cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016718/* confdefs.h. */
16719_ACEOF
16720cat confdefs.h >>conftest.$ac_ext
16721cat >>conftest.$ac_ext <<_ACEOF
16722/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016723
16724#include <sys/types.h>
16725#include <sys/select.h>
16726#include <sys/time.h>
16727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728int
16729main ()
16730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016731;
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext
16737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016738 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 grep -v '^ *+' conftest.er1 >conftest.err
16741 rm -f conftest.er1
16742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16744 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016745 { ac_try='test -z "$ac_c_werror_flag"
16746 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16748 (eval $ac_try) 2>&5
16749 ac_status=$?
16750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16751 (exit $ac_status); }; } &&
16752 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16754 (eval $ac_try) 2>&5
16755 ac_status=$?
16756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16757 (exit $ac_status); }; }; then
16758
16759
16760cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016761#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
16763
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016764 was_it_defined=yes
16765
Guido van Rossumf78abae1997-01-21 22:02:36 +000016766else
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016768sed 's/^/| /' conftest.$ac_ext >&5
16769
Guido van Rossum7f43da71994-08-01 12:15:30 +000016770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016772echo "$as_me:$LINENO: result: $was_it_defined" >&5
16773echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016774
Martin v. Löwis11437992002-04-12 09:54:03 +000016775echo "$as_me:$LINENO: checking for addrinfo" >&5
16776echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16777if test "${ac_cv_struct_addrinfo+set}" = set; then
16778 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016779else
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016781/* confdefs.h. */
16782_ACEOF
16783cat confdefs.h >>conftest.$ac_ext
16784cat >>conftest.$ac_ext <<_ACEOF
16785/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016786
16787# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016788int
16789main ()
16790{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016791struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016792 ;
16793 return 0;
16794}
16795_ACEOF
16796rm -f conftest.$ac_objext
16797if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800 grep -v '^ *+' conftest.er1 >conftest.err
16801 rm -f conftest.er1
16802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16804 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016805 { ac_try='test -z "$ac_c_werror_flag"
16806 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16809 ac_status=$?
16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16811 (exit $ac_status); }; } &&
16812 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016818 ac_cv_struct_addrinfo=yes
16819else
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016821sed 's/^/| /' conftest.$ac_ext >&5
16822
Martin v. Löwis11437992002-04-12 09:54:03 +000016823ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016824fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016826fi
16827
Martin v. Löwis11437992002-04-12 09:54:03 +000016828echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16829echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016830if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016831
16832cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016833#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016834_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016835
16836fi
16837
Martin v. Löwis11437992002-04-12 09:54:03 +000016838echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16839echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16840if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016842else
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016844/* confdefs.h. */
16845_ACEOF
16846cat confdefs.h >>conftest.$ac_ext
16847cat >>conftest.$ac_ext <<_ACEOF
16848/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016849
16850# include <sys/types.h>
16851# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016852int
16853main ()
16854{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016855struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ;
16857 return 0;
16858}
16859_ACEOF
16860rm -f conftest.$ac_objext
16861if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016862 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 grep -v '^ *+' conftest.er1 >conftest.err
16865 rm -f conftest.er1
16866 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16868 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016869 { ac_try='test -z "$ac_c_werror_flag"
16870 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16872 (eval $ac_try) 2>&5
16873 ac_status=$?
16874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16875 (exit $ac_status); }; } &&
16876 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16878 (eval $ac_try) 2>&5
16879 ac_status=$?
16880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16881 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016882 ac_cv_struct_sockaddr_storage=yes
16883else
Martin v. Löwis11437992002-04-12 09:54:03 +000016884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016885sed 's/^/| /' conftest.$ac_ext >&5
16886
Martin v. Löwis11437992002-04-12 09:54:03 +000016887ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016888fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016890fi
16891
Martin v. Löwis11437992002-04-12 09:54:03 +000016892echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16893echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016894if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016895
16896cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016897#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016898_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016899
16900fi
16901
Guido van Rossum627b2d71993-12-24 10:39:16 +000016902# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016903
Michael W. Hudson54241132001-12-07 15:38:26 +000016904
Martin v. Löwis11437992002-04-12 09:54:03 +000016905echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16906echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16907if test "${ac_cv_c_char_unsigned+set}" = set; then
16908 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016909else
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016911/* confdefs.h. */
16912_ACEOF
16913cat confdefs.h >>conftest.$ac_ext
16914cat >>conftest.$ac_ext <<_ACEOF
16915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016917int
16918main ()
16919{
16920static int test_array [1 - 2 * !(((char) -1) < 0)];
16921test_array [0] = 0
16922
16923 ;
16924 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016925}
Martin v. Löwis11437992002-04-12 09:54:03 +000016926_ACEOF
16927rm -f conftest.$ac_objext
16928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016929 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016931 grep -v '^ *+' conftest.er1 >conftest.err
16932 rm -f conftest.er1
16933 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16935 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016936 { ac_try='test -z "$ac_c_werror_flag"
16937 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16939 (eval $ac_try) 2>&5
16940 ac_status=$?
16941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16942 (exit $ac_status); }; } &&
16943 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16945 (eval $ac_try) 2>&5
16946 ac_status=$?
16947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016949 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016950else
16951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016952sed 's/^/| /' conftest.$ac_ext >&5
16953
Martin v. Löwis11437992002-04-12 09:54:03 +000016954ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016955fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016958echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16959echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016960if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016962#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016963_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016964
16965fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016966
Martin v. Löwis11437992002-04-12 09:54:03 +000016967echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16968echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16969if test "${ac_cv_c_const+set}" = set; then
16970 echo $ECHO_N "(cached) $ECHO_C" >&6
16971else
16972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016973/* confdefs.h. */
16974_ACEOF
16975cat confdefs.h >>conftest.$ac_ext
16976cat >>conftest.$ac_ext <<_ACEOF
16977/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979int
16980main ()
16981{
16982/* FIXME: Include the comments suggested by Paul. */
16983#ifndef __cplusplus
16984 /* Ultrix mips cc rejects this. */
16985 typedef int charset[2];
16986 const charset x;
16987 /* SunOS 4.1.1 cc rejects this. */
16988 char const *const *ccp;
16989 char **p;
16990 /* NEC SVR4.0.2 mips cc rejects this. */
16991 struct point {int x, y;};
16992 static struct point const zero = {0,0};
16993 /* AIX XL C 1.02.0.0 rejects this.
16994 It does not let you subtract one const X* pointer from another in
16995 an arm of an if-expression whose if-part is not a constant
16996 expression */
16997 const char *g = "string";
16998 ccp = &g + (g ? g-g : 0);
16999 /* HPUX 7.0 cc rejects these. */
17000 ++ccp;
17001 p = (char**) ccp;
17002 ccp = (char const *const *) p;
17003 { /* SCO 3.2v4 cc rejects this. */
17004 char *t;
17005 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017006
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 *t++ = 0;
17008 }
17009 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17010 int x[] = {25, 17};
17011 const int *foo = &x[0];
17012 ++foo;
17013 }
17014 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17015 typedef const int *iptr;
17016 iptr p = 0;
17017 ++p;
17018 }
17019 { /* AIX XL C 1.02.0.0 rejects this saying
17020 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17021 struct s { int j; const int *ap[3]; };
17022 struct s *b; b->j = 5;
17023 }
17024 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17025 const int foo = 10;
17026 }
17027#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017028
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 ;
17030 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017031}
Martin v. Löwis11437992002-04-12 09:54:03 +000017032_ACEOF
17033rm -f conftest.$ac_objext
17034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017035 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017037 grep -v '^ *+' conftest.er1 >conftest.err
17038 rm -f conftest.er1
17039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17041 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017042 { ac_try='test -z "$ac_c_werror_flag"
17043 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17045 (eval $ac_try) 2>&5
17046 ac_status=$?
17047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17048 (exit $ac_status); }; } &&
17049 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017055 ac_cv_c_const=yes
17056else
Martin v. Löwis11437992002-04-12 09:54:03 +000017057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017058sed 's/^/| /' conftest.$ac_ext >&5
17059
Martin v. Löwis11437992002-04-12 09:54:03 +000017060ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017061fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017062rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017063fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017064echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17065echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017066if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
17068cat >>confdefs.h <<\_ACEOF
17069#define const
17070_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017071
17072fi
17073
Michael W. Hudson54241132001-12-07 15:38:26 +000017074
Guido van Rossumda88dad1995-01-26 00:46:29 +000017075works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017076echo "$as_me:$LINENO: checking for working volatile" >&5
17077echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017079/* confdefs.h. */
17080_ACEOF
17081cat confdefs.h >>conftest.$ac_ext
17082cat >>conftest.$ac_ext <<_ACEOF
17083/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017084
Martin v. Löwis11437992002-04-12 09:54:03 +000017085int
17086main ()
17087{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017088volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 ;
17090 return 0;
17091}
17092_ACEOF
17093rm -f conftest.$ac_objext
17094if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017095 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 grep -v '^ *+' conftest.er1 >conftest.err
17098 rm -f conftest.er1
17099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17101 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017102 { ac_try='test -z "$ac_c_werror_flag"
17103 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17105 (eval $ac_try) 2>&5
17106 ac_status=$?
17107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17108 (exit $ac_status); }; } &&
17109 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17111 (eval $ac_try) 2>&5
17112 ac_status=$?
17113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017115 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017116else
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017118sed 's/^/| /' conftest.$ac_ext >&5
17119
Martin v. Löwis11437992002-04-12 09:54:03 +000017120
17121cat >>confdefs.h <<\_ACEOF
17122#define volatile
17123_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017124
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017125
Guido van Rossum627b2d71993-12-24 10:39:16 +000017126fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017128echo "$as_me:$LINENO: result: $works" >&5
17129echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017130
Guido van Rossumda88dad1995-01-26 00:46:29 +000017131works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017132echo "$as_me:$LINENO: checking for working signed char" >&5
17133echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017135/* confdefs.h. */
17136_ACEOF
17137cat confdefs.h >>conftest.$ac_ext
17138cat >>conftest.$ac_ext <<_ACEOF
17139/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017140
Martin v. Löwis11437992002-04-12 09:54:03 +000017141int
17142main ()
17143{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017144signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017145 ;
17146 return 0;
17147}
17148_ACEOF
17149rm -f conftest.$ac_objext
17150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017151 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017153 grep -v '^ *+' conftest.er1 >conftest.err
17154 rm -f conftest.er1
17155 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017158 { ac_try='test -z "$ac_c_werror_flag"
17159 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17161 (eval $ac_try) 2>&5
17162 ac_status=$?
17163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17164 (exit $ac_status); }; } &&
17165 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17167 (eval $ac_try) 2>&5
17168 ac_status=$?
17169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17170 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017171 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017172else
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017174sed 's/^/| /' conftest.$ac_ext >&5
17175
Martin v. Löwis11437992002-04-12 09:54:03 +000017176
17177cat >>confdefs.h <<\_ACEOF
17178#define signed
17179_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017180
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017181
Guido van Rossum7f43da71994-08-01 12:15:30 +000017182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017184echo "$as_me:$LINENO: result: $works" >&5
17185echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017186
Guido van Rossumda88dad1995-01-26 00:46:29 +000017187have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017188echo "$as_me:$LINENO: checking for prototypes" >&5
17189echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017191/* confdefs.h. */
17192_ACEOF
17193cat confdefs.h >>conftest.$ac_ext
17194cat >>conftest.$ac_ext <<_ACEOF
17195/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017196int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017197int
17198main ()
17199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017200return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017201 ;
17202 return 0;
17203}
17204_ACEOF
17205rm -f conftest.$ac_objext
17206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017207 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017209 grep -v '^ *+' conftest.er1 >conftest.err
17210 rm -f conftest.er1
17211 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17213 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017214 { ac_try='test -z "$ac_c_werror_flag"
17215 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17217 (eval $ac_try) 2>&5
17218 ac_status=$?
17219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17220 (exit $ac_status); }; } &&
17221 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17223 (eval $ac_try) 2>&5
17224 ac_status=$?
17225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17226 (exit $ac_status); }; }; then
17227
17228
17229cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017230#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017231_ACEOF
17232
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017233 have_prototypes=yes
17234
Guido van Rossumf78abae1997-01-21 22:02:36 +000017235else
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017237sed 's/^/| /' conftest.$ac_ext >&5
17238
Guido van Rossum7f43da71994-08-01 12:15:30 +000017239fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017240rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017241echo "$as_me:$LINENO: result: $have_prototypes" >&5
17242echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017243
Guido van Rossumda88dad1995-01-26 00:46:29 +000017244works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017245echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17246echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017248/* confdefs.h. */
17249_ACEOF
17250cat confdefs.h >>conftest.$ac_ext
17251cat >>conftest.$ac_ext <<_ACEOF
17252/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017253
17254#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017255int foo(int x, ...) {
17256 va_list va;
17257 va_start(va, x);
17258 va_arg(va, int);
17259 va_arg(va, char *);
17260 va_arg(va, double);
17261 return 0;
17262}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017263
Martin v. Löwis11437992002-04-12 09:54:03 +000017264int
17265main ()
17266{
Guido van Rossum90eea071996-08-30 20:58:57 +000017267return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 ;
17269 return 0;
17270}
17271_ACEOF
17272rm -f conftest.$ac_objext
17273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017274 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017276 grep -v '^ *+' conftest.er1 >conftest.err
17277 rm -f conftest.er1
17278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17280 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017281 { ac_try='test -z "$ac_c_werror_flag"
17282 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17284 (eval $ac_try) 2>&5
17285 ac_status=$?
17286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17287 (exit $ac_status); }; } &&
17288 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17290 (eval $ac_try) 2>&5
17291 ac_status=$?
17292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17293 (exit $ac_status); }; }; then
17294
17295
17296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017297#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017298_ACEOF
17299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017300 works=yes
17301
Guido van Rossumf78abae1997-01-21 22:02:36 +000017302else
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017304sed 's/^/| /' conftest.$ac_ext >&5
17305
Guido van Rossum627b2d71993-12-24 10:39:16 +000017306fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017307rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017308echo "$as_me:$LINENO: result: $works" >&5
17309echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017310
Martin v. Löwisd6320502004-08-12 13:45:08 +000017311# check for socketpair
17312echo "$as_me:$LINENO: checking for socketpair" >&5
17313echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17314cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017315/* confdefs.h. */
17316_ACEOF
17317cat confdefs.h >>conftest.$ac_ext
17318cat >>conftest.$ac_ext <<_ACEOF
17319/* end confdefs.h. */
17320
17321#include <sys/types.h>
17322#include <sys/socket.h>
17323
17324int
17325main ()
17326{
17327void *x=socketpair
17328 ;
17329 return 0;
17330}
17331_ACEOF
17332rm -f conftest.$ac_objext
17333if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017334 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017336 grep -v '^ *+' conftest.er1 >conftest.err
17337 rm -f conftest.er1
17338 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17340 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017341 { ac_try='test -z "$ac_c_werror_flag"
17342 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17344 (eval $ac_try) 2>&5
17345 ac_status=$?
17346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17347 (exit $ac_status); }; } &&
17348 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17350 (eval $ac_try) 2>&5
17351 ac_status=$?
17352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353 (exit $ac_status); }; }; then
17354
17355cat >>confdefs.h <<\_ACEOF
17356#define HAVE_SOCKETPAIR 1
17357_ACEOF
17358
17359 echo "$as_me:$LINENO: result: yes" >&5
17360echo "${ECHO_T}yes" >&6
17361else
17362 echo "$as_me: failed program was:" >&5
17363sed 's/^/| /' conftest.$ac_ext >&5
17364
17365echo "$as_me:$LINENO: result: no" >&5
17366echo "${ECHO_T}no" >&6
17367
17368fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017370
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017371# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017372echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17373echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017375/* confdefs.h. */
17376_ACEOF
17377cat confdefs.h >>conftest.$ac_ext
17378cat >>conftest.$ac_ext <<_ACEOF
17379/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017380#include <sys/types.h>
17381#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017382int
17383main ()
17384{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017385struct sockaddr x;
17386x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017387 ;
17388 return 0;
17389}
17390_ACEOF
17391rm -f conftest.$ac_objext
17392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017393 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017395 grep -v '^ *+' conftest.er1 >conftest.err
17396 rm -f conftest.er1
17397 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17399 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017400 { ac_try='test -z "$ac_c_werror_flag"
17401 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17403 (eval $ac_try) 2>&5
17404 ac_status=$?
17405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17406 (exit $ac_status); }; } &&
17407 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17409 (eval $ac_try) 2>&5
17410 ac_status=$?
17411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17412 (exit $ac_status); }; }; then
17413 echo "$as_me:$LINENO: result: yes" >&5
17414echo "${ECHO_T}yes" >&6
17415
17416cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017417#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017418_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017419
17420else
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017422sed 's/^/| /' conftest.$ac_ext >&5
17423
Martin v. Löwis11437992002-04-12 09:54:03 +000017424echo "$as_me:$LINENO: result: no" >&5
17425echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017426fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017428
Guido van Rossumda88dad1995-01-26 00:46:29 +000017429va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017430echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17431echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017433/* confdefs.h. */
17434_ACEOF
17435cat confdefs.h >>conftest.$ac_ext
17436cat >>conftest.$ac_ext <<_ACEOF
17437/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017438
17439#ifdef HAVE_STDARG_PROTOTYPES
17440#include <stdarg.h>
17441#else
17442#include <varargs.h>
17443#endif
17444
Martin v. Löwis11437992002-04-12 09:54:03 +000017445int
17446main ()
17447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017448va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext
17454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017455 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457 grep -v '^ *+' conftest.er1 >conftest.err
17458 rm -f conftest.er1
17459 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017462 { ac_try='test -z "$ac_c_werror_flag"
17463 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17465 (eval $ac_try) 2>&5
17466 ac_status=$?
17467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17468 (exit $ac_status); }; } &&
17469 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17471 (eval $ac_try) 2>&5
17472 ac_status=$?
17473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17474 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017475 :
17476else
Martin v. Löwis11437992002-04-12 09:54:03 +000017477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017478sed 's/^/| /' conftest.$ac_ext >&5
17479
Martin v. Löwis11437992002-04-12 09:54:03 +000017480
17481
17482cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017483#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017484_ACEOF
17485
Guido van Rossumda88dad1995-01-26 00:46:29 +000017486 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017488fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017490echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17491echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017493# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017494
17495
17496
17497echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17498echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17499if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17500 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017501else
Martin v. Löwis11437992002-04-12 09:54:03 +000017502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017503/* confdefs.h. */
17504_ACEOF
17505cat confdefs.h >>conftest.$ac_ext
17506cat >>conftest.$ac_ext <<_ACEOF
17507/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017508/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017509 which can conflict with char gethostbyname_r (); below.
17510 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017511 <limits.h> exists even on freestanding compilers. Under hpux,
17512 including <limits.h> includes <sys/time.h> and causes problems
17513 checking for functions defined therein. */
17514#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017515# include <limits.h>
17516#else
17517# include <assert.h>
17518#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017519/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017520#ifdef __cplusplus
17521extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017522{
Martin v. Löwis11437992002-04-12 09:54:03 +000017523#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017524/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 builtin and then its argument prototype would still apply. */
17526char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017527/* The GNU C library defines this for functions which it implements
17528 to always fail with ENOSYS. Some functions are actually named
17529 something starting with __ and the normal name is an alias. */
17530#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17531choke me
17532#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017533char (*f) () = gethostbyname_r;
17534#endif
17535#ifdef __cplusplus
17536}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017537#endif
17538
Skip Montanaro6dead952003-09-25 14:50:04 +000017539int
17540main ()
17541{
17542return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 ;
17544 return 0;
17545}
17546_ACEOF
17547rm -f conftest.$ac_objext conftest$ac_exeext
17548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017549 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 grep -v '^ *+' conftest.er1 >conftest.err
17552 rm -f conftest.er1
17553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017556 { ac_try='test -z "$ac_c_werror_flag"
17557 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17559 (eval $ac_try) 2>&5
17560 ac_status=$?
17561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17562 (exit $ac_status); }; } &&
17563 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17565 (eval $ac_try) 2>&5
17566 ac_status=$?
17567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17568 (exit $ac_status); }; }; then
17569 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017570else
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017572sed 's/^/| /' conftest.$ac_ext >&5
17573
Martin v. Löwis11437992002-04-12 09:54:03 +000017574ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017575fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017576rm -f conftest.err conftest.$ac_objext \
17577 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017579echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17580echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17581if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017582
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017584#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017585_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017586
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17588echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017589 OLD_CFLAGS=$CFLAGS
17590 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017592/* confdefs.h. */
17593_ACEOF
17594cat confdefs.h >>conftest.$ac_ext
17595cat >>conftest.$ac_ext <<_ACEOF
17596/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017597
17598# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017599
Martin v. Löwis11437992002-04-12 09:54:03 +000017600int
17601main ()
17602{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017603
17604 char *name;
17605 struct hostent *he, *res;
17606 char buffer[2048];
17607 int buflen = 2048;
17608 int h_errnop;
17609
17610 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017611
17612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext
17617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017620 grep -v '^ *+' conftest.er1 >conftest.err
17621 rm -f conftest.er1
17622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17624 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017625 { ac_try='test -z "$ac_c_werror_flag"
17626 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17628 (eval $ac_try) 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); }; } &&
17632 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634 (eval $ac_try) 2>&5
17635 ac_status=$?
17636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637 (exit $ac_status); }; }; then
17638
17639 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017640#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017641_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017642
Martin v. Löwis11437992002-04-12 09:54:03 +000017643
17644cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017645#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017646_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017647
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 echo "$as_me:$LINENO: result: yes" >&5
17649echo "${ECHO_T}yes" >&6
17650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017651else
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017653sed 's/^/| /' conftest.$ac_ext >&5
17654
Martin v. Löwis11437992002-04-12 09:54:03 +000017655
17656 echo "$as_me:$LINENO: result: no" >&5
17657echo "${ECHO_T}no" >&6
17658 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17659echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017661/* confdefs.h. */
17662_ACEOF
17663cat confdefs.h >>conftest.$ac_ext
17664cat >>conftest.$ac_ext <<_ACEOF
17665/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017666
17667# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017668
Martin v. Löwis11437992002-04-12 09:54:03 +000017669int
17670main ()
17671{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017672
17673 char *name;
17674 struct hostent *he;
17675 char buffer[2048];
17676 int buflen = 2048;
17677 int h_errnop;
17678
17679 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017680
17681 ;
17682 return 0;
17683}
17684_ACEOF
17685rm -f conftest.$ac_objext
17686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017687 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017689 grep -v '^ *+' conftest.er1 >conftest.err
17690 rm -f conftest.er1
17691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17693 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017694 { ac_try='test -z "$ac_c_werror_flag"
17695 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17697 (eval $ac_try) 2>&5
17698 ac_status=$?
17699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17700 (exit $ac_status); }; } &&
17701 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17703 (eval $ac_try) 2>&5
17704 ac_status=$?
17705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17706 (exit $ac_status); }; }; then
17707
17708 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017709#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017710_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017711
Martin v. Löwis11437992002-04-12 09:54:03 +000017712
17713cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017714#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017715_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017716
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 echo "$as_me:$LINENO: result: yes" >&5
17718echo "${ECHO_T}yes" >&6
17719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017720else
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017722sed 's/^/| /' conftest.$ac_ext >&5
17723
Martin v. Löwis11437992002-04-12 09:54:03 +000017724
17725 echo "$as_me:$LINENO: result: no" >&5
17726echo "${ECHO_T}no" >&6
17727 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17728echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017730/* confdefs.h. */
17731_ACEOF
17732cat confdefs.h >>conftest.$ac_ext
17733cat >>conftest.$ac_ext <<_ACEOF
17734/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017735
17736# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017737
Martin v. Löwis11437992002-04-12 09:54:03 +000017738int
17739main ()
17740{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017741
17742 char *name;
17743 struct hostent *he;
17744 struct hostent_data data;
17745
17746 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017747
17748 ;
17749 return 0;
17750}
17751_ACEOF
17752rm -f conftest.$ac_objext
17753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017754 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017756 grep -v '^ *+' conftest.er1 >conftest.err
17757 rm -f conftest.er1
17758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17760 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017761 { ac_try='test -z "$ac_c_werror_flag"
17762 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17764 (eval $ac_try) 2>&5
17765 ac_status=$?
17766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17767 (exit $ac_status); }; } &&
17768 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17770 (eval $ac_try) 2>&5
17771 ac_status=$?
17772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17773 (exit $ac_status); }; }; then
17774
17775 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017776#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017777_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017778
Martin v. Löwis11437992002-04-12 09:54:03 +000017779
17780cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017781#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017782_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017783
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 echo "$as_me:$LINENO: result: yes" >&5
17785echo "${ECHO_T}yes" >&6
17786
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017787else
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017789sed 's/^/| /' conftest.$ac_ext >&5
17790
Martin v. Löwis11437992002-04-12 09:54:03 +000017791
17792 echo "$as_me:$LINENO: result: no" >&5
17793echo "${ECHO_T}no" >&6
17794
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017795fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017797
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017798fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017800
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017801fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017803 CFLAGS=$OLD_CFLAGS
17804
17805else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017806
Martin v. Löwis11437992002-04-12 09:54:03 +000017807
17808for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017809do
Martin v. Löwis11437992002-04-12 09:54:03 +000017810as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17811echo "$as_me:$LINENO: checking for $ac_func" >&5
17812echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17813if eval "test \"\${$as_ac_var+set}\" = set"; then
17814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017815else
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017817/* confdefs.h. */
17818_ACEOF
17819cat confdefs.h >>conftest.$ac_ext
17820cat >>conftest.$ac_ext <<_ACEOF
17821/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017822/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017823 which can conflict with char $ac_func (); below.
17824 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017825 <limits.h> exists even on freestanding compilers. Under hpux,
17826 including <limits.h> includes <sys/time.h> and causes problems
17827 checking for functions defined therein. */
17828#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017829# include <limits.h>
17830#else
17831# include <assert.h>
17832#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017833/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017834#ifdef __cplusplus
17835extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017836{
Martin v. Löwis11437992002-04-12 09:54:03 +000017837#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017838/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 builtin and then its argument prototype would still apply. */
17840char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017841/* The GNU C library defines this for functions which it implements
17842 to always fail with ENOSYS. Some functions are actually named
17843 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017844#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017845choke me
17846#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017847char (*f) () = $ac_func;
17848#endif
17849#ifdef __cplusplus
17850}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017851#endif
17852
Skip Montanaro6dead952003-09-25 14:50:04 +000017853int
17854main ()
17855{
17856return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 ;
17858 return 0;
17859}
17860_ACEOF
17861rm -f conftest.$ac_objext conftest$ac_exeext
17862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017863 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017865 grep -v '^ *+' conftest.er1 >conftest.err
17866 rm -f conftest.er1
17867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17869 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017870 { ac_try='test -z "$ac_c_werror_flag"
17871 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17873 (eval $ac_try) 2>&5
17874 ac_status=$?
17875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17876 (exit $ac_status); }; } &&
17877 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17879 (eval $ac_try) 2>&5
17880 ac_status=$?
17881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17882 (exit $ac_status); }; }; then
17883 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017884else
Martin v. Löwis11437992002-04-12 09:54:03 +000017885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017886sed 's/^/| /' conftest.$ac_ext >&5
17887
Martin v. Löwis11437992002-04-12 09:54:03 +000017888eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017889fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017890rm -f conftest.err conftest.$ac_objext \
17891 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017892fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017893echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17894echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17895if test `eval echo '${'$as_ac_var'}'` = yes; then
17896 cat >>confdefs.h <<_ACEOF
17897#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17898_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017899
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017900fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017901done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017902
Michael W. Hudson54241132001-12-07 15:38:26 +000017903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017904fi
17905
Michael W. Hudson54241132001-12-07 15:38:26 +000017906
17907
17908
17909
17910
17911
Guido van Rossum627b2d71993-12-24 10:39:16 +000017912# checks for system services
17913# (none yet)
17914
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017915# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017916echo "$as_me:$LINENO: checking for __fpu_control" >&5
17917echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17918if test "${ac_cv_func___fpu_control+set}" = set; then
17919 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017920else
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017922/* confdefs.h. */
17923_ACEOF
17924cat confdefs.h >>conftest.$ac_ext
17925cat >>conftest.$ac_ext <<_ACEOF
17926/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017927/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017928 which can conflict with char __fpu_control (); below.
17929 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017930 <limits.h> exists even on freestanding compilers. Under hpux,
17931 including <limits.h> includes <sys/time.h> and causes problems
17932 checking for functions defined therein. */
17933#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017934# include <limits.h>
17935#else
17936# include <assert.h>
17937#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017938/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017939#ifdef __cplusplus
17940extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017941{
Martin v. Löwis11437992002-04-12 09:54:03 +000017942#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 builtin and then its argument prototype would still apply. */
17945char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017946/* The GNU C library defines this for functions which it implements
17947 to always fail with ENOSYS. Some functions are actually named
17948 something starting with __ and the normal name is an alias. */
17949#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17950choke me
17951#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017952char (*f) () = __fpu_control;
17953#endif
17954#ifdef __cplusplus
17955}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017956#endif
17957
Skip Montanaro6dead952003-09-25 14:50:04 +000017958int
17959main ()
17960{
17961return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 ;
17963 return 0;
17964}
17965_ACEOF
17966rm -f conftest.$ac_objext conftest$ac_exeext
17967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017970 grep -v '^ *+' conftest.er1 >conftest.err
17971 rm -f conftest.er1
17972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17974 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017975 { ac_try='test -z "$ac_c_werror_flag"
17976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17978 (eval $ac_try) 2>&5
17979 ac_status=$?
17980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17981 (exit $ac_status); }; } &&
17982 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17984 (eval $ac_try) 2>&5
17985 ac_status=$?
17986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17987 (exit $ac_status); }; }; then
17988 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017989else
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017991sed 's/^/| /' conftest.$ac_ext >&5
17992
Martin v. Löwis11437992002-04-12 09:54:03 +000017993ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017995rm -f conftest.err conftest.$ac_objext \
17996 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017998echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
17999echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18000if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018001 :
18002else
Martin v. Löwis11437992002-04-12 09:54:03 +000018003
18004echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18005echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18006if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018008else
Martin v. Löwis11437992002-04-12 09:54:03 +000018009 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018010LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018012/* confdefs.h. */
18013_ACEOF
18014cat confdefs.h >>conftest.$ac_ext
18015cat >>conftest.$ac_ext <<_ACEOF
18016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018018/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018019#ifdef __cplusplus
18020extern "C"
18021#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018022/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 builtin and then its argument prototype would still apply. */
18024char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018025int
18026main ()
18027{
18028__fpu_control ();
18029 ;
18030 return 0;
18031}
18032_ACEOF
18033rm -f conftest.$ac_objext conftest$ac_exeext
18034if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018035 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018037 grep -v '^ *+' conftest.er1 >conftest.err
18038 rm -f conftest.er1
18039 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18041 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018042 { ac_try='test -z "$ac_c_werror_flag"
18043 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18045 (eval $ac_try) 2>&5
18046 ac_status=$?
18047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048 (exit $ac_status); }; } &&
18049 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18051 (eval $ac_try) 2>&5
18052 ac_status=$?
18053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18054 (exit $ac_status); }; }; then
18055 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018056else
Martin v. Löwis11437992002-04-12 09:54:03 +000018057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018058sed 's/^/| /' conftest.$ac_ext >&5
18059
Martin v. Löwis11437992002-04-12 09:54:03 +000018060ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018061fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018062rm -f conftest.err conftest.$ac_objext \
18063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018064LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018066echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18067echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18068if test $ac_cv_lib_ieee___fpu_control = yes; then
18069 cat >>confdefs.h <<_ACEOF
18070#define HAVE_LIBIEEE 1
18071_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018072
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018073 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018074
Guido van Rossum627b2d71993-12-24 10:39:16 +000018075fi
18076
Michael W. Hudson54241132001-12-07 15:38:26 +000018077
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018078fi
18079
Michael W. Hudson54241132001-12-07 15:38:26 +000018080
Guido van Rossum7f253911997-05-09 02:42:48 +000018081# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018082echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18083echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18084
Guido van Rossum7f253911997-05-09 02:42:48 +000018085# Check whether --with-fpectl or --without-fpectl was given.
18086if test "${with_fpectl+set}" = set; then
18087 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018088
Guido van Rossum7f253911997-05-09 02:42:48 +000018089if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018090then
18091
18092cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018093#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018094_ACEOF
18095
18096 echo "$as_me:$LINENO: result: yes" >&5
18097echo "${ECHO_T}yes" >&6
18098else echo "$as_me:$LINENO: result: no" >&5
18099echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018100fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018101else
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 echo "$as_me:$LINENO: result: no" >&5
18103echo "${ECHO_T}no" >&6
18104fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018105
Guido van Rossum7f43da71994-08-01 12:15:30 +000018106# check for --with-libm=...
18107
Guido van Rossum563e7081996-09-10 18:20:48 +000018108case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018109Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018110BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018111*) LIBM=-lm
18112esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018113echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18114echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18115
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018116# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018117if test "${with_libm+set}" = set; then
18118 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018119
Guido van Rossum7f253911997-05-09 02:42:48 +000018120if test "$withval" = no
18121then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018122 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18123echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018124elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018125then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018126 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18127echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18128else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18129echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018131fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018132else
Martin v. Löwis11437992002-04-12 09:54:03 +000018133 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18134echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18135fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018136
18137# check for --with-libc=...
18138
Martin v. Löwis11437992002-04-12 09:54:03 +000018139echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18140echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18141
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018142# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018143if test "${with_libc+set}" = set; then
18144 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
Guido van Rossum7f253911997-05-09 02:42:48 +000018146if test "$withval" = no
18147then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18149echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018150elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018151then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18153echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18154else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18155echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18156 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018157fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018158else
Martin v. Löwis11437992002-04-12 09:54:03 +000018159 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18160echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18161fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018162
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018163# check for hypot() in math library
18164LIBS_SAVE=$LIBS
18165LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018166
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018167for ac_func in hypot
18168do
Martin v. Löwis11437992002-04-12 09:54:03 +000018169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18170echo "$as_me:$LINENO: checking for $ac_func" >&5
18171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18172if eval "test \"\${$as_ac_var+set}\" = set"; then
18173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018174else
Martin v. Löwis11437992002-04-12 09:54:03 +000018175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018176/* confdefs.h. */
18177_ACEOF
18178cat confdefs.h >>conftest.$ac_ext
18179cat >>conftest.$ac_ext <<_ACEOF
18180/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018181/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018182 which can conflict with char $ac_func (); below.
18183 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018184 <limits.h> exists even on freestanding compilers. Under hpux,
18185 including <limits.h> includes <sys/time.h> and causes problems
18186 checking for functions defined therein. */
18187#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018188# include <limits.h>
18189#else
18190# include <assert.h>
18191#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018192/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018193#ifdef __cplusplus
18194extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018195{
Martin v. Löwis11437992002-04-12 09:54:03 +000018196#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018197/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 builtin and then its argument prototype would still apply. */
18199char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018200/* The GNU C library defines this for functions which it implements
18201 to always fail with ENOSYS. Some functions are actually named
18202 something starting with __ and the normal name is an alias. */
18203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18204choke me
18205#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018206char (*f) () = $ac_func;
18207#endif
18208#ifdef __cplusplus
18209}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018210#endif
18211
Skip Montanaro6dead952003-09-25 14:50:04 +000018212int
18213main ()
18214{
18215return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018216 ;
18217 return 0;
18218}
18219_ACEOF
18220rm -f conftest.$ac_objext conftest$ac_exeext
18221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018222 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018224 grep -v '^ *+' conftest.er1 >conftest.err
18225 rm -f conftest.er1
18226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18228 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018229 { ac_try='test -z "$ac_c_werror_flag"
18230 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18232 (eval $ac_try) 2>&5
18233 ac_status=$?
18234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18235 (exit $ac_status); }; } &&
18236 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18238 (eval $ac_try) 2>&5
18239 ac_status=$?
18240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18241 (exit $ac_status); }; }; then
18242 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018243else
Martin v. Löwis11437992002-04-12 09:54:03 +000018244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018245sed 's/^/| /' conftest.$ac_ext >&5
18246
Martin v. Löwis11437992002-04-12 09:54:03 +000018247eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018249rm -f conftest.err conftest.$ac_objext \
18250 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018252echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18253echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18254if test `eval echo '${'$as_ac_var'}'` = yes; then
18255 cat >>confdefs.h <<_ACEOF
18256#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18257_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018258
Michael W. Hudson54241132001-12-07 15:38:26 +000018259else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018260 case $LIBOBJS in
18261 "$ac_func.$ac_objext" | \
18262 *" $ac_func.$ac_objext" | \
18263 "$ac_func.$ac_objext "* | \
18264 *" $ac_func.$ac_objext "* ) ;;
18265 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18266esac
18267
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018268fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018269done
18270
Michael W. Hudson54241132001-12-07 15:38:26 +000018271
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018272LIBS=$LIBS_SAVE
18273
Guido van Rossumef2255b2000-03-10 22:30:29 +000018274# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018275if test "${ac_cv_header_wchar_h+set}" = set; then
18276 echo "$as_me:$LINENO: checking for wchar.h" >&5
18277echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18278if test "${ac_cv_header_wchar_h+set}" = set; then
18279 echo $ECHO_N "(cached) $ECHO_C" >&6
18280fi
18281echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18282echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018283else
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 # Is the header compilable?
18285echo "$as_me:$LINENO: checking wchar.h usability" >&5
18286echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018288/* confdefs.h. */
18289_ACEOF
18290cat confdefs.h >>conftest.$ac_ext
18291cat >>conftest.$ac_ext <<_ACEOF
18292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018293$ac_includes_default
18294#include <wchar.h>
18295_ACEOF
18296rm -f conftest.$ac_objext
18297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018298 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018300 grep -v '^ *+' conftest.er1 >conftest.err
18301 rm -f conftest.er1
18302 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18304 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018305 { ac_try='test -z "$ac_c_werror_flag"
18306 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18308 (eval $ac_try) 2>&5
18309 ac_status=$?
18310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18311 (exit $ac_status); }; } &&
18312 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18314 (eval $ac_try) 2>&5
18315 ac_status=$?
18316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18317 (exit $ac_status); }; }; then
18318 ac_header_compiler=yes
18319else
18320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018321sed 's/^/| /' conftest.$ac_ext >&5
18322
Martin v. Löwis11437992002-04-12 09:54:03 +000018323ac_header_compiler=no
18324fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018325rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018326echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18327echo "${ECHO_T}$ac_header_compiler" >&6
18328
18329# Is the header present?
18330echo "$as_me:$LINENO: checking wchar.h presence" >&5
18331echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018333/* confdefs.h. */
18334_ACEOF
18335cat confdefs.h >>conftest.$ac_ext
18336cat >>conftest.$ac_ext <<_ACEOF
18337/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018338#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018339_ACEOF
18340if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18341 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18342 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018343 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 rm -f conftest.er1
18345 cat conftest.err >&5
18346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18347 (exit $ac_status); } >/dev/null; then
18348 if test -s conftest.err; then
18349 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018350 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 else
18352 ac_cpp_err=
18353 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018354else
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 ac_cpp_err=yes
18356fi
18357if test -z "$ac_cpp_err"; then
18358 ac_header_preproc=yes
18359else
18360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018361sed 's/^/| /' conftest.$ac_ext >&5
18362
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018364fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018365rm -f conftest.err conftest.$ac_ext
18366echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18367echo "${ECHO_T}$ac_header_preproc" >&6
18368
18369# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018370case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18371 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18373echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18375echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18376 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018377 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018378 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018379 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18380echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018381 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18382echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18383 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18384echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18385 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18386echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018387 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18388echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018389 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18390echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018391 (
18392 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018393## ------------------------------------------------ ##
18394## Report this to http://www.python.org/python-bugs ##
18395## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018396_ASBOX
18397 ) |
18398 sed "s/^/$as_me: WARNING: /" >&2
18399 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018400esac
18401echo "$as_me:$LINENO: checking for wchar.h" >&5
18402echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18403if test "${ac_cv_header_wchar_h+set}" = set; then
18404 echo $ECHO_N "(cached) $ECHO_C" >&6
18405else
18406 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018408echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18409echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18410
18411fi
18412if test $ac_cv_header_wchar_h = yes; then
18413
18414
18415cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018416#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018417_ACEOF
18418
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018419 wchar_h="yes"
18420
Guido van Rossumef2255b2000-03-10 22:30:29 +000018421else
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018423
18424fi
18425
Michael W. Hudson54241132001-12-07 15:38:26 +000018426
Martin v. Löwis11437992002-04-12 09:54:03 +000018427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018428# determine wchar_t size
18429if test "$wchar_h" = yes
18430then
Martin v. Löwis11437992002-04-12 09:54:03 +000018431 echo "$as_me:$LINENO: checking for wchar_t" >&5
18432echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18433if test "${ac_cv_type_wchar_t+set}" = set; then
18434 echo $ECHO_N "(cached) $ECHO_C" >&6
18435else
18436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018437/* confdefs.h. */
18438_ACEOF
18439cat confdefs.h >>conftest.$ac_ext
18440cat >>conftest.$ac_ext <<_ACEOF
18441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018442#include <wchar.h>
18443
Martin v. Löwis11437992002-04-12 09:54:03 +000018444int
18445main ()
18446{
18447if ((wchar_t *) 0)
18448 return 0;
18449if (sizeof (wchar_t))
18450 return 0;
18451 ;
18452 return 0;
18453}
18454_ACEOF
18455rm -f conftest.$ac_objext
18456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018457 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018459 grep -v '^ *+' conftest.er1 >conftest.err
18460 rm -f conftest.er1
18461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18463 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018464 { ac_try='test -z "$ac_c_werror_flag"
18465 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18467 (eval $ac_try) 2>&5
18468 ac_status=$?
18469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18470 (exit $ac_status); }; } &&
18471 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18473 (eval $ac_try) 2>&5
18474 ac_status=$?
18475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18476 (exit $ac_status); }; }; then
18477 ac_cv_type_wchar_t=yes
18478else
18479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018480sed 's/^/| /' conftest.$ac_ext >&5
18481
Martin v. Löwis11437992002-04-12 09:54:03 +000018482ac_cv_type_wchar_t=no
18483fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018485fi
18486echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18487echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18488
18489echo "$as_me:$LINENO: checking size of wchar_t" >&5
18490echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18491if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18492 echo $ECHO_N "(cached) $ECHO_C" >&6
18493else
18494 if test "$ac_cv_type_wchar_t" = yes; then
18495 # The cast to unsigned long works around a bug in the HP C Compiler
18496 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18497 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18498 # This bug is HP SR number 8606223364.
18499 if test "$cross_compiling" = yes; then
18500 # Depending upon the size, compute the lo and hi bounds.
18501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018502/* confdefs.h. */
18503_ACEOF
18504cat confdefs.h >>conftest.$ac_ext
18505cat >>conftest.$ac_ext <<_ACEOF
18506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018507#include <wchar.h>
18508
Martin v. Löwis11437992002-04-12 09:54:03 +000018509int
18510main ()
18511{
18512static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18513test_array [0] = 0
18514
18515 ;
18516 return 0;
18517}
18518_ACEOF
18519rm -f conftest.$ac_objext
18520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018521 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018523 grep -v '^ *+' conftest.er1 >conftest.err
18524 rm -f conftest.er1
18525 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18527 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018528 { ac_try='test -z "$ac_c_werror_flag"
18529 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18531 (eval $ac_try) 2>&5
18532 ac_status=$?
18533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18534 (exit $ac_status); }; } &&
18535 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18537 (eval $ac_try) 2>&5
18538 ac_status=$?
18539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18540 (exit $ac_status); }; }; then
18541 ac_lo=0 ac_mid=0
18542 while :; do
18543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018549#include <wchar.h>
18550
Martin v. Löwis11437992002-04-12 09:54:03 +000018551int
18552main ()
18553{
18554static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18555test_array [0] = 0
18556
18557 ;
18558 return 0;
18559}
18560_ACEOF
18561rm -f conftest.$ac_objext
18562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018563 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565 grep -v '^ *+' conftest.er1 >conftest.err
18566 rm -f conftest.er1
18567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18569 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018570 { ac_try='test -z "$ac_c_werror_flag"
18571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18573 (eval $ac_try) 2>&5
18574 ac_status=$?
18575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18576 (exit $ac_status); }; } &&
18577 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18579 (eval $ac_try) 2>&5
18580 ac_status=$?
18581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18582 (exit $ac_status); }; }; then
18583 ac_hi=$ac_mid; break
18584else
18585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018586sed 's/^/| /' conftest.$ac_ext >&5
18587
Martin v. Löwis11437992002-04-12 09:54:03 +000018588ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018589 if test $ac_lo -le $ac_mid; then
18590 ac_lo= ac_hi=
18591 break
18592 fi
18593 ac_mid=`expr 2 '*' $ac_mid + 1`
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 done
18597else
18598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018599sed 's/^/| /' conftest.$ac_ext >&5
18600
Martin v. Löwis11437992002-04-12 09:54:03 +000018601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018602/* confdefs.h. */
18603_ACEOF
18604cat confdefs.h >>conftest.$ac_ext
18605cat >>conftest.$ac_ext <<_ACEOF
18606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018607#include <wchar.h>
18608
Martin v. Löwis11437992002-04-12 09:54:03 +000018609int
18610main ()
18611{
18612static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18613test_array [0] = 0
18614
18615 ;
18616 return 0;
18617}
18618_ACEOF
18619rm -f conftest.$ac_objext
18620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018621 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018623 grep -v '^ *+' conftest.er1 >conftest.err
18624 rm -f conftest.er1
18625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18627 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018628 { ac_try='test -z "$ac_c_werror_flag"
18629 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18631 (eval $ac_try) 2>&5
18632 ac_status=$?
18633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18634 (exit $ac_status); }; } &&
18635 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18637 (eval $ac_try) 2>&5
18638 ac_status=$?
18639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18640 (exit $ac_status); }; }; then
18641 ac_hi=-1 ac_mid=-1
18642 while :; do
18643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018644/* confdefs.h. */
18645_ACEOF
18646cat confdefs.h >>conftest.$ac_ext
18647cat >>conftest.$ac_ext <<_ACEOF
18648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018649#include <wchar.h>
18650
Martin v. Löwis11437992002-04-12 09:54:03 +000018651int
18652main ()
18653{
18654static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18655test_array [0] = 0
18656
18657 ;
18658 return 0;
18659}
18660_ACEOF
18661rm -f conftest.$ac_objext
18662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018663 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018665 grep -v '^ *+' conftest.er1 >conftest.err
18666 rm -f conftest.er1
18667 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18669 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018670 { ac_try='test -z "$ac_c_werror_flag"
18671 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18673 (eval $ac_try) 2>&5
18674 ac_status=$?
18675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18676 (exit $ac_status); }; } &&
18677 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18679 (eval $ac_try) 2>&5
18680 ac_status=$?
18681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18682 (exit $ac_status); }; }; then
18683 ac_lo=$ac_mid; break
18684else
18685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018686sed 's/^/| /' conftest.$ac_ext >&5
18687
Martin v. Löwis11437992002-04-12 09:54:03 +000018688ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018689 if test $ac_mid -le $ac_hi; then
18690 ac_lo= ac_hi=
18691 break
18692 fi
18693 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018694fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018695rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018696 done
18697else
18698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwis11437992002-04-12 09:54:03 +000018701ac_lo= ac_hi=
18702fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018704fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018706# Binary search between lo and hi bounds.
18707while test "x$ac_lo" != "x$ac_hi"; do
18708 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018710/* confdefs.h. */
18711_ACEOF
18712cat confdefs.h >>conftest.$ac_ext
18713cat >>conftest.$ac_ext <<_ACEOF
18714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018715#include <wchar.h>
18716
Martin v. Löwis11437992002-04-12 09:54:03 +000018717int
18718main ()
18719{
18720static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18721test_array [0] = 0
18722
18723 ;
18724 return 0;
18725}
18726_ACEOF
18727rm -f conftest.$ac_objext
18728if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018729 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 grep -v '^ *+' conftest.er1 >conftest.err
18732 rm -f conftest.er1
18733 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18735 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018736 { ac_try='test -z "$ac_c_werror_flag"
18737 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18739 (eval $ac_try) 2>&5
18740 ac_status=$?
18741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18742 (exit $ac_status); }; } &&
18743 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18745 (eval $ac_try) 2>&5
18746 ac_status=$?
18747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18748 (exit $ac_status); }; }; then
18749 ac_hi=$ac_mid
18750else
18751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018752sed 's/^/| /' conftest.$ac_ext >&5
18753
Martin v. Löwis11437992002-04-12 09:54:03 +000018754ac_lo=`expr '(' $ac_mid ')' + 1`
18755fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018757done
18758case $ac_lo in
18759?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018760'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18761See \`config.log' for more details." >&5
18762echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18763See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 { (exit 1); exit 1; }; } ;;
18765esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018766else
18767 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000018768 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18769See \`config.log' for more details." >&5
18770echo "$as_me: error: cannot run test program while cross compiling
18771See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018772 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018773else
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018775/* confdefs.h. */
18776_ACEOF
18777cat confdefs.h >>conftest.$ac_ext
18778cat >>conftest.$ac_ext <<_ACEOF
18779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018780#include <wchar.h>
18781
18782long longval () { return (long) (sizeof (wchar_t)); }
18783unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018784#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018785#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018786int
18787main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018788{
Martin v. Löwis11437992002-04-12 09:54:03 +000018789
18790 FILE *f = fopen ("conftest.val", "w");
18791 if (! f)
18792 exit (1);
18793 if (((long) (sizeof (wchar_t))) < 0)
18794 {
18795 long i = longval ();
18796 if (i != ((long) (sizeof (wchar_t))))
18797 exit (1);
18798 fprintf (f, "%ld\n", i);
18799 }
18800 else
18801 {
18802 unsigned long i = ulongval ();
18803 if (i != ((long) (sizeof (wchar_t))))
18804 exit (1);
18805 fprintf (f, "%lu\n", i);
18806 }
18807 exit (ferror (f) || fclose (f) != 0);
18808
18809 ;
18810 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018811}
Martin v. Löwis11437992002-04-12 09:54:03 +000018812_ACEOF
18813rm -f conftest$ac_exeext
18814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18815 (eval $ac_link) 2>&5
18816 ac_status=$?
18817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18818 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18820 (eval $ac_try) 2>&5
18821 ac_status=$?
18822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18823 (exit $ac_status); }; }; then
18824 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018825else
Martin v. Löwis11437992002-04-12 09:54:03 +000018826 echo "$as_me: program exited with status $ac_status" >&5
18827echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018828sed 's/^/| /' conftest.$ac_ext >&5
18829
Martin v. Löwis11437992002-04-12 09:54:03 +000018830( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018831{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18832See \`config.log' for more details." >&5
18833echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18834See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018835 { (exit 1); exit 1; }; }
18836fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018837rm -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 +000018838fi
18839fi
18840rm -f conftest.val
18841else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018842 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018843fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018845echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18846echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18847cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018848#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018849_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018850
Michael W. Hudson54241132001-12-07 15:38:26 +000018851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018852fi
18853
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018854echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18855echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18856have_ucs4_tcl=no
18857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018858/* confdefs.h. */
18859_ACEOF
18860cat confdefs.h >>conftest.$ac_ext
18861cat >>conftest.$ac_ext <<_ACEOF
18862/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018863
18864#include <tcl.h>
18865#if TCL_UTF_MAX != 6
18866# error "NOT UCS4_TCL"
18867#endif
18868int
18869main ()
18870{
18871
18872 ;
18873 return 0;
18874}
18875_ACEOF
18876rm -f conftest.$ac_objext
18877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018878 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018880 grep -v '^ *+' conftest.er1 >conftest.err
18881 rm -f conftest.er1
18882 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18884 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018885 { ac_try='test -z "$ac_c_werror_flag"
18886 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18888 (eval $ac_try) 2>&5
18889 ac_status=$?
18890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18891 (exit $ac_status); }; } &&
18892 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18894 (eval $ac_try) 2>&5
18895 ac_status=$?
18896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18897 (exit $ac_status); }; }; then
18898
18899
18900cat >>confdefs.h <<\_ACEOF
18901#define HAVE_UCS4_TCL 1
18902_ACEOF
18903
18904 have_ucs4_tcl=yes
18905
18906else
18907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018908sed 's/^/| /' conftest.$ac_ext >&5
18909
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018910fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018912echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18913echo "${ECHO_T}$have_ucs4_tcl" >&6
18914
Skip Montanaro6dead952003-09-25 14:50:04 +000018915# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018916if test "$wchar_h" = yes
18917then
18918 # check whether wchar_t is signed or not
18919 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18920echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18921 if test "${ac_cv_wchar_t_signed+set}" = set; then
18922 echo $ECHO_N "(cached) $ECHO_C" >&6
18923else
18924
18925 if test "$cross_compiling" = yes; then
18926 ac_cv_wchar_t_signed=yes
18927else
18928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018929/* confdefs.h. */
18930_ACEOF
18931cat confdefs.h >>conftest.$ac_ext
18932cat >>conftest.$ac_ext <<_ACEOF
18933/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018934
18935 #include <wchar.h>
18936 int main()
18937 {
18938 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18939 }
18940
18941_ACEOF
18942rm -f conftest$ac_exeext
18943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18944 (eval $ac_link) 2>&5
18945 ac_status=$?
18946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18949 (eval $ac_try) 2>&5
18950 ac_status=$?
18951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18952 (exit $ac_status); }; }; then
18953 ac_cv_wchar_t_signed=yes
18954else
18955 echo "$as_me: program exited with status $ac_status" >&5
18956echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018957sed 's/^/| /' conftest.$ac_ext >&5
18958
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018959( exit $ac_status )
18960ac_cv_wchar_t_signed=no
18961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018962rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018963fi
18964fi
18965
18966 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18967echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18968fi
18969
Martin v. Löwis11437992002-04-12 09:54:03 +000018970echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18971echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018972# Check whether --enable-unicode or --disable-unicode was given.
18973if test "${enable_unicode+set}" = set; then
18974 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018975
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018976else
18977 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018978fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018979
18980if test $enable_unicode = yes
18981then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018982 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018983 case "$have_ucs4_tcl" in
18984 yes) enable_unicode="ucs4"
18985 ;;
18986 *) enable_unicode="ucs2"
18987 ;;
18988 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018989fi
18990
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018991
18992
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018993case "$enable_unicode" in
18994ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018995 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018996#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018997_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018998
18999 ;;
19000ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019001 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019002#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019003_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019004
19005 ;;
19006esac
19007
Michael W. Hudson54241132001-12-07 15:38:26 +000019008
Martin v. Löwis11437992002-04-12 09:54:03 +000019009
19010
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019011
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019012if test "$enable_unicode" = "no"
19013then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019014 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019015 echo "$as_me:$LINENO: result: not used" >&5
19016echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019017else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019018 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019019
19020cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019021#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019022_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019023
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019024
19025 # wchar_t is only usable if it maps to an unsigned type
19026 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019027 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019028 then
19029 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019030
Martin v. Löwis11437992002-04-12 09:54:03 +000019031cat >>confdefs.h <<\_ACEOF
19032#define HAVE_USABLE_WCHAR_T 1
19033_ACEOF
19034
19035 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019036#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019037_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019038
19039 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19040 then
19041 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019042 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019043#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019044_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019045
19046 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19047 then
19048 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019049 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019050#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019051_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019052
19053 else
19054 PY_UNICODE_TYPE="no type found"
19055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19057echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019058fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019059
19060# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019061echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19062echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19063if test "${ac_cv_c_bigendian+set}" = set; then
19064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019065else
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 # See if sys/param.h defines the BYTE_ORDER macro.
19067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019068/* confdefs.h. */
19069_ACEOF
19070cat confdefs.h >>conftest.$ac_ext
19071cat >>conftest.$ac_ext <<_ACEOF
19072/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019073#include <sys/types.h>
19074#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019075
Martin v. Löwis11437992002-04-12 09:54:03 +000019076int
19077main ()
19078{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019079#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19080 bogus endian macros
19081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019082
19083 ;
19084 return 0;
19085}
19086_ACEOF
19087rm -f conftest.$ac_objext
19088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019091 grep -v '^ *+' conftest.er1 >conftest.err
19092 rm -f conftest.er1
19093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019096 { ac_try='test -z "$ac_c_werror_flag"
19097 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19099 (eval $ac_try) 2>&5
19100 ac_status=$?
19101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19102 (exit $ac_status); }; } &&
19103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19105 (eval $ac_try) 2>&5
19106 ac_status=$?
19107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19108 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019109 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019111/* confdefs.h. */
19112_ACEOF
19113cat confdefs.h >>conftest.$ac_ext
19114cat >>conftest.$ac_ext <<_ACEOF
19115/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019116#include <sys/types.h>
19117#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019118
Martin v. Löwis11437992002-04-12 09:54:03 +000019119int
19120main ()
19121{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019122#if BYTE_ORDER != BIG_ENDIAN
19123 not big endian
19124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019125
19126 ;
19127 return 0;
19128}
19129_ACEOF
19130rm -f conftest.$ac_objext
19131if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019132 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134 grep -v '^ *+' conftest.er1 >conftest.err
19135 rm -f conftest.er1
19136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19138 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019139 { ac_try='test -z "$ac_c_werror_flag"
19140 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19142 (eval $ac_try) 2>&5
19143 ac_status=$?
19144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19145 (exit $ac_status); }; } &&
19146 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19148 (eval $ac_try) 2>&5
19149 ac_status=$?
19150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19151 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019152 ac_cv_c_bigendian=yes
19153else
Martin v. Löwis11437992002-04-12 09:54:03 +000019154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019155sed 's/^/| /' conftest.$ac_ext >&5
19156
Martin v. Löwis11437992002-04-12 09:54:03 +000019157ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019158fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019160else
Martin v. Löwis11437992002-04-12 09:54:03 +000019161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019162sed 's/^/| /' conftest.$ac_ext >&5
19163
Martin v. Löwis11437992002-04-12 09:54:03 +000019164# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019165if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019166 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 ac_cv_c_bigendian=unknown
19168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019169/* confdefs.h. */
19170_ACEOF
19171cat confdefs.h >>conftest.$ac_ext
19172cat >>conftest.$ac_ext <<_ACEOF
19173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019174short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19175short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19176void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19177short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19178short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19179void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019180int
19181main ()
19182{
19183 _ascii (); _ebcdic ();
19184 ;
19185 return 0;
19186}
19187_ACEOF
19188rm -f conftest.$ac_objext
19189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019190 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019192 grep -v '^ *+' conftest.er1 >conftest.err
19193 rm -f conftest.er1
19194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19196 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019197 { ac_try='test -z "$ac_c_werror_flag"
19198 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19200 (eval $ac_try) 2>&5
19201 ac_status=$?
19202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19203 (exit $ac_status); }; } &&
19204 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19206 (eval $ac_try) 2>&5
19207 ac_status=$?
19208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19209 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019210 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019211 ac_cv_c_bigendian=yes
19212fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019213if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019214 if test "$ac_cv_c_bigendian" = unknown; then
19215 ac_cv_c_bigendian=no
19216 else
19217 # finding both strings is unlikely to happen, but who knows?
19218 ac_cv_c_bigendian=unknown
19219 fi
19220fi
19221else
19222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019223sed 's/^/| /' conftest.$ac_ext >&5
19224
Martin v. Löwis11437992002-04-12 09:54:03 +000019225fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019226rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019227else
19228 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019229/* confdefs.h. */
19230_ACEOF
19231cat confdefs.h >>conftest.$ac_ext
19232cat >>conftest.$ac_ext <<_ACEOF
19233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019234int
19235main ()
19236{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019237 /* Are we little or big endian? From Harbison&Steele. */
19238 union
19239 {
19240 long l;
19241 char c[sizeof (long)];
19242 } u;
19243 u.l = 1;
19244 exit (u.c[sizeof (long) - 1] == 1);
19245}
Martin v. Löwis11437992002-04-12 09:54:03 +000019246_ACEOF
19247rm -f conftest$ac_exeext
19248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19249 (eval $ac_link) 2>&5
19250 ac_status=$?
19251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19254 (eval $ac_try) 2>&5
19255 ac_status=$?
19256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19257 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019258 ac_cv_c_bigendian=no
19259else
Martin v. Löwis11437992002-04-12 09:54:03 +000019260 echo "$as_me: program exited with status $ac_status" >&5
19261echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262sed 's/^/| /' conftest.$ac_ext >&5
19263
Martin v. Löwis11437992002-04-12 09:54:03 +000019264( exit $ac_status )
19265ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019266fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019267rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019268fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019269fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019270rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019271fi
19272echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19273echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19274case $ac_cv_c_bigendian in
19275 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019276
Martin v. Löwis11437992002-04-12 09:54:03 +000019277cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019278#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019279_ACEOF
19280 ;;
19281 no)
19282 ;;
19283 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019284 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019285presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019286echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019287presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19288 { (exit 1); exit 1; }; } ;;
19289esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019290
Michael W. Hudson54241132001-12-07 15:38:26 +000019291
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019292# Check whether right shifting a negative integer extends the sign bit
19293# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019294echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19295echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19296if test "${ac_cv_rshift_extends_sign+set}" = set; then
19297 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019298else
Martin v. Löwis11437992002-04-12 09:54:03 +000019299
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019300if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019301 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019302else
Martin v. Löwis11437992002-04-12 09:54:03 +000019303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019304/* confdefs.h. */
19305_ACEOF
19306cat confdefs.h >>conftest.$ac_ext
19307cat >>conftest.$ac_ext <<_ACEOF
19308/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019309
19310int main()
19311{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019312 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019313}
19314
Martin v. Löwis11437992002-04-12 09:54:03 +000019315_ACEOF
19316rm -f conftest$ac_exeext
19317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19318 (eval $ac_link) 2>&5
19319 ac_status=$?
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19323 (eval $ac_try) 2>&5
19324 ac_status=$?
19325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19326 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019327 ac_cv_rshift_extends_sign=yes
19328else
Martin v. Löwis11437992002-04-12 09:54:03 +000019329 echo "$as_me: program exited with status $ac_status" >&5
19330echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019331sed 's/^/| /' conftest.$ac_ext >&5
19332
Martin v. Löwis11437992002-04-12 09:54:03 +000019333( exit $ac_status )
19334ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019335fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019336rm -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 +000019337fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019338fi
19339
Martin v. Löwis11437992002-04-12 09:54:03 +000019340echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19341echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019342if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019343then
Martin v. Löwis11437992002-04-12 09:54:03 +000019344
19345cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019346#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019347_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019348
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019349fi
19350
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019351# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019352echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19353echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19354if test "${ac_cv_have_getc_unlocked+set}" = set; then
19355 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019356else
Martin v. Löwis11437992002-04-12 09:54:03 +000019357
19358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019359/* confdefs.h. */
19360_ACEOF
19361cat confdefs.h >>conftest.$ac_ext
19362cat >>conftest.$ac_ext <<_ACEOF
19363/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019364#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019365int
19366main ()
19367{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019368
19369 FILE *f = fopen("/dev/null", "r");
19370 flockfile(f);
19371 getc_unlocked(f);
19372 funlockfile(f);
19373
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 ;
19375 return 0;
19376}
19377_ACEOF
19378rm -f conftest.$ac_objext conftest$ac_exeext
19379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019380 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019382 grep -v '^ *+' conftest.er1 >conftest.err
19383 rm -f conftest.er1
19384 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19386 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019387 { ac_try='test -z "$ac_c_werror_flag"
19388 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19390 (eval $ac_try) 2>&5
19391 ac_status=$?
19392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19393 (exit $ac_status); }; } &&
19394 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19396 (eval $ac_try) 2>&5
19397 ac_status=$?
19398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19399 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019400 ac_cv_have_getc_unlocked=yes
19401else
Martin v. Löwis11437992002-04-12 09:54:03 +000019402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019403sed 's/^/| /' conftest.$ac_ext >&5
19404
Martin v. Löwis11437992002-04-12 09:54:03 +000019405ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019406fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019407rm -f conftest.err conftest.$ac_objext \
19408 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019409fi
19410
Martin v. Löwis11437992002-04-12 09:54:03 +000019411echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19412echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019413if test "$ac_cv_have_getc_unlocked" = yes
19414then
Martin v. Löwis11437992002-04-12 09:54:03 +000019415
19416cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019417#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019418_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019419
19420fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019421
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019422# check for readline 2.1
19423echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19424echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19425if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19426 echo $ECHO_N "(cached) $ECHO_C" >&6
19427else
19428 ac_check_lib_save_LIBS=$LIBS
19429LIBS="-lreadline -ltermcap $LIBS"
19430cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019431/* confdefs.h. */
19432_ACEOF
19433cat confdefs.h >>conftest.$ac_ext
19434cat >>conftest.$ac_ext <<_ACEOF
19435/* end confdefs.h. */
19436
19437/* Override any gcc2 internal prototype to avoid an error. */
19438#ifdef __cplusplus
19439extern "C"
19440#endif
19441/* We use char because int might match the return type of a gcc2
19442 builtin and then its argument prototype would still apply. */
19443char rl_callback_handler_install ();
19444int
19445main ()
19446{
19447rl_callback_handler_install ();
19448 ;
19449 return 0;
19450}
19451_ACEOF
19452rm -f conftest.$ac_objext conftest$ac_exeext
19453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 grep -v '^ *+' conftest.er1 >conftest.err
19457 rm -f conftest.er1
19458 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19460 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019461 { ac_try='test -z "$ac_c_werror_flag"
19462 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19464 (eval $ac_try) 2>&5
19465 ac_status=$?
19466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19467 (exit $ac_status); }; } &&
19468 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19470 (eval $ac_try) 2>&5
19471 ac_status=$?
19472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19473 (exit $ac_status); }; }; then
19474 ac_cv_lib_readline_rl_callback_handler_install=yes
19475else
19476 echo "$as_me: failed program was:" >&5
19477sed 's/^/| /' conftest.$ac_ext >&5
19478
19479ac_cv_lib_readline_rl_callback_handler_install=no
19480fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019481rm -f conftest.err conftest.$ac_objext \
19482 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019483LIBS=$ac_check_lib_save_LIBS
19484fi
19485echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19486echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19487if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19488
19489cat >>confdefs.h <<\_ACEOF
19490#define HAVE_RL_CALLBACK 1
19491_ACEOF
19492
19493fi
19494
19495
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019496# check for readline 2.2
19497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019498/* confdefs.h. */
19499_ACEOF
19500cat confdefs.h >>conftest.$ac_ext
19501cat >>conftest.$ac_ext <<_ACEOF
19502/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019503#include <readline/readline.h>
19504_ACEOF
19505if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19506 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19507 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019508 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019509 rm -f conftest.er1
19510 cat conftest.err >&5
19511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19512 (exit $ac_status); } >/dev/null; then
19513 if test -s conftest.err; then
19514 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019515 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019516 else
19517 ac_cpp_err=
19518 fi
19519else
19520 ac_cpp_err=yes
19521fi
19522if test -z "$ac_cpp_err"; then
19523 have_readline=yes
19524else
19525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019526sed 's/^/| /' conftest.$ac_ext >&5
19527
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019528 have_readline=no
19529fi
19530rm -f conftest.err conftest.$ac_ext
19531if test $have_readline = yes
19532then
19533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019534/* confdefs.h. */
19535_ACEOF
19536cat confdefs.h >>conftest.$ac_ext
19537cat >>conftest.$ac_ext <<_ACEOF
19538/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019539#include <readline/readline.h>
19540
19541_ACEOF
19542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019543 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019544
19545cat >>confdefs.h <<\_ACEOF
19546#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19547_ACEOF
19548
19549fi
19550rm -f conftest*
19551
19552fi
19553
Martin v. Löwis0daad592001-09-30 21:09:59 +000019554# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019555echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19556echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19557if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019559else
Martin v. Löwis11437992002-04-12 09:54:03 +000019560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019561LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019563/* confdefs.h. */
19564_ACEOF
19565cat confdefs.h >>conftest.$ac_ext
19566cat >>conftest.$ac_ext <<_ACEOF
19567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019568
Guido van Rossum353ae582001-07-10 16:45:32 +000019569/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019570#ifdef __cplusplus
19571extern "C"
19572#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019573/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019574 builtin and then its argument prototype would still apply. */
19575char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019576int
19577main ()
19578{
19579rl_pre_input_hook ();
19580 ;
19581 return 0;
19582}
19583_ACEOF
19584rm -f conftest.$ac_objext conftest$ac_exeext
19585if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019586 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019588 grep -v '^ *+' conftest.er1 >conftest.err
19589 rm -f conftest.er1
19590 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19592 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019593 { ac_try='test -z "$ac_c_werror_flag"
19594 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19596 (eval $ac_try) 2>&5
19597 ac_status=$?
19598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19599 (exit $ac_status); }; } &&
19600 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19602 (eval $ac_try) 2>&5
19603 ac_status=$?
19604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19605 (exit $ac_status); }; }; then
19606 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019607else
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019609sed 's/^/| /' conftest.$ac_ext >&5
19610
Martin v. Löwis11437992002-04-12 09:54:03 +000019611ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019613rm -f conftest.err conftest.$ac_objext \
19614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019615LIBS=$ac_check_lib_save_LIBS
19616fi
19617echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19618echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19619if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019620
Martin v. Löwis11437992002-04-12 09:54:03 +000019621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019622#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019623_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019624
Martin v. Löwis0daad592001-09-30 21:09:59 +000019625fi
19626
Michael W. Hudson54241132001-12-07 15:38:26 +000019627
Martin v. Löwis0daad592001-09-30 21:09:59 +000019628# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019629echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19630echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19631if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19632 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019633else
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019635LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019637/* confdefs.h. */
19638_ACEOF
19639cat confdefs.h >>conftest.$ac_ext
19640cat >>conftest.$ac_ext <<_ACEOF
19641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019642
Martin v. Löwis0daad592001-09-30 21:09:59 +000019643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019644#ifdef __cplusplus
19645extern "C"
19646#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 builtin and then its argument prototype would still apply. */
19649char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019650int
19651main ()
19652{
19653rl_completion_matches ();
19654 ;
19655 return 0;
19656}
19657_ACEOF
19658rm -f conftest.$ac_objext conftest$ac_exeext
19659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019660 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019662 grep -v '^ *+' conftest.er1 >conftest.err
19663 rm -f conftest.er1
19664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19666 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019667 { ac_try='test -z "$ac_c_werror_flag"
19668 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19670 (eval $ac_try) 2>&5
19671 ac_status=$?
19672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19673 (exit $ac_status); }; } &&
19674 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19676 (eval $ac_try) 2>&5
19677 ac_status=$?
19678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19679 (exit $ac_status); }; }; then
19680 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019681else
Martin v. Löwis11437992002-04-12 09:54:03 +000019682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019683sed 's/^/| /' conftest.$ac_ext >&5
19684
Martin v. Löwis11437992002-04-12 09:54:03 +000019685ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019686fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019687rm -f conftest.err conftest.$ac_objext \
19688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019689LIBS=$ac_check_lib_save_LIBS
19690fi
19691echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19692echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19693if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019694
Martin v. Löwis11437992002-04-12 09:54:03 +000019695cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019696#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019697_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019698
Guido van Rossum353ae582001-07-10 16:45:32 +000019699fi
19700
Jack Jansendd19cf82001-12-06 22:36:17 +000019701
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019702# also in readline 4.2
19703cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019704/* confdefs.h. */
19705_ACEOF
19706cat confdefs.h >>conftest.$ac_ext
19707cat >>conftest.$ac_ext <<_ACEOF
19708/* end confdefs.h. */
19709#include <readline/readline.h>
19710_ACEOF
19711if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19712 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19713 ac_status=$?
19714 grep -v '^ *+' conftest.er1 >conftest.err
19715 rm -f conftest.er1
19716 cat conftest.err >&5
19717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19718 (exit $ac_status); } >/dev/null; then
19719 if test -s conftest.err; then
19720 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019721 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019722 else
19723 ac_cpp_err=
19724 fi
19725else
19726 ac_cpp_err=yes
19727fi
19728if test -z "$ac_cpp_err"; then
19729 have_readline=yes
19730else
19731 echo "$as_me: failed program was:" >&5
19732sed 's/^/| /' conftest.$ac_ext >&5
19733
19734 have_readline=no
19735fi
19736rm -f conftest.err conftest.$ac_ext
19737if test $have_readline = yes
19738then
19739 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019740/* confdefs.h. */
19741_ACEOF
19742cat confdefs.h >>conftest.$ac_ext
19743cat >>conftest.$ac_ext <<_ACEOF
19744/* end confdefs.h. */
19745#include <readline/readline.h>
19746
19747_ACEOF
19748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19749 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19750
19751cat >>confdefs.h <<\_ACEOF
19752#define HAVE_RL_CATCH_SIGNAL 1
19753_ACEOF
19754
19755fi
19756rm -f conftest*
19757
19758fi
19759
Martin v. Löwis11437992002-04-12 09:54:03 +000019760echo "$as_me:$LINENO: checking for broken nice()" >&5
19761echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19762if test "${ac_cv_broken_nice+set}" = set; then
19763 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019764else
Martin v. Löwis11437992002-04-12 09:54:03 +000019765
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019766if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019767 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019768else
Martin v. Löwis11437992002-04-12 09:54:03 +000019769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019770/* confdefs.h. */
19771_ACEOF
19772cat confdefs.h >>conftest.$ac_ext
19773cat >>conftest.$ac_ext <<_ACEOF
19774/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019775
19776int main()
19777{
19778 int val1 = nice(1);
19779 if (val1 != -1 && val1 == nice(2))
19780 exit(0);
19781 exit(1);
19782}
19783
Martin v. Löwis11437992002-04-12 09:54:03 +000019784_ACEOF
19785rm -f conftest$ac_exeext
19786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19787 (eval $ac_link) 2>&5
19788 ac_status=$?
19789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19792 (eval $ac_try) 2>&5
19793 ac_status=$?
19794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19795 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019796 ac_cv_broken_nice=yes
19797else
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 echo "$as_me: program exited with status $ac_status" >&5
19799echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019800sed 's/^/| /' conftest.$ac_ext >&5
19801
Martin v. Löwis11437992002-04-12 09:54:03 +000019802( exit $ac_status )
19803ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019805rm -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 +000019806fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019807fi
19808
Martin v. Löwis11437992002-04-12 09:54:03 +000019809echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19810echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019811if test "$ac_cv_broken_nice" = yes
19812then
Martin v. Löwis11437992002-04-12 09:54:03 +000019813
19814cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019815#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019816_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019817
19818fi
19819
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019820echo "$as_me:$LINENO: checking for broken poll()" >&5
19821echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19822if test "$cross_compiling" = yes; then
19823 ac_cv_broken_poll=no
19824else
19825 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019826/* confdefs.h. */
19827_ACEOF
19828cat confdefs.h >>conftest.$ac_ext
19829cat >>conftest.$ac_ext <<_ACEOF
19830/* end confdefs.h. */
19831
19832#include <poll.h>
19833
19834int main (void)
19835 {
19836 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19837
19838 close (42);
19839
19840 int poll_test = poll (&poll_struct, 1, 0);
19841
19842 if (poll_test < 0)
19843 {
19844 exit(0);
19845 }
19846 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19847 {
19848 exit(0);
19849 }
19850 else
19851 {
19852 exit(1);
19853 }
19854 }
19855
19856_ACEOF
19857rm -f conftest$ac_exeext
19858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19859 (eval $ac_link) 2>&5
19860 ac_status=$?
19861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19864 (eval $ac_try) 2>&5
19865 ac_status=$?
19866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19867 (exit $ac_status); }; }; then
19868 ac_cv_broken_poll=yes
19869else
19870 echo "$as_me: program exited with status $ac_status" >&5
19871echo "$as_me: failed program was:" >&5
19872sed 's/^/| /' conftest.$ac_ext >&5
19873
19874( exit $ac_status )
19875ac_cv_broken_poll=no
19876fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019877rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019878fi
19879echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19880echo "${ECHO_T}$ac_cv_broken_poll" >&6
19881if test "$ac_cv_broken_poll" = yes
19882then
19883
19884cat >>confdefs.h <<\_ACEOF
19885#define HAVE_BROKEN_POLL 1
19886_ACEOF
19887
19888fi
19889
Brett Cannon43802422005-02-10 20:48:03 +000019890# 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 +000019891# (which is not required by ISO C or UNIX spec) and/or if we support
19892# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000019893echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19894echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19895if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19896 echo $ECHO_N "(cached) $ECHO_C" >&6
19897else
19898 cat >conftest.$ac_ext <<_ACEOF
19899/* confdefs.h. */
19900_ACEOF
19901cat confdefs.h >>conftest.$ac_ext
19902cat >>conftest.$ac_ext <<_ACEOF
19903/* end confdefs.h. */
19904#include <sys/types.h>
19905#include <$ac_cv_struct_tm>
19906
19907
19908int
19909main ()
19910{
19911static struct tm ac_aggr;
19912if (ac_aggr.tm_zone)
19913return 0;
19914 ;
19915 return 0;
19916}
19917_ACEOF
19918rm -f conftest.$ac_objext
19919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19920 (eval $ac_compile) 2>conftest.er1
19921 ac_status=$?
19922 grep -v '^ *+' conftest.er1 >conftest.err
19923 rm -f conftest.er1
19924 cat conftest.err >&5
19925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19926 (exit $ac_status); } &&
19927 { ac_try='test -z "$ac_c_werror_flag"
19928 || test ! -s conftest.err'
19929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19930 (eval $ac_try) 2>&5
19931 ac_status=$?
19932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19933 (exit $ac_status); }; } &&
19934 { ac_try='test -s conftest.$ac_objext'
19935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19936 (eval $ac_try) 2>&5
19937 ac_status=$?
19938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19939 (exit $ac_status); }; }; then
19940 ac_cv_member_struct_tm_tm_zone=yes
19941else
19942 echo "$as_me: failed program was:" >&5
19943sed 's/^/| /' conftest.$ac_ext >&5
19944
19945cat >conftest.$ac_ext <<_ACEOF
19946/* confdefs.h. */
19947_ACEOF
19948cat confdefs.h >>conftest.$ac_ext
19949cat >>conftest.$ac_ext <<_ACEOF
19950/* end confdefs.h. */
19951#include <sys/types.h>
19952#include <$ac_cv_struct_tm>
19953
19954
19955int
19956main ()
19957{
19958static struct tm ac_aggr;
19959if (sizeof ac_aggr.tm_zone)
19960return 0;
19961 ;
19962 return 0;
19963}
19964_ACEOF
19965rm -f conftest.$ac_objext
19966if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19967 (eval $ac_compile) 2>conftest.er1
19968 ac_status=$?
19969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19973 (exit $ac_status); } &&
19974 { ac_try='test -z "$ac_c_werror_flag"
19975 || test ! -s conftest.err'
19976 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19977 (eval $ac_try) 2>&5
19978 ac_status=$?
19979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19980 (exit $ac_status); }; } &&
19981 { ac_try='test -s conftest.$ac_objext'
19982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19983 (eval $ac_try) 2>&5
19984 ac_status=$?
19985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19986 (exit $ac_status); }; }; then
19987 ac_cv_member_struct_tm_tm_zone=yes
19988else
19989 echo "$as_me: failed program was:" >&5
19990sed 's/^/| /' conftest.$ac_ext >&5
19991
19992ac_cv_member_struct_tm_tm_zone=no
19993fi
19994rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19995fi
19996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19997fi
19998echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19999echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20000if test $ac_cv_member_struct_tm_tm_zone = yes; then
20001
20002cat >>confdefs.h <<_ACEOF
20003#define HAVE_STRUCT_TM_TM_ZONE 1
20004_ACEOF
20005
20006
20007fi
20008
20009if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20010
20011cat >>confdefs.h <<\_ACEOF
20012#define HAVE_TM_ZONE 1
20013_ACEOF
20014
20015else
20016 echo "$as_me:$LINENO: checking for tzname" >&5
20017echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20018if test "${ac_cv_var_tzname+set}" = set; then
20019 echo $ECHO_N "(cached) $ECHO_C" >&6
20020else
20021 cat >conftest.$ac_ext <<_ACEOF
20022/* confdefs.h. */
20023_ACEOF
20024cat confdefs.h >>conftest.$ac_ext
20025cat >>conftest.$ac_ext <<_ACEOF
20026/* end confdefs.h. */
20027#include <time.h>
20028#ifndef tzname /* For SGI. */
20029extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20030#endif
20031
20032int
20033main ()
20034{
20035atoi(*tzname);
20036 ;
20037 return 0;
20038}
20039_ACEOF
20040rm -f conftest.$ac_objext conftest$ac_exeext
20041if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20042 (eval $ac_link) 2>conftest.er1
20043 ac_status=$?
20044 grep -v '^ *+' conftest.er1 >conftest.err
20045 rm -f conftest.er1
20046 cat conftest.err >&5
20047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20048 (exit $ac_status); } &&
20049 { ac_try='test -z "$ac_c_werror_flag"
20050 || test ! -s conftest.err'
20051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20052 (eval $ac_try) 2>&5
20053 ac_status=$?
20054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20055 (exit $ac_status); }; } &&
20056 { ac_try='test -s conftest$ac_exeext'
20057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20058 (eval $ac_try) 2>&5
20059 ac_status=$?
20060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20061 (exit $ac_status); }; }; then
20062 ac_cv_var_tzname=yes
20063else
20064 echo "$as_me: failed program was:" >&5
20065sed 's/^/| /' conftest.$ac_ext >&5
20066
20067ac_cv_var_tzname=no
20068fi
20069rm -f conftest.err conftest.$ac_objext \
20070 conftest$ac_exeext conftest.$ac_ext
20071fi
20072echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20073echo "${ECHO_T}$ac_cv_var_tzname" >&6
20074 if test $ac_cv_var_tzname = yes; then
20075
20076cat >>confdefs.h <<\_ACEOF
20077#define HAVE_TZNAME 1
20078_ACEOF
20079
20080 fi
20081fi
20082
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020083
Martin v. Löwis1d459062005-03-14 21:23:33 +000020084# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020085echo "$as_me:$LINENO: checking for working tzset()" >&5
20086echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20087if test "${ac_cv_working_tzset+set}" = set; then
20088 echo $ECHO_N "(cached) $ECHO_C" >&6
20089else
20090
20091if test "$cross_compiling" = yes; then
20092 ac_cv_working_tzset=no
20093else
20094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020095/* confdefs.h. */
20096_ACEOF
20097cat confdefs.h >>conftest.$ac_ext
20098cat >>conftest.$ac_ext <<_ACEOF
20099/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020100
20101#include <stdlib.h>
20102#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020103#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020104
20105#if HAVE_TZNAME
20106extern char *tzname[];
20107#endif
20108
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020109int main()
20110{
Brett Cannon18367812003-09-19 00:59:16 +000020111 /* Note that we need to ensure that not only does tzset(3)
20112 do 'something' with localtime, but it works as documented
20113 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020114 This includes making sure that tzname is set properly if
20115 tm->tm_zone does not exist since it is the alternative way
20116 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020117
20118 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020119 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020120 */
20121
Martin v. Löwis1d459062005-03-14 21:23:33 +000020122 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020123 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20124
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020125 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020126 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020127 if (localtime(&groundhogday)->tm_hour != 0)
20128 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020129#if HAVE_TZNAME
20130 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20131 if (strcmp(tzname[0], "UTC") ||
20132 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20133 exit(1);
20134#endif
Brett Cannon18367812003-09-19 00:59:16 +000020135
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020136 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020137 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020138 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020139 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020140#if HAVE_TZNAME
20141 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20142 exit(1);
20143#endif
Brett Cannon18367812003-09-19 00:59:16 +000020144
20145 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20146 tzset();
20147 if (localtime(&groundhogday)->tm_hour != 11)
20148 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020149#if HAVE_TZNAME
20150 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20151 exit(1);
20152#endif
20153
20154#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020155 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20156 exit(1);
20157 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20158 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020159#endif
Brett Cannon18367812003-09-19 00:59:16 +000020160
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020161 exit(0);
20162}
20163
20164_ACEOF
20165rm -f conftest$ac_exeext
20166if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20167 (eval $ac_link) 2>&5
20168 ac_status=$?
20169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20170 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20172 (eval $ac_try) 2>&5
20173 ac_status=$?
20174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20175 (exit $ac_status); }; }; then
20176 ac_cv_working_tzset=yes
20177else
20178 echo "$as_me: program exited with status $ac_status" >&5
20179echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020180sed 's/^/| /' conftest.$ac_ext >&5
20181
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020182( exit $ac_status )
20183ac_cv_working_tzset=no
20184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020185rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020186fi
20187fi
20188
20189echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20190echo "${ECHO_T}$ac_cv_working_tzset" >&6
20191if test "$ac_cv_working_tzset" = yes
20192then
20193
20194cat >>confdefs.h <<\_ACEOF
20195#define HAVE_WORKING_TZSET 1
20196_ACEOF
20197
20198fi
20199
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020200# Look for subsecond timestamps in struct stat
20201echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20202echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20203if test "${ac_cv_stat_tv_nsec+set}" = set; then
20204 echo $ECHO_N "(cached) $ECHO_C" >&6
20205else
20206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020212#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020213int
20214main ()
20215{
20216
20217struct stat st;
20218st.st_mtim.tv_nsec = 1;
20219
20220 ;
20221 return 0;
20222}
20223_ACEOF
20224rm -f conftest.$ac_objext
20225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020226 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020228 grep -v '^ *+' conftest.er1 >conftest.err
20229 rm -f conftest.er1
20230 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20232 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020233 { ac_try='test -z "$ac_c_werror_flag"
20234 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20236 (eval $ac_try) 2>&5
20237 ac_status=$?
20238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20239 (exit $ac_status); }; } &&
20240 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20242 (eval $ac_try) 2>&5
20243 ac_status=$?
20244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20245 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020246 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020247else
20248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020249sed 's/^/| /' conftest.$ac_ext >&5
20250
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020251ac_cv_stat_tv_nsec=no
20252fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020254fi
20255
20256echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20257echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20258if test "$ac_cv_stat_tv_nsec" = yes
20259then
20260
20261cat >>confdefs.h <<\_ACEOF
20262#define HAVE_STAT_TV_NSEC 1
20263_ACEOF
20264
20265fi
20266
Jack Jansen666b1e72001-10-31 12:11:48 +000020267# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020268echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20269echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20270if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20271 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020272else
Martin v. Löwis11437992002-04-12 09:54:03 +000020273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020274/* confdefs.h. */
20275_ACEOF
20276cat confdefs.h >>conftest.$ac_ext
20277cat >>conftest.$ac_ext <<_ACEOF
20278/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020279#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020280int
20281main ()
20282{
Jack Jansen666b1e72001-10-31 12:11:48 +000020283
20284 int rtn;
20285 rtn = mvwdelch(0,0,0);
20286
Martin v. Löwis11437992002-04-12 09:54:03 +000020287 ;
20288 return 0;
20289}
20290_ACEOF
20291rm -f conftest.$ac_objext
20292if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020293 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20299 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020300 { ac_try='test -z "$ac_c_werror_flag"
20301 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20303 (eval $ac_try) 2>&5
20304 ac_status=$?
20305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20306 (exit $ac_status); }; } &&
20307 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20309 (eval $ac_try) 2>&5
20310 ac_status=$?
20311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20312 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020313 ac_cv_mvwdelch_is_expression=yes
20314else
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020316sed 's/^/| /' conftest.$ac_ext >&5
20317
Martin v. Löwis11437992002-04-12 09:54:03 +000020318ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020319fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020321fi
20322
Martin v. Löwis11437992002-04-12 09:54:03 +000020323echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20324echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020325
20326if test "$ac_cv_mvwdelch_is_expression" = yes
20327then
Martin v. Löwis11437992002-04-12 09:54:03 +000020328
20329cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020330#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020331_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020332
20333fi
20334
Martin v. Löwis11437992002-04-12 09:54:03 +000020335echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20336echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20337if test "${ac_cv_window_has_flags+set}" = set; then
20338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020339else
Martin v. Löwis11437992002-04-12 09:54:03 +000020340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020341/* confdefs.h. */
20342_ACEOF
20343cat confdefs.h >>conftest.$ac_ext
20344cat >>conftest.$ac_ext <<_ACEOF
20345/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020346#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020347int
20348main ()
20349{
Jack Jansen666b1e72001-10-31 12:11:48 +000020350
20351 WINDOW *w;
20352 w->_flags = 0;
20353
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 ;
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
Jack Jansen666b1e72001-10-31 12:11:48 +000020380 ac_cv_window_has_flags=yes
20381else
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_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020386fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020388fi
20389
Martin v. Löwis11437992002-04-12 09:54:03 +000020390echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20391echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020392
Jack Jansen666b1e72001-10-31 12:11:48 +000020393
20394if test "$ac_cv_window_has_flags" = yes
20395then
Martin v. Löwis11437992002-04-12 09:54:03 +000020396
20397cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020398#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020399_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020400
20401fi
20402
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020403echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20404echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20405
20406if test -e /dev/ptmx
20407then
20408 echo "$as_me:$LINENO: result: yes" >&5
20409echo "${ECHO_T}yes" >&6
20410
20411cat >>confdefs.h <<\_ACEOF
20412#define HAVE_DEV_PTMX 1
20413_ACEOF
20414
20415else
20416 echo "$as_me:$LINENO: result: no" >&5
20417echo "${ECHO_T}no" >&6
20418fi
20419
Neal Norwitz865400f2003-03-21 01:42:58 +000020420echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20421echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20422
20423if test -e /dev/ptc
20424then
20425 echo "$as_me:$LINENO: result: yes" >&5
20426echo "${ECHO_T}yes" >&6
20427
20428cat >>confdefs.h <<\_ACEOF
20429#define HAVE_DEV_PTC 1
20430_ACEOF
20431
20432else
20433 echo "$as_me:$LINENO: result: no" >&5
20434echo "${ECHO_T}no" >&6
20435fi
20436
Martin v. Löwis11437992002-04-12 09:54:03 +000020437echo "$as_me:$LINENO: checking for socklen_t" >&5
20438echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20439if test "${ac_cv_type_socklen_t+set}" = set; then
20440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020441else
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020443/* confdefs.h. */
20444_ACEOF
20445cat confdefs.h >>conftest.$ac_ext
20446cat >>conftest.$ac_ext <<_ACEOF
20447/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020448
20449#ifdef HAVE_SYS_TYPES_H
20450#include <sys/types.h>
20451#endif
20452#ifdef HAVE_SYS_SOCKET_H
20453#include <sys/socket.h>
20454#endif
20455
20456
Martin v. Löwis11437992002-04-12 09:54:03 +000020457int
20458main ()
20459{
20460if ((socklen_t *) 0)
20461 return 0;
20462if (sizeof (socklen_t))
20463 return 0;
20464 ;
20465 return 0;
20466}
20467_ACEOF
20468rm -f conftest.$ac_objext
20469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020470 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020472 grep -v '^ *+' conftest.er1 >conftest.err
20473 rm -f conftest.er1
20474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20476 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020477 { ac_try='test -z "$ac_c_werror_flag"
20478 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20480 (eval $ac_try) 2>&5
20481 ac_status=$?
20482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20483 (exit $ac_status); }; } &&
20484 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20486 (eval $ac_try) 2>&5
20487 ac_status=$?
20488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20489 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020490 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020491else
Martin v. Löwis11437992002-04-12 09:54:03 +000020492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020493sed 's/^/| /' conftest.$ac_ext >&5
20494
Martin v. Löwis11437992002-04-12 09:54:03 +000020495ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020496fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020498fi
20499echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20500echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20501if test $ac_cv_type_socklen_t = yes; then
20502 :
20503else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020504
Martin v. Löwis01c04012002-11-11 14:58:44 +000020505cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020506#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020507_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020508
20509fi
20510
Michael W. Hudson54241132001-12-07 15:38:26 +000020511
Michael W. Hudson54241132001-12-07 15:38:26 +000020512
20513
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020514for h in `(cd $srcdir;echo Python/thread_*.h)`
20515do
20516 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20517done
20518
Michael W. Hudson54241132001-12-07 15:38:26 +000020519
Jack Jansen0b06be72002-06-21 14:48:38 +000020520SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020521echo "$as_me:$LINENO: checking for build directories" >&5
20522echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020523for dir in $SRCDIRS; do
20524 if test ! -d $dir; then
20525 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020526 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020527done
Martin v. Löwis11437992002-04-12 09:54:03 +000020528echo "$as_me:$LINENO: result: done" >&5
20529echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020530
Guido van Rossum627b2d71993-12-24 10:39:16 +000020531# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020532 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020533
Martin v. Löwis11437992002-04-12 09:54:03 +000020534cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020535# This file is a shell script that caches the results of configure
20536# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020537# scripts and configure runs, see configure's option --config-cache.
20538# It is not useful on other systems. If it contains results you don't
20539# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020540#
Martin v. Löwis11437992002-04-12 09:54:03 +000020541# config.status only pays attention to the cache file if you give it
20542# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020543#
Skip Montanaro6dead952003-09-25 14:50:04 +000020544# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020545# loading this file, other *unset* `ac_cv_foo' will be assigned the
20546# following values.
20547
20548_ACEOF
20549
Guido van Rossumf78abae1997-01-21 22:02:36 +000020550# The following way of writing the cache mishandles newlines in values,
20551# but we know of no workaround that is simple, portable, and efficient.
20552# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020553# Ultrix sh set writes to stderr and can't be redirected directly,
20554# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020555{
20556 (set) 2>&1 |
20557 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20558 *ac_space=\ *)
20559 # `set' does not quote correctly, so add quotes (double-quote
20560 # substitution turns \\\\ into \\, and sed turns \\ into \).
20561 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020562 "s/'/'\\\\''/g;
20563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 ;;
20565 *)
20566 # `set' quotes correctly as required by POSIX, so do not add quotes.
20567 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020568 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 ;;
20570 esac;
20571} |
20572 sed '
20573 t clear
20574 : clear
20575 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20576 t end
20577 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20578 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020579if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020580 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020581 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20582 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020583 else
20584 echo "not updating unwritable cache $cache_file"
20585 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020586fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020587rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020588
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020589test "x$prefix" = xNONE && prefix=$ac_default_prefix
20590# Let make expand exec_prefix.
20591test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020592
Martin v. Löwis11437992002-04-12 09:54:03 +000020593# VPATH may cause trouble with some makes, so we remove $(srcdir),
20594# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20595# trailing colons and then remove the whole line if VPATH becomes empty
20596# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020597if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020598 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020599s/:*\$(srcdir):*/:/;
20600s/:*\${srcdir}:*/:/;
20601s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020602s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020603s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020604s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020605}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020606fi
20607
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020608DEFS=-DHAVE_CONFIG_H
20609
Skip Montanaro6dead952003-09-25 14:50:04 +000020610ac_libobjs=
20611ac_ltlibobjs=
20612for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20613 # 1. Remove the extension, and $U if already installed.
20614 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020615 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020616 # 2. Add them.
20617 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20618 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20619done
20620LIBOBJS=$ac_libobjs
20621
20622LTLIBOBJS=$ac_ltlibobjs
20623
20624
Martin v. Löwis11437992002-04-12 09:54:03 +000020625
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020626: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020627ac_clean_files_save=$ac_clean_files
20628ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20629{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20630echo "$as_me: creating $CONFIG_STATUS" >&6;}
20631cat >$CONFIG_STATUS <<_ACEOF
20632#! $SHELL
20633# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020634# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020635# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020636# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020637
Martin v. Löwis11437992002-04-12 09:54:03 +000020638debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020639ac_cs_recheck=false
20640ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020641SHELL=\${CONFIG_SHELL-$SHELL}
20642_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020643
Martin v. Löwis11437992002-04-12 09:54:03 +000020644cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020645## --------------------- ##
20646## M4sh Initialization. ##
20647## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020648
Martin v. Löwis11437992002-04-12 09:54:03 +000020649# Be Bourne compatible
20650if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20651 emulate sh
20652 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020653 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20654 # is contrary to our usage. Disable this feature.
20655 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020656elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20657 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020659DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020660
Martin v. Löwis11437992002-04-12 09:54:03 +000020661# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020662if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 as_unset=unset
20664else
20665 as_unset=false
20666fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020667
Skip Montanaro6dead952003-09-25 14:50:04 +000020668
20669# Work around bugs in pre-3.0 UWIN ksh.
20670$as_unset ENV MAIL MAILPATH
20671PS1='$ '
20672PS2='> '
20673PS4='+ '
20674
20675# NLS nuisances.
20676for as_var in \
20677 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20678 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20679 LC_TELEPHONE LC_TIME
20680do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020681 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020682 eval $as_var=C; export $as_var
20683 else
20684 $as_unset $as_var
20685 fi
20686done
20687
20688# Required to use basename.
20689if expr a : '\(a\)' >/dev/null 2>&1; then
20690 as_expr=expr
20691else
20692 as_expr=false
20693fi
20694
20695if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20696 as_basename=basename
20697else
20698 as_basename=false
20699fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020700
20701
20702# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020703as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020704$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20705 X"$0" : 'X\(//\)$' \| \
20706 X"$0" : 'X\(/\)$' \| \
20707 . : '\(.\)' 2>/dev/null ||
20708echo X/"$0" |
20709 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20710 /^X\/\(\/\/\)$/{ s//\1/; q; }
20711 /^X\/\(\/\).*/{ s//\1/; q; }
20712 s/.*/./; q'`
20713
Skip Montanaro6dead952003-09-25 14:50:04 +000020714
Martin v. Löwis11437992002-04-12 09:54:03 +000020715# PATH needs CR, and LINENO needs CR and PATH.
20716# Avoid depending upon Character Ranges.
20717as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20718as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20719as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20720as_cr_digits='0123456789'
20721as_cr_alnum=$as_cr_Letters$as_cr_digits
20722
20723# The user is always right.
20724if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020725 echo "#! /bin/sh" >conf$$.sh
20726 echo "exit 0" >>conf$$.sh
20727 chmod +x conf$$.sh
20728 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 PATH_SEPARATOR=';'
20730 else
20731 PATH_SEPARATOR=:
20732 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020733 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020734fi
20735
20736
20737 as_lineno_1=$LINENO
20738 as_lineno_2=$LINENO
20739 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20740 test "x$as_lineno_1" != "x$as_lineno_2" &&
20741 test "x$as_lineno_3" = "x$as_lineno_2" || {
20742 # Find who we are. Look in the path if we contain no path at all
20743 # relative or not.
20744 case $0 in
20745 *[\\/]* ) as_myself=$0 ;;
20746 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20747for as_dir in $PATH
20748do
20749 IFS=$as_save_IFS
20750 test -z "$as_dir" && as_dir=.
20751 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20752done
20753
20754 ;;
20755 esac
20756 # We did not find ourselves, most probably we were run as `sh COMMAND'
20757 # in which case we are not to be found in the path.
20758 if test "x$as_myself" = x; then
20759 as_myself=$0
20760 fi
20761 if test ! -f "$as_myself"; then
20762 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20763echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20764 { (exit 1); exit 1; }; }
20765 fi
20766 case $CONFIG_SHELL in
20767 '')
20768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20769for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20770do
20771 IFS=$as_save_IFS
20772 test -z "$as_dir" && as_dir=.
20773 for as_base in sh bash ksh sh5; do
20774 case $as_dir in
20775 /*)
20776 if ("$as_dir/$as_base" -c '
20777 as_lineno_1=$LINENO
20778 as_lineno_2=$LINENO
20779 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20780 test "x$as_lineno_1" != "x$as_lineno_2" &&
20781 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020782 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20783 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020784 CONFIG_SHELL=$as_dir/$as_base
20785 export CONFIG_SHELL
20786 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20787 fi;;
20788 esac
20789 done
20790done
20791;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020792 esac
20793
Martin v. Löwis11437992002-04-12 09:54:03 +000020794 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20795 # uniformly replaced by the line number. The first 'sed' inserts a
20796 # line-number line before each line; the second 'sed' does the real
20797 # work. The second script uses 'N' to pair each line-number line
20798 # with the numbered line, and appends trailing '-' during
20799 # substitution so that $LINENO is not a special case at line end.
20800 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20801 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20802 sed '=' <$as_myself |
20803 sed '
20804 N
20805 s,$,-,
20806 : loop
20807 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20808 t loop
20809 s,-$,,
20810 s,^['$as_cr_digits']*\n,,
20811 ' >$as_me.lineno &&
20812 chmod +x $as_me.lineno ||
20813 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20814echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20815 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020816
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 # Don't try to exec as it changes $[0], causing all sort of problems
20818 # (the dirname of $[0] is not the place where we might find the
20819 # original and so on. Autoconf is especially sensible to this).
20820 . ./$as_me.lineno
20821 # Exit status is that of the last command.
20822 exit
20823}
20824
20825
20826case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20827 *c*,-n*) ECHO_N= ECHO_C='
20828' ECHO_T=' ' ;;
20829 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20830 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20831esac
20832
20833if expr a : '\(a\)' >/dev/null 2>&1; then
20834 as_expr=expr
20835else
20836 as_expr=false
20837fi
20838
20839rm -f conf$$ conf$$.exe conf$$.file
20840echo >conf$$.file
20841if ln -s conf$$.file conf$$ 2>/dev/null; then
20842 # We could just check for DJGPP; but this test a) works b) is more generic
20843 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20844 if test -f conf$$.exe; then
20845 # Don't use ln at all; we don't have any links
20846 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020847 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 as_ln_s='ln -s'
20849 fi
20850elif ln conf$$.file conf$$ 2>/dev/null; then
20851 as_ln_s=ln
20852else
20853 as_ln_s='cp -p'
20854fi
20855rm -f conf$$ conf$$.exe conf$$.file
20856
Skip Montanaro6dead952003-09-25 14:50:04 +000020857if mkdir -p . 2>/dev/null; then
20858 as_mkdir_p=:
20859else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020860 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020861 as_mkdir_p=false
20862fi
20863
Martin v. Löwis11437992002-04-12 09:54:03 +000020864as_executable_p="test -f"
20865
20866# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020867as_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 +000020868
20869# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020870as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020871
20872
20873# IFS
20874# We need space, tab and new line, in precisely that order.
20875as_nl='
20876'
20877IFS=" $as_nl"
20878
20879# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020880$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020881
20882exec 6>&1
20883
20884# Open the log real soon, to keep \$[0] and so on meaningful, and to
20885# report actual input values of CONFIG_FILES etc. instead of their
20886# values after options handling. Logging --version etc. is OK.
20887exec 5>>config.log
20888{
20889 echo
20890 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20891## Running $as_me. ##
20892_ASBOX
20893} >&5
20894cat >&5 <<_CSEOF
20895
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000020896This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020897generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020898
20899 CONFIG_FILES = $CONFIG_FILES
20900 CONFIG_HEADERS = $CONFIG_HEADERS
20901 CONFIG_LINKS = $CONFIG_LINKS
20902 CONFIG_COMMANDS = $CONFIG_COMMANDS
20903 $ $0 $@
20904
20905_CSEOF
20906echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20907echo >&5
20908_ACEOF
20909
20910# Files that config.status was made for.
20911if test -n "$ac_config_files"; then
20912 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20913fi
20914
20915if test -n "$ac_config_headers"; then
20916 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20917fi
20918
20919if test -n "$ac_config_links"; then
20920 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20921fi
20922
20923if test -n "$ac_config_commands"; then
20924 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20925fi
20926
20927cat >>$CONFIG_STATUS <<\_ACEOF
20928
20929ac_cs_usage="\
20930\`$as_me' instantiates files from templates according to the
20931current configuration.
20932
20933Usage: $0 [OPTIONS] [FILE]...
20934
20935 -h, --help print this help, then exit
20936 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020937 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020938 -d, --debug don't remove temporary files
20939 --recheck update $as_me by reconfiguring in the same conditions
20940 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020941 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020943 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020944
20945Configuration files:
20946$config_files
20947
20948Configuration headers:
20949$config_headers
20950
20951Report bugs to <bug-autoconf@gnu.org>."
20952_ACEOF
20953
20954cat >>$CONFIG_STATUS <<_ACEOF
20955ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000020956python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020957configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020958 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20959
Skip Montanarof0d5f792004-08-15 14:08:23 +000020960Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020961This config.status script is free software; the Free Software Foundation
20962gives unlimited permission to copy, distribute and modify it."
20963srcdir=$srcdir
20964INSTALL="$INSTALL"
20965_ACEOF
20966
20967cat >>$CONFIG_STATUS <<\_ACEOF
20968# If no file are specified by the user, then we need to provide default
20969# value. By we need to know if files were specified by the user.
20970ac_need_defaults=:
20971while test $# != 0
20972do
20973 case $1 in
20974 --*=*)
20975 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20976 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020977 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020978 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020979 -*)
20980 ac_option=$1
20981 ac_optarg=$2
20982 ac_shift=shift
20983 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020984 *) # This is not an option, so the user has probably given explicit
20985 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020986 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ac_need_defaults=false;;
20988 esac
20989
Skip Montanaro6dead952003-09-25 14:50:04 +000020990 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020991 # Handling of the options.
20992_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020993cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020994 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20995 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 --version | --vers* | -V )
20997 echo "$ac_cs_version"; exit 0 ;;
20998 --he | --h)
20999 # Conflict between --help and --header
21000 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21001Try \`$0 --help' for more information." >&5
21002echo "$as_me: error: ambiguous option: $1
21003Try \`$0 --help' for more information." >&2;}
21004 { (exit 1); exit 1; }; };;
21005 --help | --hel | -h )
21006 echo "$ac_cs_usage"; exit 0 ;;
21007 --debug | --d* | -d )
21008 debug=: ;;
21009 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021010 $ac_shift
21011 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021012 ac_need_defaults=false;;
21013 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021014 $ac_shift
21015 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021016 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21018 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21019 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021020
21021 # This is an error.
21022 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21023Try \`$0 --help' for more information." >&5
21024echo "$as_me: error: unrecognized option: $1
21025Try \`$0 --help' for more information." >&2;}
21026 { (exit 1); exit 1; }; } ;;
21027
21028 *) ac_config_targets="$ac_config_targets $1" ;;
21029
21030 esac
21031 shift
21032done
21033
Skip Montanaro6dead952003-09-25 14:50:04 +000021034ac_configure_extra_args=
21035
21036if $ac_cs_silent; then
21037 exec 6>/dev/null
21038 ac_configure_extra_args="$ac_configure_extra_args --silent"
21039fi
21040
21041_ACEOF
21042cat >>$CONFIG_STATUS <<_ACEOF
21043if \$ac_cs_recheck; then
21044 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21045 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21046fi
21047
Martin v. Löwis11437992002-04-12 09:54:03 +000021048_ACEOF
21049
21050
21051
21052
21053
21054cat >>$CONFIG_STATUS <<\_ACEOF
21055for ac_config_target in $ac_config_targets
21056do
21057 case "$ac_config_target" in
21058 # Handling of arguments.
21059 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21060 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21061 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21062 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21063echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21064 { (exit 1); exit 1; }; };;
21065 esac
21066done
21067
21068# If the user did not use the arguments to specify the items to instantiate,
21069# then the envvar interface is used. Set only those that are not.
21070# We use the long form for the default assignment because of an extremely
21071# bizarre bug on SunOS 4.1.3.
21072if $ac_need_defaults; then
21073 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21074 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21075fi
21076
Skip Montanaro6dead952003-09-25 14:50:04 +000021077# Have a temporary directory for convenience. Make it in the build tree
21078# simply because there is no reason to put it here, and in addition,
21079# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021080# Create a temporary directory, and hook for its removal unless debugging.
21081$debug ||
21082{
21083 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21084 trap '{ (exit 1); exit 1; }' 1 2 13 15
21085}
21086
21087# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021088
Martin v. Löwis11437992002-04-12 09:54:03 +000021089{
Skip Montanaro6dead952003-09-25 14:50:04 +000021090 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 test -n "$tmp" && test -d "$tmp"
21092} ||
21093{
Skip Montanaro6dead952003-09-25 14:50:04 +000021094 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 (umask 077 && mkdir $tmp)
21096} ||
21097{
Skip Montanaro6dead952003-09-25 14:50:04 +000021098 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021099 { (exit 1); exit 1; }
21100}
21101
21102_ACEOF
21103
21104cat >>$CONFIG_STATUS <<_ACEOF
21105
21106#
21107# CONFIG_FILES section.
21108#
21109
21110# No need to generate the scripts if there are no CONFIG_FILES.
21111# This happens for instance when ./config.status config.h
21112if test -n "\$CONFIG_FILES"; then
21113 # Protect against being on the right side of a sed subst in config.status.
21114 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21115 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21116s,@SHELL@,$SHELL,;t t
21117s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21118s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21119s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21120s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21121s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21122s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21123s,@exec_prefix@,$exec_prefix,;t t
21124s,@prefix@,$prefix,;t t
21125s,@program_transform_name@,$program_transform_name,;t t
21126s,@bindir@,$bindir,;t t
21127s,@sbindir@,$sbindir,;t t
21128s,@libexecdir@,$libexecdir,;t t
21129s,@datadir@,$datadir,;t t
21130s,@sysconfdir@,$sysconfdir,;t t
21131s,@sharedstatedir@,$sharedstatedir,;t t
21132s,@localstatedir@,$localstatedir,;t t
21133s,@libdir@,$libdir,;t t
21134s,@includedir@,$includedir,;t t
21135s,@oldincludedir@,$oldincludedir,;t t
21136s,@infodir@,$infodir,;t t
21137s,@mandir@,$mandir,;t t
21138s,@build_alias@,$build_alias,;t t
21139s,@host_alias@,$host_alias,;t t
21140s,@target_alias@,$target_alias,;t t
21141s,@DEFS@,$DEFS,;t t
21142s,@ECHO_C@,$ECHO_C,;t t
21143s,@ECHO_N@,$ECHO_N,;t t
21144s,@ECHO_T@,$ECHO_T,;t t
21145s,@LIBS@,$LIBS,;t t
21146s,@VERSION@,$VERSION,;t t
21147s,@SOVERSION@,$SOVERSION,;t t
21148s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21149s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21150s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21151s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21152s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21153s,@MACHDEP@,$MACHDEP,;t t
21154s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021155s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021156s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021157s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021158s,@CXX@,$CXX,;t t
21159s,@MAINOBJ@,$MAINOBJ,;t t
21160s,@EXEEXT@,$EXEEXT,;t t
21161s,@CC@,$CC,;t t
21162s,@CFLAGS@,$CFLAGS,;t t
21163s,@LDFLAGS@,$LDFLAGS,;t t
21164s,@CPPFLAGS@,$CPPFLAGS,;t t
21165s,@ac_ct_CC@,$ac_ct_CC,;t t
21166s,@OBJEXT@,$OBJEXT,;t t
21167s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021168s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021169s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21170s,@LIBRARY@,$LIBRARY,;t t
21171s,@LDLIBRARY@,$LDLIBRARY,;t t
21172s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21173s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21174s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21175s,@INSTSONAME@,$INSTSONAME,;t t
21176s,@RUNSHARED@,$RUNSHARED,;t t
21177s,@LINKCC@,$LINKCC,;t t
21178s,@RANLIB@,$RANLIB,;t t
21179s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21180s,@AR@,$AR,;t t
21181s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21182s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21183s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21184s,@LN@,$LN,;t t
21185s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021186s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021187s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021188s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21189s,@SO@,$SO,;t t
21190s,@LDSHARED@,$LDSHARED,;t t
21191s,@BLDSHARED@,$BLDSHARED,;t t
21192s,@CCSHARED@,$CCSHARED,;t t
21193s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21194s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021195s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021196s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21197s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21198s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21199s,@LDLAST@,$LDLAST,;t t
21200s,@THREADOBJ@,$THREADOBJ,;t t
21201s,@DLINCLDIR@,$DLINCLDIR,;t t
21202s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21203s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021204s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021205s,@LIBOBJS@,$LIBOBJS,;t t
21206s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21207s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21208s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21209s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21210s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21211s,@LIBM@,$LIBM,;t t
21212s,@LIBC@,$LIBC,;t t
21213s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21214s,@THREADHEADERS@,$THREADHEADERS,;t t
21215s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021216s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021217CEOF
21218
21219_ACEOF
21220
21221 cat >>$CONFIG_STATUS <<\_ACEOF
21222 # Split the substitutions into bite-sized pieces for seds with
21223 # small command number limits, like on Digital OSF/1 and HP-UX.
21224 ac_max_sed_lines=48
21225 ac_sed_frag=1 # Number of current file.
21226 ac_beg=1 # First line for current file.
21227 ac_end=$ac_max_sed_lines # Line after last line for current file.
21228 ac_more_lines=:
21229 ac_sed_cmds=
21230 while $ac_more_lines; do
21231 if test $ac_beg -gt 1; then
21232 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21233 else
21234 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21235 fi
21236 if test ! -s $tmp/subs.frag; then
21237 ac_more_lines=false
21238 else
21239 # The purpose of the label and of the branching condition is to
21240 # speed up the sed processing (if there are no `@' at all, there
21241 # is no need to browse any of the substitutions).
21242 # These are the two extra sed commands mentioned above.
21243 (echo ':t
21244 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21245 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021246 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021247 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021248 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 fi
21250 ac_sed_frag=`expr $ac_sed_frag + 1`
21251 ac_beg=$ac_end
21252 ac_end=`expr $ac_end + $ac_max_sed_lines`
21253 fi
21254 done
21255 if test -z "$ac_sed_cmds"; then
21256 ac_sed_cmds=cat
21257 fi
21258fi # test -n "$CONFIG_FILES"
21259
21260_ACEOF
21261cat >>$CONFIG_STATUS <<\_ACEOF
21262for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21263 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21264 case $ac_file in
21265 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021266 cat >$tmp/stdin
21267 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21268 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021270 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021271 * ) ac_file_in=$ac_file.in ;;
21272 esac
21273
21274 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21275 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21276$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021277 X"$ac_file" : 'X\(//\)[^/]' \| \
21278 X"$ac_file" : 'X\(//\)$' \| \
21279 X"$ac_file" : 'X\(/\)' \| \
21280 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021281echo X"$ac_file" |
21282 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21283 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21284 /^X\(\/\/\)$/{ s//\1/; q; }
21285 /^X\(\/\).*/{ s//\1/; q; }
21286 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021287 { if $as_mkdir_p; then
21288 mkdir -p "$ac_dir"
21289 else
21290 as_dir="$ac_dir"
21291 as_dirs=
21292 while test ! -d "$as_dir"; do
21293 as_dirs="$as_dir $as_dirs"
21294 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21295$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021296 X"$as_dir" : 'X\(//\)[^/]' \| \
21297 X"$as_dir" : 'X\(//\)$' \| \
21298 X"$as_dir" : 'X\(/\)' \| \
21299 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021300echo X"$as_dir" |
21301 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21302 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21303 /^X\(\/\/\)$/{ s//\1/; q; }
21304 /^X\(\/\).*/{ s//\1/; q; }
21305 s/.*/./; q'`
21306 done
21307 test ! -n "$as_dirs" || mkdir $as_dirs
21308 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21309echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21310 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021311
21312 ac_builddir=.
21313
21314if test "$ac_dir" != .; then
21315 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21316 # A "../" for each directory in $ac_dir_suffix.
21317 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21318else
21319 ac_dir_suffix= ac_top_builddir=
21320fi
21321
21322case $srcdir in
21323 .) # No --srcdir option. We are building in place.
21324 ac_srcdir=.
21325 if test -z "$ac_top_builddir"; then
21326 ac_top_srcdir=.
21327 else
21328 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21329 fi ;;
21330 [\\/]* | ?:[\\/]* ) # Absolute path.
21331 ac_srcdir=$srcdir$ac_dir_suffix;
21332 ac_top_srcdir=$srcdir ;;
21333 *) # Relative path.
21334 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21335 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21336esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021337
21338# Do not use `cd foo && pwd` to compute absolute paths, because
21339# the directories may not exist.
21340case `pwd` in
21341.) ac_abs_builddir="$ac_dir";;
21342*)
21343 case "$ac_dir" in
21344 .) ac_abs_builddir=`pwd`;;
21345 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21346 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21347 esac;;
21348esac
21349case $ac_abs_builddir in
21350.) ac_abs_top_builddir=${ac_top_builddir}.;;
21351*)
21352 case ${ac_top_builddir}. in
21353 .) ac_abs_top_builddir=$ac_abs_builddir;;
21354 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21355 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21356 esac;;
21357esac
21358case $ac_abs_builddir in
21359.) ac_abs_srcdir=$ac_srcdir;;
21360*)
21361 case $ac_srcdir in
21362 .) ac_abs_srcdir=$ac_abs_builddir;;
21363 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21364 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21365 esac;;
21366esac
21367case $ac_abs_builddir in
21368.) ac_abs_top_srcdir=$ac_top_srcdir;;
21369*)
21370 case $ac_top_srcdir in
21371 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21372 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21373 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21374 esac;;
21375esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021376
21377
21378 case $INSTALL in
21379 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21380 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21381 esac
21382
Brett Cannon43802422005-02-10 20:48:03 +000021383 if test x"$ac_file" != x-; then
21384 { echo "$as_me:$LINENO: creating $ac_file" >&5
21385echo "$as_me: creating $ac_file" >&6;}
21386 rm -f "$ac_file"
21387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 # Let's still pretend it is `configure' which instantiates (i.e., don't
21389 # use $as_me), people would be surprised to read:
21390 # /* config.h. Generated by config.status. */
21391 if test x"$ac_file" = x-; then
21392 configure_input=
21393 else
21394 configure_input="$ac_file. "
21395 fi
21396 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021397 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021398
21399 # First look for the input files in the build tree, otherwise in the
21400 # src tree.
21401 ac_file_inputs=`IFS=:
21402 for f in $ac_file_in; do
21403 case $f in
21404 -) echo $tmp/stdin ;;
21405 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021406 # Absolute (can't be DOS-style, as IFS=:)
21407 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021408echo "$as_me: error: cannot find input file: $f" >&2;}
21409 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021410 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021411 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021412 if test -f "$f"; then
21413 # Build tree
21414 echo "$f"
21415 elif test -f "$srcdir/$f"; then
21416 # Source tree
21417 echo "$srcdir/$f"
21418 else
21419 # /dev/null tree
21420 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021421echo "$as_me: error: cannot find input file: $f" >&2;}
21422 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021423 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021424 esac
21425 done` || { (exit 1); exit 1; }
21426_ACEOF
21427cat >>$CONFIG_STATUS <<_ACEOF
21428 sed "$ac_vpsub
21429$extrasub
21430_ACEOF
21431cat >>$CONFIG_STATUS <<\_ACEOF
21432:t
21433/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21434s,@configure_input@,$configure_input,;t t
21435s,@srcdir@,$ac_srcdir,;t t
21436s,@abs_srcdir@,$ac_abs_srcdir,;t t
21437s,@top_srcdir@,$ac_top_srcdir,;t t
21438s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21439s,@builddir@,$ac_builddir,;t t
21440s,@abs_builddir@,$ac_abs_builddir,;t t
21441s,@top_builddir@,$ac_top_builddir,;t t
21442s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21443s,@INSTALL@,$ac_INSTALL,;t t
21444" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21445 rm -f $tmp/stdin
21446 if test x"$ac_file" != x-; then
21447 mv $tmp/out $ac_file
21448 else
21449 cat $tmp/out
21450 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021451 fi
21452
Martin v. Löwis11437992002-04-12 09:54:03 +000021453done
21454_ACEOF
21455cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021456
Martin v. Löwis11437992002-04-12 09:54:03 +000021457#
21458# CONFIG_HEADER section.
21459#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021460
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021461# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21462# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021463#
21464# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021465ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21466ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021467ac_dC=' '
21468ac_dD=',;t'
21469# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021470ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021471ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021472ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021473ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021474
Martin v. Löwis11437992002-04-12 09:54:03 +000021475for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021476 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021477 case $ac_file in
21478 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021479 cat >$tmp/stdin
21480 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21481 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021482 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021483 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021485 esac
21486
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21488echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021489
Martin v. Löwis11437992002-04-12 09:54:03 +000021490 # First look for the input files in the build tree, otherwise in the
21491 # src tree.
21492 ac_file_inputs=`IFS=:
21493 for f in $ac_file_in; do
21494 case $f in
21495 -) echo $tmp/stdin ;;
21496 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021497 # Absolute (can't be DOS-style, as IFS=:)
21498 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021499echo "$as_me: error: cannot find input file: $f" >&2;}
21500 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021501 # Do quote $f, to prevent DOS paths from being IFS'd.
21502 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021503 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021504 if test -f "$f"; then
21505 # Build tree
21506 echo "$f"
21507 elif test -f "$srcdir/$f"; then
21508 # Source tree
21509 echo "$srcdir/$f"
21510 else
21511 # /dev/null tree
21512 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021513echo "$as_me: error: cannot find input file: $f" >&2;}
21514 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021515 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021516 esac
21517 done` || { (exit 1); exit 1; }
21518 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021519 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021520
Martin v. Löwis11437992002-04-12 09:54:03 +000021521_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021522
Martin v. Löwis11437992002-04-12 09:54:03 +000021523# Transform confdefs.h into two sed scripts, `conftest.defines' and
21524# `conftest.undefs', that substitutes the proper values into
21525# config.h.in to produce config.h. The first handles `#define'
21526# templates, and the second `#undef' templates.
21527# And first: Protect against being on the right side of a sed subst in
21528# config.status. Protect against being in an unquoted here document
21529# in config.status.
21530rm -f conftest.defines conftest.undefs
21531# Using a here document instead of a string reduces the quoting nightmare.
21532# Putting comments in sed scripts is not portable.
21533#
21534# `end' is used to avoid that the second main sed command (meant for
21535# 0-ary CPP macros) applies to n-ary macro definitions.
21536# See the Autoconf documentation for `clear'.
21537cat >confdef2sed.sed <<\_ACEOF
21538s/[\\&,]/\\&/g
21539s,[\\$`],\\&,g
21540t clear
21541: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021542s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021543t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021544s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021545: end
21546_ACEOF
21547# If some macros were called several times there might be several times
21548# the same #defines, which is useless. Nevertheless, we may not want to
21549# sort them, since we want the *last* AC-DEFINE to be honored.
21550uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21551sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21552rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021553
21554# This sed command replaces #undef with comments. This is necessary, for
21555# example, in the case of _POSIX_SOURCE, which is predefined and required
21556# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021557cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021558s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021559_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021560
Martin v. Löwis11437992002-04-12 09:54:03 +000021561# Break up conftest.defines because some shells have a limit on the size
21562# of here documents, and old seds have small limits too (100 cmds).
21563echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021564echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021565echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21566echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021567rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021568while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021569do
Martin v. Löwis11437992002-04-12 09:54:03 +000021570 # Write a limited-size here document to $tmp/defines.sed.
21571 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21572 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021573 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 # Work around the forget-to-reset-the-flag bug.
21575 echo 't clr' >>$CONFIG_STATUS
21576 echo ': clr' >>$CONFIG_STATUS
21577 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021578 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021579 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21580 rm -f $tmp/in
21581 mv $tmp/out $tmp/in
21582' >>$CONFIG_STATUS
21583 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21584 rm -f conftest.defines
21585 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021586done
Martin v. Löwis11437992002-04-12 09:54:03 +000021587rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021588echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021589echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021590
Martin v. Löwis11437992002-04-12 09:54:03 +000021591# Break up conftest.undefs because some shells have a limit on the size
21592# of here documents, and old seds have small limits too (100 cmds).
21593echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21594rm -f conftest.tail
21595while grep . conftest.undefs >/dev/null
21596do
21597 # Write a limited-size here document to $tmp/undefs.sed.
21598 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21599 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021600 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021601 # Work around the forget-to-reset-the-flag bug.
21602 echo 't clr' >>$CONFIG_STATUS
21603 echo ': clr' >>$CONFIG_STATUS
21604 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21605 echo 'CEOF
21606 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21607 rm -f $tmp/in
21608 mv $tmp/out $tmp/in
21609' >>$CONFIG_STATUS
21610 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21611 rm -f conftest.undefs
21612 mv conftest.tail conftest.undefs
21613done
21614rm -f conftest.undefs
21615
21616cat >>$CONFIG_STATUS <<\_ACEOF
21617 # Let's still pretend it is `configure' which instantiates (i.e., don't
21618 # use $as_me), people would be surprised to read:
21619 # /* config.h. Generated by config.status. */
21620 if test x"$ac_file" = x-; then
21621 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021622 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021623 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 cat $tmp/in >>$tmp/config.h
21626 rm -f $tmp/in
21627 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021628 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21630echo "$as_me: $ac_file is unchanged" >&6;}
21631 else
21632 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21633$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021634 X"$ac_file" : 'X\(//\)[^/]' \| \
21635 X"$ac_file" : 'X\(//\)$' \| \
21636 X"$ac_file" : 'X\(/\)' \| \
21637 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021638echo X"$ac_file" |
21639 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21640 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21641 /^X\(\/\/\)$/{ s//\1/; q; }
21642 /^X\(\/\).*/{ s//\1/; q; }
21643 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021644 { if $as_mkdir_p; then
21645 mkdir -p "$ac_dir"
21646 else
21647 as_dir="$ac_dir"
21648 as_dirs=
21649 while test ! -d "$as_dir"; do
21650 as_dirs="$as_dir $as_dirs"
21651 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21652$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021653 X"$as_dir" : 'X\(//\)[^/]' \| \
21654 X"$as_dir" : 'X\(//\)$' \| \
21655 X"$as_dir" : 'X\(/\)' \| \
21656 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021657echo X"$as_dir" |
21658 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21659 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21660 /^X\(\/\/\)$/{ s//\1/; q; }
21661 /^X\(\/\).*/{ s//\1/; q; }
21662 s/.*/./; q'`
21663 done
21664 test ! -n "$as_dirs" || mkdir $as_dirs
21665 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21666echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21667 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021668
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 rm -f $ac_file
21670 mv $tmp/config.h $ac_file
21671 fi
21672 else
21673 cat $tmp/config.h
21674 rm -f $tmp/config.h
21675 fi
21676done
21677_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021678
Martin v. Löwis11437992002-04-12 09:54:03 +000021679cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021680
Martin v. Löwis11437992002-04-12 09:54:03 +000021681{ (exit 0); exit 0; }
21682_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021683chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021684ac_clean_files=$ac_clean_files_save
21685
21686
21687# configure is writing to config.log, and then calls config.status.
21688# config.status does its own redirection, appending to config.log.
21689# Unfortunately, on DOS this fails, as config.log is still kept open
21690# by configure, so config.status won't be able to write to it; its
21691# output is simply discarded. So we exec the FD to /dev/null,
21692# effectively closing config.log, so it can be properly (re)opened and
21693# appended to by config.status. When coming back to configure, we
21694# need to make the FD available again.
21695if test "$no_create" != yes; then
21696 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021697 ac_config_status_args=
21698 test "$silent" = yes &&
21699 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021701 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 exec 5>>config.log
21703 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21704 # would make configure fail if this is the last instruction.
21705 $ac_cs_success || { (exit 1); exit 1; }
21706fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021707
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021708
21709echo "creating Setup"
21710if test ! -f Modules/Setup
21711then
21712 cp $srcdir/Modules/Setup.dist Modules/Setup
21713fi
21714
21715echo "creating Setup.local"
21716if test ! -f Modules/Setup.local
21717then
21718 echo "# Edit this file for local setup changes" >Modules/Setup.local
21719fi
21720
21721echo "creating Makefile"
21722$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21723 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021724 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021725mv config.c Modules