blob: 5ff9d0e828b284d95039f9a0f2013ba3643516b2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaro288a5be2006-04-13 02:00:56 +00002# From configure.in Revision: 45278 .
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
Martin v. Löwisdea59e52006-01-05 10:00:36 +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 SVNVERSION 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
Martin v. Löwis9176fc12006-04-11 11:12:43 +0000866 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000867 --with-signal-module disable/enable signal module
868 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
869 --with(out)-threads[=DIRECTORY]
870 disable/enable thread support
871 --with(out)-thread[=DIRECTORY]
872 deprecated; use --with(out)-threads
873 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000874 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000875 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000876 --with(out)-pymalloc disable/enable specialized mallocs
877 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000878 --with-fpectl enable SIGFPE catching
879 --with-libm=STRING math library
880 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000881
882Some influential environment variables:
883 CC C compiler command
884 CFLAGS C compiler flags
885 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
886 nonstandard directory <lib dir>
887 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
888 headers in a nonstandard directory <include dir>
889 CPP C preprocessor
890
891Use these variables to override the choices made by `configure' or to help
892it to find libraries and programs with nonstandard names/locations.
893
Martin v. Löwis1d459062005-03-14 21:23:33 +0000894Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000895_ACEOF
896fi
897
898if test "$ac_init_help" = "recursive"; then
899 # If there are subdirs, report their specific --help.
900 ac_popdir=`pwd`
901 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
902 test -d $ac_dir || continue
903 ac_builddir=.
904
905if test "$ac_dir" != .; then
906 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
907 # A "../" for each directory in $ac_dir_suffix.
908 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
909else
910 ac_dir_suffix= ac_top_builddir=
911fi
912
913case $srcdir in
914 .) # No --srcdir option. We are building in place.
915 ac_srcdir=.
916 if test -z "$ac_top_builddir"; then
917 ac_top_srcdir=.
918 else
919 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
920 fi ;;
921 [\\/]* | ?:[\\/]* ) # Absolute path.
922 ac_srcdir=$srcdir$ac_dir_suffix;
923 ac_top_srcdir=$srcdir ;;
924 *) # Relative path.
925 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
926 ac_top_srcdir=$ac_top_builddir$srcdir ;;
927esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000928
929# Do not use `cd foo && pwd` to compute absolute paths, because
930# the directories may not exist.
931case `pwd` in
932.) ac_abs_builddir="$ac_dir";;
933*)
934 case "$ac_dir" in
935 .) ac_abs_builddir=`pwd`;;
936 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
937 *) ac_abs_builddir=`pwd`/"$ac_dir";;
938 esac;;
939esac
940case $ac_abs_builddir in
941.) ac_abs_top_builddir=${ac_top_builddir}.;;
942*)
943 case ${ac_top_builddir}. in
944 .) ac_abs_top_builddir=$ac_abs_builddir;;
945 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
946 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
947 esac;;
948esac
949case $ac_abs_builddir in
950.) ac_abs_srcdir=$ac_srcdir;;
951*)
952 case $ac_srcdir in
953 .) ac_abs_srcdir=$ac_abs_builddir;;
954 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
955 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
956 esac;;
957esac
958case $ac_abs_builddir in
959.) ac_abs_top_srcdir=$ac_top_srcdir;;
960*)
961 case $ac_top_srcdir in
962 .) ac_abs_top_srcdir=$ac_abs_builddir;;
963 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
964 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
965 esac;;
966esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000967
968 cd $ac_dir
969 # Check for guested configure; otherwise get Cygnus style configure.
970 if test -f $ac_srcdir/configure.gnu; then
971 echo
972 $SHELL $ac_srcdir/configure.gnu --help=recursive
973 elif test -f $ac_srcdir/configure; then
974 echo
975 $SHELL $ac_srcdir/configure --help=recursive
976 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000977 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 echo
979 $ac_configure --help
980 else
981 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
982 fi
Brett Cannon43802422005-02-10 20:48:03 +0000983 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 done
985fi
986
987test -n "$ac_init_help" && exit 0
988if $ac_init_version; then
989 cat <<\_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000990python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000991generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000992
Skip Montanarof0d5f792004-08-15 14:08:23 +0000993Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000994This configure script is free software; the Free Software Foundation
995gives unlimited permission to copy, distribute and modify it.
996_ACEOF
997 exit 0
998fi
999exec 5>config.log
1000cat >&5 <<_ACEOF
1001This file contains any messages produced by compilers while
1002running configure, to aid debugging if configure makes a mistake.
1003
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001004It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001005generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001006
1007 $ $0 $@
1008
1009_ACEOF
1010{
1011cat <<_ASUNAME
1012## --------- ##
1013## Platform. ##
1014## --------- ##
1015
1016hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1017uname -m = `(uname -m) 2>/dev/null || echo unknown`
1018uname -r = `(uname -r) 2>/dev/null || echo unknown`
1019uname -s = `(uname -s) 2>/dev/null || echo unknown`
1020uname -v = `(uname -v) 2>/dev/null || echo unknown`
1021
1022/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1023/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1024
1025/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1026/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1027/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1028hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1029/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1030/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1031/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1032
1033_ASUNAME
1034
1035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1036for as_dir in $PATH
1037do
1038 IFS=$as_save_IFS
1039 test -z "$as_dir" && as_dir=.
1040 echo "PATH: $as_dir"
1041done
1042
1043} >&5
1044
1045cat >&5 <<_ACEOF
1046
1047
1048## ----------- ##
1049## Core tests. ##
1050## ----------- ##
1051
1052_ACEOF
1053
1054
1055# Keep a trace of the command line.
1056# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001057# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001058# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001059# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001060ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001061ac_configure_args0=
1062ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001063ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001064ac_must_keep_next=false
1065for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001066do
Skip Montanaro6dead952003-09-25 14:50:04 +00001067 for ac_arg
1068 do
1069 case $ac_arg in
1070 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1072 | -silent | --silent | --silen | --sile | --sil)
1073 continue ;;
1074 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1075 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1076 esac
1077 case $ac_pass in
1078 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1079 2)
1080 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1081 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001082 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001083 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001084 case $ac_arg in
1085 *=* | --config-cache | -C | -disable-* | --disable-* \
1086 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1087 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1088 | -with-* | --with-* | -without-* | --without-* | --x)
1089 case "$ac_configure_args0 " in
1090 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1091 esac
1092 ;;
1093 -* ) ac_must_keep_next=true ;;
1094 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001095 fi
1096 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1097 # Get rid of the leading space.
1098 ac_sep=" "
1099 ;;
1100 esac
1101 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001102done
Skip Montanaro6dead952003-09-25 14:50:04 +00001103$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1104$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 +00001105
1106# When interrupted or exit'd, cleanup temporary files, and complete
1107# config.log. We remove comments because anyway the quotes in there
1108# would cause problems or look ugly.
1109# WARNING: Be sure not to use single quotes in there, as some shells,
1110# such as our DU 5.0 friend, will then `close' the trap.
1111trap 'exit_status=$?
1112 # Save into config.log some information that might help in debugging.
1113 {
1114 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001115
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 cat <<\_ASBOX
1117## ---------------- ##
1118## Cache variables. ##
1119## ---------------- ##
1120_ASBOX
1121 echo
1122 # The following way of writing the cache mishandles newlines in values,
1123{
1124 (set) 2>&1 |
1125 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1126 *ac_space=\ *)
1127 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001128 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1129 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ;;
1131 *)
1132 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001133 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 ;;
1135 esac;
1136}
1137 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001138
1139 cat <<\_ASBOX
1140## ----------------- ##
1141## Output variables. ##
1142## ----------------- ##
1143_ASBOX
1144 echo
1145 for ac_var in $ac_subst_vars
1146 do
1147 eval ac_val=$`echo $ac_var`
1148 echo "$ac_var='"'"'$ac_val'"'"'"
1149 done | sort
1150 echo
1151
1152 if test -n "$ac_subst_files"; then
1153 cat <<\_ASBOX
1154## ------------- ##
1155## Output files. ##
1156## ------------- ##
1157_ASBOX
1158 echo
1159 for ac_var in $ac_subst_files
1160 do
1161 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001162 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001163 done | sort
1164 echo
1165 fi
1166
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 if test -s confdefs.h; then
1168 cat <<\_ASBOX
1169## ----------- ##
1170## confdefs.h. ##
1171## ----------- ##
1172_ASBOX
1173 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001174 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 echo
1176 fi
1177 test "$ac_signal" != 0 &&
1178 echo "$as_me: caught signal $ac_signal"
1179 echo "$as_me: exit $exit_status"
1180 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001181 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1183 exit $exit_status
1184 ' 0
1185for ac_signal in 1 2 13 15; do
1186 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1187done
1188ac_signal=0
1189
1190# confdefs.h avoids OS command line length limits that DEFS can exceed.
1191rm -rf conftest* confdefs.h
1192# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1193echo >confdefs.h
1194
1195# Predefined preprocessor variables.
1196
1197cat >>confdefs.h <<_ACEOF
1198#define PACKAGE_NAME "$PACKAGE_NAME"
1199_ACEOF
1200
1201
1202cat >>confdefs.h <<_ACEOF
1203#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1204_ACEOF
1205
1206
1207cat >>confdefs.h <<_ACEOF
1208#define PACKAGE_VERSION "$PACKAGE_VERSION"
1209_ACEOF
1210
1211
1212cat >>confdefs.h <<_ACEOF
1213#define PACKAGE_STRING "$PACKAGE_STRING"
1214_ACEOF
1215
1216
1217cat >>confdefs.h <<_ACEOF
1218#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1219_ACEOF
1220
1221
1222# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223# Prefer explicitly selected file to automatically selected ones.
1224if test -z "$CONFIG_SITE"; then
1225 if test "x$prefix" != xNONE; then
1226 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1227 else
1228 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1229 fi
1230fi
1231for ac_site_file in $CONFIG_SITE; do
1232 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1234echo "$as_me: loading site script $ac_site_file" >&6;}
1235 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 . "$ac_site_file"
1237 fi
1238done
1239
1240if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 # Some versions of bash will fail to source /dev/null (special
1242 # files actually), so we avoid doing that.
1243 if test -f "$cache_file"; then
1244 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1245echo "$as_me: loading cache $cache_file" >&6;}
1246 case $cache_file in
1247 [\\/]* | ?:[\\/]* ) . $cache_file;;
1248 *) . ./$cache_file;;
1249 esac
1250 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001251else
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1253echo "$as_me: creating cache $cache_file" >&6;}
1254 >$cache_file
1255fi
1256
1257# Check that the precious variables saved in the cache have kept the same
1258# value.
1259ac_cache_corrupted=false
1260for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001261 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1263 eval ac_new_set=\$ac_env_${ac_var}_set
1264 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1265 eval ac_new_val="\$ac_env_${ac_var}_value"
1266 case $ac_old_set,$ac_new_set in
1267 set,)
1268 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1269echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1270 ac_cache_corrupted=: ;;
1271 ,set)
1272 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1273echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1274 ac_cache_corrupted=: ;;
1275 ,);;
1276 *)
1277 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001278 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001279echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001280 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001281echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001282 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001283echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001284 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 fi;;
1286 esac
1287 # Pass precious variables to config.status.
1288 if test "$ac_new_set" = set; then
1289 case $ac_new_val in
1290 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1291 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1292 *) ac_arg=$ac_var=$ac_new_val ;;
1293 esac
1294 case " $ac_configure_args " in
1295 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1296 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1297 esac
1298 fi
1299done
1300if $ac_cache_corrupted; then
1301 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1302echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1303 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1304echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1305 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306fi
1307
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1312ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Michael W. Hudson54241132001-12-07 15:38:26 +00001315
1316
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
Martin v. Löwis88afe662002-10-26 13:47:44 +00001331
1332
1333
1334
1335
1336
1337
1338
1339
Skip Montanaro6dead952003-09-25 14:50:04 +00001340
1341 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001342
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344
1345
1346
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001347
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001348
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001349# We don't use PACKAGE_ variables, and they cause conflicts
1350# with other autoconf-based packages that include Python.h
1351grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1352rm confdefs.h
1353mv confdefs.h.new confdefs.h
1354
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001355
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001356VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001357
Martin v. Löwis1142de32002-03-29 16:28:31 +00001358
1359SOVERSION=1.0
1360
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001361# The later defininition of _XOPEN_SOURCE disables certain features
1362# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1363
1364cat >>confdefs.h <<\_ACEOF
1365#define _GNU_SOURCE 1
1366_ACEOF
1367
1368
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001369# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1370# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1371# them.
1372
1373cat >>confdefs.h <<\_ACEOF
1374#define _NETBSD_SOURCE 1
1375_ACEOF
1376
1377
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001378# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1379# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1380# them.
1381
1382cat >>confdefs.h <<\_ACEOF
1383#define __BSD_VISIBLE 1
1384_ACEOF
1385
1386
Martin v. Löwisd6320502004-08-12 13:45:08 +00001387# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1388# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1389
1390cat >>confdefs.h <<\_ACEOF
1391#define _BSD_TYPES 1
1392_ACEOF
1393
1394
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001395define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001396
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001397# Arguments passed to configure.
1398
1399CONFIG_ARGS="$ac_configure_args"
1400
Jack Jansene578a632001-08-15 01:27:14 +00001401# Check whether --enable-framework or --disable-framework was given.
1402if test "${enable_framework+set}" = set; then
1403 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
Jack Jansene578a632001-08-15 01:27:14 +00001405 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001407 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001408 esac
1409 case $enableval in
1410 no)
1411 PYTHONFRAMEWORK=
1412 PYTHONFRAMEWORKDIR=no-framework
1413 PYTHONFRAMEWORKPREFIX=
1414 PYTHONFRAMEWORKINSTALLDIR=
1415 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001416 ;;
1417 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001418 PYTHONFRAMEWORK=Python
1419 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001420 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001421 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1422 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001423 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
Guido van Rossum563e7081996-09-10 18:20:48 +00001425else
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
Jack Jansene578a632001-08-15 01:27:14 +00001427 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001428 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001429 PYTHONFRAMEWORKPREFIX=
1430 PYTHONFRAMEWORKINSTALLDIR=
1431 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001432
Martin v. Löwis11437992002-04-12 09:54:03 +00001433fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001434
1435
1436
1437
Jack Jansene578a632001-08-15 01:27:14 +00001438
1439##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440## AC_HELP_STRING(--with-dyld,
1441## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001442##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001443# Set name for machine-dependent library files
1444
Martin v. Löwis11437992002-04-12 09:54:03 +00001445echo "$as_me:$LINENO: checking MACHDEP" >&5
1446echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001447if test -z "$MACHDEP"
1448then
Guido van Rossum563e7081996-09-10 18:20:48 +00001449 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001450 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1451 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001452 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001453 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001454 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001455 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001456 ac_md_system=`echo $ac_sys_system |
1457 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1458 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001459 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001460 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001461
Guido van Rossum07397971997-04-29 21:49:50 +00001462 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001463 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001464 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001465 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001466 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001467 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001468 esac
1469fi
Guido van Rossum91922671997-10-09 20:24:13 +00001470
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001471# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1472# disable features if it is defined, without any means to access these
1473# features as extensions. For these systems, we skip the definition of
1474# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1475# some feature, make sure there is no alternative way to access this
1476# feature. Also, when using wildcards, make sure you have verified the
1477# need for not defining _XOPEN_SOURCE on all systems matching the
1478# wildcard, and that the wildcard does not include future systems
1479# (which may remove their limitations).
1480case $ac_sys_system/$ac_sys_release in
1481 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1482 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001483 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz671b9e32006-01-09 07:07:12 +00001484 OpenBSD/2.* | OpenBSD/3.[012345678])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001485 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001486 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1487 # of union __?sigval. Reported by Stuart Bishop.
1488 SunOS/5.6)
1489 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001490 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1491 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001492 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001493 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001494 define_xopen_source=no;;
1495 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001496 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001497 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001498 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001499 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1500 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1501 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1502 # This should hopefully be fixed in FreeBSD 4.9
1503 FreeBSD/4.8* | Darwin/6* )
1504 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001505 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1506 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1507 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001508 AIX/4)
1509 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001510 AIX/5)
1511 if test `uname -r` -eq 1; then
1512 define_xopen_source=no
1513 fi
1514 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00001515 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1516 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00001517 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1518 # has no effect, don't bother defineing them
1519 Darwin/[78].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00001520 define_xopen_source=no
1521 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00001522
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001523esac
1524
1525if test $define_xopen_source = yes
1526then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001527 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1528 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00001529 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1530 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001532 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001533
1534cat >>confdefs.h <<\_ACEOF
1535#define _XOPEN_SOURCE 500
1536_ACEOF
1537
1538 ;;
1539 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001540
1541cat >>confdefs.h <<\_ACEOF
1542#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001543_ACEOF
1544
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545 ;;
1546 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001547
1548 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1549 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1550 # several APIs are not declared. Since this is also needed in some
1551 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001552 # except for Solaris 10, where it must not be defined,
1553 # as it implies XPG4.2
1554 case $ac_sys_system/$ac_sys_release in
1555 SunOS/5.10)
1556 ;;
1557 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001558
1559cat >>confdefs.h <<\_ACEOF
1560#define _XOPEN_SOURCE_EXTENDED 1
1561_ACEOF
1562
Martin v. Löwis7dece662005-11-26 11:38:24 +00001563 ;;
1564 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001565
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001566
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001567cat >>confdefs.h <<\_ACEOF
1568#define _POSIX_C_SOURCE 200112L
1569_ACEOF
1570
1571
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001572fi
1573
Guido van Rossum91922671997-10-09 20:24:13 +00001574#
1575# SGI compilers allow the specification of the both the ABI and the
1576# ISA on the command line. Depending on the values of these switches,
1577# different and often incompatable code will be generated.
1578#
1579# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1580# thus supply support for various ABI/ISA combinations. The MACHDEP
1581# variable is also adjusted.
1582#
1583
1584if test ! -z "$SGI_ABI"
1585then
1586 CC="cc $SGI_ABI"
1587 LDFLAGS="$SGI_ABI $LDFLAGS"
1588 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001590echo "$as_me:$LINENO: result: $MACHDEP" >&5
1591echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001592
Jack Jansen83f898c2002-12-30 22:23:40 +00001593# And add extra plat-mac for darwin
1594
Jack Jansen7b59b422003-03-17 15:44:10 +00001595
Jack Jansen83f898c2002-12-30 22:23:40 +00001596echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1597echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1598if test -z "$EXTRAPLATDIR"
1599then
1600 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001601 darwin)
1602 EXTRAPLATDIR="\$(PLATMACDIRS)"
1603 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1604 ;;
1605 *)
1606 EXTRAPLATDIR=""
1607 EXTRAMACHDEPPATH=""
1608 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001609 esac
1610fi
1611echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1612echo "${ECHO_T}$EXTRAPLATDIR" >&6
1613
Jack Jansen6b08a402004-06-03 12:41:45 +00001614# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1615# it may influence the way we can build extensions, so distutils
1616# needs to check it
1617
1618CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1619
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001621
1622# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1623# for debug/optimization stuff. BASECFLAGS is for flags that are required
1624# just to get things to compile and link. Users are free to override OPT
1625# when running configure or make. The build should not break if they do.
1626# BASECFLAGS should generally not be messed with, however.
1627
1628# XXX shouldn't some/most/all of this code be merged with the stuff later
1629# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001630echo "$as_me:$LINENO: checking for --without-gcc" >&5
1631echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001633# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001634if test "${with_gcc+set}" = set; then
1635 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Guido van Rossum7f43da71994-08-01 12:15:30 +00001637 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001638 no) CC=cc
1639 without_gcc=yes;;
1640 yes) CC=gcc
1641 without_gcc=no;;
1642 *) CC=$withval
1643 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001644 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001645else
Martin v. Löwis11437992002-04-12 09:54:03 +00001646
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001647 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001648 AIX*) CC=cc_r
1649 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001650 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 case $BE_HOST_CPU in
1652 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001653 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001654 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001655 BASECFLAGS="$BASECFLAGS -export pragma"
1656 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001657 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001658 ;;
1659 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001660 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001661 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001662 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001663 ;;
1664 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001665 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1666echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1667 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001668 ;;
1669 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001670 AR="\$(srcdir)/Modules/ar_beos"
1671 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001672 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001673 Monterey*)
1674 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001675 without_gcc=;;
1676 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001677 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001678fi;
1679echo "$as_me:$LINENO: result: $without_gcc" >&5
1680echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001681
1682
Guido van Rossum95012191999-12-16 17:50:52 +00001683
Fred Drakea1a84e72001-03-06 05:52:16 +00001684MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001685echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1686echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1687
Guido van Rossum95012191999-12-16 17:50:52 +00001688# Check whether --with-cxx or --without-cxx was given.
1689if test "${with_cxx+set}" = set; then
1690 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001691
Martin v. Löwis22352952000-12-13 17:37:02 +00001692 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001693 case $withval in
1694 no) CXX=
1695 with_cxx=no;;
1696 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001697 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001698 with_cxx=$withval;;
1699 esac
1700else
Martin v. Löwis11437992002-04-12 09:54:03 +00001701
Guido van Rossum95012191999-12-16 17:50:52 +00001702 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001703 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001704
Martin v. Löwis11437992002-04-12 09:54:03 +00001705fi;
1706echo "$as_me:$LINENO: result: $with_cxx" >&5
1707echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001708
1709if test "$with_cxx" = "yes"
1710then
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1712echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1713 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001714fi
1715
1716
1717
1718
Martin v. Löwis11437992002-04-12 09:54:03 +00001719if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001720then
1721 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1722do
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 # 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 +00001724set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001725echo "$as_me:$LINENO: checking for $ac_word" >&5
1726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1727if test "${ac_cv_prog_CXX+set}" = set; then
1728 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001729else
1730 if test -n "$CXX"; then
1731 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1732else
Martin v. Löwis11437992002-04-12 09:54:03 +00001733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1734for as_dir in $PATH
1735do
1736 IFS=$as_save_IFS
1737 test -z "$as_dir" && as_dir=.
1738 for ac_exec_ext in '' $ac_executable_extensions; do
1739 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1740 ac_cv_prog_CXX="$ac_prog"
1741 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1742 break 2
1743 fi
1744done
1745done
1746
Martin v. Löwis22352952000-12-13 17:37:02 +00001747fi
1748fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001749CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001750if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 echo "$as_me:$LINENO: result: $CXX" >&5
1752echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001753else
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 echo "$as_me:$LINENO: result: no" >&5
1755echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001756fi
1757
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001759done
1760test -n "$CXX" || CXX="notfound"
1761
1762 if test "$CXX" = "notfound"
1763 then
1764 CXX=
1765 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001767ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001772/* confdefs.h. */
1773_ACEOF
1774cat confdefs.h >>conftest.$ac_ext
1775cat >>conftest.$ac_ext <<_ACEOF
1776/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001777
Martin v. Löwis11437992002-04-12 09:54:03 +00001778int
1779main ()
1780{
Michael W. Hudson54241132001-12-07 15:38:26 +00001781
Martin v. Löwis11437992002-04-12 09:54:03 +00001782 ;
1783 return 0;
1784}
1785_ACEOF
1786ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001787ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001788# Try to create an executable without -o first, disregard a.out.
1789# It will help us diagnose broken compilers, and finding out an intuition
1790# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001791echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1792echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1794if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1795 (eval $ac_link_default) 2>&5
1796 ac_status=$?
1797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1798 (exit $ac_status); }; then
1799 # Find the output, starting from the most likely. This scheme is
1800# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1801# resort.
1802
1803# Be careful to initialize this variable, since it used to be cached.
1804# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1805ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001806# b.out is created by i960 compilers.
1807for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1808do
1809 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001810 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001812 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001814 # This is the source file.
1815 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001816 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001817 # We found the default executable, but exeext='' is most
1818 # certainly right.
1819 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001820 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001821 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1822 # FIXME: I believe we export ac_cv_exeext for Libtool,
1823 # but it would be cool to find out if it's true. Does anybody
1824 # maintain Libtool? --akim.
1825 export ac_cv_exeext
1826 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001827 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001828 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001829 esac
1830done
1831else
1832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1836See \`config.log' for more details." >&5
1837echo "$as_me: error: C++ compiler cannot create executables
1838See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001839 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001840fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001841
1842ac_exeext=$ac_cv_exeext
1843echo "$as_me:$LINENO: result: $ac_file" >&5
1844echo "${ECHO_T}$ac_file" >&6
1845
1846# Check the compiler produces executables we can run. If not, either
1847# the compiler is broken, or we cross compile.
1848echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1849echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1850# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1851# If not cross compiling, check that we can run a simple program.
1852if test "$cross_compiling" != yes; then
1853 if { ac_try='./$ac_file'
1854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1855 (eval $ac_try) 2>&5
1856 ac_status=$?
1857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1858 (exit $ac_status); }; }; then
1859 cross_compiling=no
1860 else
1861 if test "$cross_compiling" = maybe; then
1862 cross_compiling=yes
1863 else
1864 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001865If you meant to cross compile, use \`--host'.
1866See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001867echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001868If you meant to cross compile, use \`--host'.
1869See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001870 { (exit 1); exit 1; }; }
1871 fi
1872 fi
1873fi
1874echo "$as_me:$LINENO: result: yes" >&5
1875echo "${ECHO_T}yes" >&6
1876
Skip Montanaro6dead952003-09-25 14:50:04 +00001877rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001878ac_clean_files=$ac_clean_files_save
1879# Check the compiler produces executables we can run. If not, either
1880# the compiler is broken, or we cross compile.
1881echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1882echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1883echo "$as_me:$LINENO: result: $cross_compiling" >&5
1884echo "${ECHO_T}$cross_compiling" >&6
1885
1886echo "$as_me:$LINENO: checking for suffix of executables" >&5
1887echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1889 (eval $ac_link) 2>&5
1890 ac_status=$?
1891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1892 (exit $ac_status); }; then
1893 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1894# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1895# work properly (i.e., refer to `conftest.exe'), while it won't with
1896# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001897for ac_file in conftest.exe conftest conftest.*; do
1898 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001899 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001901 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001902 export ac_cv_exeext
1903 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001904 * ) break;;
1905 esac
1906done
1907else
Skip Montanaro6dead952003-09-25 14:50:04 +00001908 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1909See \`config.log' for more details." >&5
1910echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1911See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001912 { (exit 1); exit 1; }; }
1913fi
1914
1915rm -f conftest$ac_cv_exeext
1916echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1917echo "${ECHO_T}$ac_cv_exeext" >&6
1918
1919rm -f conftest.$ac_ext
1920EXEEXT=$ac_cv_exeext
1921ac_exeext=$EXEEXT
1922
1923 ac_ext=c
1924ac_cpp='$CPP $CPPFLAGS'
1925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927ac_compiler_gnu=$ac_cv_c_compiler_gnu
1928
1929
Martin v. Löwis22352952000-12-13 17:37:02 +00001930
1931 fi
1932fi
1933
Guido van Rossum8b131c51995-03-09 14:10:13 +00001934# If the user switches compilers, we can't believe the cache
1935if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1936then
Martin v. Löwis11437992002-04-12 09:54:03 +00001937 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1938(it is also a good idea to do 'make clean' before compiling)" >&5
1939echo "$as_me: error: cached CC is different -- throw away $cache_file
1940(it is also a good idea to do 'make clean' before compiling)" >&2;}
1941 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001942fi
1943
Martin v. Löwis11437992002-04-12 09:54:03 +00001944ac_ext=c
1945ac_cpp='$CPP $CPPFLAGS'
1946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1948ac_compiler_gnu=$ac_cv_c_compiler_gnu
1949if test -n "$ac_tool_prefix"; then
1950 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1951set dummy ${ac_tool_prefix}gcc; ac_word=$2
1952echo "$as_me:$LINENO: checking for $ac_word" >&5
1953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1954if test "${ac_cv_prog_CC+set}" = set; then
1955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956else
1957 if test -n "$CC"; then
1958 ac_cv_prog_CC="$CC" # Let the user override the test.
1959else
Martin v. Löwis11437992002-04-12 09:54:03 +00001960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1961for as_dir in $PATH
1962do
1963 IFS=$as_save_IFS
1964 test -z "$as_dir" && as_dir=.
1965 for ac_exec_ext in '' $ac_executable_extensions; do
1966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1967 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969 break 2
1970 fi
1971done
1972done
1973
Jack Jansendd19cf82001-12-06 22:36:17 +00001974fi
1975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001976CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001977if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 echo "$as_me:$LINENO: result: $CC" >&5
1979echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001980else
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 echo "$as_me:$LINENO: result: no" >&5
1982echo "${ECHO_T}no" >&6
1983fi
1984
1985fi
1986if test -z "$ac_cv_prog_CC"; then
1987 ac_ct_CC=$CC
1988 # Extract the first word of "gcc", so it can be a program name with args.
1989set dummy gcc; ac_word=$2
1990echo "$as_me:$LINENO: checking for $ac_word" >&5
1991echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1992if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1993 echo $ECHO_N "(cached) $ECHO_C" >&6
1994else
1995 if test -n "$ac_ct_CC"; then
1996 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1997else
1998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1999for as_dir in $PATH
2000do
2001 IFS=$as_save_IFS
2002 test -z "$as_dir" && as_dir=.
2003 for ac_exec_ext in '' $ac_executable_extensions; do
2004 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2005 ac_cv_prog_ac_ct_CC="gcc"
2006 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2007 break 2
2008 fi
2009done
2010done
2011
2012fi
2013fi
2014ac_ct_CC=$ac_cv_prog_ac_ct_CC
2015if test -n "$ac_ct_CC"; then
2016 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2017echo "${ECHO_T}$ac_ct_CC" >&6
2018else
2019 echo "$as_me:$LINENO: result: no" >&5
2020echo "${ECHO_T}no" >&6
2021fi
2022
2023 CC=$ac_ct_CC
2024else
2025 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002026fi
2027
Jack Jansendd19cf82001-12-06 22:36:17 +00002028if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002029 if test -n "$ac_tool_prefix"; then
2030 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2031set dummy ${ac_tool_prefix}cc; ac_word=$2
2032echo "$as_me:$LINENO: checking for $ac_word" >&5
2033echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2034if test "${ac_cv_prog_CC+set}" = set; then
2035 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002036else
2037 if test -n "$CC"; then
2038 ac_cv_prog_CC="$CC" # Let the user override the test.
2039else
Martin v. Löwis11437992002-04-12 09:54:03 +00002040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2041for as_dir in $PATH
2042do
2043 IFS=$as_save_IFS
2044 test -z "$as_dir" && as_dir=.
2045 for ac_exec_ext in '' $ac_executable_extensions; do
2046 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2047 ac_cv_prog_CC="${ac_tool_prefix}cc"
2048 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2049 break 2
2050 fi
2051done
2052done
2053
2054fi
2055fi
2056CC=$ac_cv_prog_CC
2057if test -n "$CC"; then
2058 echo "$as_me:$LINENO: result: $CC" >&5
2059echo "${ECHO_T}$CC" >&6
2060else
2061 echo "$as_me:$LINENO: result: no" >&5
2062echo "${ECHO_T}no" >&6
2063fi
2064
2065fi
2066if test -z "$ac_cv_prog_CC"; then
2067 ac_ct_CC=$CC
2068 # Extract the first word of "cc", so it can be a program name with args.
2069set dummy cc; ac_word=$2
2070echo "$as_me:$LINENO: checking for $ac_word" >&5
2071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2072if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2073 echo $ECHO_N "(cached) $ECHO_C" >&6
2074else
2075 if test -n "$ac_ct_CC"; then
2076 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2077else
2078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2079for as_dir in $PATH
2080do
2081 IFS=$as_save_IFS
2082 test -z "$as_dir" && as_dir=.
2083 for ac_exec_ext in '' $ac_executable_extensions; do
2084 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2085 ac_cv_prog_ac_ct_CC="cc"
2086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2087 break 2
2088 fi
2089done
2090done
2091
2092fi
2093fi
2094ac_ct_CC=$ac_cv_prog_ac_ct_CC
2095if test -n "$ac_ct_CC"; then
2096 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2097echo "${ECHO_T}$ac_ct_CC" >&6
2098else
2099 echo "$as_me:$LINENO: result: no" >&5
2100echo "${ECHO_T}no" >&6
2101fi
2102
2103 CC=$ac_ct_CC
2104else
2105 CC="$ac_cv_prog_CC"
2106fi
2107
2108fi
2109if test -z "$CC"; then
2110 # Extract the first word of "cc", so it can be a program name with args.
2111set dummy cc; ac_word=$2
2112echo "$as_me:$LINENO: checking for $ac_word" >&5
2113echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2114if test "${ac_cv_prog_CC+set}" = set; then
2115 echo $ECHO_N "(cached) $ECHO_C" >&6
2116else
2117 if test -n "$CC"; then
2118 ac_cv_prog_CC="$CC" # Let the user override the test.
2119else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002120 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2122for as_dir in $PATH
2123do
2124 IFS=$as_save_IFS
2125 test -z "$as_dir" && as_dir=.
2126 for ac_exec_ext in '' $ac_executable_extensions; do
2127 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2128 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2129 ac_prog_rejected=yes
2130 continue
2131 fi
2132 ac_cv_prog_CC="cc"
2133 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2134 break 2
2135 fi
2136done
2137done
2138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002139if test $ac_prog_rejected = yes; then
2140 # We found a bogon in the path, so make sure we never use it.
2141 set dummy $ac_cv_prog_CC
2142 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002143 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002144 # We chose a different compiler from the bogus one.
2145 # However, it has the same basename, so the bogon will be chosen
2146 # first if we set CC to just the basename; use the full file name.
2147 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002148 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002149 fi
2150fi
2151fi
2152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002153CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002154if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 echo "$as_me:$LINENO: result: $CC" >&5
2156echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002157else
Martin v. Löwis11437992002-04-12 09:54:03 +00002158 echo "$as_me:$LINENO: result: no" >&5
2159echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002160fi
2161
Martin v. Löwis11437992002-04-12 09:54:03 +00002162fi
2163if test -z "$CC"; then
2164 if test -n "$ac_tool_prefix"; then
2165 for ac_prog in cl
2166 do
2167 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2168set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2169echo "$as_me:$LINENO: checking for $ac_word" >&5
2170echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2171if test "${ac_cv_prog_CC+set}" = set; then
2172 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002173else
2174 if test -n "$CC"; then
2175 ac_cv_prog_CC="$CC" # Let the user override the test.
2176else
Martin v. Löwis11437992002-04-12 09:54:03 +00002177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2178for as_dir in $PATH
2179do
2180 IFS=$as_save_IFS
2181 test -z "$as_dir" && as_dir=.
2182 for ac_exec_ext in '' $ac_executable_extensions; do
2183 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2184 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2185 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2186 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002188done
2189done
2190
2191fi
2192fi
2193CC=$ac_cv_prog_CC
2194if test -n "$CC"; then
2195 echo "$as_me:$LINENO: result: $CC" >&5
2196echo "${ECHO_T}$CC" >&6
2197else
2198 echo "$as_me:$LINENO: result: no" >&5
2199echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002200fi
2201
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 test -n "$CC" && break
2203 done
2204fi
2205if test -z "$CC"; then
2206 ac_ct_CC=$CC
2207 for ac_prog in cl
2208do
2209 # Extract the first word of "$ac_prog", so it can be a program name with args.
2210set dummy $ac_prog; ac_word=$2
2211echo "$as_me:$LINENO: checking for $ac_word" >&5
2212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2214 echo $ECHO_N "(cached) $ECHO_C" >&6
2215else
2216 if test -n "$ac_ct_CC"; then
2217 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2218else
2219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2220for as_dir in $PATH
2221do
2222 IFS=$as_save_IFS
2223 test -z "$as_dir" && as_dir=.
2224 for ac_exec_ext in '' $ac_executable_extensions; do
2225 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2226 ac_cv_prog_ac_ct_CC="$ac_prog"
2227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2228 break 2
2229 fi
2230done
2231done
Jack Jansendd19cf82001-12-06 22:36:17 +00002232
Martin v. Löwis11437992002-04-12 09:54:03 +00002233fi
2234fi
2235ac_ct_CC=$ac_cv_prog_ac_ct_CC
2236if test -n "$ac_ct_CC"; then
2237 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2238echo "${ECHO_T}$ac_ct_CC" >&6
2239else
2240 echo "$as_me:$LINENO: result: no" >&5
2241echo "${ECHO_T}no" >&6
2242fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002243
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 test -n "$ac_ct_CC" && break
2245done
Michael W. Hudson54241132001-12-07 15:38:26 +00002246
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 CC=$ac_ct_CC
2248fi
2249
2250fi
2251
2252
Skip Montanaro6dead952003-09-25 14:50:04 +00002253test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2254See \`config.log' for more details." >&5
2255echo "$as_me: error: no acceptable C compiler found in \$PATH
2256See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002257 { (exit 1); exit 1; }; }
2258
2259# Provide some information about the compiler.
2260echo "$as_me:$LINENO:" \
2261 "checking for C compiler version" >&5
2262ac_compiler=`set X $ac_compile; echo $2`
2263{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2264 (eval $ac_compiler --version </dev/null >&5) 2>&5
2265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); }
2268{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2269 (eval $ac_compiler -v </dev/null >&5) 2>&5
2270 ac_status=$?
2271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2272 (exit $ac_status); }
2273{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2274 (eval $ac_compiler -V </dev/null >&5) 2>&5
2275 ac_status=$?
2276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277 (exit $ac_status); }
2278
2279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002280/* confdefs.h. */
2281_ACEOF
2282cat confdefs.h >>conftest.$ac_ext
2283cat >>conftest.$ac_ext <<_ACEOF
2284/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002285
Martin v. Löwis11437992002-04-12 09:54:03 +00002286int
2287main ()
2288{
2289
2290 ;
2291 return 0;
2292}
2293_ACEOF
2294ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002295ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002296# Try to create an executable without -o first, disregard a.out.
2297# It will help us diagnose broken compilers, and finding out an intuition
2298# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002299echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2300echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002301ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2302if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2303 (eval $ac_link_default) 2>&5
2304 ac_status=$?
2305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2306 (exit $ac_status); }; then
2307 # Find the output, starting from the most likely. This scheme is
2308# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2309# resort.
2310
2311# Be careful to initialize this variable, since it used to be cached.
2312# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2313ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002314# b.out is created by i960 compilers.
2315for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2316do
2317 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002319 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002320 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002321 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002322 # This is the source file.
2323 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002324 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002325 # We found the default executable, but exeext='' is most
2326 # certainly right.
2327 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002328 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002329 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2330 # FIXME: I believe we export ac_cv_exeext for Libtool,
2331 # but it would be cool to find out if it's true. Does anybody
2332 # maintain Libtool? --akim.
2333 export ac_cv_exeext
2334 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002335 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002336 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 esac
2338done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002339else
Martin v. Löwis11437992002-04-12 09:54:03 +00002340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002341sed 's/^/| /' conftest.$ac_ext >&5
2342
2343{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2344See \`config.log' for more details." >&5
2345echo "$as_me: error: C compiler cannot create executables
2346See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002347 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002348fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002349
Martin v. Löwis11437992002-04-12 09:54:03 +00002350ac_exeext=$ac_cv_exeext
2351echo "$as_me:$LINENO: result: $ac_file" >&5
2352echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002353
Martin v. Löwis11437992002-04-12 09:54:03 +00002354# Check the compiler produces executables we can run. If not, either
2355# the compiler is broken, or we cross compile.
2356echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2357echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2358# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2359# If not cross compiling, check that we can run a simple program.
2360if test "$cross_compiling" != yes; then
2361 if { ac_try='./$ac_file'
2362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2363 (eval $ac_try) 2>&5
2364 ac_status=$?
2365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2366 (exit $ac_status); }; }; then
2367 cross_compiling=no
2368 else
2369 if test "$cross_compiling" = maybe; then
2370 cross_compiling=yes
2371 else
2372 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002373If you meant to cross compile, use \`--host'.
2374See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002375echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002376If you meant to cross compile, use \`--host'.
2377See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002378 { (exit 1); exit 1; }; }
2379 fi
2380 fi
2381fi
2382echo "$as_me:$LINENO: result: yes" >&5
2383echo "${ECHO_T}yes" >&6
2384
Skip Montanaro6dead952003-09-25 14:50:04 +00002385rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002386ac_clean_files=$ac_clean_files_save
2387# Check the compiler produces executables we can run. If not, either
2388# the compiler is broken, or we cross compile.
2389echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2390echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2391echo "$as_me:$LINENO: result: $cross_compiling" >&5
2392echo "${ECHO_T}$cross_compiling" >&6
2393
2394echo "$as_me:$LINENO: checking for suffix of executables" >&5
2395echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2397 (eval $ac_link) 2>&5
2398 ac_status=$?
2399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2400 (exit $ac_status); }; then
2401 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2402# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2403# work properly (i.e., refer to `conftest.exe'), while it won't with
2404# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405for ac_file in conftest.exe conftest conftest.*; do
2406 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002410 export ac_cv_exeext
2411 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002412 * ) break;;
2413 esac
2414done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002415else
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2417See \`config.log' for more details." >&5
2418echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2419See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002420 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002421fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002422
Martin v. Löwis11437992002-04-12 09:54:03 +00002423rm -f conftest$ac_cv_exeext
2424echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2425echo "${ECHO_T}$ac_cv_exeext" >&6
2426
2427rm -f conftest.$ac_ext
2428EXEEXT=$ac_cv_exeext
2429ac_exeext=$EXEEXT
2430echo "$as_me:$LINENO: checking for suffix of object files" >&5
2431echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2432if test "${ac_cv_objext+set}" = set; then
2433 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002434else
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002436/* confdefs.h. */
2437_ACEOF
2438cat confdefs.h >>conftest.$ac_ext
2439cat >>conftest.$ac_ext <<_ACEOF
2440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442int
2443main ()
2444{
2445
2446 ;
2447 return 0;
2448}
2449_ACEOF
2450rm -f conftest.o conftest.obj
2451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2452 (eval $ac_compile) 2>&5
2453 ac_status=$?
2454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2455 (exit $ac_status); }; then
2456 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2457 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002458 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2460 break;;
2461 esac
2462done
2463else
2464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002465sed 's/^/| /' conftest.$ac_ext >&5
2466
2467{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2468See \`config.log' for more details." >&5
2469echo "$as_me: error: cannot compute suffix of object files: cannot compile
2470See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 { (exit 1); exit 1; }; }
2472fi
2473
2474rm -f conftest.$ac_cv_objext conftest.$ac_ext
2475fi
2476echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2477echo "${ECHO_T}$ac_cv_objext" >&6
2478OBJEXT=$ac_cv_objext
2479ac_objext=$OBJEXT
2480echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2481echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2482if test "${ac_cv_c_compiler_gnu+set}" = set; then
2483 echo $ECHO_N "(cached) $ECHO_C" >&6
2484else
2485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002486/* confdefs.h. */
2487_ACEOF
2488cat confdefs.h >>conftest.$ac_ext
2489cat >>conftest.$ac_ext <<_ACEOF
2490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
Martin v. Löwis11437992002-04-12 09:54:03 +00002492int
2493main ()
2494{
2495#ifndef __GNUC__
2496 choke me
2497#endif
2498
2499 ;
2500 return 0;
2501}
2502_ACEOF
2503rm -f conftest.$ac_objext
2504if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002505 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002507 grep -v '^ *+' conftest.er1 >conftest.err
2508 rm -f conftest.er1
2509 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2511 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002512 { ac_try='test -z "$ac_c_werror_flag"
2513 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002514 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2515 (eval $ac_try) 2>&5
2516 ac_status=$?
2517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2518 (exit $ac_status); }; } &&
2519 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2521 (eval $ac_try) 2>&5
2522 ac_status=$?
2523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2524 (exit $ac_status); }; }; then
2525 ac_compiler_gnu=yes
2526else
2527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002528sed 's/^/| /' conftest.$ac_ext >&5
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530ac_compiler_gnu=no
2531fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002532rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002533ac_cv_c_compiler_gnu=$ac_compiler_gnu
2534
2535fi
2536echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2537echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2538GCC=`test $ac_compiler_gnu = yes && echo yes`
2539ac_test_CFLAGS=${CFLAGS+set}
2540ac_save_CFLAGS=$CFLAGS
2541CFLAGS="-g"
2542echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2543echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2544if test "${ac_cv_prog_cc_g+set}" = set; then
2545 echo $ECHO_N "(cached) $ECHO_C" >&6
2546else
2547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002548/* confdefs.h. */
2549_ACEOF
2550cat confdefs.h >>conftest.$ac_ext
2551cat >>conftest.$ac_ext <<_ACEOF
2552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554int
2555main ()
2556{
2557
2558 ;
2559 return 0;
2560}
2561_ACEOF
2562rm -f conftest.$ac_objext
2563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002564 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002566 grep -v '^ *+' conftest.er1 >conftest.err
2567 rm -f conftest.er1
2568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2570 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002571 { ac_try='test -z "$ac_c_werror_flag"
2572 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2574 (eval $ac_try) 2>&5
2575 ac_status=$?
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); }; } &&
2578 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2580 (eval $ac_try) 2>&5
2581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002584 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585else
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002587sed 's/^/| /' conftest.$ac_ext >&5
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002590fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002591rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002593echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2594echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002595if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002597elif test $ac_cv_prog_cc_g = yes; then
2598 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002599 CFLAGS="-g -O2"
2600 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002601 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002604 if test "$GCC" = yes; then
2605 CFLAGS="-O2"
2606 else
2607 CFLAGS=
2608 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002609fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002610echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2611echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2612if test "${ac_cv_prog_cc_stdc+set}" = set; then
2613 echo $ECHO_N "(cached) $ECHO_C" >&6
2614else
2615 ac_cv_prog_cc_stdc=no
2616ac_save_CC=$CC
2617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002618/* confdefs.h. */
2619_ACEOF
2620cat confdefs.h >>conftest.$ac_ext
2621cat >>conftest.$ac_ext <<_ACEOF
2622/* end confdefs.h. */
2623#include <stdarg.h>
2624#include <stdio.h>
2625#include <sys/types.h>
2626#include <sys/stat.h>
2627/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2628struct buf { int x; };
2629FILE * (*rcsopen) (struct buf *, struct stat *, int);
2630static char *e (p, i)
2631 char **p;
2632 int i;
2633{
2634 return p[i];
2635}
2636static char *f (char * (*g) (char **, int), char **p, ...)
2637{
2638 char *s;
2639 va_list v;
2640 va_start (v,p);
2641 s = g (p, va_arg (v,int));
2642 va_end (v);
2643 return s;
2644}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002645
2646/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2647 function prototypes and stuff, but not '\xHH' hex character constants.
2648 These don't provoke an error unfortunately, instead are silently treated
2649 as 'x'. The following induces an error, until -std1 is added to get
2650 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2651 array size at least. It's necessary to write '\x00'==0 to get something
2652 that's true only with -std1. */
2653int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2654
Skip Montanaro6dead952003-09-25 14:50:04 +00002655int test (int i, double x);
2656struct s1 {int (*f) (int a);};
2657struct s2 {int (*f) (double a);};
2658int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2659int argc;
2660char **argv;
2661int
2662main ()
2663{
2664return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2665 ;
2666 return 0;
2667}
2668_ACEOF
2669# Don't try gcc -ansi; that turns off useful extensions and
2670# breaks some systems' header files.
2671# AIX -qlanglvl=ansi
2672# Ultrix and OSF/1 -std1
2673# HP-UX 10.20 and later -Ae
2674# HP-UX older versions -Aa -D_HPUX_SOURCE
2675# SVR4 -Xc -D__EXTENSIONS__
2676for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2677do
2678 CC="$ac_save_CC $ac_arg"
2679 rm -f conftest.$ac_objext
2680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002681 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002683 grep -v '^ *+' conftest.er1 >conftest.err
2684 rm -f conftest.er1
2685 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002688 { ac_try='test -z "$ac_c_werror_flag"
2689 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2691 (eval $ac_try) 2>&5
2692 ac_status=$?
2693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2694 (exit $ac_status); }; } &&
2695 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2697 (eval $ac_try) 2>&5
2698 ac_status=$?
2699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2700 (exit $ac_status); }; }; then
2701 ac_cv_prog_cc_stdc=$ac_arg
2702break
2703else
2704 echo "$as_me: failed program was:" >&5
2705sed 's/^/| /' conftest.$ac_ext >&5
2706
2707fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002708rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002709done
2710rm -f conftest.$ac_ext conftest.$ac_objext
2711CC=$ac_save_CC
2712
2713fi
2714
2715case "x$ac_cv_prog_cc_stdc" in
2716 x|xno)
2717 echo "$as_me:$LINENO: result: none needed" >&5
2718echo "${ECHO_T}none needed" >&6 ;;
2719 *)
2720 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2721echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2722 CC="$CC $ac_cv_prog_cc_stdc" ;;
2723esac
2724
Martin v. Löwis11437992002-04-12 09:54:03 +00002725# Some people use a C++ compiler to compile C. Since we use `exit',
2726# in C++ we need to declare it. In case someone uses the same compiler
2727# for both compiling C and C++ we need to have the C++ compiler decide
2728# the declaration of exit, since it's the most demanding environment.
2729cat >conftest.$ac_ext <<_ACEOF
2730#ifndef __cplusplus
2731 choke me
2732#endif
2733_ACEOF
2734rm -f conftest.$ac_objext
2735if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002736 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002738 grep -v '^ *+' conftest.er1 >conftest.err
2739 rm -f conftest.er1
2740 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2742 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002743 { ac_try='test -z "$ac_c_werror_flag"
2744 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2746 (eval $ac_try) 2>&5
2747 ac_status=$?
2748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749 (exit $ac_status); }; } &&
2750 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2752 (eval $ac_try) 2>&5
2753 ac_status=$?
2754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2755 (exit $ac_status); }; }; then
2756 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002757 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 'extern "C" void std::exit (int) throw (); using std::exit;' \
2759 'extern "C" void std::exit (int); using std::exit;' \
2760 'extern "C" void exit (int) throw ();' \
2761 'extern "C" void exit (int);' \
2762 'void exit (int);'
2763do
2764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002765/* confdefs.h. */
2766_ACEOF
2767cat confdefs.h >>conftest.$ac_ext
2768cat >>conftest.$ac_ext <<_ACEOF
2769/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002770$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002771#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002772int
2773main ()
2774{
2775exit (42);
2776 ;
2777 return 0;
2778}
2779_ACEOF
2780rm -f conftest.$ac_objext
2781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002782 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002784 grep -v '^ *+' conftest.er1 >conftest.err
2785 rm -f conftest.er1
2786 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2788 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002789 { ac_try='test -z "$ac_c_werror_flag"
2790 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2792 (eval $ac_try) 2>&5
2793 ac_status=$?
2794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2795 (exit $ac_status); }; } &&
2796 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2798 (eval $ac_try) 2>&5
2799 ac_status=$?
2800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2801 (exit $ac_status); }; }; then
2802 :
2803else
2804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002805sed 's/^/| /' conftest.$ac_ext >&5
2806
Martin v. Löwis11437992002-04-12 09:54:03 +00002807continue
2808fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002811/* confdefs.h. */
2812_ACEOF
2813cat confdefs.h >>conftest.$ac_ext
2814cat >>conftest.$ac_ext <<_ACEOF
2815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002816$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002817int
2818main ()
2819{
2820exit (42);
2821 ;
2822 return 0;
2823}
2824_ACEOF
2825rm -f conftest.$ac_objext
2826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002827 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002829 grep -v '^ *+' conftest.er1 >conftest.err
2830 rm -f conftest.er1
2831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2833 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002834 { ac_try='test -z "$ac_c_werror_flag"
2835 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2837 (eval $ac_try) 2>&5
2838 ac_status=$?
2839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2840 (exit $ac_status); }; } &&
2841 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2843 (eval $ac_try) 2>&5
2844 ac_status=$?
2845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2846 (exit $ac_status); }; }; then
2847 break
2848else
2849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002850sed 's/^/| /' conftest.$ac_ext >&5
2851
Martin v. Löwis11437992002-04-12 09:54:03 +00002852fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002854done
2855rm -f conftest*
2856if test -n "$ac_declaration"; then
2857 echo '#ifdef __cplusplus' >>confdefs.h
2858 echo $ac_declaration >>confdefs.h
2859 echo '#endif' >>confdefs.h
2860fi
2861
2862else
2863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002864sed 's/^/| /' conftest.$ac_ext >&5
2865
Martin v. Löwis11437992002-04-12 09:54:03 +00002866fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_ext=c
2869ac_cpp='$CPP $CPPFLAGS'
2870ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2871ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2872ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002873
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002874
2875# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
2877ac_ext=c
2878ac_cpp='$CPP $CPPFLAGS'
2879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2881ac_compiler_gnu=$ac_cv_c_compiler_gnu
2882echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2883echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002884# On Suns, sometimes $CPP names a directory.
2885if test -n "$CPP" && test -d "$CPP"; then
2886 CPP=
2887fi
2888if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 if test "${ac_cv_prog_CPP+set}" = set; then
2890 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002891else
Martin v. Löwis11437992002-04-12 09:54:03 +00002892 # Double quotes because CPP needs to be expanded
2893 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2894 do
2895 ac_preproc_ok=false
2896for ac_c_preproc_warn_flag in '' yes
2897do
2898 # Use a header file that comes with gcc, so configuring glibc
2899 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002900 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2901 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002902 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002903 # not just through cpp. "Syntax error" is here to catch this case.
2904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002905/* confdefs.h. */
2906_ACEOF
2907cat confdefs.h >>conftest.$ac_ext
2908cat >>conftest.$ac_ext <<_ACEOF
2909/* end confdefs.h. */
2910#ifdef __STDC__
2911# include <limits.h>
2912#else
2913# include <assert.h>
2914#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002915 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002916_ACEOF
2917if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2918 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2919 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002920 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002921 rm -f conftest.er1
2922 cat conftest.err >&5
2923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2924 (exit $ac_status); } >/dev/null; then
2925 if test -s conftest.err; then
2926 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002927 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002928 else
2929 ac_cpp_err=
2930 fi
2931else
2932 ac_cpp_err=yes
2933fi
2934if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002935 :
2936else
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002938sed 's/^/| /' conftest.$ac_ext >&5
2939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 # Broken: fails on valid input.
2941continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002942fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002943rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002944
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 # OK, works on sane cases. Now check whether non-existent headers
2946 # can be detected and how.
2947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002948/* confdefs.h. */
2949_ACEOF
2950cat confdefs.h >>conftest.$ac_ext
2951cat >>conftest.$ac_ext <<_ACEOF
2952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002953#include <ac_nonexistent.h>
2954_ACEOF
2955if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2956 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2957 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002958 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 rm -f conftest.er1
2960 cat conftest.err >&5
2961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2962 (exit $ac_status); } >/dev/null; then
2963 if test -s conftest.err; then
2964 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002965 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002966 else
2967 ac_cpp_err=
2968 fi
2969else
2970 ac_cpp_err=yes
2971fi
2972if test -z "$ac_cpp_err"; then
2973 # Broken: success on invalid input.
2974continue
2975else
2976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002977sed 's/^/| /' conftest.$ac_ext >&5
2978
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 # Passes both tests.
2980ac_preproc_ok=:
2981break
2982fi
2983rm -f conftest.err conftest.$ac_ext
2984
2985done
2986# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2987rm -f conftest.err conftest.$ac_ext
2988if $ac_preproc_ok; then
2989 break
2990fi
2991
2992 done
2993 ac_cv_prog_CPP=$CPP
2994
2995fi
2996 CPP=$ac_cv_prog_CPP
2997else
2998 ac_cv_prog_CPP=$CPP
2999fi
3000echo "$as_me:$LINENO: result: $CPP" >&5
3001echo "${ECHO_T}$CPP" >&6
3002ac_preproc_ok=false
3003for ac_c_preproc_warn_flag in '' yes
3004do
3005 # Use a header file that comes with gcc, so configuring glibc
3006 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003007 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3008 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003009 # On the NeXT, cc -E runs the code through the compiler's parser,
3010 # not just through cpp. "Syntax error" is here to catch this case.
3011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
3017#ifdef __STDC__
3018# include <limits.h>
3019#else
3020# include <assert.h>
3021#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003022 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003023_ACEOF
3024if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3025 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3026 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003027 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003028 rm -f conftest.er1
3029 cat conftest.err >&5
3030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3031 (exit $ac_status); } >/dev/null; then
3032 if test -s conftest.err; then
3033 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003034 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003035 else
3036 ac_cpp_err=
3037 fi
3038else
3039 ac_cpp_err=yes
3040fi
3041if test -z "$ac_cpp_err"; then
3042 :
3043else
3044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 # Broken: fails on valid input.
3048continue
3049fi
3050rm -f conftest.err conftest.$ac_ext
3051
3052 # OK, works on sane cases. Now check whether non-existent headers
3053 # can be detected and how.
3054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003055/* confdefs.h. */
3056_ACEOF
3057cat confdefs.h >>conftest.$ac_ext
3058cat >>conftest.$ac_ext <<_ACEOF
3059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003060#include <ac_nonexistent.h>
3061_ACEOF
3062if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3063 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3064 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003065 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003066 rm -f conftest.er1
3067 cat conftest.err >&5
3068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3069 (exit $ac_status); } >/dev/null; then
3070 if test -s conftest.err; then
3071 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003072 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003073 else
3074 ac_cpp_err=
3075 fi
3076else
3077 ac_cpp_err=yes
3078fi
3079if test -z "$ac_cpp_err"; then
3080 # Broken: success on invalid input.
3081continue
3082else
3083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003084sed 's/^/| /' conftest.$ac_ext >&5
3085
Martin v. Löwis11437992002-04-12 09:54:03 +00003086 # Passes both tests.
3087ac_preproc_ok=:
3088break
3089fi
3090rm -f conftest.err conftest.$ac_ext
3091
3092done
3093# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3094rm -f conftest.err conftest.$ac_ext
3095if $ac_preproc_ok; then
3096 :
3097else
Skip Montanaro6dead952003-09-25 14:50:04 +00003098 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3099See \`config.log' for more details." >&5
3100echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3101See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003102 { (exit 1); exit 1; }; }
3103fi
3104
3105ac_ext=c
3106ac_cpp='$CPP $CPPFLAGS'
3107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3109ac_compiler_gnu=$ac_cv_c_compiler_gnu
3110
3111
Skip Montanaro6dead952003-09-25 14:50:04 +00003112echo "$as_me:$LINENO: checking for egrep" >&5
3113echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3114if test "${ac_cv_prog_egrep+set}" = set; then
3115 echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
3117 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3118 then ac_cv_prog_egrep='grep -E'
3119 else ac_cv_prog_egrep='egrep'
3120 fi
3121fi
3122echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3123echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3124 EGREP=$ac_cv_prog_egrep
3125
3126
Martin v. Löwis11437992002-04-12 09:54:03 +00003127
3128echo "$as_me:$LINENO: checking for AIX" >&5
3129echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003131/* confdefs.h. */
3132_ACEOF
3133cat confdefs.h >>conftest.$ac_ext
3134cat >>conftest.$ac_ext <<_ACEOF
3135/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003136#ifdef _AIX
3137 yes
3138#endif
3139
Martin v. Löwis11437992002-04-12 09:54:03 +00003140_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003142 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003143 echo "$as_me:$LINENO: result: yes" >&5
3144echo "${ECHO_T}yes" >&6
3145cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003146#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003147_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003148
3149else
Martin v. Löwis11437992002-04-12 09:54:03 +00003150 echo "$as_me:$LINENO: result: no" >&5
3151echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003152fi
3153rm -f conftest*
3154
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003156
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003157# Check for unsupported systems
3158case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003159Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003160 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3161 echo See README for details.
3162 exit 1;;
3163esac
3164
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Martin v. Löwis11437992002-04-12 09:54:03 +00003166echo "$as_me:$LINENO: checking for --with-suffix" >&5
3167echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003168
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003169# Check whether --with-suffix or --without-suffix was given.
3170if test "${with_suffix+set}" = set; then
3171 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003172
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003173 case $withval in
3174 no) EXEEXT=;;
3175 yes) EXEEXT=.exe;;
3176 *) EXEEXT=$withval;;
3177 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003178fi;
3179echo "$as_me:$LINENO: result: $EXEEXT" >&5
3180echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003181
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003182# Test whether we're running on a non-case-sensitive system, in which
3183# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003184
Martin v. Löwis11437992002-04-12 09:54:03 +00003185echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3186echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003187if test ! -d CaseSensitiveTestDir; then
3188mkdir CaseSensitiveTestDir
3189fi
3190
3191if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003192then
Martin v. Löwis11437992002-04-12 09:54:03 +00003193 echo "$as_me:$LINENO: result: yes" >&5
3194echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003195 BUILDEXEEXT=.exe
3196else
Martin v. Löwis11437992002-04-12 09:54:03 +00003197 echo "$as_me:$LINENO: result: no" >&5
3198echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003199 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003200fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003201rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003202
Guido van Rossumdd997f71998-10-07 19:58:26 +00003203case $MACHDEP in
3204bsdos*)
3205 case $CC in
3206 gcc) CC="$CC -D_HAVE_BSDI";;
3207 esac;;
3208esac
3209
Guido van Rossum24b1e751997-08-21 02:29:16 +00003210case $ac_sys_system in
3211hp*|HP*)
3212 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003213 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003214 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003215Monterey*)
3216 case $CC in
3217 cc) CC="$CC -Wl,-Bexport";;
3218 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003219SunOS*)
3220 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003221
3222cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003223#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003224_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003225
3226 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003227esac
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
Martin v. Löwis11437992002-04-12 09:54:03 +00003231echo "$as_me:$LINENO: checking LIBRARY" >&5
3232echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003233if test -z "$LIBRARY"
3234then
3235 LIBRARY='libpython$(VERSION).a'
3236fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003237echo "$as_me:$LINENO: result: $LIBRARY" >&5
3238echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003239
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003240# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003241# name of the library into which to insert object files). BLDLIBRARY is also
3242# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3243# is blank as the main program is not linked directly against LDLIBRARY.
3244# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3245# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3246# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3247# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003248#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003249# RUNSHARED is used to run shared python without installed libraries
3250#
3251# INSTSONAME is the name of the shared library that will be use to install
3252# on the system - some systems like version suffix, others don't
3253
3254
Michael W. Hudson54241132001-12-07 15:38:26 +00003255
3256
3257
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003258
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003259LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003260BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003261INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003262DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003263LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003264RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003265
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003266# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003267# If CXX is set, and if it is needed to link a main function that was
3268# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3269# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003270# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003271# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003272
Martin v. Löwis11437992002-04-12 09:54:03 +00003273echo "$as_me:$LINENO: checking LINKCC" >&5
3274echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003275if test -z "$LINKCC"
3276then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003277 if test -z "$CXX"; then
3278 LINKCC="\$(PURIFY) \$(CC)"
3279 else
Martin v. Löwis147fbe52005-08-07 21:09:30 +00003280 echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
3281 $CXX -c conftest_a.cc # 2>&5
3282 echo 'void foo(){}' > conftest_b.$ac_ext
3283 $CC -c conftest_b.$ac_ext # 2>&5
3284 if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003285 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3286 then
3287 LINKCC="\$(PURIFY) \$(CC)"
3288 else
3289 LINKCC="\$(PURIFY) \$(CXX)"
3290 fi
3291 rm -fr conftest*
3292 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003293 case $ac_sys_system in
3294 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003295 exp_extra="\"\""
3296 if test $ac_sys_release -ge 5 -o \
3297 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3298 exp_extra="."
3299 fi
3300 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003301 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003302 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003303 esac
3304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003305echo "$as_me:$LINENO: result: $LINKCC" >&5
3306echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003307
Martin v. Löwis11437992002-04-12 09:54:03 +00003308echo "$as_me:$LINENO: checking for --enable-shared" >&5
3309echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003310# Check whether --enable-shared or --disable-shared was given.
3311if test "${enable_shared+set}" = set; then
3312 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003313
Martin v. Löwis11437992002-04-12 09:54:03 +00003314fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003315
3316if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003317then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003318 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003319 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003320 enable_shared="yes";;
3321 *)
3322 enable_shared="no";;
3323 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003324fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003325echo "$as_me:$LINENO: result: $enable_shared" >&5
3326echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003327
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003328echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3329echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3330# Check whether --enable-profiling or --disable-profiling was given.
3331if test "${enable_profiling+set}" = set; then
3332 enableval="$enable_profiling"
3333 ac_save_cc="$CC"
3334 CC="$CC -pg"
3335 if test "$cross_compiling" = yes; then
3336 ac_enable_profiling="no"
3337else
3338 cat >conftest.$ac_ext <<_ACEOF
3339/* confdefs.h. */
3340_ACEOF
3341cat confdefs.h >>conftest.$ac_ext
3342cat >>conftest.$ac_ext <<_ACEOF
3343/* end confdefs.h. */
3344int main() { return 0; }
3345_ACEOF
3346rm -f conftest$ac_exeext
3347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3348 (eval $ac_link) 2>&5
3349 ac_status=$?
3350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3351 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3353 (eval $ac_try) 2>&5
3354 ac_status=$?
3355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3356 (exit $ac_status); }; }; then
3357 ac_enable_profiling="yes"
3358else
3359 echo "$as_me: program exited with status $ac_status" >&5
3360echo "$as_me: failed program was:" >&5
3361sed 's/^/| /' conftest.$ac_ext >&5
3362
3363( exit $ac_status )
3364ac_enable_profiling="no"
3365fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003366rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003367fi
3368 CC="$ac_save_cc"
3369fi;
3370echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3371echo "${ECHO_T}$ac_enable_profiling" >&6
3372
3373case "$ac_enable_profiling" in
3374 "yes")
3375 BASECFLAGS="-pg $BASECFLAGS"
3376 LDFLAGS="-pg $LDFLAGS"
3377 ;;
3378esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3381echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003382
Guido van Rossumb8552162001-09-05 14:58:11 +00003383# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3384# library that we build, but we do not want to link against it (we
3385# will find it with a -framework option). For this reason there is an
3386# extra variable BLDLIBRARY against which Python and the extension
3387# modules are linked, BLDLIBRARY. This is normally the same as
3388# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003389if test "$enable_framework"
3390then
3391 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003392 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003393 BLDLIBRARY=''
3394else
3395 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003396fi
Jack Jansene578a632001-08-15 01:27:14 +00003397
Martin v. Löwis1142de32002-03-29 16:28:31 +00003398# Other platforms follow
3399if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003400
3401cat >>confdefs.h <<\_ACEOF
3402#define Py_ENABLE_SHARED 1
3403_ACEOF
3404
Martin v. Löwis1142de32002-03-29 16:28:31 +00003405 case $ac_sys_system in
3406 BeOS*)
3407 LDLIBRARY='libpython$(VERSION).so'
3408 ;;
3409 CYGWIN*)
3410 LDLIBRARY='libpython$(VERSION).dll.a'
3411 DLLLIBRARY='libpython$(VERSION).dll'
3412 ;;
3413 SunOS*)
3414 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003415 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003416 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003417 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003418 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00003419 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003420 LDLIBRARY='libpython$(VERSION).so'
3421 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003422 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003423 case $ac_sys_system in
3424 FreeBSD*)
3425 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3426 ;;
3427 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003428 INSTSONAME="$LDLIBRARY".$SOVERSION
3429 ;;
3430 hp*|HP*)
3431 LDLIBRARY='libpython$(VERSION).sl'
3432 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003433 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003434 ;;
3435 OSF*)
3436 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003437 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003438 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003439 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003440 atheos*)
3441 LDLIBRARY='libpython$(VERSION).so'
3442 BLDLIBRARY='-L. -lpython$(VERSION)'
3443 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3444 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003445 esac
Jason Tishler30765592003-09-04 11:04:06 +00003446else # shared is disabled
3447 case $ac_sys_system in
3448 CYGWIN*)
3449 BLDLIBRARY='$(LIBRARY)'
3450 LDLIBRARY='libpython$(VERSION).dll.a'
3451 ;;
3452 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003453fi
3454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3456echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003457
Martin v. Löwis11437992002-04-12 09:54:03 +00003458if test -n "$ac_tool_prefix"; then
3459 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3460set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3461echo "$as_me:$LINENO: checking for $ac_word" >&5
3462echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463if test "${ac_cv_prog_RANLIB+set}" = set; then
3464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465else
3466 if test -n "$RANLIB"; then
3467 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3468else
Martin v. Löwis11437992002-04-12 09:54:03 +00003469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
3475 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3476 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3477 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3478 break 2
3479 fi
3480done
3481done
3482
Guido van Rossum627b2d71993-12-24 10:39:16 +00003483fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003486if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 echo "$as_me:$LINENO: result: $RANLIB" >&5
3488echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003489else
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 echo "$as_me:$LINENO: result: no" >&5
3491echo "${ECHO_T}no" >&6
3492fi
3493
3494fi
3495if test -z "$ac_cv_prog_RANLIB"; then
3496 ac_ct_RANLIB=$RANLIB
3497 # Extract the first word of "ranlib", so it can be a program name with args.
3498set dummy ranlib; ac_word=$2
3499echo "$as_me:$LINENO: checking for $ac_word" >&5
3500echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3501if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3502 echo $ECHO_N "(cached) $ECHO_C" >&6
3503else
3504 if test -n "$ac_ct_RANLIB"; then
3505 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3506else
3507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3508for as_dir in $PATH
3509do
3510 IFS=$as_save_IFS
3511 test -z "$as_dir" && as_dir=.
3512 for ac_exec_ext in '' $ac_executable_extensions; do
3513 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3514 ac_cv_prog_ac_ct_RANLIB="ranlib"
3515 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3516 break 2
3517 fi
3518done
3519done
3520
3521 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3522fi
3523fi
3524ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3525if test -n "$ac_ct_RANLIB"; then
3526 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3527echo "${ECHO_T}$ac_ct_RANLIB" >&6
3528else
3529 echo "$as_me:$LINENO: result: no" >&5
3530echo "${ECHO_T}no" >&6
3531fi
3532
3533 RANLIB=$ac_ct_RANLIB
3534else
3535 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003536fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003537
3538
Guido van Rossum7f43da71994-08-01 12:15:30 +00003539for ac_prog in ar aal
3540do
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003543echo "$as_me:$LINENO: checking for $ac_word" >&5
3544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3545if test "${ac_cv_prog_AR+set}" = set; then
3546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547else
3548 if test -n "$AR"; then
3549 ac_cv_prog_AR="$AR" # Let the user override the test.
3550else
Martin v. Löwis11437992002-04-12 09:54:03 +00003551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3552for as_dir in $PATH
3553do
3554 IFS=$as_save_IFS
3555 test -z "$as_dir" && as_dir=.
3556 for ac_exec_ext in '' $ac_executable_extensions; do
3557 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3558 ac_cv_prog_AR="$ac_prog"
3559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3560 break 2
3561 fi
3562done
3563done
3564
Guido van Rossum7f43da71994-08-01 12:15:30 +00003565fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003566fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003567AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 echo "$as_me:$LINENO: result: $AR" >&5
3570echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 echo "$as_me:$LINENO: result: no" >&5
3573echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003574fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003577done
3578test -n "$AR" || AR="ar"
3579
Michael W. Hudson54241132001-12-07 15:38:26 +00003580
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003581
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003582# Extract the first word of "svnversion", so it can be a program name with args.
3583set dummy svnversion; ac_word=$2
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003584echo "$as_me:$LINENO: checking for $ac_word" >&5
3585echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3586if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3587 echo $ECHO_N "(cached) $ECHO_C" >&6
3588else
3589 if test -n "$SVNVERSION"; then
3590 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3591else
3592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593for as_dir in $PATH
3594do
3595 IFS=$as_save_IFS
3596 test -z "$as_dir" && as_dir=.
3597 for ac_exec_ext in '' $ac_executable_extensions; do
3598 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003599 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003600 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3601 break 2
3602 fi
3603done
3604done
3605
Martin v. Löwisff600232006-04-03 19:12:32 +00003606 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003607fi
3608fi
3609SVNVERSION=$ac_cv_prog_SVNVERSION
3610if test -n "$SVNVERSION"; then
3611 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3612echo "${ECHO_T}$SVNVERSION" >&6
3613else
3614 echo "$as_me:$LINENO: result: no" >&5
3615echo "${ECHO_T}no" >&6
3616fi
3617
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003618if test $SVNVERSION = found
3619then
3620 SVNVERSION="svnversion \$(srcdir)"
3621else
3622 SVNVERSION="echo exported"
3623fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003624
Neil Schemenauera42c8272001-03-31 00:01:55 +00003625case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003626bsdos*|hp*|HP*)
3627 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003628 if test -z "$INSTALL"
3629 then
3630 INSTALL="${srcdir}/install-sh -c"
3631 fi
3632esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003633ac_aux_dir=
3634for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3635 if test -f $ac_dir/install-sh; then
3636 ac_aux_dir=$ac_dir
3637 ac_install_sh="$ac_aux_dir/install-sh -c"
3638 break
3639 elif test -f $ac_dir/install.sh; then
3640 ac_aux_dir=$ac_dir
3641 ac_install_sh="$ac_aux_dir/install.sh -c"
3642 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 elif test -f $ac_dir/shtool; then
3644 ac_aux_dir=$ac_dir
3645 ac_install_sh="$ac_aux_dir/shtool install -c"
3646 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003647 fi
3648done
3649if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3651echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3652 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3655ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3656ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003657
3658# Find a good install program. We prefer a C program (faster),
3659# so one script is as good as another. But avoid the broken or
3660# incompatible versions:
3661# SysV /etc/install, /usr/sbin/install
3662# SunOS /usr/etc/install
3663# IRIX /sbin/install
3664# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003665# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3667# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3668# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003669# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003670# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003671echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3672echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003673if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003674if test "${ac_cv_path_install+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 # Account for people who put trailing slashes in PATH elements.
3683case $as_dir/ in
3684 ./ | .// | /cC/* | \
3685 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003686 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 /usr/ucb/* ) ;;
3688 *)
3689 # OSF1 and SCO ODT 3.0 have their own names for install.
3690 # Don't use installbsd from OSF since it installs stuff as root
3691 # by default.
3692 for ac_prog in ginstall scoinst install; do
3693 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003694 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3695 if test $ac_prog = install &&
3696 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3697 # AIX install. It has an incompatible calling convention.
3698 :
3699 elif test $ac_prog = install &&
3700 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3701 # program-specific install script used by HP pwplus--don't use.
3702 :
3703 else
3704 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3705 break 3
3706 fi
3707 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003708 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 done
3710 ;;
3711esac
3712done
3713
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003714
3715fi
3716 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003718 else
3719 # As a last resort, use the slow shell script. We don't cache a
3720 # path for INSTALL within a source directory, because that will
3721 # break other packages using the cache if that directory is
3722 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003723 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003724 fi
3725fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003726echo "$as_me:$LINENO: result: $INSTALL" >&5
3727echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003728
3729# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3730# It thinks the first close brace ends the variable substitution.
3731test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003734
3735test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3736
Michael W. Hudson54241132001-12-07 15:38:26 +00003737
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003738# Not every filesystem supports hard links
3739
3740if test -z "$LN" ; then
3741 case $ac_sys_system in
3742 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003743 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003744 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003745 *) LN=ln;;
3746 esac
3747fi
3748
Fred Drake109d9862001-07-11 06:27:56 +00003749# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003750echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3751echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3752
Fred Drake109d9862001-07-11 06:27:56 +00003753# Check whether --with-pydebug or --without-pydebug was given.
3754if test "${with_pydebug+set}" = set; then
3755 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003756
Fred Drake109d9862001-07-11 06:27:56 +00003757if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003758then
3759
3760cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003761#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003762_ACEOF
3763
3764 echo "$as_me:$LINENO: result: yes" >&5
3765echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003766 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003767else echo "$as_me:$LINENO: result: no" >&5
3768echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003769fi
3770else
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 echo "$as_me:$LINENO: result: no" >&5
3772echo "${ECHO_T}no" >&6
3773fi;
Fred Drake109d9862001-07-11 06:27:56 +00003774
Skip Montanarodecc6a42003-01-01 20:07:49 +00003775# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3776# merged with this chunk of code?
3777
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003778# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003779# ------------------------
3780# (The following bit of code is complicated enough - please keep things
3781# indented properly. Just pretend you're editing Python code. ;-)
3782
3783# There are two parallel sets of case statements below, one that checks to
3784# see if OPT was set and one that does BASECFLAGS setting based upon
3785# compiler and platform. BASECFLAGS tweaks need to be made even if the
3786# user set OPT.
3787
3788# tweak OPT based on compiler and platform, only if the user didn't set
3789# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003790
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003791if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003792then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003793 case $GCC in
3794 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00003795 if test "$CC" != 'g++' ; then
3796 STRICT_PROTO="-Wstrict-prototypes"
3797 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003798 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003799 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003800 if test "$Py_DEBUG" = 'true' ; then
3801 # Optimization messes up debuggers, so turn it off for
3802 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00003803 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00003804 else
Skip Montanaro288a5be2006-04-13 02:00:56 +00003805 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806 fi
3807 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003808 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00003809 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003811 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003812 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003813 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3814 ;;
3815 esac
Fred Drake109d9862001-07-11 06:27:56 +00003816 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003817
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003818 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819 OPT="-O"
3820 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003821 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003822
3823 # The current (beta) Monterey compiler dies with optimizations
3824 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003825 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003826 Monterey*)
3827 OPT=""
3828 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003829 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003830
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003831fi
3832
Skip Montanarodecc6a42003-01-01 20:07:49 +00003833
3834# tweak BASECFLAGS based on compiler and platform
3835case $GCC in
3836yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003837 # Python violates C99 rules, by casting between incompatible
3838 # pointer types. GCC may generate bad code as a result of that,
3839 # so use -fno-strict-aliasing if supported.
3840 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3841echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3842 ac_save_cc="$CC"
3843 CC="$CC -fno-strict-aliasing"
3844 if test "$cross_compiling" = yes; then
3845 ac_cv_no_strict_aliasing_ok=no
3846else
3847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003848/* confdefs.h. */
3849_ACEOF
3850cat confdefs.h >>conftest.$ac_ext
3851cat >>conftest.$ac_ext <<_ACEOF
3852/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003853int main() { return 0; }
3854_ACEOF
3855rm -f conftest$ac_exeext
3856if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3857 (eval $ac_link) 2>&5
3858 ac_status=$?
3859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3862 (eval $ac_try) 2>&5
3863 ac_status=$?
3864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865 (exit $ac_status); }; }; then
3866 ac_cv_no_strict_aliasing_ok=yes
3867else
3868 echo "$as_me: program exited with status $ac_status" >&5
3869echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003870sed 's/^/| /' conftest.$ac_ext >&5
3871
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003872( exit $ac_status )
3873ac_cv_no_strict_aliasing_ok=no
3874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003875rm -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 +00003876fi
3877 CC="$ac_save_cc"
3878 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3879echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3880 if test $ac_cv_no_strict_aliasing_ok = yes
3881 then
3882 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3883 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003884 case $ac_sys_system in
3885 SCO_SV*)
3886 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3887 ;;
3888 # is there any other compiler on Darwin besides gcc?
3889 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003890 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003891 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00003892 OSF*)
3893 BASECFLAGS="$BASECFLAGS -mieee"
3894 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003895 esac
3896 ;;
3897
3898*)
3899 case $ac_sys_system in
3900 OpenUNIX*|UnixWare*)
3901 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3902 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003903 OSF*)
3904 BASECFLAGS="$BASECFLAGS -ieee -std"
3905 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003906 SCO_SV*)
3907 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3908 ;;
3909 esac
3910 ;;
3911esac
3912
Fred Drakee1ceaa02001-12-04 20:55:47 +00003913if test "$Py_DEBUG" = 'true'; then
3914 :
3915else
3916 OPT="-DNDEBUG $OPT"
3917fi
3918
Guido van Rossum563e7081996-09-10 18:20:48 +00003919if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003920then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003921 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003922fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003923
Neal Norwitz020c46a2006-01-07 21:39:28 +00003924# disable check for icc since it seems to pass, but generates a warning
3925if test "$CC" = icc
3926then
3927 ac_cv_opt_olimit_ok=no
3928fi
3929
Martin v. Löwis11437992002-04-12 09:54:03 +00003930echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3931echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3932if test "${ac_cv_opt_olimit_ok+set}" = set; then
3933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003934else
3935 ac_save_cc="$CC"
3936CC="$CC -OPT:Olimit=0"
3937if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003938 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003939else
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003941/* confdefs.h. */
3942_ACEOF
3943cat confdefs.h >>conftest.$ac_ext
3944cat >>conftest.$ac_ext <<_ACEOF
3945/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003946int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003947_ACEOF
3948rm -f conftest$ac_exeext
3949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3950 (eval $ac_link) 2>&5
3951 ac_status=$?
3952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3953 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3955 (eval $ac_try) 2>&5
3956 ac_status=$?
3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003959 ac_cv_opt_olimit_ok=yes
3960else
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 echo "$as_me: program exited with status $ac_status" >&5
3962echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003963sed 's/^/| /' conftest.$ac_ext >&5
3964
Martin v. Löwis11437992002-04-12 09:54:03 +00003965( exit $ac_status )
3966ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003967fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003968rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003969fi
Guido van Rossum91922671997-10-09 20:24:13 +00003970CC="$ac_save_cc"
3971fi
3972
Martin v. Löwis11437992002-04-12 09:54:03 +00003973echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3974echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003975if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003976 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003977 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3978 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3979 # environment?
3980 Darwin*)
3981 ;;
3982 *)
3983 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3984 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003985 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003986else
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3988echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3989 if test "${ac_cv_olimit_ok+set}" = set; then
3990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003991else
3992 ac_save_cc="$CC"
3993 CC="$CC -Olimit 1500"
3994 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003995 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003996else
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* confdefs.h. */
3999_ACEOF
4000cat confdefs.h >>conftest.$ac_ext
4001cat >>conftest.$ac_ext <<_ACEOF
4002/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004003int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004004_ACEOF
4005rm -f conftest$ac_exeext
4006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4007 (eval $ac_link) 2>&5
4008 ac_status=$?
4009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4012 (eval $ac_try) 2>&5
4013 ac_status=$?
4014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4015 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004016 ac_cv_olimit_ok=yes
4017else
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 echo "$as_me: program exited with status $ac_status" >&5
4019echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004020sed 's/^/| /' conftest.$ac_ext >&5
4021
Martin v. Löwis11437992002-04-12 09:54:03 +00004022( exit $ac_status )
4023ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004025rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004026fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004027 CC="$ac_save_cc"
4028fi
4029
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4031echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004032 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004033 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004034 fi
4035fi
4036
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004037# On some compilers, pthreads are available without further options
4038# (e.g. MacOS X). On some of these systems, the compiler will not
4039# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4040# So we have to see first whether pthreads are available without
4041# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004042echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4043echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4044if test "${ac_cv_pthread_is_default+set}" = set; then
4045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004046else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004047 if test "$cross_compiling" = yes; then
4048 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004049else
Martin v. Löwis11437992002-04-12 09:54:03 +00004050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004051/* confdefs.h. */
4052_ACEOF
4053cat confdefs.h >>conftest.$ac_ext
4054cat >>conftest.$ac_ext <<_ACEOF
4055/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004056
Martin v. Löwis130fb172001-07-19 11:00:41 +00004057#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004058
4059void* routine(void* p){return NULL;}
4060
4061int main(){
4062 pthread_t p;
4063 if(pthread_create(&p,NULL,routine,NULL)!=0)
4064 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004065 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004066 return 0;
4067}
4068
Martin v. Löwis11437992002-04-12 09:54:03 +00004069_ACEOF
4070rm -f conftest$ac_exeext
4071if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4072 (eval $ac_link) 2>&5
4073 ac_status=$?
4074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4075 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4077 (eval $ac_try) 2>&5
4078 ac_status=$?
4079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4080 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004081
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004082 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004083 ac_cv_kthread=no
4084 ac_cv_pthread=no
4085
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004086else
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 echo "$as_me: program exited with status $ac_status" >&5
4088echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004089sed 's/^/| /' conftest.$ac_ext >&5
4090
Martin v. Löwis11437992002-04-12 09:54:03 +00004091( exit $ac_status )
4092ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004093fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004094rm -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 +00004095fi
4096
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004097fi
4098
Martin v. Löwis11437992002-04-12 09:54:03 +00004099echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4100echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004101
Michael W. Hudson54241132001-12-07 15:38:26 +00004102
Martin v. Löwis11437992002-04-12 09:54:03 +00004103if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004104then
4105 ac_cv_kpthread=no
4106else
4107# -Kpthread, if available, provides the right #defines
4108# and linker options to make pthread_create available
4109# Some compilers won't report that they do not support -Kpthread,
4110# so we need to run a program to see whether it really made the
4111# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004112echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4113echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4114if test "${ac_cv_kpthread+set}" = set; then
4115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004116else
4117 ac_save_cc="$CC"
4118CC="$CC -Kpthread"
4119if test "$cross_compiling" = yes; then
4120 ac_cv_kpthread=no
4121else
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004123/* confdefs.h. */
4124_ACEOF
4125cat confdefs.h >>conftest.$ac_ext
4126cat >>conftest.$ac_ext <<_ACEOF
4127/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004128
4129#include <pthread.h>
4130
4131void* routine(void* p){return NULL;}
4132
4133int main(){
4134 pthread_t p;
4135 if(pthread_create(&p,NULL,routine,NULL)!=0)
4136 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004137 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004138 return 0;
4139}
4140
Martin v. Löwis11437992002-04-12 09:54:03 +00004141_ACEOF
4142rm -f conftest$ac_exeext
4143if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4144 (eval $ac_link) 2>&5
4145 ac_status=$?
4146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4147 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4149 (eval $ac_try) 2>&5
4150 ac_status=$?
4151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4152 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004153 ac_cv_kpthread=yes
4154else
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 echo "$as_me: program exited with status $ac_status" >&5
4156echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004157sed 's/^/| /' conftest.$ac_ext >&5
4158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159( exit $ac_status )
4160ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004161fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004162rm -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 +00004163fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004164CC="$ac_save_cc"
4165fi
4166
Martin v. Löwis11437992002-04-12 09:54:03 +00004167echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4168echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004169fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004170
Skip Montanarod8d39a02003-07-10 20:44:10 +00004171if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004172then
4173# -Kthread, if available, provides the right #defines
4174# and linker options to make pthread_create available
4175# Some compilers won't report that they do not support -Kthread,
4176# so we need to run a program to see whether it really made the
4177# function available.
4178echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4179echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4180if test "${ac_cv_kthread+set}" = set; then
4181 echo $ECHO_N "(cached) $ECHO_C" >&6
4182else
4183 ac_save_cc="$CC"
4184CC="$CC -Kthread"
4185if test "$cross_compiling" = yes; then
4186 ac_cv_kthread=no
4187else
4188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004189/* confdefs.h. */
4190_ACEOF
4191cat confdefs.h >>conftest.$ac_ext
4192cat >>conftest.$ac_ext <<_ACEOF
4193/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004194
4195#include <pthread.h>
4196
4197void* routine(void* p){return NULL;}
4198
4199int main(){
4200 pthread_t p;
4201 if(pthread_create(&p,NULL,routine,NULL)!=0)
4202 return 1;
4203 (void)pthread_detach(p);
4204 return 0;
4205}
4206
4207_ACEOF
4208rm -f conftest$ac_exeext
4209if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4210 (eval $ac_link) 2>&5
4211 ac_status=$?
4212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4213 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4215 (eval $ac_try) 2>&5
4216 ac_status=$?
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218 (exit $ac_status); }; }; then
4219 ac_cv_kthread=yes
4220else
4221 echo "$as_me: program exited with status $ac_status" >&5
4222echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004223sed 's/^/| /' conftest.$ac_ext >&5
4224
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004225( exit $ac_status )
4226ac_cv_kthread=no
4227fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004228rm -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 +00004229fi
4230CC="$ac_save_cc"
4231fi
4232
4233echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4234echo "${ECHO_T}$ac_cv_kthread" >&6
4235fi
4236
Skip Montanarod8d39a02003-07-10 20:44:10 +00004237if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004238then
4239# -pthread, if available, provides the right #defines
4240# and linker options to make pthread_create available
4241# Some compilers won't report that they do not support -pthread,
4242# so we need to run a program to see whether it really made the
4243# function available.
4244echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4245echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4246if test "${ac_cv_thread+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4248else
4249 ac_save_cc="$CC"
4250CC="$CC -pthread"
4251if test "$cross_compiling" = yes; then
4252 ac_cv_pthread=no
4253else
4254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* confdefs.h. */
4256_ACEOF
4257cat confdefs.h >>conftest.$ac_ext
4258cat >>conftest.$ac_ext <<_ACEOF
4259/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004260
4261#include <pthread.h>
4262
4263void* routine(void* p){return NULL;}
4264
4265int main(){
4266 pthread_t p;
4267 if(pthread_create(&p,NULL,routine,NULL)!=0)
4268 return 1;
4269 (void)pthread_detach(p);
4270 return 0;
4271}
4272
4273_ACEOF
4274rm -f conftest$ac_exeext
4275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4276 (eval $ac_link) 2>&5
4277 ac_status=$?
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4281 (eval $ac_try) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); }; }; then
4285 ac_cv_pthread=yes
4286else
4287 echo "$as_me: program exited with status $ac_status" >&5
4288echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004289sed 's/^/| /' conftest.$ac_ext >&5
4290
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004291( exit $ac_status )
4292ac_cv_pthread=no
4293fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294rm -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 +00004295fi
4296CC="$ac_save_cc"
4297fi
4298
4299echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4300echo "${ECHO_T}$ac_cv_pthread" >&6
4301fi
4302
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004303# If we have set a CC compiler flag for thread support then
4304# check if it works for CXX, too.
4305ac_cv_cxx_thread=no
4306if test ! -z "$CXX"
4307then
4308echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4309echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4310ac_save_cxx="$CXX"
4311
4312if test "$ac_cv_kpthread" = "yes"
4313then
4314 CXX="$CXX -Kpthread"
4315 ac_cv_cxx_thread=yes
4316elif test "$ac_cv_kthread" = "yes"
4317then
4318 CXX="$CXX -Kthread"
4319 ac_cv_cxx_thread=yes
4320elif test "$ac_cv_pthread" = "yes"
4321then
4322 CXX="$CXX -pthread"
4323 ac_cv_cxx_thread=yes
4324fi
4325
4326if test $ac_cv_cxx_thread = yes
4327then
4328 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4329 $CXX -c conftest.$ac_ext 2>&5
4330 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4331 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4332 then
4333 ac_cv_cxx_thread=yes
4334 else
4335 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004336 fi
4337 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004338fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004339echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4340echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004341fi
4342CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004343
Michael W. Hudson54241132001-12-07 15:38:26 +00004344
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004345# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004346echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4347echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4348if test "${ac_cv_header_stdc+set}" = set; then
4349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350else
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004352/* confdefs.h. */
4353_ACEOF
4354cat confdefs.h >>conftest.$ac_ext
4355cat >>conftest.$ac_ext <<_ACEOF
4356/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004357#include <stdlib.h>
4358#include <stdarg.h>
4359#include <string.h>
4360#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004361
Skip Montanaro6dead952003-09-25 14:50:04 +00004362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
Martin v. Löwis11437992002-04-12 09:54:03 +00004369_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004370rm -f conftest.$ac_objext
4371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004372 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004374 grep -v '^ *+' conftest.er1 >conftest.err
4375 rm -f conftest.er1
4376 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004378 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004379 { ac_try='test -z "$ac_c_werror_flag"
4380 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4382 (eval $ac_try) 2>&5
4383 ac_status=$?
4384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4385 (exit $ac_status); }; } &&
4386 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4388 (eval $ac_try) 2>&5
4389 ac_status=$?
4390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4391 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392 ac_cv_header_stdc=yes
4393else
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004395sed 's/^/| /' conftest.$ac_ext >&5
4396
4397ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004399rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400
4401if test $ac_cv_header_stdc = yes; then
4402 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004404/* confdefs.h. */
4405_ACEOF
4406cat confdefs.h >>conftest.$ac_ext
4407cat >>conftest.$ac_ext <<_ACEOF
4408/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004410
4411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004413 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414 :
4415else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416 ac_cv_header_stdc=no
4417fi
4418rm -f conftest*
4419
4420fi
4421
4422if test $ac_cv_header_stdc = yes; then
4423 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004425/* confdefs.h. */
4426_ACEOF
4427cat confdefs.h >>conftest.$ac_ext
4428cat >>conftest.$ac_ext <<_ACEOF
4429/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004431
4432_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004434 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435 :
4436else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437 ac_cv_header_stdc=no
4438fi
4439rm -f conftest*
4440
4441fi
4442
4443if test $ac_cv_header_stdc = yes; then
4444 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004445 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004446 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447else
Martin v. Löwis11437992002-04-12 09:54:03 +00004448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004449/* confdefs.h. */
4450_ACEOF
4451cat confdefs.h >>conftest.$ac_ext
4452cat >>conftest.$ac_ext <<_ACEOF
4453/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004454#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004455#if ((' ' & 0x0FF) == 0x020)
4456# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4457# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4458#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004459# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004460 (('a' <= (c) && (c) <= 'i') \
4461 || ('j' <= (c) && (c) <= 'r') \
4462 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004463# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4464#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004465
Martin v. Löwis11437992002-04-12 09:54:03 +00004466#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4467int
4468main ()
4469{
4470 int i;
4471 for (i = 0; i < 256; i++)
4472 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004473 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004474 exit(2);
4475 exit (0);
4476}
4477_ACEOF
4478rm -f conftest$ac_exeext
4479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4480 (eval $ac_link) 2>&5
4481 ac_status=$?
4482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485 (eval $ac_try) 2>&5
4486 ac_status=$?
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489 :
4490else
Martin v. Löwis11437992002-04-12 09:54:03 +00004491 echo "$as_me: program exited with status $ac_status" >&5
4492echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004493sed 's/^/| /' conftest.$ac_ext >&5
4494
Martin v. Löwis11437992002-04-12 09:54:03 +00004495( exit $ac_status )
4496ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004498rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004499fi
4500fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004501fi
4502echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4503echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004504if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004505
4506cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004508_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004509
4510fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004511
Skip Montanarob9820a32004-01-17 00:16:12 +00004512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004523 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004524do
4525as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4526echo "$as_me:$LINENO: checking for $ac_header" >&5
4527echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4528if eval "test \"\${$as_ac_Header+set}\" = set"; then
4529 echo $ECHO_N "(cached) $ECHO_C" >&6
4530else
4531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004532/* confdefs.h. */
4533_ACEOF
4534cat confdefs.h >>conftest.$ac_ext
4535cat >>conftest.$ac_ext <<_ACEOF
4536/* end confdefs.h. */
4537$ac_includes_default
4538
4539#include <$ac_header>
4540_ACEOF
4541rm -f conftest.$ac_objext
4542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004543 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004545 grep -v '^ *+' conftest.er1 >conftest.err
4546 rm -f conftest.er1
4547 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004550 { ac_try='test -z "$ac_c_werror_flag"
4551 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4553 (eval $ac_try) 2>&5
4554 ac_status=$?
4555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4556 (exit $ac_status); }; } &&
4557 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4559 (eval $ac_try) 2>&5
4560 ac_status=$?
4561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4562 (exit $ac_status); }; }; then
4563 eval "$as_ac_Header=yes"
4564else
4565 echo "$as_me: failed program was:" >&5
4566sed 's/^/| /' conftest.$ac_ext >&5
4567
4568eval "$as_ac_Header=no"
4569fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004571fi
4572echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4573echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4574if test `eval echo '${'$as_ac_Header'}'` = yes; then
4575 cat >>confdefs.h <<_ACEOF
4576#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4577_ACEOF
4578
4579fi
4580
4581done
4582
4583
Martin v. Löwis11437992002-04-12 09:54:03 +00004584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
Anthony Baxter8a560de2004-10-13 15:30:56 +00004620
Martin v. Löwisc3001752005-01-23 09:27:24 +00004621
Martin v. Löwis11017b12006-01-14 18:12:57 +00004622
4623for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
4624shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004625stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004626unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004627sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4628sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004629sys/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 +00004630sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004631sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4632bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633do
Martin v. Löwis11437992002-04-12 09:54:03 +00004634as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4635if eval "test \"\${$as_ac_Header+set}\" = set"; then
4636 echo "$as_me:$LINENO: checking for $ac_header" >&5
4637echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4638if eval "test \"\${$as_ac_Header+set}\" = set"; then
4639 echo $ECHO_N "(cached) $ECHO_C" >&6
4640fi
4641echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4642echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643else
Martin v. Löwis11437992002-04-12 09:54:03 +00004644 # Is the header compilable?
4645echo "$as_me:$LINENO: checking $ac_header usability" >&5
4646echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004648/* confdefs.h. */
4649_ACEOF
4650cat confdefs.h >>conftest.$ac_ext
4651cat >>conftest.$ac_ext <<_ACEOF
4652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004653$ac_includes_default
4654#include <$ac_header>
4655_ACEOF
4656rm -f conftest.$ac_objext
4657if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004658 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004660 grep -v '^ *+' conftest.er1 >conftest.err
4661 rm -f conftest.er1
4662 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4664 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004665 { ac_try='test -z "$ac_c_werror_flag"
4666 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4668 (eval $ac_try) 2>&5
4669 ac_status=$?
4670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4671 (exit $ac_status); }; } &&
4672 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4674 (eval $ac_try) 2>&5
4675 ac_status=$?
4676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4677 (exit $ac_status); }; }; then
4678 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004679else
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004681sed 's/^/| /' conftest.$ac_ext >&5
4682
Martin v. Löwis11437992002-04-12 09:54:03 +00004683ac_header_compiler=no
4684fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004686echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4687echo "${ECHO_T}$ac_header_compiler" >&6
4688
4689# Is the header present?
4690echo "$as_me:$LINENO: checking $ac_header presence" >&5
4691echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004693/* confdefs.h. */
4694_ACEOF
4695cat confdefs.h >>conftest.$ac_ext
4696cat >>conftest.$ac_ext <<_ACEOF
4697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004698#include <$ac_header>
4699_ACEOF
4700if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4702 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004703 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 rm -f conftest.er1
4705 cat conftest.err >&5
4706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707 (exit $ac_status); } >/dev/null; then
4708 if test -s conftest.err; then
4709 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004710 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004711 else
4712 ac_cpp_err=
4713 fi
4714else
4715 ac_cpp_err=yes
4716fi
4717if test -z "$ac_cpp_err"; then
4718 ac_header_preproc=yes
4719else
4720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004721sed 's/^/| /' conftest.$ac_ext >&5
4722
Martin v. Löwis11437992002-04-12 09:54:03 +00004723 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004724fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004725rm -f conftest.err conftest.$ac_ext
4726echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4727echo "${ECHO_T}$ac_header_preproc" >&6
4728
4729# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4731 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004732 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4733echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004734 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4735echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4736 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004737 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004738 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004739 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4740echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004741 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4742echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4743 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4744echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4745 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4746echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004747 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4748echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004749 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4750echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004751 (
4752 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004753## ------------------------------------------------ ##
4754## Report this to http://www.python.org/python-bugs ##
4755## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004756_ASBOX
4757 ) |
4758 sed "s/^/$as_me: WARNING: /" >&2
4759 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004760esac
4761echo "$as_me:$LINENO: checking for $ac_header" >&5
4762echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4763if eval "test \"\${$as_ac_Header+set}\" = set"; then
4764 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004765else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004766 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004768echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4769echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4770
4771fi
4772if test `eval echo '${'$as_ac_Header'}'` = yes; then
4773 cat >>confdefs.h <<_ACEOF
4774#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4775_ACEOF
4776
4777fi
4778
Guido van Rossum627b2d71993-12-24 10:39:16 +00004779done
4780
Martin v. Löwis11437992002-04-12 09:54:03 +00004781
4782
4783
4784
4785
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004787for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4788 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4789echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4790echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4791if eval "test \"\${$as_ac_Header+set}\" = set"; then
4792 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004793else
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004795/* confdefs.h. */
4796_ACEOF
4797cat confdefs.h >>conftest.$ac_ext
4798cat >>conftest.$ac_ext <<_ACEOF
4799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800#include <sys/types.h>
4801#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004802
Martin v. Löwis11437992002-04-12 09:54:03 +00004803int
4804main ()
4805{
4806if ((DIR *) 0)
4807return 0;
4808 ;
4809 return 0;
4810}
4811_ACEOF
4812rm -f conftest.$ac_objext
4813if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004814 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004816 grep -v '^ *+' conftest.er1 >conftest.err
4817 rm -f conftest.er1
4818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004821 { ac_try='test -z "$ac_c_werror_flag"
4822 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4824 (eval $ac_try) 2>&5
4825 ac_status=$?
4826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4827 (exit $ac_status); }; } &&
4828 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4830 (eval $ac_try) 2>&5
4831 ac_status=$?
4832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4833 (exit $ac_status); }; }; then
4834 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004835else
Martin v. Löwis11437992002-04-12 09:54:03 +00004836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004837sed 's/^/| /' conftest.$ac_ext >&5
4838
Martin v. Löwis11437992002-04-12 09:54:03 +00004839eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004840fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004842fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004843echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4844echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4845if test `eval echo '${'$as_ac_Header'}'` = yes; then
4846 cat >>confdefs.h <<_ACEOF
4847#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4848_ACEOF
4849
4850ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004851fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853done
4854# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4855if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4857echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4858if test "${ac_cv_search_opendir+set}" = set; then
4859 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004860else
Martin v. Löwis11437992002-04-12 09:54:03 +00004861 ac_func_search_save_LIBS=$LIBS
4862ac_cv_search_opendir=no
4863cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004864/* confdefs.h. */
4865_ACEOF
4866cat confdefs.h >>conftest.$ac_ext
4867cat >>conftest.$ac_ext <<_ACEOF
4868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004870/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004871#ifdef __cplusplus
4872extern "C"
4873#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004874/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 builtin and then its argument prototype would still apply. */
4876char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004877int
4878main ()
4879{
4880opendir ();
4881 ;
4882 return 0;
4883}
4884_ACEOF
4885rm -f conftest.$ac_objext conftest$ac_exeext
4886if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004887 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004889 grep -v '^ *+' conftest.er1 >conftest.err
4890 rm -f conftest.er1
4891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004894 { ac_try='test -z "$ac_c_werror_flag"
4895 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4897 (eval $ac_try) 2>&5
4898 ac_status=$?
4899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4900 (exit $ac_status); }; } &&
4901 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4903 (eval $ac_try) 2>&5
4904 ac_status=$?
4905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4906 (exit $ac_status); }; }; then
4907 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908else
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004912fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004913rm -f conftest.err conftest.$ac_objext \
4914 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004915if test "$ac_cv_search_opendir" = no; then
4916 for ac_lib in dir; do
4917 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4918 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004919/* confdefs.h. */
4920_ACEOF
4921cat confdefs.h >>conftest.$ac_ext
4922cat >>conftest.$ac_ext <<_ACEOF
4923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004926#ifdef __cplusplus
4927extern "C"
4928#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004929/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 builtin and then its argument prototype would still apply. */
4931char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004932int
4933main ()
4934{
4935opendir ();
4936 ;
4937 return 0;
4938}
4939_ACEOF
4940rm -f conftest.$ac_objext conftest$ac_exeext
4941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004942 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004944 grep -v '^ *+' conftest.er1 >conftest.err
4945 rm -f conftest.er1
4946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004949 { ac_try='test -z "$ac_c_werror_flag"
4950 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4952 (eval $ac_try) 2>&5
4953 ac_status=$?
4954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4955 (exit $ac_status); }; } &&
4956 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4958 (eval $ac_try) 2>&5
4959 ac_status=$?
4960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4961 (exit $ac_status); }; }; then
4962 ac_cv_search_opendir="-l$ac_lib"
4963break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964else
Martin v. Löwis11437992002-04-12 09:54:03 +00004965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004966sed 's/^/| /' conftest.$ac_ext >&5
4967
Guido van Rossum76be6ed1995-01-02 18:33:54 +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 +00004971 done
4972fi
4973LIBS=$ac_func_search_save_LIBS
4974fi
4975echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4976echo "${ECHO_T}$ac_cv_search_opendir" >&6
4977if test "$ac_cv_search_opendir" != no; then
4978 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004981
Michael W. Hudson54241132001-12-07 15:38:26 +00004982else
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4984echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4985if test "${ac_cv_search_opendir+set}" = set; then
4986 echo $ECHO_N "(cached) $ECHO_C" >&6
4987else
4988 ac_func_search_save_LIBS=$LIBS
4989ac_cv_search_opendir=no
4990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004991/* confdefs.h. */
4992_ACEOF
4993cat confdefs.h >>conftest.$ac_ext
4994cat >>conftest.$ac_ext <<_ACEOF
4995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004996
4997/* Override any gcc2 internal prototype to avoid an error. */
4998#ifdef __cplusplus
4999extern "C"
5000#endif
5001/* We use char because int might match the return type of a gcc2
5002 builtin and then its argument prototype would still apply. */
5003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005004int
5005main ()
5006{
5007opendir ();
5008 ;
5009 return 0;
5010}
5011_ACEOF
5012rm -f conftest.$ac_objext conftest$ac_exeext
5013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005014 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005016 grep -v '^ *+' conftest.er1 >conftest.err
5017 rm -f conftest.er1
5018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005021 { ac_try='test -z "$ac_c_werror_flag"
5022 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5024 (eval $ac_try) 2>&5
5025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); }; } &&
5028 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5030 (eval $ac_try) 2>&5
5031 ac_status=$?
5032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5033 (exit $ac_status); }; }; then
5034 ac_cv_search_opendir="none required"
5035else
5036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005037sed 's/^/| /' conftest.$ac_ext >&5
5038
Martin v. Löwis11437992002-04-12 09:54:03 +00005039fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005040rm -f conftest.err conftest.$ac_objext \
5041 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005042if test "$ac_cv_search_opendir" = no; then
5043 for ac_lib in x; do
5044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
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öwis11437992002-04-12 09:54:03 +00005051
5052/* Override any gcc2 internal prototype to avoid an error. */
5053#ifdef __cplusplus
5054extern "C"
5055#endif
5056/* We use char because int might match the return type of a gcc2
5057 builtin and then its argument prototype would still apply. */
5058char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005059int
5060main ()
5061{
5062opendir ();
5063 ;
5064 return 0;
5065}
5066_ACEOF
5067rm -f conftest.$ac_objext conftest$ac_exeext
5068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005069 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005071 grep -v '^ *+' conftest.er1 >conftest.err
5072 rm -f conftest.er1
5073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5075 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005076 { ac_try='test -z "$ac_c_werror_flag"
5077 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5079 (eval $ac_try) 2>&5
5080 ac_status=$?
5081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5082 (exit $ac_status); }; } &&
5083 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5085 (eval $ac_try) 2>&5
5086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); }; }; then
5089 ac_cv_search_opendir="-l$ac_lib"
5090break
5091else
5092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005093sed 's/^/| /' conftest.$ac_ext >&5
5094
Martin v. Löwis11437992002-04-12 09:54:03 +00005095fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005096rm -f conftest.err conftest.$ac_objext \
5097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005098 done
5099fi
5100LIBS=$ac_func_search_save_LIBS
5101fi
5102echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5103echo "${ECHO_T}$ac_cv_search_opendir" >&6
5104if test "$ac_cv_search_opendir" != no; then
5105 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107fi
5108
5109fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005110
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005111echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5112echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5113if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5114 echo $ECHO_N "(cached) $ECHO_C" >&6
5115else
5116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005117/* confdefs.h. */
5118_ACEOF
5119cat confdefs.h >>conftest.$ac_ext
5120cat >>conftest.$ac_ext <<_ACEOF
5121/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005122#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005123int
5124main ()
5125{
5126return makedev(0, 0);
5127 ;
5128 return 0;
5129}
5130_ACEOF
5131rm -f conftest.$ac_objext conftest$ac_exeext
5132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005133 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005135 grep -v '^ *+' conftest.er1 >conftest.err
5136 rm -f conftest.er1
5137 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005140 { ac_try='test -z "$ac_c_werror_flag"
5141 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5143 (eval $ac_try) 2>&5
5144 ac_status=$?
5145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146 (exit $ac_status); }; } &&
5147 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5149 (eval $ac_try) 2>&5
5150 ac_status=$?
5151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152 (exit $ac_status); }; }; then
5153 ac_cv_header_sys_types_h_makedev=yes
5154else
5155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005156sed 's/^/| /' conftest.$ac_ext >&5
5157
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005158ac_cv_header_sys_types_h_makedev=no
5159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005160rm -f conftest.err conftest.$ac_objext \
5161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005162
5163fi
5164echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5165echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5166
5167if test $ac_cv_header_sys_types_h_makedev = no; then
5168if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5169 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5170echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5171if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5172 echo $ECHO_N "(cached) $ECHO_C" >&6
5173fi
5174echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5175echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5176else
5177 # Is the header compilable?
5178echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5179echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005181/* confdefs.h. */
5182_ACEOF
5183cat confdefs.h >>conftest.$ac_ext
5184cat >>conftest.$ac_ext <<_ACEOF
5185/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005186$ac_includes_default
5187#include <sys/mkdev.h>
5188_ACEOF
5189rm -f conftest.$ac_objext
5190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005191 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005193 grep -v '^ *+' conftest.er1 >conftest.err
5194 rm -f conftest.er1
5195 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005198 { ac_try='test -z "$ac_c_werror_flag"
5199 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201 (eval $ac_try) 2>&5
5202 ac_status=$?
5203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204 (exit $ac_status); }; } &&
5205 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5207 (eval $ac_try) 2>&5
5208 ac_status=$?
5209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210 (exit $ac_status); }; }; then
5211 ac_header_compiler=yes
5212else
5213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005216ac_header_compiler=no
5217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005219echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5220echo "${ECHO_T}$ac_header_compiler" >&6
5221
5222# Is the header present?
5223echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5224echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005226/* confdefs.h. */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005231#include <sys/mkdev.h>
5232_ACEOF
5233if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5234 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5235 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005236 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005237 rm -f conftest.er1
5238 cat conftest.err >&5
5239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5240 (exit $ac_status); } >/dev/null; then
5241 if test -s conftest.err; then
5242 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005243 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005244 else
5245 ac_cpp_err=
5246 fi
5247else
5248 ac_cpp_err=yes
5249fi
5250if test -z "$ac_cpp_err"; then
5251 ac_header_preproc=yes
5252else
5253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005254sed 's/^/| /' conftest.$ac_ext >&5
5255
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005256 ac_header_preproc=no
5257fi
5258rm -f conftest.err conftest.$ac_ext
5259echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5260echo "${ECHO_T}$ac_header_preproc" >&6
5261
5262# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005263case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5264 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5266echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005267 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5268echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5269 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005270 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005271 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005272 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5273echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005274 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5275echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5276 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5277echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5278 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5279echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005280 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5281echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005282 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5283echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005284 (
5285 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005286## ------------------------------------------------ ##
5287## Report this to http://www.python.org/python-bugs ##
5288## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005289_ASBOX
5290 ) |
5291 sed "s/^/$as_me: WARNING: /" >&2
5292 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005293esac
5294echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5295echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5296if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5297 echo $ECHO_N "(cached) $ECHO_C" >&6
5298else
5299 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5300fi
5301echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5302echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5303
5304fi
5305if test $ac_cv_header_sys_mkdev_h = yes; then
5306
5307cat >>confdefs.h <<\_ACEOF
5308#define MAJOR_IN_MKDEV 1
5309_ACEOF
5310
5311fi
5312
5313
5314
5315 if test $ac_cv_header_sys_mkdev_h = no; then
5316 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5317 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5318echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5319if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5320 echo $ECHO_N "(cached) $ECHO_C" >&6
5321fi
5322echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5323echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5324else
5325 # Is the header compilable?
5326echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5327echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005329/* confdefs.h. */
5330_ACEOF
5331cat confdefs.h >>conftest.$ac_ext
5332cat >>conftest.$ac_ext <<_ACEOF
5333/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005334$ac_includes_default
5335#include <sys/sysmacros.h>
5336_ACEOF
5337rm -f conftest.$ac_objext
5338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005339 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 grep -v '^ *+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005346 { ac_try='test -z "$ac_c_werror_flag"
5347 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5349 (eval $ac_try) 2>&5
5350 ac_status=$?
5351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); }; } &&
5353 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5355 (eval $ac_try) 2>&5
5356 ac_status=$?
5357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5358 (exit $ac_status); }; }; then
5359 ac_header_compiler=yes
5360else
5361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005362sed 's/^/| /' conftest.$ac_ext >&5
5363
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005364ac_header_compiler=no
5365fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005367echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5368echo "${ECHO_T}$ac_header_compiler" >&6
5369
5370# Is the header present?
5371echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5372echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005374/* confdefs.h. */
5375_ACEOF
5376cat confdefs.h >>conftest.$ac_ext
5377cat >>conftest.$ac_ext <<_ACEOF
5378/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005379#include <sys/sysmacros.h>
5380_ACEOF
5381if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5383 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005384 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005385 rm -f conftest.er1
5386 cat conftest.err >&5
5387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5388 (exit $ac_status); } >/dev/null; then
5389 if test -s conftest.err; then
5390 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005391 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005392 else
5393 ac_cpp_err=
5394 fi
5395else
5396 ac_cpp_err=yes
5397fi
5398if test -z "$ac_cpp_err"; then
5399 ac_header_preproc=yes
5400else
5401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005402sed 's/^/| /' conftest.$ac_ext >&5
5403
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005404 ac_header_preproc=no
5405fi
5406rm -f conftest.err conftest.$ac_ext
5407echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5408echo "${ECHO_T}$ac_header_preproc" >&6
5409
5410# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005411case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5412 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005413 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5414echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005415 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5416echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5417 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005418 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005420 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5421echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005422 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5423echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5424 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5425echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5426 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5427echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005428 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5429echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005430 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5431echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005432 (
5433 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005434## ------------------------------------------------ ##
5435## Report this to http://www.python.org/python-bugs ##
5436## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005437_ASBOX
5438 ) |
5439 sed "s/^/$as_me: WARNING: /" >&2
5440 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005441esac
5442echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5443echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5444if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5445 echo $ECHO_N "(cached) $ECHO_C" >&6
5446else
5447 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5448fi
5449echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5450echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5451
5452fi
5453if test $ac_cv_header_sys_sysmacros_h = yes; then
5454
5455cat >>confdefs.h <<\_ACEOF
5456#define MAJOR_IN_SYSMACROS 1
5457_ACEOF
5458
5459fi
5460
5461
5462 fi
5463fi
5464
Michael W. Hudson54241132001-12-07 15:38:26 +00005465
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005466# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005467
5468for ac_header in term.h
5469do
5470as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5471echo "$as_me:$LINENO: checking for $ac_header" >&5
5472echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5473if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005474 echo $ECHO_N "(cached) $ECHO_C" >&6
5475else
5476 cat >conftest.$ac_ext <<_ACEOF
5477/* confdefs.h. */
5478_ACEOF
5479cat confdefs.h >>conftest.$ac_ext
5480cat >>conftest.$ac_ext <<_ACEOF
5481/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005482
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005483#ifdef HAVE_CURSES_H
5484#include <curses.h>
5485#endif
5486
5487
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005488#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005489_ACEOF
5490rm -f conftest.$ac_objext
5491if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5492 (eval $ac_compile) 2>conftest.er1
5493 ac_status=$?
5494 grep -v '^ *+' conftest.er1 >conftest.err
5495 rm -f conftest.er1
5496 cat conftest.err >&5
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005499 { ac_try='test -z "$ac_c_werror_flag"
5500 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502 (eval $ac_try) 2>&5
5503 ac_status=$?
5504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505 (exit $ac_status); }; } &&
5506 { ac_try='test -s conftest.$ac_objext'
5507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508 (eval $ac_try) 2>&5
5509 ac_status=$?
5510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005512 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005513else
5514 echo "$as_me: failed program was:" >&5
5515sed 's/^/| /' conftest.$ac_ext >&5
5516
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005517eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005518fi
5519rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5520fi
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005521echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5522echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5523if test `eval echo '${'$as_ac_Header'}'` = yes; then
5524 cat >>confdefs.h <<_ACEOF
5525#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5526_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005527
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005528fi
5529
5530done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005531
5532
Martin v. Löwis11017b12006-01-14 18:12:57 +00005533# On Linux, netlink.h requires asm/types.h
5534
5535for ac_header in linux/netlink.h
5536do
5537as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538echo "$as_me:$LINENO: checking for $ac_header" >&5
5539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5540if eval "test \"\${$as_ac_Header+set}\" = set"; then
5541 echo $ECHO_N "(cached) $ECHO_C" >&6
5542else
5543 cat >conftest.$ac_ext <<_ACEOF
5544/* confdefs.h. */
5545_ACEOF
5546cat confdefs.h >>conftest.$ac_ext
5547cat >>conftest.$ac_ext <<_ACEOF
5548/* end confdefs.h. */
5549
5550#ifdef HAVE_ASM_TYPES_H
5551#include <asm/types.h>
5552#endif
5553#ifdef HAVE_SYS_SOCKET_H
5554#include <sys/socket.h>
5555#endif
5556
5557
5558#include <$ac_header>
5559_ACEOF
5560rm -f conftest.$ac_objext
5561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5562 (eval $ac_compile) 2>conftest.er1
5563 ac_status=$?
5564 grep -v '^ *+' conftest.er1 >conftest.err
5565 rm -f conftest.er1
5566 cat conftest.err >&5
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); } &&
5569 { ac_try='test -z "$ac_c_werror_flag"
5570 || test ! -s conftest.err'
5571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5572 (eval $ac_try) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); }; } &&
5576 { ac_try='test -s conftest.$ac_objext'
5577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578 (eval $ac_try) 2>&5
5579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); }; }; then
5582 eval "$as_ac_Header=yes"
5583else
5584 echo "$as_me: failed program was:" >&5
5585sed 's/^/| /' conftest.$ac_ext >&5
5586
5587eval "$as_ac_Header=no"
5588fi
5589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5590fi
5591echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5592echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5593if test `eval echo '${'$as_ac_Header'}'` = yes; then
5594 cat >>confdefs.h <<_ACEOF
5595#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5596_ACEOF
5597
5598fi
5599
5600done
5601
5602
Guido van Rossum627b2d71993-12-24 10:39:16 +00005603# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005604was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005605echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5606echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005608/* confdefs.h. */
5609_ACEOF
5610cat confdefs.h >>conftest.$ac_ext
5611cat >>conftest.$ac_ext <<_ACEOF
5612/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005614
5615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005617 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005618 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005619else
Martin v. Löwis11437992002-04-12 09:54:03 +00005620
5621
5622cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005624_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005625
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005626
Guido van Rossum627b2d71993-12-24 10:39:16 +00005627fi
5628rm -f conftest*
5629
Martin v. Löwis11437992002-04-12 09:54:03 +00005630echo "$as_me:$LINENO: result: $was_it_defined" >&5
5631echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005632
Neal Norwitz11690112002-07-30 01:08:28 +00005633# Check whether using makedev requires defining _OSF_SOURCE
5634echo "$as_me:$LINENO: checking for makedev" >&5
5635echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005637/* confdefs.h. */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005642#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005643int
5644main ()
5645{
5646 makedev(0, 0)
5647 ;
5648 return 0;
5649}
5650_ACEOF
5651rm -f conftest.$ac_objext conftest$ac_exeext
5652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005653 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005655 grep -v '^ *+' conftest.er1 >conftest.err
5656 rm -f conftest.er1
5657 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005660 { ac_try='test -z "$ac_c_werror_flag"
5661 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5663 (eval $ac_try) 2>&5
5664 ac_status=$?
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); }; } &&
5667 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5669 (eval $ac_try) 2>&5
5670 ac_status=$?
5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672 (exit $ac_status); }; }; then
5673 ac_cv_has_makedev=yes
5674else
5675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005676sed 's/^/| /' conftest.$ac_ext >&5
5677
Neal Norwitz11690112002-07-30 01:08:28 +00005678ac_cv_has_makedev=no
5679fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680rm -f conftest.err conftest.$ac_objext \
5681 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005682if test "$ac_cv_has_makedev" = "no"; then
5683 # we didn't link, try if _OSF_SOURCE will allow us to link
5684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005685/* confdefs.h. */
5686_ACEOF
5687cat confdefs.h >>conftest.$ac_ext
5688cat >>conftest.$ac_ext <<_ACEOF
5689/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005690
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005691#define _OSF_SOURCE 1
5692#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005693
Neal Norwitz11690112002-07-30 01:08:28 +00005694int
5695main ()
5696{
5697 makedev(0, 0)
5698 ;
5699 return 0;
5700}
5701_ACEOF
5702rm -f conftest.$ac_objext conftest$ac_exeext
5703if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005704 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005706 grep -v '^ *+' conftest.er1 >conftest.err
5707 rm -f conftest.er1
5708 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005711 { ac_try='test -z "$ac_c_werror_flag"
5712 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5714 (eval $ac_try) 2>&5
5715 ac_status=$?
5716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5717 (exit $ac_status); }; } &&
5718 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5720 (eval $ac_try) 2>&5
5721 ac_status=$?
5722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723 (exit $ac_status); }; }; then
5724 ac_cv_has_makedev=yes
5725else
5726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005727sed 's/^/| /' conftest.$ac_ext >&5
5728
Neal Norwitz11690112002-07-30 01:08:28 +00005729ac_cv_has_makedev=no
5730fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731rm -f conftest.err conftest.$ac_objext \
5732 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005733 if test "$ac_cv_has_makedev" = "yes"; then
5734
5735cat >>confdefs.h <<\_ACEOF
5736#define _OSF_SOURCE 1
5737_ACEOF
5738
5739 fi
5740fi
5741echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5742echo "${ECHO_T}$ac_cv_has_makedev" >&6
5743if test "$ac_cv_has_makedev" = "yes"; then
5744
5745cat >>confdefs.h <<\_ACEOF
5746#define HAVE_MAKEDEV 1
5747_ACEOF
5748
5749fi
5750
Martin v. Löwis399a6892002-10-04 10:22:02 +00005751# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5752# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5753# defined, but the compiler does not support pragma redefine_extname,
5754# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5755# structures (such as rlimit64) without declaring them. As a
5756# work-around, disable LFS on such configurations
5757
5758use_lfs=yes
5759echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5760echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005762/* confdefs.h. */
5763_ACEOF
5764cat confdefs.h >>conftest.$ac_ext
5765cat >>conftest.$ac_ext <<_ACEOF
5766/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005767
5768#define _LARGEFILE_SOURCE 1
5769#define _FILE_OFFSET_BITS 64
5770#include <sys/resource.h>
5771
Martin v. Löwis399a6892002-10-04 10:22:02 +00005772int
5773main ()
5774{
5775struct rlimit foo;
5776 ;
5777 return 0;
5778}
5779_ACEOF
5780rm -f conftest.$ac_objext
5781if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005782 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 grep -v '^ *+' conftest.er1 >conftest.err
5785 rm -f conftest.er1
5786 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005789 { ac_try='test -z "$ac_c_werror_flag"
5790 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5792 (eval $ac_try) 2>&5
5793 ac_status=$?
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); }; } &&
5796 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5798 (eval $ac_try) 2>&5
5799 ac_status=$?
5800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5801 (exit $ac_status); }; }; then
5802 sol_lfs_bug=no
5803else
5804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005805sed 's/^/| /' conftest.$ac_ext >&5
5806
Martin v. Löwis399a6892002-10-04 10:22:02 +00005807sol_lfs_bug=yes
5808fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005810echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5811echo "${ECHO_T}$sol_lfs_bug" >&6
5812if test "$sol_lfs_bug" = "yes"; then
5813 use_lfs=no
5814fi
5815
5816if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005817# Two defines needed to enable largefile support on various platforms
5818# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005819
Martin v. Löwis11437992002-04-12 09:54:03 +00005820cat >>confdefs.h <<\_ACEOF
5821#define _LARGEFILE_SOURCE 1
5822_ACEOF
5823
5824
5825cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005826#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005827_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005828
Martin v. Löwis399a6892002-10-04 10:22:02 +00005829fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005830
Guido van Rossum84e7b241996-08-19 21:59:00 +00005831# Add some code to confdefs.h so that the test for off_t works on SCO
5832cat >> confdefs.h <<\EOF
5833#if defined(SCO_DS)
5834#undef _OFF_T
5835#endif
5836EOF
5837
Guido van Rossumef2255b2000-03-10 22:30:29 +00005838# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005839echo "$as_me:$LINENO: checking for mode_t" >&5
5840echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5841if test "${ac_cv_type_mode_t+set}" = set; then
5842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005843else
Martin v. Löwis11437992002-04-12 09:54:03 +00005844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005845/* confdefs.h. */
5846_ACEOF
5847cat confdefs.h >>conftest.$ac_ext
5848cat >>conftest.$ac_ext <<_ACEOF
5849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005850$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005851int
5852main ()
5853{
5854if ((mode_t *) 0)
5855 return 0;
5856if (sizeof (mode_t))
5857 return 0;
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005864 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005871 { ac_try='test -z "$ac_c_werror_flag"
5872 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5874 (eval $ac_try) 2>&5
5875 ac_status=$?
5876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5877 (exit $ac_status); }; } &&
5878 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5880 (eval $ac_try) 2>&5
5881 ac_status=$?
5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5883 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005884 ac_cv_type_mode_t=yes
5885else
Martin v. Löwis11437992002-04-12 09:54:03 +00005886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005887sed 's/^/| /' conftest.$ac_ext >&5
5888
Martin v. Löwis11437992002-04-12 09:54:03 +00005889ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005890fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005891rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005892fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005893echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5894echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5895if test $ac_cv_type_mode_t = yes; then
5896 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897else
Martin v. Löwis11437992002-04-12 09:54:03 +00005898
5899cat >>confdefs.h <<_ACEOF
5900#define mode_t int
5901_ACEOF
5902
5903fi
5904
5905echo "$as_me:$LINENO: checking for off_t" >&5
5906echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5907if test "${ac_cv_type_off_t+set}" = set; then
5908 echo $ECHO_N "(cached) $ECHO_C" >&6
5909else
5910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005911/* confdefs.h. */
5912_ACEOF
5913cat confdefs.h >>conftest.$ac_ext
5914cat >>conftest.$ac_ext <<_ACEOF
5915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005917int
5918main ()
5919{
5920if ((off_t *) 0)
5921 return 0;
5922if (sizeof (off_t))
5923 return 0;
5924 ;
5925 return 0;
5926}
5927_ACEOF
5928rm -f conftest.$ac_objext
5929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005930 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005932 grep -v '^ *+' conftest.er1 >conftest.err
5933 rm -f conftest.er1
5934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005937 { ac_try='test -z "$ac_c_werror_flag"
5938 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; } &&
5944 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946 (eval $ac_try) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005950 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005951else
Martin v. Löwis11437992002-04-12 09:54:03 +00005952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005953sed 's/^/| /' conftest.$ac_ext >&5
5954
Martin v. Löwis11437992002-04-12 09:54:03 +00005955ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005956fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005959echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5960echo "${ECHO_T}$ac_cv_type_off_t" >&6
5961if test $ac_cv_type_off_t = yes; then
5962 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963else
Martin v. Löwis11437992002-04-12 09:54:03 +00005964
5965cat >>confdefs.h <<_ACEOF
5966#define off_t long
5967_ACEOF
5968
5969fi
5970
5971echo "$as_me:$LINENO: checking for pid_t" >&5
5972echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5973if test "${ac_cv_type_pid_t+set}" = set; then
5974 echo $ECHO_N "(cached) $ECHO_C" >&6
5975else
5976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005977/* confdefs.h. */
5978_ACEOF
5979cat confdefs.h >>conftest.$ac_ext
5980cat >>conftest.$ac_ext <<_ACEOF
5981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005982$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005983int
5984main ()
5985{
5986if ((pid_t *) 0)
5987 return 0;
5988if (sizeof (pid_t))
5989 return 0;
5990 ;
5991 return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext
5995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005996 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005998 grep -v '^ *+' conftest.er1 >conftest.err
5999 rm -f conftest.er1
6000 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006003 { ac_try='test -z "$ac_c_werror_flag"
6004 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
6010 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012 (eval $ac_try) 2>&5
6013 ac_status=$?
6014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006016 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017else
Martin v. Löwis11437992002-04-12 09:54:03 +00006018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006019sed 's/^/| /' conftest.$ac_ext >&5
6020
Martin v. Löwis11437992002-04-12 09:54:03 +00006021ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006022fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006024fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006025echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6026echo "${ECHO_T}$ac_cv_type_pid_t" >&6
6027if test $ac_cv_type_pid_t = yes; then
6028 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029else
Martin v. Löwis11437992002-04-12 09:54:03 +00006030
6031cat >>confdefs.h <<_ACEOF
6032#define pid_t int
6033_ACEOF
6034
6035fi
6036
6037echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6038echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6039if test "${ac_cv_type_signal+set}" = set; then
6040 echo $ECHO_N "(cached) $ECHO_C" >&6
6041else
6042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006043/* confdefs.h. */
6044_ACEOF
6045cat confdefs.h >>conftest.$ac_ext
6046cat >>conftest.$ac_ext <<_ACEOF
6047/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006048#include <sys/types.h>
6049#include <signal.h>
6050#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006051# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00006052#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006053#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006054extern "C" void (*signal (int, void (*)(int)))(int);
6055#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006056void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006057#endif
6058
Martin v. Löwis11437992002-04-12 09:54:03 +00006059int
6060main ()
6061{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006062int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006063 ;
6064 return 0;
6065}
6066_ACEOF
6067rm -f conftest.$ac_objext
6068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006069 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006071 grep -v '^ *+' conftest.er1 >conftest.err
6072 rm -f conftest.er1
6073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006076 { ac_try='test -z "$ac_c_werror_flag"
6077 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6079 (eval $ac_try) 2>&5
6080 ac_status=$?
6081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6082 (exit $ac_status); }; } &&
6083 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6085 (eval $ac_try) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006089 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006090else
Martin v. Löwis11437992002-04-12 09:54:03 +00006091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006092sed 's/^/| /' conftest.$ac_ext >&5
6093
Martin v. Löwis11437992002-04-12 09:54:03 +00006094ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006095fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006098echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6099echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006100
Martin v. Löwis11437992002-04-12 09:54:03 +00006101cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006103_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006104
Michael W. Hudson54241132001-12-07 15:38:26 +00006105
Martin v. Löwis11437992002-04-12 09:54:03 +00006106echo "$as_me:$LINENO: checking for size_t" >&5
6107echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6108if test "${ac_cv_type_size_t+set}" = set; then
6109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110else
Martin v. Löwis11437992002-04-12 09:54:03 +00006111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006112/* confdefs.h. */
6113_ACEOF
6114cat confdefs.h >>conftest.$ac_ext
6115cat >>conftest.$ac_ext <<_ACEOF
6116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006117$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006118int
6119main ()
6120{
6121if ((size_t *) 0)
6122 return 0;
6123if (sizeof (size_t))
6124 return 0;
6125 ;
6126 return 0;
6127}
6128_ACEOF
6129rm -f conftest.$ac_objext
6130if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006131 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 grep -v '^ *+' conftest.er1 >conftest.err
6134 rm -f conftest.er1
6135 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006138 { ac_try='test -z "$ac_c_werror_flag"
6139 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6141 (eval $ac_try) 2>&5
6142 ac_status=$?
6143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6144 (exit $ac_status); }; } &&
6145 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6147 (eval $ac_try) 2>&5
6148 ac_status=$?
6149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006151 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006152else
Martin v. Löwis11437992002-04-12 09:54:03 +00006153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006154sed 's/^/| /' conftest.$ac_ext >&5
6155
Martin v. Löwis11437992002-04-12 09:54:03 +00006156ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006157fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006158rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006160echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6161echo "${ECHO_T}$ac_cv_type_size_t" >&6
6162if test $ac_cv_type_size_t = yes; then
6163 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164else
Martin v. Löwis11437992002-04-12 09:54:03 +00006165
6166cat >>confdefs.h <<_ACEOF
6167#define size_t unsigned
6168_ACEOF
6169
6170fi
6171
6172echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6173echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6174if test "${ac_cv_type_uid_t+set}" = set; then
6175 echo $ECHO_N "(cached) $ECHO_C" >&6
6176else
6177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006178/* confdefs.h. */
6179_ACEOF
6180cat confdefs.h >>conftest.$ac_ext
6181cat >>conftest.$ac_ext <<_ACEOF
6182/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006184
6185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006187 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006188 ac_cv_type_uid_t=yes
6189else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006190 ac_cv_type_uid_t=no
6191fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006192rm -f conftest*
6193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006195echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6196echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006197if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198
Martin v. Löwis11437992002-04-12 09:54:03 +00006199cat >>confdefs.h <<\_ACEOF
6200#define uid_t int
6201_ACEOF
6202
6203
6204cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006206_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207
6208fi
6209
Martin v. Löwis18e16552006-02-15 17:27:45 +00006210echo "$as_me:$LINENO: checking for ssize_t" >&5
6211echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6212if test "${ac_cv_type_ssize_t+set}" = set; then
6213 echo $ECHO_N "(cached) $ECHO_C" >&6
6214else
6215 cat >conftest.$ac_ext <<_ACEOF
6216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
6221$ac_includes_default
6222int
6223main ()
6224{
6225if ((ssize_t *) 0)
6226 return 0;
6227if (sizeof (ssize_t))
6228 return 0;
6229 ;
6230 return 0;
6231}
6232_ACEOF
6233rm -f conftest.$ac_objext
6234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6235 (eval $ac_compile) 2>conftest.er1
6236 ac_status=$?
6237 grep -v '^ *+' conftest.er1 >conftest.err
6238 rm -f conftest.er1
6239 cat conftest.err >&5
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); } &&
6242 { ac_try='test -z "$ac_c_werror_flag"
6243 || test ! -s conftest.err'
6244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6245 (eval $ac_try) 2>&5
6246 ac_status=$?
6247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248 (exit $ac_status); }; } &&
6249 { ac_try='test -s conftest.$ac_objext'
6250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6251 (eval $ac_try) 2>&5
6252 ac_status=$?
6253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6254 (exit $ac_status); }; }; then
6255 ac_cv_type_ssize_t=yes
6256else
6257 echo "$as_me: failed program was:" >&5
6258sed 's/^/| /' conftest.$ac_ext >&5
6259
6260ac_cv_type_ssize_t=no
6261fi
6262rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6263fi
6264echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6265echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
6266if test $ac_cv_type_ssize_t = yes; then
6267
6268cat >>confdefs.h <<\_ACEOF
6269#define HAVE_SSIZE_T 1
6270_ACEOF
6271
6272fi
6273
Jack Jansendd19cf82001-12-06 22:36:17 +00006274
Michael W. Hudson54241132001-12-07 15:38:26 +00006275# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006276# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006277echo "$as_me:$LINENO: checking for int" >&5
6278echo $ECHO_N "checking for int... $ECHO_C" >&6
6279if test "${ac_cv_type_int+set}" = set; then
6280 echo $ECHO_N "(cached) $ECHO_C" >&6
6281else
6282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* confdefs.h. */
6284_ACEOF
6285cat confdefs.h >>conftest.$ac_ext
6286cat >>conftest.$ac_ext <<_ACEOF
6287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006288$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006289int
6290main ()
6291{
6292if ((int *) 0)
6293 return 0;
6294if (sizeof (int))
6295 return 0;
6296 ;
6297 return 0;
6298}
6299_ACEOF
6300rm -f conftest.$ac_objext
6301if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006302 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 grep -v '^ *+' conftest.er1 >conftest.err
6305 rm -f conftest.er1
6306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006309 { ac_try='test -z "$ac_c_werror_flag"
6310 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6312 (eval $ac_try) 2>&5
6313 ac_status=$?
6314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6315 (exit $ac_status); }; } &&
6316 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6318 (eval $ac_try) 2>&5
6319 ac_status=$?
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6321 (exit $ac_status); }; }; then
6322 ac_cv_type_int=yes
6323else
6324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006325sed 's/^/| /' conftest.$ac_ext >&5
6326
Martin v. Löwis11437992002-04-12 09:54:03 +00006327ac_cv_type_int=no
6328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006330fi
6331echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6332echo "${ECHO_T}$ac_cv_type_int" >&6
6333
6334echo "$as_me:$LINENO: checking size of int" >&5
6335echo $ECHO_N "checking size of int... $ECHO_C" >&6
6336if test "${ac_cv_sizeof_int+set}" = set; then
6337 echo $ECHO_N "(cached) $ECHO_C" >&6
6338else
6339 if test "$ac_cv_type_int" = yes; then
6340 # The cast to unsigned long works around a bug in the HP C Compiler
6341 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6342 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6343 # This bug is HP SR number 8606223364.
6344 if test "$cross_compiling" = yes; then
6345 # Depending upon the size, compute the lo and hi bounds.
6346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006347/* confdefs.h. */
6348_ACEOF
6349cat confdefs.h >>conftest.$ac_ext
6350cat >>conftest.$ac_ext <<_ACEOF
6351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006352$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006353int
6354main ()
6355{
6356static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6357test_array [0] = 0
6358
6359 ;
6360 return 0;
6361}
6362_ACEOF
6363rm -f conftest.$ac_objext
6364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006365 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006367 grep -v '^ *+' conftest.er1 >conftest.err
6368 rm -f conftest.er1
6369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006372 { ac_try='test -z "$ac_c_werror_flag"
6373 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6375 (eval $ac_try) 2>&5
6376 ac_status=$?
6377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6378 (exit $ac_status); }; } &&
6379 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6381 (eval $ac_try) 2>&5
6382 ac_status=$?
6383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6384 (exit $ac_status); }; }; then
6385 ac_lo=0 ac_mid=0
6386 while :; do
6387 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006388/* confdefs.h. */
6389_ACEOF
6390cat confdefs.h >>conftest.$ac_ext
6391cat >>conftest.$ac_ext <<_ACEOF
6392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006393$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006394int
6395main ()
6396{
6397static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6398test_array [0] = 0
6399
6400 ;
6401 return 0;
6402}
6403_ACEOF
6404rm -f conftest.$ac_objext
6405if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006406 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006408 grep -v '^ *+' conftest.er1 >conftest.err
6409 rm -f conftest.er1
6410 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006413 { ac_try='test -z "$ac_c_werror_flag"
6414 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6416 (eval $ac_try) 2>&5
6417 ac_status=$?
6418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6419 (exit $ac_status); }; } &&
6420 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6422 (eval $ac_try) 2>&5
6423 ac_status=$?
6424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6425 (exit $ac_status); }; }; then
6426 ac_hi=$ac_mid; break
6427else
6428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006429sed 's/^/| /' conftest.$ac_ext >&5
6430
Martin v. Löwis11437992002-04-12 09:54:03 +00006431ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006432 if test $ac_lo -le $ac_mid; then
6433 ac_lo= ac_hi=
6434 break
6435 fi
6436 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006437fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006439 done
6440else
6441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006442sed 's/^/| /' conftest.$ac_ext >&5
6443
Martin v. Löwis11437992002-04-12 09:54:03 +00006444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006445/* confdefs.h. */
6446_ACEOF
6447cat confdefs.h >>conftest.$ac_ext
6448cat >>conftest.$ac_ext <<_ACEOF
6449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006450$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006451int
6452main ()
6453{
6454static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6455test_array [0] = 0
6456
6457 ;
6458 return 0;
6459}
6460_ACEOF
6461rm -f conftest.$ac_objext
6462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006463 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006465 grep -v '^ *+' conftest.er1 >conftest.err
6466 rm -f conftest.er1
6467 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6469 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006470 { ac_try='test -z "$ac_c_werror_flag"
6471 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6473 (eval $ac_try) 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); }; } &&
6477 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6479 (eval $ac_try) 2>&5
6480 ac_status=$?
6481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482 (exit $ac_status); }; }; then
6483 ac_hi=-1 ac_mid=-1
6484 while :; do
6485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006486/* confdefs.h. */
6487_ACEOF
6488cat confdefs.h >>conftest.$ac_ext
6489cat >>conftest.$ac_ext <<_ACEOF
6490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006491$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006492int
6493main ()
6494{
6495static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6496test_array [0] = 0
6497
6498 ;
6499 return 0;
6500}
6501_ACEOF
6502rm -f conftest.$ac_objext
6503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006504 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006506 grep -v '^ *+' conftest.er1 >conftest.err
6507 rm -f conftest.er1
6508 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6510 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006511 { ac_try='test -z "$ac_c_werror_flag"
6512 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; } &&
6518 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6520 (eval $ac_try) 2>&5
6521 ac_status=$?
6522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523 (exit $ac_status); }; }; then
6524 ac_lo=$ac_mid; break
6525else
6526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006527sed 's/^/| /' conftest.$ac_ext >&5
6528
Martin v. Löwis11437992002-04-12 09:54:03 +00006529ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006530 if test $ac_mid -le $ac_hi; then
6531 ac_lo= ac_hi=
6532 break
6533 fi
6534 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006535fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006537 done
6538else
6539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006540sed 's/^/| /' conftest.$ac_ext >&5
6541
Martin v. Löwis11437992002-04-12 09:54:03 +00006542ac_lo= ac_hi=
6543fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006544rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006545fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006546rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006547# Binary search between lo and hi bounds.
6548while test "x$ac_lo" != "x$ac_hi"; do
6549 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006551/* confdefs.h. */
6552_ACEOF
6553cat confdefs.h >>conftest.$ac_ext
6554cat >>conftest.$ac_ext <<_ACEOF
6555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006557int
6558main ()
6559{
6560static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6561test_array [0] = 0
6562
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext
6568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006569 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 grep -v '^ *+' conftest.er1 >conftest.err
6572 rm -f conftest.er1
6573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006576 { ac_try='test -z "$ac_c_werror_flag"
6577 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6579 (eval $ac_try) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); }; } &&
6583 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6585 (eval $ac_try) 2>&5
6586 ac_status=$?
6587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 ac_hi=$ac_mid
6590else
6591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006592sed 's/^/| /' conftest.$ac_ext >&5
6593
Martin v. Löwis11437992002-04-12 09:54:03 +00006594ac_lo=`expr '(' $ac_mid ')' + 1`
6595fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006596rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006597done
6598case $ac_lo in
6599?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006600'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6601See \`config.log' for more details." >&5
6602echo "$as_me: error: cannot compute sizeof (int), 77
6603See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006604 { (exit 1); exit 1; }; } ;;
6605esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006606else
6607 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006608 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6609See \`config.log' for more details." >&5
6610echo "$as_me: error: cannot run test program while cross compiling
6611See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006612 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006613else
Martin v. Löwis11437992002-04-12 09:54:03 +00006614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006615/* confdefs.h. */
6616_ACEOF
6617cat confdefs.h >>conftest.$ac_ext
6618cat >>conftest.$ac_ext <<_ACEOF
6619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006620$ac_includes_default
6621long longval () { return (long) (sizeof (int)); }
6622unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006623#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006624#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006625int
6626main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006627{
Martin v. Löwis11437992002-04-12 09:54:03 +00006628
6629 FILE *f = fopen ("conftest.val", "w");
6630 if (! f)
6631 exit (1);
6632 if (((long) (sizeof (int))) < 0)
6633 {
6634 long i = longval ();
6635 if (i != ((long) (sizeof (int))))
6636 exit (1);
6637 fprintf (f, "%ld\n", i);
6638 }
6639 else
6640 {
6641 unsigned long i = ulongval ();
6642 if (i != ((long) (sizeof (int))))
6643 exit (1);
6644 fprintf (f, "%lu\n", i);
6645 }
6646 exit (ferror (f) || fclose (f) != 0);
6647
6648 ;
6649 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006650}
Martin v. Löwis11437992002-04-12 09:54:03 +00006651_ACEOF
6652rm -f conftest$ac_exeext
6653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6654 (eval $ac_link) 2>&5
6655 ac_status=$?
6656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6657 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6659 (eval $ac_try) 2>&5
6660 ac_status=$?
6661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662 (exit $ac_status); }; }; then
6663 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006664else
Martin v. Löwis11437992002-04-12 09:54:03 +00006665 echo "$as_me: program exited with status $ac_status" >&5
6666echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006667sed 's/^/| /' conftest.$ac_ext >&5
6668
Martin v. Löwis11437992002-04-12 09:54:03 +00006669( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006670{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6671See \`config.log' for more details." >&5
6672echo "$as_me: error: cannot compute sizeof (int), 77
6673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006674 { (exit 1); exit 1; }; }
6675fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006676rm -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 +00006677fi
6678fi
6679rm -f conftest.val
6680else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006681 ac_cv_sizeof_int=0
6682fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006684echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6685echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6686cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006687#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006688_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006689
6690
Martin v. Löwis11437992002-04-12 09:54:03 +00006691echo "$as_me:$LINENO: checking for long" >&5
6692echo $ECHO_N "checking for long... $ECHO_C" >&6
6693if test "${ac_cv_type_long+set}" = set; then
6694 echo $ECHO_N "(cached) $ECHO_C" >&6
6695else
6696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006697/* confdefs.h. */
6698_ACEOF
6699cat confdefs.h >>conftest.$ac_ext
6700cat >>conftest.$ac_ext <<_ACEOF
6701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006703int
6704main ()
6705{
6706if ((long *) 0)
6707 return 0;
6708if (sizeof (long))
6709 return 0;
6710 ;
6711 return 0;
6712}
6713_ACEOF
6714rm -f conftest.$ac_objext
6715if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006716 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006718 grep -v '^ *+' conftest.er1 >conftest.err
6719 rm -f conftest.er1
6720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006723 { ac_try='test -z "$ac_c_werror_flag"
6724 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6726 (eval $ac_try) 2>&5
6727 ac_status=$?
6728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6729 (exit $ac_status); }; } &&
6730 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6732 (eval $ac_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6735 (exit $ac_status); }; }; then
6736 ac_cv_type_long=yes
6737else
6738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006739sed 's/^/| /' conftest.$ac_ext >&5
6740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741ac_cv_type_long=no
6742fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
6745echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6746echo "${ECHO_T}$ac_cv_type_long" >&6
6747
6748echo "$as_me:$LINENO: checking size of long" >&5
6749echo $ECHO_N "checking size of long... $ECHO_C" >&6
6750if test "${ac_cv_sizeof_long+set}" = set; then
6751 echo $ECHO_N "(cached) $ECHO_C" >&6
6752else
6753 if test "$ac_cv_type_long" = yes; then
6754 # The cast to unsigned long works around a bug in the HP C Compiler
6755 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6756 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6757 # This bug is HP SR number 8606223364.
6758 if test "$cross_compiling" = yes; then
6759 # Depending upon the size, compute the lo and hi bounds.
6760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006761/* confdefs.h. */
6762_ACEOF
6763cat confdefs.h >>conftest.$ac_ext
6764cat >>conftest.$ac_ext <<_ACEOF
6765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006766$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006767int
6768main ()
6769{
6770static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6771test_array [0] = 0
6772
6773 ;
6774 return 0;
6775}
6776_ACEOF
6777rm -f conftest.$ac_objext
6778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006781 grep -v '^ *+' conftest.er1 >conftest.err
6782 rm -f conftest.er1
6783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006786 { ac_try='test -z "$ac_c_werror_flag"
6787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789 (eval $ac_try) 2>&5
6790 ac_status=$?
6791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792 (exit $ac_status); }; } &&
6793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6795 (eval $ac_try) 2>&5
6796 ac_status=$?
6797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798 (exit $ac_status); }; }; then
6799 ac_lo=0 ac_mid=0
6800 while :; do
6801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006808int
6809main ()
6810{
6811static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6812test_array [0] = 0
6813
6814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006820 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006822 grep -v '^ *+' conftest.er1 >conftest.err
6823 rm -f conftest.er1
6824 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006827 { ac_try='test -z "$ac_c_werror_flag"
6828 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6830 (eval $ac_try) 2>&5
6831 ac_status=$?
6832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6833 (exit $ac_status); }; } &&
6834 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6836 (eval $ac_try) 2>&5
6837 ac_status=$?
6838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6839 (exit $ac_status); }; }; then
6840 ac_hi=$ac_mid; break
6841else
6842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006846 if test $ac_lo -le $ac_mid; then
6847 ac_lo= ac_hi=
6848 break
6849 fi
6850 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006851fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006852rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 done
6854else
6855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006856sed 's/^/| /' conftest.$ac_ext >&5
6857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006859/* confdefs.h. */
6860_ACEOF
6861cat confdefs.h >>conftest.$ac_ext
6862cat >>conftest.$ac_ext <<_ACEOF
6863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006864$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006865int
6866main ()
6867{
6868static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6869test_array [0] = 0
6870
6871 ;
6872 return 0;
6873}
6874_ACEOF
6875rm -f conftest.$ac_objext
6876if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006877 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006879 grep -v '^ *+' conftest.er1 >conftest.err
6880 rm -f conftest.er1
6881 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006884 { ac_try='test -z "$ac_c_werror_flag"
6885 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6887 (eval $ac_try) 2>&5
6888 ac_status=$?
6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890 (exit $ac_status); }; } &&
6891 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6893 (eval $ac_try) 2>&5
6894 ac_status=$?
6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896 (exit $ac_status); }; }; then
6897 ac_hi=-1 ac_mid=-1
6898 while :; do
6899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006900/* confdefs.h. */
6901_ACEOF
6902cat confdefs.h >>conftest.$ac_ext
6903cat >>conftest.$ac_ext <<_ACEOF
6904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006905$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006906int
6907main ()
6908{
6909static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6910test_array [0] = 0
6911
6912 ;
6913 return 0;
6914}
6915_ACEOF
6916rm -f conftest.$ac_objext
6917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006918 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006920 grep -v '^ *+' conftest.er1 >conftest.err
6921 rm -f conftest.er1
6922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6924 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006925 { ac_try='test -z "$ac_c_werror_flag"
6926 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928 (eval $ac_try) 2>&5
6929 ac_status=$?
6930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931 (exit $ac_status); }; } &&
6932 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6934 (eval $ac_try) 2>&5
6935 ac_status=$?
6936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6937 (exit $ac_status); }; }; then
6938 ac_lo=$ac_mid; break
6939else
6940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006941sed 's/^/| /' conftest.$ac_ext >&5
6942
Martin v. Löwis11437992002-04-12 09:54:03 +00006943ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006944 if test $ac_mid -le $ac_hi; then
6945 ac_lo= ac_hi=
6946 break
6947 fi
6948 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006949fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006951 done
6952else
6953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006954sed 's/^/| /' conftest.$ac_ext >&5
6955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956ac_lo= ac_hi=
6957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006961# Binary search between lo and hi bounds.
6962while test "x$ac_lo" != "x$ac_hi"; do
6963 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006965/* confdefs.h. */
6966_ACEOF
6967cat confdefs.h >>conftest.$ac_ext
6968cat >>conftest.$ac_ext <<_ACEOF
6969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006970$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006971int
6972main ()
6973{
6974static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6975test_array [0] = 0
6976
6977 ;
6978 return 0;
6979}
6980_ACEOF
6981rm -f conftest.$ac_objext
6982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006983 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006985 grep -v '^ *+' conftest.er1 >conftest.err
6986 rm -f conftest.er1
6987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006990 { ac_try='test -z "$ac_c_werror_flag"
6991 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; } &&
6997 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6999 (eval $ac_try) 2>&5
7000 ac_status=$?
7001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7002 (exit $ac_status); }; }; then
7003 ac_hi=$ac_mid
7004else
7005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007006sed 's/^/| /' conftest.$ac_ext >&5
7007
Martin v. Löwis11437992002-04-12 09:54:03 +00007008ac_lo=`expr '(' $ac_mid ')' + 1`
7009fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007010rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007011done
7012case $ac_lo in
7013?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007014'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7015See \`config.log' for more details." >&5
7016echo "$as_me: error: cannot compute sizeof (long), 77
7017See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007018 { (exit 1); exit 1; }; } ;;
7019esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007020else
7021 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007022 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7023See \`config.log' for more details." >&5
7024echo "$as_me: error: cannot run test program while cross compiling
7025See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007026 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007027else
Martin v. Löwis11437992002-04-12 09:54:03 +00007028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007034$ac_includes_default
7035long longval () { return (long) (sizeof (long)); }
7036unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007037#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007038#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007039int
7040main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007041{
Martin v. Löwis11437992002-04-12 09:54:03 +00007042
7043 FILE *f = fopen ("conftest.val", "w");
7044 if (! f)
7045 exit (1);
7046 if (((long) (sizeof (long))) < 0)
7047 {
7048 long i = longval ();
7049 if (i != ((long) (sizeof (long))))
7050 exit (1);
7051 fprintf (f, "%ld\n", i);
7052 }
7053 else
7054 {
7055 unsigned long i = ulongval ();
7056 if (i != ((long) (sizeof (long))))
7057 exit (1);
7058 fprintf (f, "%lu\n", i);
7059 }
7060 exit (ferror (f) || fclose (f) != 0);
7061
7062 ;
7063 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007064}
Martin v. Löwis11437992002-04-12 09:54:03 +00007065_ACEOF
7066rm -f conftest$ac_exeext
7067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7068 (eval $ac_link) 2>&5
7069 ac_status=$?
7070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7073 (eval $ac_try) 2>&5
7074 ac_status=$?
7075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076 (exit $ac_status); }; }; then
7077 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007078else
Martin v. Löwis11437992002-04-12 09:54:03 +00007079 echo "$as_me: program exited with status $ac_status" >&5
7080echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007081sed 's/^/| /' conftest.$ac_ext >&5
7082
Martin v. Löwis11437992002-04-12 09:54:03 +00007083( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007084{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7085See \`config.log' for more details." >&5
7086echo "$as_me: error: cannot compute sizeof (long), 77
7087See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007088 { (exit 1); exit 1; }; }
7089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007090rm -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 +00007091fi
7092fi
7093rm -f conftest.val
7094else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007095 ac_cv_sizeof_long=0
7096fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007098echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7099echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7100cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007101#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007102_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007103
7104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105echo "$as_me:$LINENO: checking for void *" >&5
7106echo $ECHO_N "checking for void *... $ECHO_C" >&6
7107if test "${ac_cv_type_void_p+set}" = set; then
7108 echo $ECHO_N "(cached) $ECHO_C" >&6
7109else
7110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007117int
7118main ()
7119{
7120if ((void * *) 0)
7121 return 0;
7122if (sizeof (void *))
7123 return 0;
7124 ;
7125 return 0;
7126}
7127_ACEOF
7128rm -f conftest.$ac_objext
7129if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007130 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007132 grep -v '^ *+' conftest.er1 >conftest.err
7133 rm -f conftest.er1
7134 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007137 { ac_try='test -z "$ac_c_werror_flag"
7138 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7140 (eval $ac_try) 2>&5
7141 ac_status=$?
7142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143 (exit $ac_status); }; } &&
7144 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7146 (eval $ac_try) 2>&5
7147 ac_status=$?
7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7149 (exit $ac_status); }; }; then
7150 ac_cv_type_void_p=yes
7151else
7152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007153sed 's/^/| /' conftest.$ac_ext >&5
7154
Martin v. Löwis11437992002-04-12 09:54:03 +00007155ac_cv_type_void_p=no
7156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007157rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007158fi
7159echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7160echo "${ECHO_T}$ac_cv_type_void_p" >&6
7161
7162echo "$as_me:$LINENO: checking size of void *" >&5
7163echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7164if test "${ac_cv_sizeof_void_p+set}" = set; then
7165 echo $ECHO_N "(cached) $ECHO_C" >&6
7166else
7167 if test "$ac_cv_type_void_p" = yes; then
7168 # The cast to unsigned long works around a bug in the HP C Compiler
7169 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7170 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7171 # This bug is HP SR number 8606223364.
7172 if test "$cross_compiling" = yes; then
7173 # Depending upon the size, compute the lo and hi bounds.
7174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007175/* confdefs.h. */
7176_ACEOF
7177cat confdefs.h >>conftest.$ac_ext
7178cat >>conftest.$ac_ext <<_ACEOF
7179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007180$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007181int
7182main ()
7183{
7184static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7185test_array [0] = 0
7186
7187 ;
7188 return 0;
7189}
7190_ACEOF
7191rm -f conftest.$ac_objext
7192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007193 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007195 grep -v '^ *+' conftest.er1 >conftest.err
7196 rm -f conftest.er1
7197 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007200 { ac_try='test -z "$ac_c_werror_flag"
7201 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7203 (eval $ac_try) 2>&5
7204 ac_status=$?
7205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7206 (exit $ac_status); }; } &&
7207 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7209 (eval $ac_try) 2>&5
7210 ac_status=$?
7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7212 (exit $ac_status); }; }; then
7213 ac_lo=0 ac_mid=0
7214 while :; do
7215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007216/* confdefs.h. */
7217_ACEOF
7218cat confdefs.h >>conftest.$ac_ext
7219cat >>conftest.$ac_ext <<_ACEOF
7220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007221$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007222int
7223main ()
7224{
7225static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7226test_array [0] = 0
7227
7228 ;
7229 return 0;
7230}
7231_ACEOF
7232rm -f conftest.$ac_objext
7233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007234 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007236 grep -v '^ *+' conftest.er1 >conftest.err
7237 rm -f conftest.er1
7238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007241 { ac_try='test -z "$ac_c_werror_flag"
7242 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7244 (eval $ac_try) 2>&5
7245 ac_status=$?
7246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7247 (exit $ac_status); }; } &&
7248 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7250 (eval $ac_try) 2>&5
7251 ac_status=$?
7252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7253 (exit $ac_status); }; }; then
7254 ac_hi=$ac_mid; break
7255else
7256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007257sed 's/^/| /' conftest.$ac_ext >&5
7258
Martin v. Löwis11437992002-04-12 09:54:03 +00007259ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007260 if test $ac_lo -le $ac_mid; then
7261 ac_lo= ac_hi=
7262 break
7263 fi
7264 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007265fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007267 done
7268else
7269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007270sed 's/^/| /' conftest.$ac_ext >&5
7271
Martin v. Löwis11437992002-04-12 09:54:03 +00007272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007273/* confdefs.h. */
7274_ACEOF
7275cat confdefs.h >>conftest.$ac_ext
7276cat >>conftest.$ac_ext <<_ACEOF
7277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007278$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007279int
7280main ()
7281{
7282static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7283test_array [0] = 0
7284
7285 ;
7286 return 0;
7287}
7288_ACEOF
7289rm -f conftest.$ac_objext
7290if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007291 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007293 grep -v '^ *+' conftest.er1 >conftest.err
7294 rm -f conftest.er1
7295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7297 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007298 { ac_try='test -z "$ac_c_werror_flag"
7299 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; } &&
7305 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7307 (eval $ac_try) 2>&5
7308 ac_status=$?
7309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7310 (exit $ac_status); }; }; then
7311 ac_hi=-1 ac_mid=-1
7312 while :; do
7313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007314/* confdefs.h. */
7315_ACEOF
7316cat confdefs.h >>conftest.$ac_ext
7317cat >>conftest.$ac_ext <<_ACEOF
7318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007319$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007320int
7321main ()
7322{
7323static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7324test_array [0] = 0
7325
7326 ;
7327 return 0;
7328}
7329_ACEOF
7330rm -f conftest.$ac_objext
7331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007332 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007334 grep -v '^ *+' conftest.er1 >conftest.err
7335 rm -f conftest.er1
7336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7338 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007339 { ac_try='test -z "$ac_c_werror_flag"
7340 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; } &&
7346 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7348 (eval $ac_try) 2>&5
7349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 ac_lo=$ac_mid; break
7353else
7354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007355sed 's/^/| /' conftest.$ac_ext >&5
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007358 if test $ac_mid -le $ac_hi; then
7359 ac_lo= ac_hi=
7360 break
7361 fi
7362 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007363fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007364rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 done
7366else
7367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007368sed 's/^/| /' conftest.$ac_ext >&5
7369
Martin v. Löwis11437992002-04-12 09:54:03 +00007370ac_lo= ac_hi=
7371fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007373fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007375# Binary search between lo and hi bounds.
7376while test "x$ac_lo" != "x$ac_hi"; do
7377 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007384$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007385int
7386main ()
7387{
7388static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7389test_array [0] = 0
7390
7391 ;
7392 return 0;
7393}
7394_ACEOF
7395rm -f conftest.$ac_objext
7396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007397 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007399 grep -v '^ *+' conftest.er1 >conftest.err
7400 rm -f conftest.er1
7401 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007404 { ac_try='test -z "$ac_c_werror_flag"
7405 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7407 (eval $ac_try) 2>&5
7408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); }; } &&
7411 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7413 (eval $ac_try) 2>&5
7414 ac_status=$?
7415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7416 (exit $ac_status); }; }; then
7417 ac_hi=$ac_mid
7418else
7419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007420sed 's/^/| /' conftest.$ac_ext >&5
7421
Martin v. Löwis11437992002-04-12 09:54:03 +00007422ac_lo=`expr '(' $ac_mid ')' + 1`
7423fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007424rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007425done
7426case $ac_lo in
7427?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007428'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7429See \`config.log' for more details." >&5
7430echo "$as_me: error: cannot compute sizeof (void *), 77
7431See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007432 { (exit 1); exit 1; }; } ;;
7433esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007434else
7435 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007436 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7437See \`config.log' for more details." >&5
7438echo "$as_me: error: cannot run test program while cross compiling
7439See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007440 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007441else
Martin v. Löwis11437992002-04-12 09:54:03 +00007442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007443/* confdefs.h. */
7444_ACEOF
7445cat confdefs.h >>conftest.$ac_ext
7446cat >>conftest.$ac_ext <<_ACEOF
7447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007448$ac_includes_default
7449long longval () { return (long) (sizeof (void *)); }
7450unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007451#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007452#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007453int
7454main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007455{
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457 FILE *f = fopen ("conftest.val", "w");
7458 if (! f)
7459 exit (1);
7460 if (((long) (sizeof (void *))) < 0)
7461 {
7462 long i = longval ();
7463 if (i != ((long) (sizeof (void *))))
7464 exit (1);
7465 fprintf (f, "%ld\n", i);
7466 }
7467 else
7468 {
7469 unsigned long i = ulongval ();
7470 if (i != ((long) (sizeof (void *))))
7471 exit (1);
7472 fprintf (f, "%lu\n", i);
7473 }
7474 exit (ferror (f) || fclose (f) != 0);
7475
7476 ;
7477 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007478}
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
7480rm -f conftest$ac_exeext
7481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7482 (eval $ac_link) 2>&5
7483 ac_status=$?
7484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7485 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7487 (eval $ac_try) 2>&5
7488 ac_status=$?
7489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7490 (exit $ac_status); }; }; then
7491 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007492else
Martin v. Löwis11437992002-04-12 09:54:03 +00007493 echo "$as_me: program exited with status $ac_status" >&5
7494echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007495sed 's/^/| /' conftest.$ac_ext >&5
7496
Martin v. Löwis11437992002-04-12 09:54:03 +00007497( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007498{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7499See \`config.log' for more details." >&5
7500echo "$as_me: error: cannot compute sizeof (void *), 77
7501See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007502 { (exit 1); exit 1; }; }
7503fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007504rm -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 +00007505fi
7506fi
7507rm -f conftest.val
7508else
Guido van Rossumad678af1998-10-02 14:42:15 +00007509 ac_cv_sizeof_void_p=0
7510fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007512echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7513echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7514cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007515#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007516_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007517
7518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519echo "$as_me:$LINENO: checking for short" >&5
7520echo $ECHO_N "checking for short... $ECHO_C" >&6
7521if test "${ac_cv_type_short+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7523else
7524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007525/* confdefs.h. */
7526_ACEOF
7527cat confdefs.h >>conftest.$ac_ext
7528cat >>conftest.$ac_ext <<_ACEOF
7529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007530$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007531int
7532main ()
7533{
7534if ((short *) 0)
7535 return 0;
7536if (sizeof (short))
7537 return 0;
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007544 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007546 grep -v '^ *+' conftest.er1 >conftest.err
7547 rm -f conftest.er1
7548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007551 { ac_try='test -z "$ac_c_werror_flag"
7552 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7554 (eval $ac_try) 2>&5
7555 ac_status=$?
7556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557 (exit $ac_status); }; } &&
7558 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7560 (eval $ac_try) 2>&5
7561 ac_status=$?
7562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7563 (exit $ac_status); }; }; then
7564 ac_cv_type_short=yes
7565else
7566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007567sed 's/^/| /' conftest.$ac_ext >&5
7568
Martin v. Löwis11437992002-04-12 09:54:03 +00007569ac_cv_type_short=no
7570fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007572fi
7573echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7574echo "${ECHO_T}$ac_cv_type_short" >&6
7575
7576echo "$as_me:$LINENO: checking size of short" >&5
7577echo $ECHO_N "checking size of short... $ECHO_C" >&6
7578if test "${ac_cv_sizeof_short+set}" = set; then
7579 echo $ECHO_N "(cached) $ECHO_C" >&6
7580else
7581 if test "$ac_cv_type_short" = yes; then
7582 # The cast to unsigned long works around a bug in the HP C Compiler
7583 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585 # This bug is HP SR number 8606223364.
7586 if test "$cross_compiling" = yes; then
7587 # Depending upon the size, compute the lo and hi bounds.
7588cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007594$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
7598static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
7606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007607 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007609 grep -v '^ *+' conftest.er1 >conftest.err
7610 rm -f conftest.er1
7611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007614 { ac_try='test -z "$ac_c_werror_flag"
7615 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7617 (eval $ac_try) 2>&5
7618 ac_status=$?
7619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7620 (exit $ac_status); }; } &&
7621 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7623 (eval $ac_try) 2>&5
7624 ac_status=$?
7625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7626 (exit $ac_status); }; }; then
7627 ac_lo=0 ac_mid=0
7628 while :; do
7629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
7639static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
7647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007648 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007650 grep -v '^ *+' conftest.er1 >conftest.err
7651 rm -f conftest.er1
7652 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007655 { ac_try='test -z "$ac_c_werror_flag"
7656 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7658 (eval $ac_try) 2>&5
7659 ac_status=$?
7660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7661 (exit $ac_status); }; } &&
7662 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 ac_hi=$ac_mid; break
7669else
7670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007671sed 's/^/| /' conftest.$ac_ext >&5
7672
Martin v. Löwis11437992002-04-12 09:54:03 +00007673ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007674 if test $ac_lo -le $ac_mid; then
7675 ac_lo= ac_hi=
7676 break
7677 fi
7678 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 done
7682else
7683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007684sed 's/^/| /' conftest.$ac_ext >&5
7685
Martin v. Löwis11437992002-04-12 09:54:03 +00007686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* confdefs.h. */
7688_ACEOF
7689cat confdefs.h >>conftest.$ac_ext
7690cat >>conftest.$ac_ext <<_ACEOF
7691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007693int
7694main ()
7695{
7696static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7697test_array [0] = 0
7698
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
7704if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007712 { ac_try='test -z "$ac_c_werror_flag"
7713 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7715 (eval $ac_try) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); }; } &&
7719 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7724 (exit $ac_status); }; }; then
7725 ac_hi=-1 ac_mid=-1
7726 while :; do
7727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007728/* confdefs.h. */
7729_ACEOF
7730cat confdefs.h >>conftest.$ac_ext
7731cat >>conftest.$ac_ext <<_ACEOF
7732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007733$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007734int
7735main ()
7736{
7737static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7738test_array [0] = 0
7739
7740 ;
7741 return 0;
7742}
7743_ACEOF
7744rm -f conftest.$ac_objext
7745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007746 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 grep -v '^ *+' conftest.er1 >conftest.err
7749 rm -f conftest.er1
7750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007753 { ac_try='test -z "$ac_c_werror_flag"
7754 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; } &&
7760 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7762 (eval $ac_try) 2>&5
7763 ac_status=$?
7764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765 (exit $ac_status); }; }; then
7766 ac_lo=$ac_mid; break
7767else
7768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007772 if test $ac_mid -le $ac_hi; then
7773 ac_lo= ac_hi=
7774 break
7775 fi
7776 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007779 done
7780else
7781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007782sed 's/^/| /' conftest.$ac_ext >&5
7783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784ac_lo= ac_hi=
7785fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007786rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007788rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007789# Binary search between lo and hi bounds.
7790while test "x$ac_lo" != "x$ac_hi"; do
7791 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
7802static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7803test_array [0] = 0
7804
7805 ;
7806 return 0;
7807}
7808_ACEOF
7809rm -f conftest.$ac_objext
7810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007811 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 grep -v '^ *+' conftest.er1 >conftest.err
7814 rm -f conftest.er1
7815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007818 { ac_try='test -z "$ac_c_werror_flag"
7819 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; } &&
7825 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7827 (eval $ac_try) 2>&5
7828 ac_status=$?
7829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7830 (exit $ac_status); }; }; then
7831 ac_hi=$ac_mid
7832else
7833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007834sed 's/^/| /' conftest.$ac_ext >&5
7835
Martin v. Löwis11437992002-04-12 09:54:03 +00007836ac_lo=`expr '(' $ac_mid ')' + 1`
7837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007838rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007839done
7840case $ac_lo in
7841?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007842'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7843See \`config.log' for more details." >&5
7844echo "$as_me: error: cannot compute sizeof (short), 77
7845See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007846 { (exit 1); exit 1; }; } ;;
7847esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007848else
7849 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007850 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7851See \`config.log' for more details." >&5
7852echo "$as_me: error: cannot run test program while cross compiling
7853See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007855else
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* confdefs.h. */
7858_ACEOF
7859cat confdefs.h >>conftest.$ac_ext
7860cat >>conftest.$ac_ext <<_ACEOF
7861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862$ac_includes_default
7863long longval () { return (long) (sizeof (short)); }
7864unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007865#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007866#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007867int
7868main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007869{
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
7871 FILE *f = fopen ("conftest.val", "w");
7872 if (! f)
7873 exit (1);
7874 if (((long) (sizeof (short))) < 0)
7875 {
7876 long i = longval ();
7877 if (i != ((long) (sizeof (short))))
7878 exit (1);
7879 fprintf (f, "%ld\n", i);
7880 }
7881 else
7882 {
7883 unsigned long i = ulongval ();
7884 if (i != ((long) (sizeof (short))))
7885 exit (1);
7886 fprintf (f, "%lu\n", i);
7887 }
7888 exit (ferror (f) || fclose (f) != 0);
7889
7890 ;
7891 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007892}
Martin v. Löwis11437992002-04-12 09:54:03 +00007893_ACEOF
7894rm -f conftest$ac_exeext
7895if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7896 (eval $ac_link) 2>&5
7897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901 (eval $ac_try) 2>&5
7902 ac_status=$?
7903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904 (exit $ac_status); }; }; then
7905 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007906else
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 echo "$as_me: program exited with status $ac_status" >&5
7908echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007909sed 's/^/| /' conftest.$ac_ext >&5
7910
Martin v. Löwis11437992002-04-12 09:54:03 +00007911( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007912{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7913See \`config.log' for more details." >&5
7914echo "$as_me: error: cannot compute sizeof (short), 77
7915See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 { (exit 1); exit 1; }; }
7917fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007918rm -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 +00007919fi
7920fi
7921rm -f conftest.val
7922else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007923 ac_cv_sizeof_short=0
7924fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007925fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7927echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7928cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007929#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007930_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007931
7932
Martin v. Löwis11437992002-04-12 09:54:03 +00007933echo "$as_me:$LINENO: checking for float" >&5
7934echo $ECHO_N "checking for float... $ECHO_C" >&6
7935if test "${ac_cv_type_float+set}" = set; then
7936 echo $ECHO_N "(cached) $ECHO_C" >&6
7937else
7938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* confdefs.h. */
7940_ACEOF
7941cat confdefs.h >>conftest.$ac_ext
7942cat >>conftest.$ac_ext <<_ACEOF
7943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
7948if ((float *) 0)
7949 return 0;
7950if (sizeof (float))
7951 return 0;
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007958 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007965 { ac_try='test -z "$ac_c_werror_flag"
7966 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7968 (eval $ac_try) 2>&5
7969 ac_status=$?
7970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7971 (exit $ac_status); }; } &&
7972 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7974 (eval $ac_try) 2>&5
7975 ac_status=$?
7976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7977 (exit $ac_status); }; }; then
7978 ac_cv_type_float=yes
7979else
7980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007981sed 's/^/| /' conftest.$ac_ext >&5
7982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983ac_cv_type_float=no
7984fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986fi
7987echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7988echo "${ECHO_T}$ac_cv_type_float" >&6
7989
7990echo "$as_me:$LINENO: checking size of float" >&5
7991echo $ECHO_N "checking size of float... $ECHO_C" >&6
7992if test "${ac_cv_sizeof_float+set}" = set; then
7993 echo $ECHO_N "(cached) $ECHO_C" >&6
7994else
7995 if test "$ac_cv_type_float" = yes; then
7996 # The cast to unsigned long works around a bug in the HP C Compiler
7997 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7998 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7999 # This bug is HP SR number 8606223364.
8000 if test "$cross_compiling" = yes; then
8001 # Depending upon the size, compute the lo and hi bounds.
8002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008003/* confdefs.h. */
8004_ACEOF
8005cat confdefs.h >>conftest.$ac_ext
8006cat >>conftest.$ac_ext <<_ACEOF
8007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008008$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008009int
8010main ()
8011{
8012static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
8013test_array [0] = 0
8014
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext
8020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008021 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008023 grep -v '^ *+' conftest.er1 >conftest.err
8024 rm -f conftest.er1
8025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008028 { ac_try='test -z "$ac_c_werror_flag"
8029 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8031 (eval $ac_try) 2>&5
8032 ac_status=$?
8033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8034 (exit $ac_status); }; } &&
8035 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8037 (eval $ac_try) 2>&5
8038 ac_status=$?
8039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8040 (exit $ac_status); }; }; then
8041 ac_lo=0 ac_mid=0
8042 while :; do
8043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008050int
8051main ()
8052{
8053static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8054test_array [0] = 0
8055
8056 ;
8057 return 0;
8058}
8059_ACEOF
8060rm -f conftest.$ac_objext
8061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008062 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008064 grep -v '^ *+' conftest.er1 >conftest.err
8065 rm -f conftest.er1
8066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008069 { ac_try='test -z "$ac_c_werror_flag"
8070 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8072 (eval $ac_try) 2>&5
8073 ac_status=$?
8074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8075 (exit $ac_status); }; } &&
8076 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8078 (eval $ac_try) 2>&5
8079 ac_status=$?
8080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8081 (exit $ac_status); }; }; then
8082 ac_hi=$ac_mid; break
8083else
8084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008085sed 's/^/| /' conftest.$ac_ext >&5
8086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008088 if test $ac_lo -le $ac_mid; then
8089 ac_lo= ac_hi=
8090 break
8091 fi
8092 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008093fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008094rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008095 done
8096else
8097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008098sed 's/^/| /' conftest.$ac_ext >&5
8099
Martin v. Löwis11437992002-04-12 09:54:03 +00008100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008101/* confdefs.h. */
8102_ACEOF
8103cat confdefs.h >>conftest.$ac_ext
8104cat >>conftest.$ac_ext <<_ACEOF
8105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008106$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008107int
8108main ()
8109{
8110static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
8111test_array [0] = 0
8112
8113 ;
8114 return 0;
8115}
8116_ACEOF
8117rm -f conftest.$ac_objext
8118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008119 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008121 grep -v '^ *+' conftest.er1 >conftest.err
8122 rm -f conftest.er1
8123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008126 { ac_try='test -z "$ac_c_werror_flag"
8127 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8129 (eval $ac_try) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); }; } &&
8133 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8135 (eval $ac_try) 2>&5
8136 ac_status=$?
8137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); }; }; then
8139 ac_hi=-1 ac_mid=-1
8140 while :; do
8141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008142/* confdefs.h. */
8143_ACEOF
8144cat confdefs.h >>conftest.$ac_ext
8145cat >>conftest.$ac_ext <<_ACEOF
8146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008147$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008148int
8149main ()
8150{
8151static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8152test_array [0] = 0
8153
8154 ;
8155 return 0;
8156}
8157_ACEOF
8158rm -f conftest.$ac_objext
8159if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008160 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008162 grep -v '^ *+' conftest.er1 >conftest.err
8163 rm -f conftest.er1
8164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8166 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008167 { ac_try='test -z "$ac_c_werror_flag"
8168 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; } &&
8174 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8176 (eval $ac_try) 2>&5
8177 ac_status=$?
8178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8179 (exit $ac_status); }; }; then
8180 ac_lo=$ac_mid; break
8181else
8182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008186 if test $ac_mid -le $ac_hi; then
8187 ac_lo= ac_hi=
8188 break
8189 fi
8190 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008192rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008193 done
8194else
8195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008196sed 's/^/| /' conftest.$ac_ext >&5
8197
Martin v. Löwis11437992002-04-12 09:54:03 +00008198ac_lo= ac_hi=
8199fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008200rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008201fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008203# Binary search between lo and hi bounds.
8204while test "x$ac_lo" != "x$ac_hi"; do
8205 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008213int
8214main ()
8215{
8216static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8217test_array [0] = 0
8218
8219 ;
8220 return 0;
8221}
8222_ACEOF
8223rm -f conftest.$ac_objext
8224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008225 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008227 grep -v '^ *+' conftest.er1 >conftest.err
8228 rm -f conftest.er1
8229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008232 { ac_try='test -z "$ac_c_werror_flag"
8233 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235 (eval $ac_try) 2>&5
8236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); }; } &&
8239 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8241 (eval $ac_try) 2>&5
8242 ac_status=$?
8243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8244 (exit $ac_status); }; }; then
8245 ac_hi=$ac_mid
8246else
8247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008248sed 's/^/| /' conftest.$ac_ext >&5
8249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250ac_lo=`expr '(' $ac_mid ')' + 1`
8251fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008252rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008253done
8254case $ac_lo in
8255?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008256'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8257See \`config.log' for more details." >&5
8258echo "$as_me: error: cannot compute sizeof (float), 77
8259See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 { (exit 1); exit 1; }; } ;;
8261esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008262else
8263 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008264 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8265See \`config.log' for more details." >&5
8266echo "$as_me: error: cannot run test program while cross compiling
8267See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008269else
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008271/* confdefs.h. */
8272_ACEOF
8273cat confdefs.h >>conftest.$ac_ext
8274cat >>conftest.$ac_ext <<_ACEOF
8275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008276$ac_includes_default
8277long longval () { return (long) (sizeof (float)); }
8278unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008279#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008280#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008281int
8282main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008283{
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285 FILE *f = fopen ("conftest.val", "w");
8286 if (! f)
8287 exit (1);
8288 if (((long) (sizeof (float))) < 0)
8289 {
8290 long i = longval ();
8291 if (i != ((long) (sizeof (float))))
8292 exit (1);
8293 fprintf (f, "%ld\n", i);
8294 }
8295 else
8296 {
8297 unsigned long i = ulongval ();
8298 if (i != ((long) (sizeof (float))))
8299 exit (1);
8300 fprintf (f, "%lu\n", i);
8301 }
8302 exit (ferror (f) || fclose (f) != 0);
8303
8304 ;
8305 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008306}
Martin v. Löwis11437992002-04-12 09:54:03 +00008307_ACEOF
8308rm -f conftest$ac_exeext
8309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8310 (eval $ac_link) 2>&5
8311 ac_status=$?
8312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8315 (eval $ac_try) 2>&5
8316 ac_status=$?
8317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8318 (exit $ac_status); }; }; then
8319 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008320else
Martin v. Löwis11437992002-04-12 09:54:03 +00008321 echo "$as_me: program exited with status $ac_status" >&5
8322echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008323sed 's/^/| /' conftest.$ac_ext >&5
8324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008326{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8327See \`config.log' for more details." >&5
8328echo "$as_me: error: cannot compute sizeof (float), 77
8329See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008330 { (exit 1); exit 1; }; }
8331fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008332rm -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 +00008333fi
8334fi
8335rm -f conftest.val
8336else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008337 ac_cv_sizeof_float=0
8338fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008339fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008340echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8341echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8342cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008343#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008345
8346
Martin v. Löwis11437992002-04-12 09:54:03 +00008347echo "$as_me:$LINENO: checking for double" >&5
8348echo $ECHO_N "checking for double... $ECHO_C" >&6
8349if test "${ac_cv_type_double+set}" = set; then
8350 echo $ECHO_N "(cached) $ECHO_C" >&6
8351else
8352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008353/* confdefs.h. */
8354_ACEOF
8355cat confdefs.h >>conftest.$ac_ext
8356cat >>conftest.$ac_ext <<_ACEOF
8357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008358$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008359int
8360main ()
8361{
8362if ((double *) 0)
8363 return 0;
8364if (sizeof (double))
8365 return 0;
8366 ;
8367 return 0;
8368}
8369_ACEOF
8370rm -f conftest.$ac_objext
8371if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008372 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008374 grep -v '^ *+' conftest.er1 >conftest.err
8375 rm -f conftest.er1
8376 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008379 { ac_try='test -z "$ac_c_werror_flag"
8380 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8382 (eval $ac_try) 2>&5
8383 ac_status=$?
8384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8385 (exit $ac_status); }; } &&
8386 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8388 (eval $ac_try) 2>&5
8389 ac_status=$?
8390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8391 (exit $ac_status); }; }; then
8392 ac_cv_type_double=yes
8393else
8394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008395sed 's/^/| /' conftest.$ac_ext >&5
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397ac_cv_type_double=no
8398fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008399rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
8401echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8402echo "${ECHO_T}$ac_cv_type_double" >&6
8403
8404echo "$as_me:$LINENO: checking size of double" >&5
8405echo $ECHO_N "checking size of double... $ECHO_C" >&6
8406if test "${ac_cv_sizeof_double+set}" = set; then
8407 echo $ECHO_N "(cached) $ECHO_C" >&6
8408else
8409 if test "$ac_cv_type_double" = yes; then
8410 # The cast to unsigned long works around a bug in the HP C Compiler
8411 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8412 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8413 # This bug is HP SR number 8606223364.
8414 if test "$cross_compiling" = yes; then
8415 # Depending upon the size, compute the lo and hi bounds.
8416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008417/* confdefs.h. */
8418_ACEOF
8419cat confdefs.h >>conftest.$ac_ext
8420cat >>conftest.$ac_ext <<_ACEOF
8421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008422$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008423int
8424main ()
8425{
8426static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8427test_array [0] = 0
8428
8429 ;
8430 return 0;
8431}
8432_ACEOF
8433rm -f conftest.$ac_objext
8434if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008435 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008437 grep -v '^ *+' conftest.er1 >conftest.err
8438 rm -f conftest.er1
8439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8441 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008442 { ac_try='test -z "$ac_c_werror_flag"
8443 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8445 (eval $ac_try) 2>&5
8446 ac_status=$?
8447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8448 (exit $ac_status); }; } &&
8449 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8451 (eval $ac_try) 2>&5
8452 ac_status=$?
8453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8454 (exit $ac_status); }; }; then
8455 ac_lo=0 ac_mid=0
8456 while :; do
8457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008458/* confdefs.h. */
8459_ACEOF
8460cat confdefs.h >>conftest.$ac_ext
8461cat >>conftest.$ac_ext <<_ACEOF
8462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
8467static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
8475if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008476 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008478 grep -v '^ *+' conftest.er1 >conftest.err
8479 rm -f conftest.er1
8480 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008483 { ac_try='test -z "$ac_c_werror_flag"
8484 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8486 (eval $ac_try) 2>&5
8487 ac_status=$?
8488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8489 (exit $ac_status); }; } &&
8490 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8492 (eval $ac_try) 2>&5
8493 ac_status=$?
8494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8495 (exit $ac_status); }; }; then
8496 ac_hi=$ac_mid; break
8497else
8498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008499sed 's/^/| /' conftest.$ac_ext >&5
8500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008502 if test $ac_lo -le $ac_mid; then
8503 ac_lo= ac_hi=
8504 break
8505 fi
8506 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008507fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008508rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008509 done
8510else
8511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008512sed 's/^/| /' conftest.$ac_ext >&5
8513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008515/* confdefs.h. */
8516_ACEOF
8517cat confdefs.h >>conftest.$ac_ext
8518cat >>conftest.$ac_ext <<_ACEOF
8519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008521int
8522main ()
8523{
8524static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8525test_array [0] = 0
8526
8527 ;
8528 return 0;
8529}
8530_ACEOF
8531rm -f conftest.$ac_objext
8532if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008533 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008535 grep -v '^ *+' conftest.er1 >conftest.err
8536 rm -f conftest.er1
8537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008540 { ac_try='test -z "$ac_c_werror_flag"
8541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8543 (eval $ac_try) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); }; } &&
8547 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8549 (eval $ac_try) 2>&5
8550 ac_status=$?
8551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8552 (exit $ac_status); }; }; then
8553 ac_hi=-1 ac_mid=-1
8554 while :; do
8555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008556/* confdefs.h. */
8557_ACEOF
8558cat confdefs.h >>conftest.$ac_ext
8559cat >>conftest.$ac_ext <<_ACEOF
8560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008561$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008562int
8563main ()
8564{
8565static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8566test_array [0] = 0
8567
8568 ;
8569 return 0;
8570}
8571_ACEOF
8572rm -f conftest.$ac_objext
8573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008574 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 grep -v '^ *+' conftest.er1 >conftest.err
8577 rm -f conftest.er1
8578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8580 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008581 { ac_try='test -z "$ac_c_werror_flag"
8582 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; } &&
8588 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8590 (eval $ac_try) 2>&5
8591 ac_status=$?
8592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8593 (exit $ac_status); }; }; then
8594 ac_lo=$ac_mid; break
8595else
8596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008597sed 's/^/| /' conftest.$ac_ext >&5
8598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008600 if test $ac_mid -le $ac_hi; then
8601 ac_lo= ac_hi=
8602 break
8603 fi
8604 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008605fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008606rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 done
8608else
8609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008610sed 's/^/| /' conftest.$ac_ext >&5
8611
Martin v. Löwis11437992002-04-12 09:54:03 +00008612ac_lo= ac_hi=
8613fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008614rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008617# Binary search between lo and hi bounds.
8618while test "x$ac_lo" != "x$ac_hi"; do
8619 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* confdefs.h. */
8622_ACEOF
8623cat confdefs.h >>conftest.$ac_ext
8624cat >>conftest.$ac_ext <<_ACEOF
8625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008627int
8628main ()
8629{
8630static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8631test_array [0] = 0
8632
8633 ;
8634 return 0;
8635}
8636_ACEOF
8637rm -f conftest.$ac_objext
8638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008639 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008641 grep -v '^ *+' conftest.er1 >conftest.err
8642 rm -f conftest.er1
8643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8645 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008646 { ac_try='test -z "$ac_c_werror_flag"
8647 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8649 (eval $ac_try) 2>&5
8650 ac_status=$?
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); }; } &&
8653 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8655 (eval $ac_try) 2>&5
8656 ac_status=$?
8657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8658 (exit $ac_status); }; }; then
8659 ac_hi=$ac_mid
8660else
8661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008662sed 's/^/| /' conftest.$ac_ext >&5
8663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664ac_lo=`expr '(' $ac_mid ')' + 1`
8665fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008667done
8668case $ac_lo in
8669?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008670'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8671See \`config.log' for more details." >&5
8672echo "$as_me: error: cannot compute sizeof (double), 77
8673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 { (exit 1); exit 1; }; } ;;
8675esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008676else
8677 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008678 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8679See \`config.log' for more details." >&5
8680echo "$as_me: error: cannot run test program while cross compiling
8681See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008683else
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008685/* confdefs.h. */
8686_ACEOF
8687cat confdefs.h >>conftest.$ac_ext
8688cat >>conftest.$ac_ext <<_ACEOF
8689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690$ac_includes_default
8691long longval () { return (long) (sizeof (double)); }
8692unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008693#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008694#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008695int
8696main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697{
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
8699 FILE *f = fopen ("conftest.val", "w");
8700 if (! f)
8701 exit (1);
8702 if (((long) (sizeof (double))) < 0)
8703 {
8704 long i = longval ();
8705 if (i != ((long) (sizeof (double))))
8706 exit (1);
8707 fprintf (f, "%ld\n", i);
8708 }
8709 else
8710 {
8711 unsigned long i = ulongval ();
8712 if (i != ((long) (sizeof (double))))
8713 exit (1);
8714 fprintf (f, "%lu\n", i);
8715 }
8716 exit (ferror (f) || fclose (f) != 0);
8717
8718 ;
8719 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008720}
Martin v. Löwis11437992002-04-12 09:54:03 +00008721_ACEOF
8722rm -f conftest$ac_exeext
8723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8724 (eval $ac_link) 2>&5
8725 ac_status=$?
8726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8727 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8729 (eval $ac_try) 2>&5
8730 ac_status=$?
8731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8732 (exit $ac_status); }; }; then
8733 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008734else
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 echo "$as_me: program exited with status $ac_status" >&5
8736echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008737sed 's/^/| /' conftest.$ac_ext >&5
8738
Martin v. Löwis11437992002-04-12 09:54:03 +00008739( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008740{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8741See \`config.log' for more details." >&5
8742echo "$as_me: error: cannot compute sizeof (double), 77
8743See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 { (exit 1); exit 1; }; }
8745fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008746rm -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 +00008747fi
8748fi
8749rm -f conftest.val
8750else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008751 ac_cv_sizeof_double=0
8752fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008754echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8755echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8756cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008757#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008758_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008759
8760
Martin v. Löwis11437992002-04-12 09:54:03 +00008761echo "$as_me:$LINENO: checking for fpos_t" >&5
8762echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8763if test "${ac_cv_type_fpos_t+set}" = set; then
8764 echo $ECHO_N "(cached) $ECHO_C" >&6
8765else
8766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
8776if ((fpos_t *) 0)
8777 return 0;
8778if (sizeof (fpos_t))
8779 return 0;
8780 ;
8781 return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext
8785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008786 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008788 grep -v '^ *+' conftest.er1 >conftest.err
8789 rm -f conftest.er1
8790 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008793 { ac_try='test -z "$ac_c_werror_flag"
8794 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796 (eval $ac_try) 2>&5
8797 ac_status=$?
8798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799 (exit $ac_status); }; } &&
8800 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802 (eval $ac_try) 2>&5
8803 ac_status=$?
8804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805 (exit $ac_status); }; }; then
8806 ac_cv_type_fpos_t=yes
8807else
8808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008809sed 's/^/| /' conftest.$ac_ext >&5
8810
Martin v. Löwis11437992002-04-12 09:54:03 +00008811ac_cv_type_fpos_t=no
8812fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
8815echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8816echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8817
8818echo "$as_me:$LINENO: checking size of fpos_t" >&5
8819echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8820if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8821 echo $ECHO_N "(cached) $ECHO_C" >&6
8822else
8823 if test "$ac_cv_type_fpos_t" = yes; then
8824 # The cast to unsigned long works around a bug in the HP C Compiler
8825 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8826 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8827 # This bug is HP SR number 8606223364.
8828 if test "$cross_compiling" = yes; then
8829 # Depending upon the size, compute the lo and hi bounds.
8830cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008831/* confdefs.h. */
8832_ACEOF
8833cat confdefs.h >>conftest.$ac_ext
8834cat >>conftest.$ac_ext <<_ACEOF
8835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008836$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008837int
8838main ()
8839{
8840static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8841test_array [0] = 0
8842
8843 ;
8844 return 0;
8845}
8846_ACEOF
8847rm -f conftest.$ac_objext
8848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008851 grep -v '^ *+' conftest.er1 >conftest.err
8852 rm -f conftest.er1
8853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8855 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008856 { ac_try='test -z "$ac_c_werror_flag"
8857 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8859 (eval $ac_try) 2>&5
8860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); }; } &&
8863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8865 (eval $ac_try) 2>&5
8866 ac_status=$?
8867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868 (exit $ac_status); }; }; then
8869 ac_lo=0 ac_mid=0
8870 while :; do
8871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* confdefs.h. */
8873_ACEOF
8874cat confdefs.h >>conftest.$ac_ext
8875cat >>conftest.$ac_ext <<_ACEOF
8876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008877$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
8881static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8882test_array [0] = 0
8883
8884 ;
8885 return 0;
8886}
8887_ACEOF
8888rm -f conftest.$ac_objext
8889if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008890 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008892 grep -v '^ *+' conftest.er1 >conftest.err
8893 rm -f conftest.er1
8894 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008897 { ac_try='test -z "$ac_c_werror_flag"
8898 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8900 (eval $ac_try) 2>&5
8901 ac_status=$?
8902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8903 (exit $ac_status); }; } &&
8904 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8906 (eval $ac_try) 2>&5
8907 ac_status=$?
8908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8909 (exit $ac_status); }; }; then
8910 ac_hi=$ac_mid; break
8911else
8912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008913sed 's/^/| /' conftest.$ac_ext >&5
8914
Martin v. Löwis11437992002-04-12 09:54:03 +00008915ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008916 if test $ac_lo -le $ac_mid; then
8917 ac_lo= ac_hi=
8918 break
8919 fi
8920 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008921fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008922rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 done
8924else
8925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008926sed 's/^/| /' conftest.$ac_ext >&5
8927
Martin v. Löwis11437992002-04-12 09:54:03 +00008928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008929/* confdefs.h. */
8930_ACEOF
8931cat confdefs.h >>conftest.$ac_ext
8932cat >>conftest.$ac_ext <<_ACEOF
8933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
8938static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8939test_array [0] = 0
8940
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext
8946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008947 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008949 grep -v '^ *+' conftest.er1 >conftest.err
8950 rm -f conftest.er1
8951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008954 { ac_try='test -z "$ac_c_werror_flag"
8955 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8957 (eval $ac_try) 2>&5
8958 ac_status=$?
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); }; } &&
8961 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8963 (eval $ac_try) 2>&5
8964 ac_status=$?
8965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966 (exit $ac_status); }; }; then
8967 ac_hi=-1 ac_mid=-1
8968 while :; do
8969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* confdefs.h. */
8971_ACEOF
8972cat confdefs.h >>conftest.$ac_ext
8973cat >>conftest.$ac_ext <<_ACEOF
8974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
8979static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8980test_array [0] = 0
8981
8982 ;
8983 return 0;
8984}
8985_ACEOF
8986rm -f conftest.$ac_objext
8987if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008988 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008990 grep -v '^ *+' conftest.er1 >conftest.err
8991 rm -f conftest.er1
8992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008995 { ac_try='test -z "$ac_c_werror_flag"
8996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998 (eval $ac_try) 2>&5
8999 ac_status=$?
9000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001 (exit $ac_status); }; } &&
9002 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9004 (eval $ac_try) 2>&5
9005 ac_status=$?
9006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9007 (exit $ac_status); }; }; then
9008 ac_lo=$ac_mid; break
9009else
9010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009011sed 's/^/| /' conftest.$ac_ext >&5
9012
Martin v. Löwis11437992002-04-12 09:54:03 +00009013ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009014 if test $ac_mid -le $ac_hi; then
9015 ac_lo= ac_hi=
9016 break
9017 fi
9018 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009019fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 done
9022else
9023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009024sed 's/^/| /' conftest.$ac_ext >&5
9025
Martin v. Löwis11437992002-04-12 09:54:03 +00009026ac_lo= ac_hi=
9027fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009029fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009030rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009031# Binary search between lo and hi bounds.
9032while test "x$ac_lo" != "x$ac_hi"; do
9033 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009040$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
9044static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
9045test_array [0] = 0
9046
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_hi=$ac_mid
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_lo=`expr '(' $ac_mid ')' + 1`
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 +00009081done
9082case $ac_lo in
9083?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009084'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9085See \`config.log' for more details." >&5
9086echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9087See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 { (exit 1); exit 1; }; } ;;
9089esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090else
9091 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009092 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9093See \`config.log' for more details." >&5
9094echo "$as_me: error: cannot run test program while cross compiling
9095See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009097else
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009099/* confdefs.h. */
9100_ACEOF
9101cat confdefs.h >>conftest.$ac_ext
9102cat >>conftest.$ac_ext <<_ACEOF
9103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009104$ac_includes_default
9105long longval () { return (long) (sizeof (fpos_t)); }
9106unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009107#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009108#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009109int
9110main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009111{
Martin v. Löwis11437992002-04-12 09:54:03 +00009112
9113 FILE *f = fopen ("conftest.val", "w");
9114 if (! f)
9115 exit (1);
9116 if (((long) (sizeof (fpos_t))) < 0)
9117 {
9118 long i = longval ();
9119 if (i != ((long) (sizeof (fpos_t))))
9120 exit (1);
9121 fprintf (f, "%ld\n", i);
9122 }
9123 else
9124 {
9125 unsigned long i = ulongval ();
9126 if (i != ((long) (sizeof (fpos_t))))
9127 exit (1);
9128 fprintf (f, "%lu\n", i);
9129 }
9130 exit (ferror (f) || fclose (f) != 0);
9131
9132 ;
9133 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009134}
Martin v. Löwis11437992002-04-12 09:54:03 +00009135_ACEOF
9136rm -f conftest$ac_exeext
9137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9138 (eval $ac_link) 2>&5
9139 ac_status=$?
9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9143 (eval $ac_try) 2>&5
9144 ac_status=$?
9145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9146 (exit $ac_status); }; }; then
9147 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009148else
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 echo "$as_me: program exited with status $ac_status" >&5
9150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009151sed 's/^/| /' conftest.$ac_ext >&5
9152
Martin v. Löwis11437992002-04-12 09:54:03 +00009153( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009154{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9155See \`config.log' for more details." >&5
9156echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9157See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 { (exit 1); exit 1; }; }
9159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009160rm -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 +00009161fi
9162fi
9163rm -f conftest.val
9164else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009165 ac_cv_sizeof_fpos_t=0
9166fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009167fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009168echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9169echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9170cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009171#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009172_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009173
Michael W. Hudson54241132001-12-07 15:38:26 +00009174
Martin v. Löwis18e16552006-02-15 17:27:45 +00009175echo "$as_me:$LINENO: checking for size_t" >&5
9176echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9177if test "${ac_cv_type_size_t+set}" = set; then
9178 echo $ECHO_N "(cached) $ECHO_C" >&6
9179else
9180 cat >conftest.$ac_ext <<_ACEOF
9181/* confdefs.h. */
9182_ACEOF
9183cat confdefs.h >>conftest.$ac_ext
9184cat >>conftest.$ac_ext <<_ACEOF
9185/* end confdefs.h. */
9186$ac_includes_default
9187int
9188main ()
9189{
9190if ((size_t *) 0)
9191 return 0;
9192if (sizeof (size_t))
9193 return 0;
9194 ;
9195 return 0;
9196}
9197_ACEOF
9198rm -f conftest.$ac_objext
9199if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9200 (eval $ac_compile) 2>conftest.er1
9201 ac_status=$?
9202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); } &&
9207 { ac_try='test -z "$ac_c_werror_flag"
9208 || test ! -s conftest.err'
9209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9210 (eval $ac_try) 2>&5
9211 ac_status=$?
9212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9213 (exit $ac_status); }; } &&
9214 { ac_try='test -s conftest.$ac_objext'
9215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9216 (eval $ac_try) 2>&5
9217 ac_status=$?
9218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9219 (exit $ac_status); }; }; then
9220 ac_cv_type_size_t=yes
9221else
9222 echo "$as_me: failed program was:" >&5
9223sed 's/^/| /' conftest.$ac_ext >&5
9224
9225ac_cv_type_size_t=no
9226fi
9227rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9228fi
9229echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9230echo "${ECHO_T}$ac_cv_type_size_t" >&6
9231
9232echo "$as_me:$LINENO: checking size of size_t" >&5
9233echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
9234if test "${ac_cv_sizeof_size_t+set}" = set; then
9235 echo $ECHO_N "(cached) $ECHO_C" >&6
9236else
9237 if test "$ac_cv_type_size_t" = yes; then
9238 # The cast to unsigned long works around a bug in the HP C Compiler
9239 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9240 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9241 # This bug is HP SR number 8606223364.
9242 if test "$cross_compiling" = yes; then
9243 # Depending upon the size, compute the lo and hi bounds.
9244cat >conftest.$ac_ext <<_ACEOF
9245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
9250$ac_includes_default
9251int
9252main ()
9253{
9254static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
9255test_array [0] = 0
9256
9257 ;
9258 return 0;
9259}
9260_ACEOF
9261rm -f conftest.$ac_objext
9262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9263 (eval $ac_compile) 2>conftest.er1
9264 ac_status=$?
9265 grep -v '^ *+' conftest.er1 >conftest.err
9266 rm -f conftest.er1
9267 cat conftest.err >&5
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9269 (exit $ac_status); } &&
9270 { ac_try='test -z "$ac_c_werror_flag"
9271 || test ! -s conftest.err'
9272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9273 (eval $ac_try) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); }; } &&
9277 { ac_try='test -s conftest.$ac_objext'
9278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9279 (eval $ac_try) 2>&5
9280 ac_status=$?
9281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9282 (exit $ac_status); }; }; then
9283 ac_lo=0 ac_mid=0
9284 while :; do
9285 cat >conftest.$ac_ext <<_ACEOF
9286/* confdefs.h. */
9287_ACEOF
9288cat confdefs.h >>conftest.$ac_ext
9289cat >>conftest.$ac_ext <<_ACEOF
9290/* end confdefs.h. */
9291$ac_includes_default
9292int
9293main ()
9294{
9295static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9296test_array [0] = 0
9297
9298 ;
9299 return 0;
9300}
9301_ACEOF
9302rm -f conftest.$ac_objext
9303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9304 (eval $ac_compile) 2>conftest.er1
9305 ac_status=$?
9306 grep -v '^ *+' conftest.er1 >conftest.err
9307 rm -f conftest.er1
9308 cat conftest.err >&5
9309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310 (exit $ac_status); } &&
9311 { ac_try='test -z "$ac_c_werror_flag"
9312 || test ! -s conftest.err'
9313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9314 (eval $ac_try) 2>&5
9315 ac_status=$?
9316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9317 (exit $ac_status); }; } &&
9318 { ac_try='test -s conftest.$ac_objext'
9319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9320 (eval $ac_try) 2>&5
9321 ac_status=$?
9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9323 (exit $ac_status); }; }; then
9324 ac_hi=$ac_mid; break
9325else
9326 echo "$as_me: failed program was:" >&5
9327sed 's/^/| /' conftest.$ac_ext >&5
9328
9329ac_lo=`expr $ac_mid + 1`
9330 if test $ac_lo -le $ac_mid; then
9331 ac_lo= ac_hi=
9332 break
9333 fi
9334 ac_mid=`expr 2 '*' $ac_mid + 1`
9335fi
9336rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9337 done
9338else
9339 echo "$as_me: failed program was:" >&5
9340sed 's/^/| /' conftest.$ac_ext >&5
9341
9342cat >conftest.$ac_ext <<_ACEOF
9343/* confdefs.h. */
9344_ACEOF
9345cat confdefs.h >>conftest.$ac_ext
9346cat >>conftest.$ac_ext <<_ACEOF
9347/* end confdefs.h. */
9348$ac_includes_default
9349int
9350main ()
9351{
9352static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
9353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
9360if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9361 (eval $ac_compile) 2>conftest.er1
9362 ac_status=$?
9363 grep -v '^ *+' conftest.er1 >conftest.err
9364 rm -f conftest.er1
9365 cat conftest.err >&5
9366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9367 (exit $ac_status); } &&
9368 { ac_try='test -z "$ac_c_werror_flag"
9369 || test ! -s conftest.err'
9370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9371 (eval $ac_try) 2>&5
9372 ac_status=$?
9373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374 (exit $ac_status); }; } &&
9375 { ac_try='test -s conftest.$ac_objext'
9376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9377 (eval $ac_try) 2>&5
9378 ac_status=$?
9379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9380 (exit $ac_status); }; }; then
9381 ac_hi=-1 ac_mid=-1
9382 while :; do
9383 cat >conftest.$ac_ext <<_ACEOF
9384/* confdefs.h. */
9385_ACEOF
9386cat confdefs.h >>conftest.$ac_ext
9387cat >>conftest.$ac_ext <<_ACEOF
9388/* end confdefs.h. */
9389$ac_includes_default
9390int
9391main ()
9392{
9393static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
9394test_array [0] = 0
9395
9396 ;
9397 return 0;
9398}
9399_ACEOF
9400rm -f conftest.$ac_objext
9401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9402 (eval $ac_compile) 2>conftest.er1
9403 ac_status=$?
9404 grep -v '^ *+' conftest.er1 >conftest.err
9405 rm -f conftest.er1
9406 cat conftest.err >&5
9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408 (exit $ac_status); } &&
9409 { ac_try='test -z "$ac_c_werror_flag"
9410 || test ! -s conftest.err'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; } &&
9416 { ac_try='test -s conftest.$ac_objext'
9417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9418 (eval $ac_try) 2>&5
9419 ac_status=$?
9420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9421 (exit $ac_status); }; }; then
9422 ac_lo=$ac_mid; break
9423else
9424 echo "$as_me: failed program was:" >&5
9425sed 's/^/| /' conftest.$ac_ext >&5
9426
9427ac_hi=`expr '(' $ac_mid ')' - 1`
9428 if test $ac_mid -le $ac_hi; then
9429 ac_lo= ac_hi=
9430 break
9431 fi
9432 ac_mid=`expr 2 '*' $ac_mid`
9433fi
9434rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9435 done
9436else
9437 echo "$as_me: failed program was:" >&5
9438sed 's/^/| /' conftest.$ac_ext >&5
9439
9440ac_lo= ac_hi=
9441fi
9442rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9443fi
9444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9445# Binary search between lo and hi bounds.
9446while test "x$ac_lo" != "x$ac_hi"; do
9447 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9448 cat >conftest.$ac_ext <<_ACEOF
9449/* confdefs.h. */
9450_ACEOF
9451cat confdefs.h >>conftest.$ac_ext
9452cat >>conftest.$ac_ext <<_ACEOF
9453/* end confdefs.h. */
9454$ac_includes_default
9455int
9456main ()
9457{
9458static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9459test_array [0] = 0
9460
9461 ;
9462 return 0;
9463}
9464_ACEOF
9465rm -f conftest.$ac_objext
9466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9467 (eval $ac_compile) 2>conftest.er1
9468 ac_status=$?
9469 grep -v '^ *+' conftest.er1 >conftest.err
9470 rm -f conftest.er1
9471 cat conftest.err >&5
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); } &&
9474 { ac_try='test -z "$ac_c_werror_flag"
9475 || test ! -s conftest.err'
9476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9477 (eval $ac_try) 2>&5
9478 ac_status=$?
9479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9480 (exit $ac_status); }; } &&
9481 { ac_try='test -s conftest.$ac_objext'
9482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9483 (eval $ac_try) 2>&5
9484 ac_status=$?
9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486 (exit $ac_status); }; }; then
9487 ac_hi=$ac_mid
9488else
9489 echo "$as_me: failed program was:" >&5
9490sed 's/^/| /' conftest.$ac_ext >&5
9491
9492ac_lo=`expr '(' $ac_mid ')' + 1`
9493fi
9494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9495done
9496case $ac_lo in
9497?*) ac_cv_sizeof_size_t=$ac_lo;;
9498'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9499See \`config.log' for more details." >&5
9500echo "$as_me: error: cannot compute sizeof (size_t), 77
9501See \`config.log' for more details." >&2;}
9502 { (exit 1); exit 1; }; } ;;
9503esac
9504else
9505 if test "$cross_compiling" = yes; then
9506 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9507See \`config.log' for more details." >&5
9508echo "$as_me: error: cannot run test program while cross compiling
9509See \`config.log' for more details." >&2;}
9510 { (exit 1); exit 1; }; }
9511else
9512 cat >conftest.$ac_ext <<_ACEOF
9513/* confdefs.h. */
9514_ACEOF
9515cat confdefs.h >>conftest.$ac_ext
9516cat >>conftest.$ac_ext <<_ACEOF
9517/* end confdefs.h. */
9518$ac_includes_default
9519long longval () { return (long) (sizeof (size_t)); }
9520unsigned long ulongval () { return (long) (sizeof (size_t)); }
9521#include <stdio.h>
9522#include <stdlib.h>
9523int
9524main ()
9525{
9526
9527 FILE *f = fopen ("conftest.val", "w");
9528 if (! f)
9529 exit (1);
9530 if (((long) (sizeof (size_t))) < 0)
9531 {
9532 long i = longval ();
9533 if (i != ((long) (sizeof (size_t))))
9534 exit (1);
9535 fprintf (f, "%ld\n", i);
9536 }
9537 else
9538 {
9539 unsigned long i = ulongval ();
9540 if (i != ((long) (sizeof (size_t))))
9541 exit (1);
9542 fprintf (f, "%lu\n", i);
9543 }
9544 exit (ferror (f) || fclose (f) != 0);
9545
9546 ;
9547 return 0;
9548}
9549_ACEOF
9550rm -f conftest$ac_exeext
9551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9552 (eval $ac_link) 2>&5
9553 ac_status=$?
9554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9555 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9557 (eval $ac_try) 2>&5
9558 ac_status=$?
9559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9560 (exit $ac_status); }; }; then
9561 ac_cv_sizeof_size_t=`cat conftest.val`
9562else
9563 echo "$as_me: program exited with status $ac_status" >&5
9564echo "$as_me: failed program was:" >&5
9565sed 's/^/| /' conftest.$ac_ext >&5
9566
9567( exit $ac_status )
9568{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9569See \`config.log' for more details." >&5
9570echo "$as_me: error: cannot compute sizeof (size_t), 77
9571See \`config.log' for more details." >&2;}
9572 { (exit 1); exit 1; }; }
9573fi
9574rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9575fi
9576fi
9577rm -f conftest.val
9578else
9579 ac_cv_sizeof_size_t=0
9580fi
9581fi
9582echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9583echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
9584cat >>confdefs.h <<_ACEOF
9585#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9586_ACEOF
9587
9588
Michael W. Hudson54241132001-12-07 15:38:26 +00009589
Martin v. Löwis11437992002-04-12 09:54:03 +00009590echo "$as_me:$LINENO: checking for long long support" >&5
9591echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009592have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009594/* confdefs.h. */
9595_ACEOF
9596cat confdefs.h >>conftest.$ac_ext
9597cat >>conftest.$ac_ext <<_ACEOF
9598/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009599
Martin v. Löwis11437992002-04-12 09:54:03 +00009600int
9601main ()
9602{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009603long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ;
9605 return 0;
9606}
9607_ACEOF
9608rm -f conftest.$ac_objext
9609if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009610 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009612 grep -v '^ *+' conftest.er1 >conftest.err
9613 rm -f conftest.er1
9614 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009617 { ac_try='test -z "$ac_c_werror_flag"
9618 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9620 (eval $ac_try) 2>&5
9621 ac_status=$?
9622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9623 (exit $ac_status); }; } &&
9624 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9626 (eval $ac_try) 2>&5
9627 ac_status=$?
9628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9629 (exit $ac_status); }; }; then
9630
9631
9632cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009633#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009634_ACEOF
9635
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009636 have_long_long=yes
9637
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009638else
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009640sed 's/^/| /' conftest.$ac_ext >&5
9641
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009642fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009644echo "$as_me:$LINENO: result: $have_long_long" >&5
9645echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009646if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647echo "$as_me:$LINENO: checking for long long" >&5
9648echo $ECHO_N "checking for long long... $ECHO_C" >&6
9649if test "${ac_cv_type_long_long+set}" = set; then
9650 echo $ECHO_N "(cached) $ECHO_C" >&6
9651else
9652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009653/* confdefs.h. */
9654_ACEOF
9655cat confdefs.h >>conftest.$ac_ext
9656cat >>conftest.$ac_ext <<_ACEOF
9657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
9662if ((long long *) 0)
9663 return 0;
9664if (sizeof (long long))
9665 return 0;
9666 ;
9667 return 0;
9668}
9669_ACEOF
9670rm -f conftest.$ac_objext
9671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009672 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009674 grep -v '^ *+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009679 { ac_try='test -z "$ac_c_werror_flag"
9680 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9682 (eval $ac_try) 2>&5
9683 ac_status=$?
9684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685 (exit $ac_status); }; } &&
9686 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9688 (eval $ac_try) 2>&5
9689 ac_status=$?
9690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691 (exit $ac_status); }; }; then
9692 ac_cv_type_long_long=yes
9693else
9694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009695sed 's/^/| /' conftest.$ac_ext >&5
9696
Martin v. Löwis11437992002-04-12 09:54:03 +00009697ac_cv_type_long_long=no
9698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700fi
9701echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9702echo "${ECHO_T}$ac_cv_type_long_long" >&6
9703
9704echo "$as_me:$LINENO: checking size of long long" >&5
9705echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9706if test "${ac_cv_sizeof_long_long+set}" = set; then
9707 echo $ECHO_N "(cached) $ECHO_C" >&6
9708else
9709 if test "$ac_cv_type_long_long" = yes; then
9710 # The cast to unsigned long works around a bug in the HP C Compiler
9711 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9712 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9713 # This bug is HP SR number 8606223364.
9714 if test "$cross_compiling" = yes; then
9715 # Depending upon the size, compute the lo and hi bounds.
9716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009717/* confdefs.h. */
9718_ACEOF
9719cat confdefs.h >>conftest.$ac_ext
9720cat >>conftest.$ac_ext <<_ACEOF
9721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009722$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
9725{
9726static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9727test_array [0] = 0
9728
9729 ;
9730 return 0;
9731}
9732_ACEOF
9733rm -f conftest.$ac_objext
9734if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009742 { ac_try='test -z "$ac_c_werror_flag"
9743 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9745 (eval $ac_try) 2>&5
9746 ac_status=$?
9747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9748 (exit $ac_status); }; } &&
9749 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9751 (eval $ac_try) 2>&5
9752 ac_status=$?
9753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9754 (exit $ac_status); }; }; then
9755 ac_lo=0 ac_mid=0
9756 while :; do
9757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009758/* confdefs.h. */
9759_ACEOF
9760cat confdefs.h >>conftest.$ac_ext
9761cat >>conftest.$ac_ext <<_ACEOF
9762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009763$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
9767static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9768test_array [0] = 0
9769
9770 ;
9771 return 0;
9772}
9773_ACEOF
9774rm -f conftest.$ac_objext
9775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009776 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009778 grep -v '^ *+' conftest.er1 >conftest.err
9779 rm -f conftest.er1
9780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9782 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009783 { ac_try='test -z "$ac_c_werror_flag"
9784 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9786 (eval $ac_try) 2>&5
9787 ac_status=$?
9788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789 (exit $ac_status); }; } &&
9790 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9792 (eval $ac_try) 2>&5
9793 ac_status=$?
9794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795 (exit $ac_status); }; }; then
9796 ac_hi=$ac_mid; break
9797else
9798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009799sed 's/^/| /' conftest.$ac_ext >&5
9800
Martin v. Löwis11437992002-04-12 09:54:03 +00009801ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009802 if test $ac_lo -le $ac_mid; then
9803 ac_lo= ac_hi=
9804 break
9805 fi
9806 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009807fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 done
9810else
9811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009812sed 's/^/| /' conftest.$ac_ext >&5
9813
Martin v. Löwis11437992002-04-12 09:54:03 +00009814cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009821int
9822main ()
9823{
9824static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9825test_array [0] = 0
9826
9827 ;
9828 return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext
9832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009833 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009835 grep -v '^ *+' conftest.er1 >conftest.err
9836 rm -f conftest.er1
9837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009840 { ac_try='test -z "$ac_c_werror_flag"
9841 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; } &&
9847 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9849 (eval $ac_try) 2>&5
9850 ac_status=$?
9851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9853 ac_hi=-1 ac_mid=-1
9854 while :; do
9855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009856/* confdefs.h. */
9857_ACEOF
9858cat confdefs.h >>conftest.$ac_ext
9859cat >>conftest.$ac_ext <<_ACEOF
9860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009862int
9863main ()
9864{
9865static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9866test_array [0] = 0
9867
9868 ;
9869 return 0;
9870}
9871_ACEOF
9872rm -f conftest.$ac_objext
9873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009874 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009876 grep -v '^ *+' conftest.er1 >conftest.err
9877 rm -f conftest.er1
9878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009881 { ac_try='test -z "$ac_c_werror_flag"
9882 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9884 (eval $ac_try) 2>&5
9885 ac_status=$?
9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887 (exit $ac_status); }; } &&
9888 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9890 (eval $ac_try) 2>&5
9891 ac_status=$?
9892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893 (exit $ac_status); }; }; then
9894 ac_lo=$ac_mid; break
9895else
9896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009897sed 's/^/| /' conftest.$ac_ext >&5
9898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009900 if test $ac_mid -le $ac_hi; then
9901 ac_lo= ac_hi=
9902 break
9903 fi
9904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 done
9908else
9909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009910sed 's/^/| /' conftest.$ac_ext >&5
9911
Martin v. Löwis11437992002-04-12 09:54:03 +00009912ac_lo= ac_hi=
9913fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009914rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009915fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009916rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009917# Binary search between lo and hi bounds.
9918while test "x$ac_lo" != "x$ac_hi"; do
9919 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
9930static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9931test_array [0] = 0
9932
9933 ;
9934 return 0;
9935}
9936_ACEOF
9937rm -f conftest.$ac_objext
9938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009939 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009946 { ac_try='test -z "$ac_c_werror_flag"
9947 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009948 { (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); }; } &&
9953 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9955 (eval $ac_try) 2>&5
9956 ac_status=$?
9957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9958 (exit $ac_status); }; }; then
9959 ac_hi=$ac_mid
9960else
9961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009962sed 's/^/| /' conftest.$ac_ext >&5
9963
Martin v. Löwis11437992002-04-12 09:54:03 +00009964ac_lo=`expr '(' $ac_mid ')' + 1`
9965fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009967done
9968case $ac_lo in
9969?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009970'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9971See \`config.log' for more details." >&5
9972echo "$as_me: error: cannot compute sizeof (long long), 77
9973See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 { (exit 1); exit 1; }; } ;;
9975esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976else
9977 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009978 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9979See \`config.log' for more details." >&5
9980echo "$as_me: error: cannot run test program while cross compiling
9981See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009982 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009983else
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990$ac_includes_default
9991long longval () { return (long) (sizeof (long long)); }
9992unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009993#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009994#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009995int
9996main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009997{
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
9999 FILE *f = fopen ("conftest.val", "w");
10000 if (! f)
10001 exit (1);
10002 if (((long) (sizeof (long long))) < 0)
10003 {
10004 long i = longval ();
10005 if (i != ((long) (sizeof (long long))))
10006 exit (1);
10007 fprintf (f, "%ld\n", i);
10008 }
10009 else
10010 {
10011 unsigned long i = ulongval ();
10012 if (i != ((long) (sizeof (long long))))
10013 exit (1);
10014 fprintf (f, "%lu\n", i);
10015 }
10016 exit (ferror (f) || fclose (f) != 0);
10017
10018 ;
10019 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010020}
Martin v. Löwis11437992002-04-12 09:54:03 +000010021_ACEOF
10022rm -f conftest$ac_exeext
10023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10024 (eval $ac_link) 2>&5
10025 ac_status=$?
10026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10029 (eval $ac_try) 2>&5
10030 ac_status=$?
10031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10032 (exit $ac_status); }; }; then
10033 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010034else
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 echo "$as_me: program exited with status $ac_status" >&5
10036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010037sed 's/^/| /' conftest.$ac_ext >&5
10038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010040{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
10041See \`config.log' for more details." >&5
10042echo "$as_me: error: cannot compute sizeof (long long), 77
10043See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 { (exit 1); exit 1; }; }
10045fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010046rm -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 +000010047fi
10048fi
10049rm -f conftest.val
10050else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010051 ac_cv_sizeof_long_long=0
10052fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010054echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10055echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
10056cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010057#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010058_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010059
Michael W. Hudson54241132001-12-07 15:38:26 +000010060
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010061fi
10062
Martin v. Löwis11437992002-04-12 09:54:03 +000010063echo "$as_me:$LINENO: checking for uintptr_t support" >&5
10064echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010065have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* confdefs.h. */
10068_ACEOF
10069cat confdefs.h >>conftest.$ac_ext
10070cat >>conftest.$ac_ext <<_ACEOF
10071/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010072
Martin v. Löwis11437992002-04-12 09:54:03 +000010073int
10074main ()
10075{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010076uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 ;
10078 return 0;
10079}
10080_ACEOF
10081rm -f conftest.$ac_objext
10082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010083 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010090 { ac_try='test -z "$ac_c_werror_flag"
10091 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10093 (eval $ac_try) 2>&5
10094 ac_status=$?
10095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10096 (exit $ac_status); }; } &&
10097 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10099 (eval $ac_try) 2>&5
10100 ac_status=$?
10101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102 (exit $ac_status); }; }; then
10103
10104
10105cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010106#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010107_ACEOF
10108
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010109 have_uintptr_t=yes
10110
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010111else
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010113sed 's/^/| /' conftest.$ac_ext >&5
10114
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010115fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010117echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
10118echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010119if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010120echo "$as_me:$LINENO: checking for uintptr_t" >&5
10121echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
10122if test "${ac_cv_type_uintptr_t+set}" = set; then
10123 echo $ECHO_N "(cached) $ECHO_C" >&6
10124else
10125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* confdefs.h. */
10127_ACEOF
10128cat confdefs.h >>conftest.$ac_ext
10129cat >>conftest.$ac_ext <<_ACEOF
10130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
10135if ((uintptr_t *) 0)
10136 return 0;
10137if (sizeof (uintptr_t))
10138 return 0;
10139 ;
10140 return 0;
10141}
10142_ACEOF
10143rm -f conftest.$ac_objext
10144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010147 grep -v '^ *+' conftest.er1 >conftest.err
10148 rm -f conftest.er1
10149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010152 { ac_try='test -z "$ac_c_werror_flag"
10153 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10155 (eval $ac_try) 2>&5
10156 ac_status=$?
10157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158 (exit $ac_status); }; } &&
10159 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10161 (eval $ac_try) 2>&5
10162 ac_status=$?
10163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10164 (exit $ac_status); }; }; then
10165 ac_cv_type_uintptr_t=yes
10166else
10167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010168sed 's/^/| /' conftest.$ac_ext >&5
10169
Martin v. Löwis11437992002-04-12 09:54:03 +000010170ac_cv_type_uintptr_t=no
10171fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010173fi
10174echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10175echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
10176
10177echo "$as_me:$LINENO: checking size of uintptr_t" >&5
10178echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
10179if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
10180 echo $ECHO_N "(cached) $ECHO_C" >&6
10181else
10182 if test "$ac_cv_type_uintptr_t" = yes; then
10183 # The cast to unsigned long works around a bug in the HP C Compiler
10184 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10185 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10186 # This bug is HP SR number 8606223364.
10187 if test "$cross_compiling" = yes; then
10188 # Depending upon the size, compute the lo and hi bounds.
10189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010190/* confdefs.h. */
10191_ACEOF
10192cat confdefs.h >>conftest.$ac_ext
10193cat >>conftest.$ac_ext <<_ACEOF
10194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010195$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010196int
10197main ()
10198{
10199static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
10200test_array [0] = 0
10201
10202 ;
10203 return 0;
10204}
10205_ACEOF
10206rm -f conftest.$ac_objext
10207if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010208 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010210 grep -v '^ *+' conftest.er1 >conftest.err
10211 rm -f conftest.er1
10212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10214 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010215 { ac_try='test -z "$ac_c_werror_flag"
10216 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10218 (eval $ac_try) 2>&5
10219 ac_status=$?
10220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10221 (exit $ac_status); }; } &&
10222 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10224 (eval $ac_try) 2>&5
10225 ac_status=$?
10226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10227 (exit $ac_status); }; }; then
10228 ac_lo=0 ac_mid=0
10229 while :; do
10230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010231/* confdefs.h. */
10232_ACEOF
10233cat confdefs.h >>conftest.$ac_ext
10234cat >>conftest.$ac_ext <<_ACEOF
10235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010236$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010237int
10238main ()
10239{
10240static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10241test_array [0] = 0
10242
10243 ;
10244 return 0;
10245}
10246_ACEOF
10247rm -f conftest.$ac_objext
10248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010249 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251 grep -v '^ *+' conftest.er1 >conftest.err
10252 rm -f conftest.er1
10253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10255 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010256 { ac_try='test -z "$ac_c_werror_flag"
10257 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10259 (eval $ac_try) 2>&5
10260 ac_status=$?
10261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262 (exit $ac_status); }; } &&
10263 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10265 (eval $ac_try) 2>&5
10266 ac_status=$?
10267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268 (exit $ac_status); }; }; then
10269 ac_hi=$ac_mid; break
10270else
10271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010272sed 's/^/| /' conftest.$ac_ext >&5
10273
Martin v. Löwis11437992002-04-12 09:54:03 +000010274ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010275 if test $ac_lo -le $ac_mid; then
10276 ac_lo= ac_hi=
10277 break
10278 fi
10279 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010280fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 done
10283else
10284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010285sed 's/^/| /' conftest.$ac_ext >&5
10286
Martin v. Löwis11437992002-04-12 09:54:03 +000010287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* confdefs.h. */
10289_ACEOF
10290cat confdefs.h >>conftest.$ac_ext
10291cat >>conftest.$ac_ext <<_ACEOF
10292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010293$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010294int
10295main ()
10296{
10297static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
10298test_array [0] = 0
10299
10300 ;
10301 return 0;
10302}
10303_ACEOF
10304rm -f conftest.$ac_objext
10305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010306 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010308 grep -v '^ *+' conftest.er1 >conftest.err
10309 rm -f conftest.er1
10310 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010313 { ac_try='test -z "$ac_c_werror_flag"
10314 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10316 (eval $ac_try) 2>&5
10317 ac_status=$?
10318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10319 (exit $ac_status); }; } &&
10320 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10322 (eval $ac_try) 2>&5
10323 ac_status=$?
10324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10325 (exit $ac_status); }; }; then
10326 ac_hi=-1 ac_mid=-1
10327 while :; do
10328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* confdefs.h. */
10330_ACEOF
10331cat confdefs.h >>conftest.$ac_ext
10332cat >>conftest.$ac_ext <<_ACEOF
10333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010335int
10336main ()
10337{
10338static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
10339test_array [0] = 0
10340
10341 ;
10342 return 0;
10343}
10344_ACEOF
10345rm -f conftest.$ac_objext
10346if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010347 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010349 grep -v '^ *+' conftest.er1 >conftest.err
10350 rm -f conftest.er1
10351 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010354 { ac_try='test -z "$ac_c_werror_flag"
10355 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10358 ac_status=$?
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); }; } &&
10361 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10363 (eval $ac_try) 2>&5
10364 ac_status=$?
10365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10366 (exit $ac_status); }; }; then
10367 ac_lo=$ac_mid; break
10368else
10369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010370sed 's/^/| /' conftest.$ac_ext >&5
10371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010373 if test $ac_mid -le $ac_hi; then
10374 ac_lo= ac_hi=
10375 break
10376 fi
10377 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010378fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010379rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 done
10381else
10382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010383sed 's/^/| /' conftest.$ac_ext >&5
10384
Martin v. Löwis11437992002-04-12 09:54:03 +000010385ac_lo= ac_hi=
10386fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010390# Binary search between lo and hi bounds.
10391while test "x$ac_lo" != "x$ac_hi"; do
10392 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* confdefs.h. */
10395_ACEOF
10396cat confdefs.h >>conftest.$ac_ext
10397cat >>conftest.$ac_ext <<_ACEOF
10398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010399$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010400int
10401main ()
10402{
10403static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10404test_array [0] = 0
10405
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext
10411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010412 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010414 grep -v '^ *+' conftest.er1 >conftest.err
10415 rm -f conftest.er1
10416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010419 { ac_try='test -z "$ac_c_werror_flag"
10420 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; } &&
10426 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10428 (eval $ac_try) 2>&5
10429 ac_status=$?
10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431 (exit $ac_status); }; }; then
10432 ac_hi=$ac_mid
10433else
10434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010435sed 's/^/| /' conftest.$ac_ext >&5
10436
Martin v. Löwis11437992002-04-12 09:54:03 +000010437ac_lo=`expr '(' $ac_mid ')' + 1`
10438fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010439rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010440done
10441case $ac_lo in
10442?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000010443'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10444See \`config.log' for more details." >&5
10445echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10446See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 { (exit 1); exit 1; }; } ;;
10448esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010449else
10450 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000010451 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10452See \`config.log' for more details." >&5
10453echo "$as_me: error: cannot run test program while cross compiling
10454See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010456else
Martin v. Löwis11437992002-04-12 09:54:03 +000010457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* confdefs.h. */
10459_ACEOF
10460cat confdefs.h >>conftest.$ac_ext
10461cat >>conftest.$ac_ext <<_ACEOF
10462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010463$ac_includes_default
10464long longval () { return (long) (sizeof (uintptr_t)); }
10465unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010467#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010470{
Martin v. Löwis11437992002-04-12 09:54:03 +000010471
10472 FILE *f = fopen ("conftest.val", "w");
10473 if (! f)
10474 exit (1);
10475 if (((long) (sizeof (uintptr_t))) < 0)
10476 {
10477 long i = longval ();
10478 if (i != ((long) (sizeof (uintptr_t))))
10479 exit (1);
10480 fprintf (f, "%ld\n", i);
10481 }
10482 else
10483 {
10484 unsigned long i = ulongval ();
10485 if (i != ((long) (sizeof (uintptr_t))))
10486 exit (1);
10487 fprintf (f, "%lu\n", i);
10488 }
10489 exit (ferror (f) || fclose (f) != 0);
10490
10491 ;
10492 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010493}
Martin v. Löwis11437992002-04-12 09:54:03 +000010494_ACEOF
10495rm -f conftest$ac_exeext
10496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10497 (eval $ac_link) 2>&5
10498 ac_status=$?
10499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10500 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10502 (eval $ac_try) 2>&5
10503 ac_status=$?
10504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10505 (exit $ac_status); }; }; then
10506 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010507else
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 echo "$as_me: program exited with status $ac_status" >&5
10509echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010510sed 's/^/| /' conftest.$ac_ext >&5
10511
Martin v. Löwis11437992002-04-12 09:54:03 +000010512( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010513{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10514See \`config.log' for more details." >&5
10515echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10516See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010517 { (exit 1); exit 1; }; }
10518fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010519rm -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 +000010520fi
10521fi
10522rm -f conftest.val
10523else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010524 ac_cv_sizeof_uintptr_t=0
10525fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010526fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010527echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
10528echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
10529cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010530#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010531_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010532
Michael W. Hudson54241132001-12-07 15:38:26 +000010533
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010534fi
10535
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010536# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010537echo "$as_me:$LINENO: checking size of off_t" >&5
10538echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
10539if test "${ac_cv_sizeof_off_t+set}" = set; then
10540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010541else
10542 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010543 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010544else
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010546/* confdefs.h. */
10547_ACEOF
10548cat confdefs.h >>conftest.$ac_ext
10549cat >>conftest.$ac_ext <<_ACEOF
10550/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010551#include <stdio.h>
10552#include <sys/types.h>
10553main()
10554{
10555 FILE *f=fopen("conftestval", "w");
10556 if (!f) exit(1);
10557 fprintf(f, "%d\n", sizeof(off_t));
10558 exit(0);
10559}
Martin v. Löwis11437992002-04-12 09:54:03 +000010560_ACEOF
10561rm -f conftest$ac_exeext
10562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10563 (eval $ac_link) 2>&5
10564 ac_status=$?
10565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10568 (eval $ac_try) 2>&5
10569 ac_status=$?
10570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10571 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010572 ac_cv_sizeof_off_t=`cat conftestval`
10573else
Martin v. Löwis11437992002-04-12 09:54:03 +000010574 echo "$as_me: program exited with status $ac_status" >&5
10575echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010576sed 's/^/| /' conftest.$ac_ext >&5
10577
Martin v. Löwis11437992002-04-12 09:54:03 +000010578( exit $ac_status )
10579ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010580fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010581rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010582fi
10583
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010584fi
10585
Martin v. Löwis11437992002-04-12 09:54:03 +000010586echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10587echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10588
10589cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010590#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010591_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010592
Michael W. Hudson54241132001-12-07 15:38:26 +000010593
Martin v. Löwis11437992002-04-12 09:54:03 +000010594echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10595echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010596if test "$have_long_long" = yes -a \
10597 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10598 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010599
Martin v. Löwis11437992002-04-12 09:54:03 +000010600cat >>confdefs.h <<\_ACEOF
10601#define HAVE_LARGEFILE_SUPPORT 1
10602_ACEOF
10603
10604 echo "$as_me:$LINENO: result: yes" >&5
10605echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010606else
Martin v. Löwis11437992002-04-12 09:54:03 +000010607 echo "$as_me:$LINENO: result: no" >&5
10608echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010609fi
10610
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010611# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010612echo "$as_me:$LINENO: checking size of time_t" >&5
10613echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10614if test "${ac_cv_sizeof_time_t+set}" = set; then
10615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010616else
10617 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010618 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010619else
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010626#include <stdio.h>
10627#include <time.h>
10628main()
10629{
10630 FILE *f=fopen("conftestval", "w");
10631 if (!f) exit(1);
10632 fprintf(f, "%d\n", sizeof(time_t));
10633 exit(0);
10634}
Martin v. Löwis11437992002-04-12 09:54:03 +000010635_ACEOF
10636rm -f conftest$ac_exeext
10637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10638 (eval $ac_link) 2>&5
10639 ac_status=$?
10640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
10645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010647 ac_cv_sizeof_time_t=`cat conftestval`
10648else
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 echo "$as_me: program exited with status $ac_status" >&5
10650echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010651sed 's/^/| /' conftest.$ac_ext >&5
10652
Martin v. Löwis11437992002-04-12 09:54:03 +000010653( exit $ac_status )
10654ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010655fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010656rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010657fi
10658
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010659fi
10660
Martin v. Löwis11437992002-04-12 09:54:03 +000010661echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10662echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10663
10664cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010665#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010667
Michael W. Hudson54241132001-12-07 15:38:26 +000010668
10669
Trent Mick635f6fb2000-08-23 21:33:05 +000010670# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010671ac_save_cc="$CC"
10672if test "$ac_cv_kpthread" = "yes"
10673then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010674elif test "$ac_cv_kthread" = "yes"
10675then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676elif test "$ac_cv_pthread" = "yes"
10677then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010678fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010679echo "$as_me:$LINENO: checking for pthread_t" >&5
10680echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010681have_pthread_t=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. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010688#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010689int
10690main ()
10691{
Guido van Rossum12580492000-09-24 16:47:19 +000010692pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ;
10694 return 0;
10695}
10696_ACEOF
10697rm -f conftest.$ac_objext
10698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010699 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010701 grep -v '^ *+' conftest.er1 >conftest.err
10702 rm -f conftest.er1
10703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10705 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010706 { ac_try='test -z "$ac_c_werror_flag"
10707 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10709 (eval $ac_try) 2>&5
10710 ac_status=$?
10711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10712 (exit $ac_status); }; } &&
10713 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10715 (eval $ac_try) 2>&5
10716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010719 have_pthread_t=yes
10720else
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010722sed 's/^/| /' conftest.$ac_ext >&5
10723
Trent Mick635f6fb2000-08-23 21:33:05 +000010724fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010725rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010726echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10727echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010728if test "$have_pthread_t" = yes ; then
10729 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10731echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10732 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10733 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010734else
10735 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010736 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010737else
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* confdefs.h. */
10740_ACEOF
10741cat confdefs.h >>conftest.$ac_ext
10742cat >>conftest.$ac_ext <<_ACEOF
10743/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010744#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010745#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010746 main()
10747 {
10748 FILE *f=fopen("conftestval", "w");
10749 if (!f) exit(1);
10750 fprintf(f, "%d\n", sizeof(pthread_t));
10751 exit(0);
10752 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010753_ACEOF
10754rm -f conftest$ac_exeext
10755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10756 (eval $ac_link) 2>&5
10757 ac_status=$?
10758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10761 (eval $ac_try) 2>&5
10762 ac_status=$?
10763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10764 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010765 ac_cv_sizeof_pthread_t=`cat conftestval`
10766else
Martin v. Löwis11437992002-04-12 09:54:03 +000010767 echo "$as_me: program exited with status $ac_status" >&5
10768echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010769sed 's/^/| /' conftest.$ac_ext >&5
10770
Martin v. Löwis11437992002-04-12 09:54:03 +000010771( exit $ac_status )
10772ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010773fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010774rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010775fi
10776
Trent Mick635f6fb2000-08-23 21:33:05 +000010777fi
10778
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10780echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10781
10782cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010783#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010784_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010785
10786fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010787CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010788
Martin v. Löwis11437992002-04-12 09:54:03 +000010789echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10790echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010791# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10792if test "${enable_toolbox_glue+set}" = set; then
10793 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795fi;
Jack Jansene578a632001-08-15 01:27:14 +000010796
10797if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010798then
Jack Jansene578a632001-08-15 01:27:14 +000010799 case $ac_sys_system/$ac_sys_release in
10800 Darwin/*)
10801 enable_toolbox_glue="yes";;
10802 *)
10803 enable_toolbox_glue="no";;
10804 esac
10805fi
10806case "$enable_toolbox_glue" in
10807yes)
Jack Jansene578a632001-08-15 01:27:14 +000010808 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010809 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010810
10811cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010812#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010814
10815 ;;
10816*)
Jack Jansene578a632001-08-15 01:27:14 +000010817 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010818 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010819 ;;
10820esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010821echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10822echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010823
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010824
10825case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000010826 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010827 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10828 ;;
10829 Darwin/*)
10830 OTHER_LIBTOOL_OPT=""
10831 ;;
10832esac
10833
10834
10835case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000010836 Darwin/[01567]\..*)
Jack Jansen39fd2312006-02-23 15:12:19 +000010837 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010838 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010839 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010840 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010841 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10842 if test ${gcc_version} '<' 4.0
10843 then
10844 LIBTOOL_CRUFT="-lcc_dynamic"
10845 else
10846 LIBTOOL_CRUFT=""
10847 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000010848 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010849 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010850 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010851esac
10852
Martin v. Löwis11437992002-04-12 09:54:03 +000010853echo "$as_me:$LINENO: checking for --enable-framework" >&5
10854echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010855if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010856then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010857 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010859 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010860
Martin v. Löwis11437992002-04-12 09:54:03 +000010861cat >>confdefs.h <<\_ACEOF
10862#define WITH_NEXT_FRAMEWORK 1
10863_ACEOF
10864
10865 echo "$as_me:$LINENO: result: yes" >&5
10866echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010867else
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 echo "$as_me:$LINENO: result: no" >&5
10869echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010870fi
10871
Martin v. Löwis11437992002-04-12 09:54:03 +000010872echo "$as_me:$LINENO: checking for dyld" >&5
10873echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010874case $ac_sys_system/$ac_sys_release in
10875 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010876
Martin v. Löwis11437992002-04-12 09:54:03 +000010877cat >>confdefs.h <<\_ACEOF
10878#define WITH_DYLD 1
10879_ACEOF
10880
10881 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10882echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010883 ;;
10884 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 echo "$as_me:$LINENO: result: no" >&5
10886echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010887 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010888esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010889
Guido van Rossum0a516c91994-09-12 10:58:40 +000010890# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010891
Michael W. Hudson54241132001-12-07 15:38:26 +000010892
10893
10894
10895
Guido van Rossum0a516c91994-09-12 10:58:40 +000010896# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010897# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010898echo "$as_me:$LINENO: checking SO" >&5
10899echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010900if test -z "$SO"
10901then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010902 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010903 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010904 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010905 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010906 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010907else
10908 # this might also be a termcap variable, see #610332
10909 echo
10910 echo '====================================================================='
10911 echo '+ +'
10912 echo '+ WARNING: You have set SO in your environment. +'
10913 echo '+ Do you really mean to change the extension for shared libraries? +'
10914 echo '+ Continuing in 10 seconds to let you to ponder. +'
10915 echo '+ +'
10916 echo '====================================================================='
10917 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010918fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010919echo "$as_me:$LINENO: result: $SO" >&5
10920echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010921# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010922# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010923# (Shared libraries in this instance are shared modules to be loaded into
10924# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010925echo "$as_me:$LINENO: checking LDSHARED" >&5
10926echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010927if test -z "$LDSHARED"
10928then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010929 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010930 AIX*)
10931 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010932 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010933 ;;
10934 BeOS*)
10935 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010936 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010937 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010938 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010939 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010941 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010942 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010943 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010944 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010945 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010946 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010947 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010948 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10949 if test "$enable_framework" ; then
10950 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010951 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10952 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010953 else
10954 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010955 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010956 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010957 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010958 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10959 if test "$enable_framework" ; then
10960 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010961 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10962 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010963 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010964 # No framework, use the Python app as bundle-loader
10965 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010966 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010967 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010968 Darwin/*)
10969 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10970 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010971 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010972 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010973 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010974 then
10975 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10976 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010977 else
10978 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10979 if test "$enable_framework" ; then
10980 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010981 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10982 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010983 else
10984 # No framework, use the Python app as bundle-loader
10985 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10986 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10987 fi
10988 fi
10989 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010990 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010991 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010992 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010993 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010994 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010995 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010996 else
10997 LDSHARED="ld -Bshareable ${LDFLAGS}"
10998 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010999 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011000 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011001 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011002 then LDSHARED='$(CC) -shared'
11003 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000011004 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011005 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000011006 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011007 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011008 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011009 *) LDSHARED="ld";;
11010 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011011fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011012echo "$as_me:$LINENO: result: $LDSHARED" >&5
11013echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011014BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000011015# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011016# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011017echo "$as_me:$LINENO: checking CCSHARED" >&5
11018echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011019if test -z "$CCSHARED"
11020then
Guido van Rossum07397971997-04-29 21:49:50 +000011021 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011022 SunOS*) if test "$GCC" = yes;
11023 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000011024 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011025 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000011026 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000011027 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000011028 else CCSHARED="+z";
11029 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011030 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011031 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011032 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011033 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011034 if test "$GCC" = "yes"
11035 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011036 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000011037 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011038 SCO_SV*)
11039 if test "$GCC" = "yes"
11040 then CCSHARED="-fPIC"
11041 else CCSHARED="-Kpic -belf"
11042 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000011043 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011044 IRIX*/6*) case $CC in
11045 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000011046 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011047 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011048 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011049 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011051echo "$as_me:$LINENO: result: $CCSHARED" >&5
11052echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011053# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011054# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011055echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
11056echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011057if test -z "$LINKFORSHARED"
11058then
Guido van Rossum07397971997-04-29 21:49:50 +000011059 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011060 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000011061 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000011062 LINKFORSHARED="-Wl,-E -Wl,+s";;
11063# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011064 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011065 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011066 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011068 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
11069 # which is
Jack Jansene578a632001-08-15 01:27:14 +000011070 # not used by the core itself but which needs to be in the core so
11071 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000011072 # -prebind is no longer used, because it actually seems to give a
11073 # slowdown in stead of a speedup, maybe due to the large number of
11074 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011075
11076 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000011077 if test "$enable_framework"
11078 then
Jack Jansenda49e192005-01-07 13:08:22 +000011079 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011080 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011081 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011082 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011083 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000011084 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011085 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000011086 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11087 then
11088 LINKFORSHARED="-Wl,--export-dynamic"
11089 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011090 SunOS/5*) case $CC in
11091 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000011092 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000011093 then
11094 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011095 fi;;
11096 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000011097 CYGWIN*)
11098 if test $enable_shared = "no"
11099 then
11100 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
11101 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011102 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011103fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011104echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
11105echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011106
Michael W. Hudson54241132001-12-07 15:38:26 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
11109echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011110if test ! "$LIBRARY" = "$LDLIBRARY"
11111then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000011112 case $ac_sys_system in
11113 CYGWIN*)
11114 # Cygwin needs CCSHARED when building extension DLLs
11115 # but not when building the interpreter DLL.
11116 CFLAGSFORSHARED='';;
11117 *)
11118 CFLAGSFORSHARED='$(CCSHARED)'
11119 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011120fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011121echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
11122echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011123
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011124# SHLIBS are libraries (except -lc and -lm) to link to the python shared
11125# library (with --enable-shared).
11126# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011127# symbols, this must be set to $(LIBS) (expanded by make). We do this even
11128# if it is not required, since it creates a dependency of the shared library
11129# to LIBS. This, in turn, means that applications linking the shared libpython
11130# don't need to link LIBS explicitly. The default should be only changed
11131# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011132
11133echo "$as_me:$LINENO: checking SHLIBS" >&5
11134echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
11135case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011136 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011137 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011138esac
11139echo "$as_me:$LINENO: result: $SHLIBS" >&5
11140echo "${ECHO_T}$SHLIBS" >&6
11141
11142
Guido van Rossum627b2d71993-12-24 10:39:16 +000011143# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
11145echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11146echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11147if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11148 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149else
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011151LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011159/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011160#ifdef __cplusplus
11161extern "C"
11162#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011163/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 builtin and then its argument prototype would still apply. */
11165char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011166int
11167main ()
11168{
11169dlopen ();
11170 ;
11171 return 0;
11172}
11173_ACEOF
11174rm -f conftest.$ac_objext conftest$ac_exeext
11175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011176 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011178 grep -v '^ *+' conftest.er1 >conftest.err
11179 rm -f conftest.er1
11180 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11182 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011183 { ac_try='test -z "$ac_c_werror_flag"
11184 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11186 (eval $ac_try) 2>&5
11187 ac_status=$?
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); }; } &&
11190 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11192 (eval $ac_try) 2>&5
11193 ac_status=$?
11194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11195 (exit $ac_status); }; }; then
11196 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011197else
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011199sed 's/^/| /' conftest.$ac_ext >&5
11200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011203rm -f conftest.err conftest.$ac_objext \
11204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011205LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011207echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11208echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11209if test $ac_cv_lib_dl_dlopen = yes; then
11210 cat >>confdefs.h <<_ACEOF
11211#define HAVE_LIBDL 1
11212_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011213
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011214 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216fi
11217 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
11219echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11220echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
11221if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11222 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011225LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011226cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* confdefs.h. */
11228_ACEOF
11229cat confdefs.h >>conftest.$ac_ext
11230cat >>conftest.$ac_ext <<_ACEOF
11231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011233/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011234#ifdef __cplusplus
11235extern "C"
11236#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011237/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 builtin and then its argument prototype would still apply. */
11239char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011240int
11241main ()
11242{
11243shl_load ();
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248rm -f conftest.$ac_objext conftest$ac_exeext
11249if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011250 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011252 grep -v '^ *+' conftest.er1 >conftest.err
11253 rm -f conftest.er1
11254 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011257 { ac_try='test -z "$ac_c_werror_flag"
11258 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11260 (eval $ac_try) 2>&5
11261 ac_status=$?
11262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11263 (exit $ac_status); }; } &&
11264 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11266 (eval $ac_try) 2>&5
11267 ac_status=$?
11268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11269 (exit $ac_status); }; }; then
11270 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271else
Martin v. Löwis11437992002-04-12 09:54:03 +000011272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011273sed 's/^/| /' conftest.$ac_ext >&5
11274
Martin v. Löwis11437992002-04-12 09:54:03 +000011275ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011276fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011277rm -f conftest.err conftest.$ac_objext \
11278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011279LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011281echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11282echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
11283if test $ac_cv_lib_dld_shl_load = yes; then
11284 cat >>confdefs.h <<_ACEOF
11285#define HAVE_LIBDLD 1
11286_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011288 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290fi
11291 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011292
11293# only check for sem_ini if thread support is requested
11294if test "$with_threads" = "yes" -o -z "$with_threads"; then
11295 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011296echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
11297if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011299else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011300 ac_func_search_save_LIBS=$LIBS
11301ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011310#ifdef __cplusplus
11311extern "C"
11312#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011313/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 builtin and then its argument prototype would still apply. */
11315char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011316int
11317main ()
11318{
11319sem_init ();
11320 ;
11321 return 0;
11322}
11323_ACEOF
11324rm -f conftest.$ac_objext conftest$ac_exeext
11325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011326 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328 grep -v '^ *+' conftest.er1 >conftest.err
11329 rm -f conftest.er1
11330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011333 { ac_try='test -z "$ac_c_werror_flag"
11334 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
11337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; } &&
11340 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11342 (eval $ac_try) 2>&5
11343 ac_status=$?
11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011346 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011347else
Martin v. Löwis11437992002-04-12 09:54:03 +000011348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011349sed 's/^/| /' conftest.$ac_ext >&5
11350
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011351fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011352rm -f conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011354if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011355 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* confdefs.h. */
11359_ACEOF
11360cat confdefs.h >>conftest.$ac_ext
11361cat >>conftest.$ac_ext <<_ACEOF
11362/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011363
11364/* Override any gcc2 internal prototype to avoid an error. */
11365#ifdef __cplusplus
11366extern "C"
11367#endif
11368/* We use char because int might match the return type of a gcc2
11369 builtin and then its argument prototype would still apply. */
11370char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011371int
11372main ()
11373{
11374sem_init ();
11375 ;
11376 return 0;
11377}
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011379rm -f conftest.$ac_objext conftest$ac_exeext
11380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011381 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011383 grep -v '^ *+' conftest.er1 >conftest.err
11384 rm -f conftest.er1
11385 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011388 { ac_try='test -z "$ac_c_werror_flag"
11389 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11391 (eval $ac_try) 2>&5
11392 ac_status=$?
11393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11394 (exit $ac_status); }; } &&
11395 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11397 (eval $ac_try) 2>&5
11398 ac_status=$?
11399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11400 (exit $ac_status); }; }; then
11401 ac_cv_search_sem_init="-l$ac_lib"
11402break
11403else
11404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011405sed 's/^/| /' conftest.$ac_ext >&5
11406
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011407fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011408rm -f conftest.err conftest.$ac_objext \
11409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011410 done
11411fi
11412LIBS=$ac_func_search_save_LIBS
11413fi
11414echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
11415echo "${ECHO_T}$ac_cv_search_sem_init" >&6
11416if test "$ac_cv_search_sem_init" != no; then
11417 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011418
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011419fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011420 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000011421 # posix4 on Solaris 2.6
11422 # pthread (first!) on Linux
11423fi
11424
Martin v. Löwis19d17342003-06-14 21:03:05 +000011425# check if we need libintl for locale functions
11426echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
11427echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
11428if test "${ac_cv_lib_intl_textdomain+set}" = set; then
11429 echo $ECHO_N "(cached) $ECHO_C" >&6
11430else
11431 ac_check_lib_save_LIBS=$LIBS
11432LIBS="-lintl $LIBS"
11433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011434/* confdefs.h. */
11435_ACEOF
11436cat confdefs.h >>conftest.$ac_ext
11437cat >>conftest.$ac_ext <<_ACEOF
11438/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011439
11440/* Override any gcc2 internal prototype to avoid an error. */
11441#ifdef __cplusplus
11442extern "C"
11443#endif
11444/* We use char because int might match the return type of a gcc2
11445 builtin and then its argument prototype would still apply. */
11446char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011447int
11448main ()
11449{
11450textdomain ();
11451 ;
11452 return 0;
11453}
11454_ACEOF
11455rm -f conftest.$ac_objext conftest$ac_exeext
11456if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011457 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000011458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011459 grep -v '^ *+' conftest.er1 >conftest.err
11460 rm -f conftest.er1
11461 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000011462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011464 { ac_try='test -z "$ac_c_werror_flag"
11465 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11467 (eval $ac_try) 2>&5
11468 ac_status=$?
11469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11470 (exit $ac_status); }; } &&
11471 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000011472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473 (eval $ac_try) 2>&5
11474 ac_status=$?
11475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476 (exit $ac_status); }; }; then
11477 ac_cv_lib_intl_textdomain=yes
11478else
11479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011480sed 's/^/| /' conftest.$ac_ext >&5
11481
Martin v. Löwis19d17342003-06-14 21:03:05 +000011482ac_cv_lib_intl_textdomain=no
11483fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011484rm -f conftest.err conftest.$ac_objext \
11485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011486LIBS=$ac_check_lib_save_LIBS
11487fi
11488echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
11489echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
11490if test $ac_cv_lib_intl_textdomain = yes; then
11491
11492cat >>confdefs.h <<\_ACEOF
11493#define WITH_LIBINTL 1
11494_ACEOF
11495
11496fi
11497
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011498
11499# checks for system dependent C++ extensions support
11500case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
11502echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
11503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011504/* confdefs.h. */
11505_ACEOF
11506cat confdefs.h >>conftest.$ac_ext
11507cat >>conftest.$ac_ext <<_ACEOF
11508/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011509#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011513loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
11518rm -f conftest.$ac_objext conftest$ac_exeext
11519if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011520 (eval $ac_link) 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_exeext'
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
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011540
Martin v. Löwis11437992002-04-12 09:54:03 +000011541cat >>confdefs.h <<\_ACEOF
11542#define AIX_GENUINE_CPLUSPLUS 1
11543_ACEOF
11544
11545 echo "$as_me:$LINENO: result: yes" >&5
11546echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011547else
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011549sed 's/^/| /' conftest.$ac_ext >&5
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551echo "$as_me:$LINENO: result: no" >&5
11552echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011553fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011554rm -f conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011556 *) ;;
11557esac
11558
Guido van Rossum70c7f481998-03-26 18:44:10 +000011559# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011560# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011561echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11562echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11563if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11564 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011565else
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011567LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* confdefs.h. */
11570_ACEOF
11571cat confdefs.h >>conftest.$ac_ext
11572cat >>conftest.$ac_ext <<_ACEOF
11573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011574
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011575/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011576#ifdef __cplusplus
11577extern "C"
11578#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011579/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 builtin and then its argument prototype would still apply. */
11581char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011582int
11583main ()
11584{
11585t_open ();
11586 ;
11587 return 0;
11588}
11589_ACEOF
11590rm -f conftest.$ac_objext conftest$ac_exeext
11591if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011592 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011594 grep -v '^ *+' conftest.er1 >conftest.err
11595 rm -f conftest.er1
11596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011599 { ac_try='test -z "$ac_c_werror_flag"
11600 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11602 (eval $ac_try) 2>&5
11603 ac_status=$?
11604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11605 (exit $ac_status); }; } &&
11606 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11608 (eval $ac_try) 2>&5
11609 ac_status=$?
11610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611 (exit $ac_status); }; }; then
11612 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011613else
Martin v. Löwis11437992002-04-12 09:54:03 +000011614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011615sed 's/^/| /' conftest.$ac_ext >&5
11616
Martin v. Löwis11437992002-04-12 09:54:03 +000011617ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011618fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011619rm -f conftest.err conftest.$ac_objext \
11620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011623echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11624echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11625if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011626 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011627fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011628 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011629echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11630echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11631if test "${ac_cv_lib_socket_socket+set}" = set; then
11632 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633else
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011635LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011642
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011644#ifdef __cplusplus
11645extern "C"
11646#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011648 builtin and then its argument prototype would still apply. */
11649char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011650int
11651main ()
11652{
11653socket ();
11654 ;
11655 return 0;
11656}
11657_ACEOF
11658rm -f conftest.$ac_objext conftest$ac_exeext
11659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011660 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011662 grep -v '^ *+' conftest.er1 >conftest.err
11663 rm -f conftest.er1
11664 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011667 { ac_try='test -z "$ac_c_werror_flag"
11668 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11670 (eval $ac_try) 2>&5
11671 ac_status=$?
11672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11673 (exit $ac_status); }; } &&
11674 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11676 (eval $ac_try) 2>&5
11677 ac_status=$?
11678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11679 (exit $ac_status); }; }; then
11680 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011681else
Martin v. Löwis11437992002-04-12 09:54:03 +000011682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011683sed 's/^/| /' conftest.$ac_ext >&5
11684
Martin v. Löwis11437992002-04-12 09:54:03 +000011685ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011686fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011687rm -f conftest.err conftest.$ac_objext \
11688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011689LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011690fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011691echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11692echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11693if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011694 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011695fi
11696 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011697
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011698case "$ac_sys_system" in
11699BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011700echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11701echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11702if test "${ac_cv_lib_net_socket+set}" = set; then
11703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011704else
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011706LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011708/* confdefs.h. */
11709_ACEOF
11710cat confdefs.h >>conftest.$ac_ext
11711cat >>conftest.$ac_ext <<_ACEOF
11712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011713
Guido van Rossumad678af1998-10-02 14:42:15 +000011714/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011715#ifdef __cplusplus
11716extern "C"
11717#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011718/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 builtin and then its argument prototype would still apply. */
11720char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011721int
11722main ()
11723{
11724socket ();
11725 ;
11726 return 0;
11727}
11728_ACEOF
11729rm -f conftest.$ac_objext conftest$ac_exeext
11730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011731 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011733 grep -v '^ *+' conftest.er1 >conftest.err
11734 rm -f conftest.er1
11735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011738 { ac_try='test -z "$ac_c_werror_flag"
11739 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11741 (eval $ac_try) 2>&5
11742 ac_status=$?
11743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11744 (exit $ac_status); }; } &&
11745 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11747 (eval $ac_try) 2>&5
11748 ac_status=$?
11749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11750 (exit $ac_status); }; }; then
11751 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011754sed 's/^/| /' conftest.$ac_ext >&5
11755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011757fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011758rm -f conftest.err conftest.$ac_objext \
11759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011760LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11763echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11764if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011765 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011766fi
11767 # BeOS
11768;;
11769esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011770
Martin v. Löwis11437992002-04-12 09:54:03 +000011771echo "$as_me:$LINENO: checking for --with-libs" >&5
11772echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11773
Guido van Rossuma68acba1996-07-31 17:36:39 +000011774# Check whether --with-libs or --without-libs was given.
11775if test "${with_libs+set}" = set; then
11776 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011777
11778echo "$as_me:$LINENO: result: $withval" >&5
11779echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011780LIBS="$withval $LIBS"
11781
11782else
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 echo "$as_me:$LINENO: result: no" >&5
11784echo "${ECHO_T}no" >&6
11785fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011786
Martin v. Löwis9176fc12006-04-11 11:12:43 +000011787# Check for use of the system libffi library
11788echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
11789echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6
11790
11791# Check whether --with-system_ffi or --without-system_ffi was given.
11792if test "${with_system_ffi+set}" = set; then
11793 withval="$with_system_ffi"
11794
11795fi;
11796
11797if test -z "$with_system_ffi"
11798then with_system_ffi="no"
11799fi
11800echo "$as_me:$LINENO: result: $with_system_ffi" >&5
11801echo "${ECHO_T}$with_system_ffi" >&6
11802
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011803# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011804
11805
Martin v. Löwis11437992002-04-12 09:54:03 +000011806echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11807echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11808
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011809# Check whether --with-signal-module or --without-signal-module was given.
11810if test "${with_signal_module+set}" = set; then
11811 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011812
Martin v. Löwis11437992002-04-12 09:54:03 +000011813fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011814
11815if test -z "$with_signal_module"
11816then with_signal_module="yes"
11817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011818echo "$as_me:$LINENO: result: $with_signal_module" >&5
11819echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011820
11821if test "${with_signal_module}" = "yes"; then
11822 USE_SIGNAL_MODULE=""
11823 SIGNAL_OBJS=""
11824else
11825 USE_SIGNAL_MODULE="#"
11826 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11827fi
11828
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011829# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011830
Barry Warsawc0d24d82000-06-29 16:12:00 +000011831USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11834echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11835
Guido van Rossumec2f0731997-01-22 20:54:01 +000011836
11837# Check whether --with-dec-threads or --without-dec-threads was given.
11838if test "${with_dec_threads+set}" = set; then
11839 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011840
11841echo "$as_me:$LINENO: result: $withval" >&5
11842echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011843LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011844if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011845 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011846fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011847else
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 echo "$as_me:$LINENO: result: no" >&5
11849echo "${ECHO_T}no" >&6
11850fi;
11851
11852# Templates for things AC_DEFINEd more than once.
11853# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011854
11855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
11857
11858
11859
11860
11861echo "$as_me:$LINENO: checking for --with-threads" >&5
11862echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11863
Guido van Rossumec2f0731997-01-22 20:54:01 +000011864# Check whether --with-threads or --without-threads was given.
11865if test "${with_threads+set}" = set; then
11866 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011869
Barry Warsawc0d24d82000-06-29 16:12:00 +000011870# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011873if test "${with_thread+set}" = set; then
11874 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011875 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011876fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000011877
11878if test -z "$with_threads"
11879then with_threads="yes"
11880fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011881echo "$as_me:$LINENO: result: $with_threads" >&5
11882echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000011883
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011884
Barry Warsawc0d24d82000-06-29 16:12:00 +000011885if test "$with_threads" = "no"
11886then
11887 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011888elif test "$ac_cv_pthread_is_default" = yes
11889then
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011891#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011892_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011893
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011894 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011896#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011898
11899 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011900 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011901elif test "$ac_cv_kpthread" = "yes"
11902then
11903 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011904 if test "$ac_cv_cxx_thread" = "yes"; then
11905 CXX="$CXX -Kpthread"
11906 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011908#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011909_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011911 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011912 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011913elif test "$ac_cv_kthread" = "yes"
11914then
11915 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011916 if test "$ac_cv_cxx_thread" = "yes"; then
11917 CXX="$CXX -Kthread"
11918 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011919 cat >>confdefs.h <<\_ACEOF
11920#define WITH_THREAD 1
11921_ACEOF
11922
11923 posix_threads=yes
11924 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011925elif test "$ac_cv_pthread" = "yes"
11926then
11927 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011928 if test "$ac_cv_cxx_thread" = "yes"; then
11929 CXX="$CXX -pthread"
11930 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011931 cat >>confdefs.h <<\_ACEOF
11932#define WITH_THREAD 1
11933_ACEOF
11934
11935 posix_threads=yes
11936 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011937else
11938 if test ! -z "$with_threads" -a -d "$with_threads"
11939 then LDFLAGS="$LDFLAGS -L$with_threads"
11940 fi
11941 if test ! -z "$withval" -a -d "$withval"
11942 then LDFLAGS="$LDFLAGS -L$withval"
11943 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011944
11945 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011946 # define _POSIX_THREADS in unistd.h. Some apparently don't
11947 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11949echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011951/* confdefs.h. */
11952_ACEOF
11953cat confdefs.h >>conftest.$ac_ext
11954cat >>conftest.$ac_ext <<_ACEOF
11955/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011956
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011957#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011958#ifdef _POSIX_THREADS
11959yes
11960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011961
11962_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011964 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011965 unistd_defines_pthreads=yes
11966else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011967 unistd_defines_pthreads=no
11968fi
11969rm -f conftest*
11970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11972echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011973
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011975#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011976_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978 if test "${ac_cv_header_cthreads_h+set}" = set; then
11979 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11980echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11981if test "${ac_cv_header_cthreads_h+set}" = set; then
11982 echo $ECHO_N "(cached) $ECHO_C" >&6
11983fi
11984echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11985echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011986else
Martin v. Löwis11437992002-04-12 09:54:03 +000011987 # Is the header compilable?
11988echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11989echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011991/* confdefs.h. */
11992_ACEOF
11993cat confdefs.h >>conftest.$ac_ext
11994cat >>conftest.$ac_ext <<_ACEOF
11995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011996$ac_includes_default
11997#include <cthreads.h>
11998_ACEOF
11999rm -f conftest.$ac_objext
12000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012001 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012003 grep -v '^ *+' conftest.er1 >conftest.err
12004 rm -f conftest.er1
12005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012008 { ac_try='test -z "$ac_c_werror_flag"
12009 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12011 (eval $ac_try) 2>&5
12012 ac_status=$?
12013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12014 (exit $ac_status); }; } &&
12015 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12017 (eval $ac_try) 2>&5
12018 ac_status=$?
12019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12020 (exit $ac_status); }; }; then
12021 ac_header_compiler=yes
12022else
12023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012024sed 's/^/| /' conftest.$ac_ext >&5
12025
Martin v. Löwis11437992002-04-12 09:54:03 +000012026ac_header_compiler=no
12027fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012029echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12030echo "${ECHO_T}$ac_header_compiler" >&6
12031
12032# Is the header present?
12033echo "$as_me:$LINENO: checking cthreads.h presence" >&5
12034echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
12035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* confdefs.h. */
12037_ACEOF
12038cat confdefs.h >>conftest.$ac_ext
12039cat >>conftest.$ac_ext <<_ACEOF
12040/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012041#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012042_ACEOF
12043if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12044 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12045 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012046 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 rm -f conftest.er1
12048 cat conftest.err >&5
12049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } >/dev/null; then
12051 if test -s conftest.err; then
12052 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012053 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 else
12055 ac_cpp_err=
12056 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012057else
Martin v. Löwis11437992002-04-12 09:54:03 +000012058 ac_cpp_err=yes
12059fi
12060if test -z "$ac_cpp_err"; then
12061 ac_header_preproc=yes
12062else
12063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012064sed 's/^/| /' conftest.$ac_ext >&5
12065
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012068rm -f conftest.err conftest.$ac_ext
12069echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12070echo "${ECHO_T}$ac_header_preproc" >&6
12071
12072# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012073case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12074 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12076echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012077 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
12078echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
12079 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012080 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012081 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012082 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
12083echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012084 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
12085echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
12086 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
12087echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
12088 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12089echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012090 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
12091echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012092 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
12093echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012094 (
12095 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012096## ------------------------------------------------ ##
12097## Report this to http://www.python.org/python-bugs ##
12098## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012099_ASBOX
12100 ) |
12101 sed "s/^/$as_me: WARNING: /" >&2
12102 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012103esac
12104echo "$as_me:$LINENO: checking for cthreads.h" >&5
12105echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
12106if test "${ac_cv_header_cthreads_h+set}" = set; then
12107 echo $ECHO_N "(cached) $ECHO_C" >&6
12108else
12109 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012110fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012111echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12112echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
12113
12114fi
12115if test $ac_cv_header_cthreads_h = yes; then
12116 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012117#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012118_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012121#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012122_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012123
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
12125cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012126#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012127_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012128
12129 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012130 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012131else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012132
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12134 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12135echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12136if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12137 echo $ECHO_N "(cached) $ECHO_C" >&6
12138fi
12139echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12140echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012141else
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 # Is the header compilable?
12143echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
12144echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
12145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012146/* confdefs.h. */
12147_ACEOF
12148cat confdefs.h >>conftest.$ac_ext
12149cat >>conftest.$ac_ext <<_ACEOF
12150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012151$ac_includes_default
12152#include <mach/cthreads.h>
12153_ACEOF
12154rm -f conftest.$ac_objext
12155if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012156 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012158 grep -v '^ *+' conftest.er1 >conftest.err
12159 rm -f conftest.er1
12160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12162 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012163 { ac_try='test -z "$ac_c_werror_flag"
12164 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12166 (eval $ac_try) 2>&5
12167 ac_status=$?
12168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12169 (exit $ac_status); }; } &&
12170 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12172 (eval $ac_try) 2>&5
12173 ac_status=$?
12174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175 (exit $ac_status); }; }; then
12176 ac_header_compiler=yes
12177else
12178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012179sed 's/^/| /' conftest.$ac_ext >&5
12180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181ac_header_compiler=no
12182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012184echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12185echo "${ECHO_T}$ac_header_compiler" >&6
12186
12187# Is the header present?
12188echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
12189echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
12190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* confdefs.h. */
12192_ACEOF
12193cat confdefs.h >>conftest.$ac_ext
12194cat >>conftest.$ac_ext <<_ACEOF
12195/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012196#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012197_ACEOF
12198if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12199 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12200 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012201 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 rm -f conftest.er1
12203 cat conftest.err >&5
12204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); } >/dev/null; then
12206 if test -s conftest.err; then
12207 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012208 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 else
12210 ac_cpp_err=
12211 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012212else
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 ac_cpp_err=yes
12214fi
12215if test -z "$ac_cpp_err"; then
12216 ac_header_preproc=yes
12217else
12218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012219sed 's/^/| /' conftest.$ac_ext >&5
12220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012223rm -f conftest.err conftest.$ac_ext
12224echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12225echo "${ECHO_T}$ac_header_preproc" >&6
12226
12227# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012228case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12229 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12231echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012232 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12233echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12234 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012235 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012236 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012237 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12238echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012239 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12240echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12241 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12242echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12243 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12244echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012245 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12246echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012247 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12248echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012249 (
12250 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012251## ------------------------------------------------ ##
12252## Report this to http://www.python.org/python-bugs ##
12253## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012254_ASBOX
12255 ) |
12256 sed "s/^/$as_me: WARNING: /" >&2
12257 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012258esac
12259echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12260echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12261if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12262 echo $ECHO_N "(cached) $ECHO_C" >&6
12263else
12264 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012266echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12267echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
12268
12269fi
12270if test $ac_cv_header_mach_cthreads_h = yes; then
12271 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012272#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012273_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012276#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012277_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
12280cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012281#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012282_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012283
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012284 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012285else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 echo "$as_me:$LINENO: checking for --with-pth" >&5
12288echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
12289
12290# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012291if test "${with_pth+set}" = set; then
12292 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012293 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012294echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012295 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012296#define WITH_THREAD 1
12297_ACEOF
12298
12299
12300cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012301#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012302_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012303
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012304 LIBS="-lpth $LIBS"
12305 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012306else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012307 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012308echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012309
12310 # Just looking for pthread_create in libpthread is not enough:
12311 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12312 # So we really have to include pthread.h, and then link.
12313 _libs=$LIBS
12314 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12316echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
12317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* confdefs.h. */
12319_ACEOF
12320cat confdefs.h >>conftest.$ac_ext
12321cat >>conftest.$ac_ext <<_ACEOF
12322/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012323#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012324
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012325void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012326int
12327main ()
12328{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012329
12330pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012331 ;
12332 return 0;
12333}
12334_ACEOF
12335rm -f conftest.$ac_objext conftest$ac_exeext
12336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012337 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012339 grep -v '^ *+' conftest.er1 >conftest.err
12340 rm -f conftest.er1
12341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12343 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012344 { ac_try='test -z "$ac_c_werror_flag"
12345 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12347 (eval $ac_try) 2>&5
12348 ac_status=$?
12349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12350 (exit $ac_status); }; } &&
12351 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12353 (eval $ac_try) 2>&5
12354 ac_status=$?
12355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12356 (exit $ac_status); }; }; then
12357
12358 echo "$as_me:$LINENO: result: yes" >&5
12359echo "${ECHO_T}yes" >&6
12360 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012361#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012362_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012363
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012364 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012365 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012366else
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012368sed 's/^/| /' conftest.$ac_ext >&5
12369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012371 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12373echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
12374if test "${ac_cv_func_pthread_detach+set}" = set; then
12375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012376else
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* confdefs.h. */
12379_ACEOF
12380cat confdefs.h >>conftest.$ac_ext
12381cat >>conftest.$ac_ext <<_ACEOF
12382/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012383/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12385#define pthread_detach innocuous_pthread_detach
12386
Guido van Rossumad678af1998-10-02 14:42:15 +000012387/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012388 which can conflict with char pthread_detach (); below.
12389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012390 <limits.h> exists even on freestanding compilers. */
12391
12392#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000012393# include <limits.h>
12394#else
12395# include <assert.h>
12396#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012397
12398#undef pthread_detach
12399
Guido van Rossumad678af1998-10-02 14:42:15 +000012400/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012401#ifdef __cplusplus
12402extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012403{
Martin v. Löwis11437992002-04-12 09:54:03 +000012404#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000012405/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 builtin and then its argument prototype would still apply. */
12407char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000012408/* The GNU C library defines this for functions which it implements
12409 to always fail with ENOSYS. Some functions are actually named
12410 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000012411#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000012412choke me
12413#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012414char (*f) () = pthread_detach;
12415#endif
12416#ifdef __cplusplus
12417}
Guido van Rossumad678af1998-10-02 14:42:15 +000012418#endif
12419
Skip Montanaro6dead952003-09-25 14:50:04 +000012420int
12421main ()
12422{
12423return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
12428rm -f conftest.$ac_objext conftest$ac_exeext
12429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012430 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012432 grep -v '^ *+' conftest.er1 >conftest.err
12433 rm -f conftest.er1
12434 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12436 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012437 { ac_try='test -z "$ac_c_werror_flag"
12438 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12440 (eval $ac_try) 2>&5
12441 ac_status=$?
12442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12443 (exit $ac_status); }; } &&
12444 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12446 (eval $ac_try) 2>&5
12447 ac_status=$?
12448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12449 (exit $ac_status); }; }; then
12450 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012451else
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
Martin v. Löwis11437992002-04-12 09:54:03 +000012455ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012456fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012457rm -f conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000012459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012460echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
12461echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
12462if test $ac_cv_func_pthread_detach = yes; then
12463 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012464#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012466
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012467 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012468 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000012469else
Guido van Rossumad678af1998-10-02 14:42:15 +000012470
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012471 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12472 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12473echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12474if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
12476fi
12477echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12478echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12479else
12480 # Is the header compilable?
12481echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
12482echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
12483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012484/* confdefs.h. */
12485_ACEOF
12486cat confdefs.h >>conftest.$ac_ext
12487cat >>conftest.$ac_ext <<_ACEOF
12488/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012489$ac_includes_default
12490#include <atheos/threads.h>
12491_ACEOF
12492rm -f conftest.$ac_objext
12493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012494 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012496 grep -v '^ *+' conftest.er1 >conftest.err
12497 rm -f conftest.er1
12498 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012501 { ac_try='test -z "$ac_c_werror_flag"
12502 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12504 (eval $ac_try) 2>&5
12505 ac_status=$?
12506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12507 (exit $ac_status); }; } &&
12508 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12510 (eval $ac_try) 2>&5
12511 ac_status=$?
12512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12513 (exit $ac_status); }; }; then
12514 ac_header_compiler=yes
12515else
12516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012517sed 's/^/| /' conftest.$ac_ext >&5
12518
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012519ac_header_compiler=no
12520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012522echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12523echo "${ECHO_T}$ac_header_compiler" >&6
12524
12525# Is the header present?
12526echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
12527echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
12528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012529/* confdefs.h. */
12530_ACEOF
12531cat confdefs.h >>conftest.$ac_ext
12532cat >>conftest.$ac_ext <<_ACEOF
12533/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012534#include <atheos/threads.h>
12535_ACEOF
12536if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12537 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012540 rm -f conftest.er1
12541 cat conftest.err >&5
12542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543 (exit $ac_status); } >/dev/null; then
12544 if test -s conftest.err; then
12545 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012546 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012547 else
12548 ac_cpp_err=
12549 fi
12550else
12551 ac_cpp_err=yes
12552fi
12553if test -z "$ac_cpp_err"; then
12554 ac_header_preproc=yes
12555else
12556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012557sed 's/^/| /' conftest.$ac_ext >&5
12558
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012559 ac_header_preproc=no
12560fi
12561rm -f conftest.err conftest.$ac_ext
12562echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12563echo "${ECHO_T}$ac_header_preproc" >&6
12564
12565# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012566case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12567 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012568 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12569echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012570 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
12571echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
12572 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012573 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012574 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012575 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
12576echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012577 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
12578echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
12579 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
12580echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12581 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12582echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012583 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12584echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012585 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12586echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012587 (
12588 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012589## ------------------------------------------------ ##
12590## Report this to http://www.python.org/python-bugs ##
12591## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012592_ASBOX
12593 ) |
12594 sed "s/^/$as_me: WARNING: /" >&2
12595 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012596esac
12597echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12598echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12599if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12600 echo $ECHO_N "(cached) $ECHO_C" >&6
12601else
12602 ac_cv_header_atheos_threads_h=$ac_header_preproc
12603fi
12604echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12605echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12606
12607fi
12608if test $ac_cv_header_atheos_threads_h = yes; then
12609 cat >>confdefs.h <<\_ACEOF
12610#define WITH_THREAD 1
12611_ACEOF
12612
12613
12614cat >>confdefs.h <<\_ACEOF
12615#define ATHEOS_THREADS 1
12616_ACEOF
12617
12618 THREADOBJ="Python/thread.o"
12619else
12620
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12622 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12623echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12624if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12625 echo $ECHO_N "(cached) $ECHO_C" >&6
12626fi
12627echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12628echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012629else
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 # Is the header compilable?
12631echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12632echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* confdefs.h. */
12635_ACEOF
12636cat confdefs.h >>conftest.$ac_ext
12637cat >>conftest.$ac_ext <<_ACEOF
12638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012639$ac_includes_default
12640#include <kernel/OS.h>
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012644 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012646 grep -v '^ *+' conftest.er1 >conftest.err
12647 rm -f conftest.er1
12648 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012651 { ac_try='test -z "$ac_c_werror_flag"
12652 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12654 (eval $ac_try) 2>&5
12655 ac_status=$?
12656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657 (exit $ac_status); }; } &&
12658 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12660 (eval $ac_try) 2>&5
12661 ac_status=$?
12662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663 (exit $ac_status); }; }; then
12664 ac_header_compiler=yes
12665else
12666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012667sed 's/^/| /' conftest.$ac_ext >&5
12668
Martin v. Löwis11437992002-04-12 09:54:03 +000012669ac_header_compiler=no
12670fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012671rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012672echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12673echo "${ECHO_T}$ac_header_compiler" >&6
12674
12675# Is the header present?
12676echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12677echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* confdefs.h. */
12680_ACEOF
12681cat confdefs.h >>conftest.$ac_ext
12682cat >>conftest.$ac_ext <<_ACEOF
12683/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012684#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012685_ACEOF
12686if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12687 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12688 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012689 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 rm -f conftest.er1
12691 cat conftest.err >&5
12692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12693 (exit $ac_status); } >/dev/null; then
12694 if test -s conftest.err; then
12695 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012696 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 else
12698 ac_cpp_err=
12699 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012700else
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 ac_cpp_err=yes
12702fi
12703if test -z "$ac_cpp_err"; then
12704 ac_header_preproc=yes
12705else
12706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012707sed 's/^/| /' conftest.$ac_ext >&5
12708
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012710fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012711rm -f conftest.err conftest.$ac_ext
12712echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12713echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012714
Martin v. Löwis11437992002-04-12 09:54:03 +000012715# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012716case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12717 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12719echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012720 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12721echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12722 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012724 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012725 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12726echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012727 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12728echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12729 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12730echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12731 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12732echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012733 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12734echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012735 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12736echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012737 (
12738 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012739## ------------------------------------------------ ##
12740## Report this to http://www.python.org/python-bugs ##
12741## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012742_ASBOX
12743 ) |
12744 sed "s/^/$as_me: WARNING: /" >&2
12745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012746esac
12747echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12748echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12749if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12750 echo $ECHO_N "(cached) $ECHO_C" >&6
12751else
12752 ac_cv_header_kernel_OS_h=$ac_header_preproc
12753fi
12754echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12755echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12756
12757fi
12758if test $ac_cv_header_kernel_OS_h = yes; then
12759 cat >>confdefs.h <<\_ACEOF
12760#define WITH_THREAD 1
12761_ACEOF
12762
12763
12764cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012765#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012766_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012767
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012768 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012769else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012770
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12772echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12773if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12774 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012775else
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012777LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012778cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* confdefs.h. */
12780_ACEOF
12781cat confdefs.h >>conftest.$ac_ext
12782cat >>conftest.$ac_ext <<_ACEOF
12783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
Greg Steinadf63d62000-07-05 10:38:09 +000012785/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012786#ifdef __cplusplus
12787extern "C"
12788#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012789/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 builtin and then its argument prototype would still apply. */
12791char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
12795pthread_create ();
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800rm -f conftest.$ac_objext conftest$ac_exeext
12801if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012802 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012804 grep -v '^ *+' conftest.er1 >conftest.err
12805 rm -f conftest.er1
12806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012809 { ac_try='test -z "$ac_c_werror_flag"
12810 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12813 ac_status=$?
12814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12815 (exit $ac_status); }; } &&
12816 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12818 (eval $ac_try) 2>&5
12819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); }; }; then
12822 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012823else
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012825sed 's/^/| /' conftest.$ac_ext >&5
12826
Martin v. Löwis11437992002-04-12 09:54:03 +000012827ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012828fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012829rm -f conftest.err conftest.$ac_objext \
12830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012831LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012833echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12834echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12835if test $ac_cv_lib_pthreads_pthread_create = yes; then
12836 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012837#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012838_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012839
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012840 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012841 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012842 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012843else
Greg Steinadf63d62000-07-05 10:38:09 +000012844
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12846echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12847if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12848 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012849else
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012851LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012853/* confdefs.h. */
12854_ACEOF
12855cat confdefs.h >>conftest.$ac_ext
12856cat >>conftest.$ac_ext <<_ACEOF
12857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Guido van Rossum49545951997-12-02 19:28:29 +000012859/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012860#ifdef __cplusplus
12861extern "C"
12862#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012863/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 builtin and then its argument prototype would still apply. */
12865char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012866int
12867main ()
12868{
12869pthread_create ();
12870 ;
12871 return 0;
12872}
12873_ACEOF
12874rm -f conftest.$ac_objext conftest$ac_exeext
12875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012876 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012878 grep -v '^ *+' conftest.er1 >conftest.err
12879 rm -f conftest.er1
12880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012883 { ac_try='test -z "$ac_c_werror_flag"
12884 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12886 (eval $ac_try) 2>&5
12887 ac_status=$?
12888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); }; } &&
12890 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12892 (eval $ac_try) 2>&5
12893 ac_status=$?
12894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12895 (exit $ac_status); }; }; then
12896 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012897else
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012899sed 's/^/| /' conftest.$ac_ext >&5
12900
Martin v. Löwis11437992002-04-12 09:54:03 +000012901ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012902fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012903rm -f conftest.err conftest.$ac_objext \
12904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012905LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012907echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12908echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12909if test $ac_cv_lib_c_r_pthread_create = yes; then
12910 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012911#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012912_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012913
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012914 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012915 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012916 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012917else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012918
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12920echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12921if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012923else
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012925LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* confdefs.h. */
12928_ACEOF
12929cat confdefs.h >>conftest.$ac_ext
12930cat >>conftest.$ac_ext <<_ACEOF
12931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012933/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934#ifdef __cplusplus
12935extern "C"
12936#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012937/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 builtin and then its argument prototype would still apply. */
12939char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
12942{
12943__pthread_create_system ();
12944 ;
12945 return 0;
12946}
12947_ACEOF
12948rm -f conftest.$ac_objext conftest$ac_exeext
12949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012950 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012952 grep -v '^ *+' conftest.er1 >conftest.err
12953 rm -f conftest.er1
12954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12956 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012957 { ac_try='test -z "$ac_c_werror_flag"
12958 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12960 (eval $ac_try) 2>&5
12961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); }; } &&
12964 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12966 (eval $ac_try) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); }; }; then
12970 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012971else
Martin v. Löwis11437992002-04-12 09:54:03 +000012972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012973sed 's/^/| /' conftest.$ac_ext >&5
12974
Martin v. Löwis11437992002-04-12 09:54:03 +000012975ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012976fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012977rm -f conftest.err conftest.$ac_objext \
12978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012980fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012981echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12982echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12983if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12984 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012985#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012986_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012987
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012988 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012989 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012990 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012991else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12994echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12995if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12996 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012997else
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012999LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013001/* confdefs.h. */
13002_ACEOF
13003cat confdefs.h >>conftest.$ac_ext
13004cat >>conftest.$ac_ext <<_ACEOF
13005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013006
Guido van Rossumb93a8621998-05-07 13:27:32 +000013007/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013008#ifdef __cplusplus
13009extern "C"
13010#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000013011/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 builtin and then its argument prototype would still apply. */
13013char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013014int
13015main ()
13016{
13017pthread_create ();
13018 ;
13019 return 0;
13020}
13021_ACEOF
13022rm -f conftest.$ac_objext conftest$ac_exeext
13023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013024 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013026 grep -v '^ *+' conftest.er1 >conftest.err
13027 rm -f conftest.er1
13028 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013031 { ac_try='test -z "$ac_c_werror_flag"
13032 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13034 (eval $ac_try) 2>&5
13035 ac_status=$?
13036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13037 (exit $ac_status); }; } &&
13038 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13040 (eval $ac_try) 2>&5
13041 ac_status=$?
13042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13043 (exit $ac_status); }; }; then
13044 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013045else
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013047sed 's/^/| /' conftest.$ac_ext >&5
13048
Martin v. Löwis11437992002-04-12 09:54:03 +000013049ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000013050fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013051rm -f conftest.err conftest.$ac_objext \
13052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013053LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013054fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013055echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
13056echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
13057if test $ac_cv_lib_cma_pthread_create = yes; then
13058 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013059#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013060_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013062 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013063 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013064 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000013065else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000013066
Martin v. Löwis130fb172001-07-19 11:00:41 +000013067 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000013068fi
13069
Guido van Rossum627b2d71993-12-24 10:39:16 +000013070
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013071fi
13072
Guido van Rossum0be3e491997-05-22 20:33:33 +000013073fi
13074
Guido van Rossum49545951997-12-02 19:28:29 +000013075fi
13076
Guido van Rossumb93a8621998-05-07 13:27:32 +000013077fi
13078
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013079
Michael W. Hudson54241132001-12-07 15:38:26 +000013080fi
13081
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013082
13083fi
13084
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013085fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013086rm -f conftest.err conftest.$ac_objext \
13087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013088fi;
13089fi
13090
13091
13092fi
13093
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013094
Michael W. Hudson54241132001-12-07 15:38:26 +000013095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
13097echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
13098if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
13099 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100else
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013102LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* confdefs.h. */
13105_ACEOF
13106cat confdefs.h >>conftest.$ac_ext
13107cat >>conftest.$ac_ext <<_ACEOF
13108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013110/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013111#ifdef __cplusplus
13112extern "C"
13113#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013114/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 builtin and then its argument prototype would still apply. */
13116char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013117int
13118main ()
13119{
13120usconfig ();
13121 ;
13122 return 0;
13123}
13124_ACEOF
13125rm -f conftest.$ac_objext conftest$ac_exeext
13126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013127 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013129 grep -v '^ *+' conftest.er1 >conftest.err
13130 rm -f conftest.er1
13131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13133 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013134 { ac_try='test -z "$ac_c_werror_flag"
13135 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13137 (eval $ac_try) 2>&5
13138 ac_status=$?
13139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140 (exit $ac_status); }; } &&
13141 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13143 (eval $ac_try) 2>&5
13144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); }; }; then
13147 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013148else
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013150sed 's/^/| /' conftest.$ac_ext >&5
13151
Martin v. Löwis11437992002-04-12 09:54:03 +000013152ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013153fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013154rm -f conftest.err conftest.$ac_objext \
13155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013156LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013158echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
13159echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
13160if test $ac_cv_lib_mpc_usconfig = yes; then
13161 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013162#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013163_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013164
Martin v. Löwis130fb172001-07-19 11:00:41 +000013165 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013166 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013167 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013168fi
13169
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013170
Neal Norwitza978ab02002-11-02 16:58:05 +000013171 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
13173echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
13174if test "${ac_cv_lib_thread_thr_create+set}" = set; then
13175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176else
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013178LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013180/* confdefs.h. */
13181_ACEOF
13182cat confdefs.h >>conftest.$ac_ext
13183cat >>conftest.$ac_ext <<_ACEOF
13184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013186/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013187#ifdef __cplusplus
13188extern "C"
13189#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 builtin and then its argument prototype would still apply. */
13192char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013193int
13194main ()
13195{
13196thr_create ();
13197 ;
13198 return 0;
13199}
13200_ACEOF
13201rm -f conftest.$ac_objext conftest$ac_exeext
13202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013203 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013205 grep -v '^ *+' conftest.er1 >conftest.err
13206 rm -f conftest.er1
13207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013210 { ac_try='test -z "$ac_c_werror_flag"
13211 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13213 (eval $ac_try) 2>&5
13214 ac_status=$?
13215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13216 (exit $ac_status); }; } &&
13217 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13219 (eval $ac_try) 2>&5
13220 ac_status=$?
13221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13222 (exit $ac_status); }; }; then
13223 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224else
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013226sed 's/^/| /' conftest.$ac_ext >&5
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013229fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013230rm -f conftest.err conftest.$ac_objext \
13231 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013232LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013233fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013234echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13235echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
13236if test $ac_cv_lib_thread_thr_create = yes; then
13237 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013239_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013240
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013241 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013242 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013243 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013244fi
13245
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013246 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013247
Martin v. Löwis130fb172001-07-19 11:00:41 +000013248 if test "$USE_THREAD_MODULE" != "#"
13249 then
13250 # If the above checks didn't disable threads, (at least) OSF1
13251 # needs this '-threads' argument during linking.
13252 case $ac_sys_system in
13253 OSF1) LDLAST=-threads;;
13254 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013255 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013256fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013257
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013258if test "$posix_threads" = "yes"; then
13259 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013260
13261cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013262#define _POSIX_THREADS 1
13263_ACEOF
13264
13265 fi
13266
13267 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13268 case $ac_sys_system/$ac_sys_release in
13269 SunOS/5.6)
13270cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013271#define HAVE_PTHREAD_DESTRUCTOR 1
13272_ACEOF
13273
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013274 ;;
13275 SunOS/5.8)
13276cat >>confdefs.h <<\_ACEOF
13277#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13278_ACEOF
13279
13280 ;;
13281 esac
13282
13283 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13284echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
13285 if test "${ac_cv_pthread_system_supported+set}" = set; then
13286 echo $ECHO_N "(cached) $ECHO_C" >&6
13287else
13288 if test "$cross_compiling" = yes; then
13289 ac_cv_pthread_system_supported=no
13290else
13291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013292/* confdefs.h. */
13293_ACEOF
13294cat confdefs.h >>conftest.$ac_ext
13295cat >>conftest.$ac_ext <<_ACEOF
13296/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013297#include <pthread.h>
13298 void *foo(void *parm) {
13299 return NULL;
13300 }
13301 main() {
13302 pthread_attr_t attr;
13303 pthread_t id;
13304 if (pthread_attr_init(&attr)) exit(-1);
13305 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13306 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13307 exit(0);
13308 }
13309_ACEOF
13310rm -f conftest$ac_exeext
13311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13312 (eval $ac_link) 2>&5
13313 ac_status=$?
13314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317 (eval $ac_try) 2>&5
13318 ac_status=$?
13319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320 (exit $ac_status); }; }; then
13321 ac_cv_pthread_system_supported=yes
13322else
13323 echo "$as_me: program exited with status $ac_status" >&5
13324echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013325sed 's/^/| /' conftest.$ac_ext >&5
13326
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013327( exit $ac_status )
13328ac_cv_pthread_system_supported=no
13329fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013330rm -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 +000013331fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013332
Guido van Rossum627b2d71993-12-24 10:39:16 +000013333fi
13334
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013335 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13336echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
13337 if test "$ac_cv_pthread_system_supported" = "yes"; then
13338
13339cat >>confdefs.h <<\_ACEOF
13340#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13341_ACEOF
13342
13343 fi
13344
13345for ac_func in pthread_sigmask
13346do
13347as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13348echo "$as_me:$LINENO: checking for $ac_func" >&5
13349echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13350if eval "test \"\${$as_ac_var+set}\" = set"; then
13351 echo $ECHO_N "(cached) $ECHO_C" >&6
13352else
13353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* confdefs.h. */
13355_ACEOF
13356cat confdefs.h >>conftest.$ac_ext
13357cat >>conftest.$ac_ext <<_ACEOF
13358/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013359/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13360 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13361#define $ac_func innocuous_$ac_func
13362
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013363/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013364 which can conflict with char $ac_func (); below.
13365 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013366 <limits.h> exists even on freestanding compilers. */
13367
13368#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013369# include <limits.h>
13370#else
13371# include <assert.h>
13372#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013373
13374#undef $ac_func
13375
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013376/* Override any gcc2 internal prototype to avoid an error. */
13377#ifdef __cplusplus
13378extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013379{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013380#endif
13381/* We use char because int might match the return type of a gcc2
13382 builtin and then its argument prototype would still apply. */
13383char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013384/* The GNU C library defines this for functions which it implements
13385 to always fail with ENOSYS. Some functions are actually named
13386 something starting with __ and the normal name is an alias. */
13387#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13388choke me
13389#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013390char (*f) () = $ac_func;
13391#endif
13392#ifdef __cplusplus
13393}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013394#endif
13395
Skip Montanaro6dead952003-09-25 14:50:04 +000013396int
13397main ()
13398{
13399return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
13404rm -f conftest.$ac_objext conftest$ac_exeext
13405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013406 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013408 grep -v '^ *+' conftest.er1 >conftest.err
13409 rm -f conftest.er1
13410 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13412 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013413 { ac_try='test -z "$ac_c_werror_flag"
13414 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13416 (eval $ac_try) 2>&5
13417 ac_status=$?
13418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419 (exit $ac_status); }; } &&
13420 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422 (eval $ac_try) 2>&5
13423 ac_status=$?
13424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425 (exit $ac_status); }; }; then
13426 eval "$as_ac_var=yes"
13427else
13428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013429sed 's/^/| /' conftest.$ac_ext >&5
13430
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013431eval "$as_ac_var=no"
13432fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013433rm -f conftest.err conftest.$ac_objext \
13434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013435fi
13436echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13437echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13438if test `eval echo '${'$as_ac_var'}'` = yes; then
13439 cat >>confdefs.h <<_ACEOF
13440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13441_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000013442 case $ac_sys_system in
13443 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013444
Jason Tishlerfac083d2003-07-22 15:20:49 +000013445cat >>confdefs.h <<\_ACEOF
13446#define HAVE_BROKEN_PTHREAD_SIGMASK 1
13447_ACEOF
13448
13449 ;;
13450 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013451fi
13452done
13453
13454fi
13455
13456
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013457# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
13459
13460echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
13461echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013462# Check whether --enable-ipv6 or --disable-ipv6 was given.
13463if test "${enable_ipv6+set}" = set; then
13464 enableval="$enable_ipv6"
13465 case "$enableval" in
13466 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000013467 echo "$as_me:$LINENO: result: no" >&5
13468echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013469 ipv6=no
13470 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 *) echo "$as_me:$LINENO: result: yes" >&5
13472echo "${ECHO_T}yes" >&6
13473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013474#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013475_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013476
13477 ipv6=yes
13478 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013480else
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013482 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 echo "$as_me:$LINENO: result: no" >&5
13484echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013485 ipv6=no
13486
13487else
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013489/* confdefs.h. */
13490_ACEOF
13491cat confdefs.h >>conftest.$ac_ext
13492cat >>conftest.$ac_ext <<_ACEOF
13493/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013494 /* AF_INET6 available check */
13495#include <sys/types.h>
13496#include <sys/socket.h>
13497main()
13498{
13499 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
13500 exit(1);
13501 else
13502 exit(0);
13503}
13504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505_ACEOF
13506rm -f conftest$ac_exeext
13507if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13508 (eval $ac_link) 2>&5
13509 ac_status=$?
13510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13513 (eval $ac_try) 2>&5
13514 ac_status=$?
13515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13516 (exit $ac_status); }; }; then
13517 echo "$as_me:$LINENO: result: yes" >&5
13518echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013519 ipv6=yes
13520else
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 echo "$as_me: program exited with status $ac_status" >&5
13522echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013523sed 's/^/| /' conftest.$ac_ext >&5
13524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525( exit $ac_status )
13526echo "$as_me:$LINENO: result: no" >&5
13527echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013528 ipv6=no
13529fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013530rm -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 +000013531fi
13532
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013533if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13535echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
13536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013537/* confdefs.h. */
13538_ACEOF
13539cat confdefs.h >>conftest.$ac_ext
13540cat >>conftest.$ac_ext <<_ACEOF
13541/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013542#include <sys/types.h>
13543#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013544int
13545main ()
13546{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013547struct sockaddr_in6 x;
13548x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 ;
13550 return 0;
13551}
13552_ACEOF
13553rm -f conftest.$ac_objext
13554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013555 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013557 grep -v '^ *+' conftest.er1 >conftest.err
13558 rm -f conftest.er1
13559 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13561 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013562 { ac_try='test -z "$ac_c_werror_flag"
13563 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13565 (eval $ac_try) 2>&5
13566 ac_status=$?
13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568 (exit $ac_status); }; } &&
13569 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13571 (eval $ac_try) 2>&5
13572 ac_status=$?
13573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13574 (exit $ac_status); }; }; then
13575 echo "$as_me:$LINENO: result: yes" >&5
13576echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013577 ipv6=yes
13578else
Martin v. Löwis11437992002-04-12 09:54:03 +000013579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013580sed 's/^/| /' conftest.$ac_ext >&5
13581
Martin v. Löwis11437992002-04-12 09:54:03 +000013582echo "$as_me:$LINENO: result: no" >&5
13583echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013584 ipv6=no
13585fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013587fi
13588
13589if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013590 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013591#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013592_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013593
13594fi
13595
Martin v. Löwis11437992002-04-12 09:54:03 +000013596fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013597
13598ipv6type=unknown
13599ipv6lib=none
13600ipv6trylibc=no
13601
13602if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013603 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13604echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013605 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13606 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013607 case $i in
13608 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013610/* confdefs.h. */
13611_ACEOF
13612cat confdefs.h >>conftest.$ac_ext
13613cat >>conftest.$ac_ext <<_ACEOF
13614/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013615
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013616#include <netinet/in.h>
13617#ifdef IPV6_INRIA_VERSION
13618yes
13619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013620_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013622 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013623 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013624fi
13625rm -f conftest*
13626
13627 ;;
13628 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* confdefs.h. */
13631_ACEOF
13632cat confdefs.h >>conftest.$ac_ext
13633cat >>conftest.$ac_ext <<_ACEOF
13634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013636#include <netinet/in.h>
13637#ifdef __KAME__
13638yes
13639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013642 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013643 ipv6type=$i;
13644 ipv6lib=inet6
13645 ipv6libdir=/usr/local/v6/lib
13646 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013647fi
13648rm -f conftest*
13649
13650 ;;
13651 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* confdefs.h. */
13654_ACEOF
13655cat confdefs.h >>conftest.$ac_ext
13656cat >>conftest.$ac_ext <<_ACEOF
13657/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013658
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013659#include <features.h>
13660#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13661yes
13662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013663_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013665 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013666 ipv6type=$i;
13667 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013668fi
13669rm -f conftest*
13670
13671 ;;
13672 linux-inet6)
13673 if test -d /usr/inet6; then
13674 ipv6type=$i
13675 ipv6lib=inet6
13676 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013677 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013678 fi
13679 ;;
13680 solaris)
13681 if test -f /etc/netconfig; then
13682 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13683 ipv6type=$i
13684 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013685 fi
13686 fi
13687 ;;
13688 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013690/* confdefs.h. */
13691_ACEOF
13692cat confdefs.h >>conftest.$ac_ext
13693cat >>conftest.$ac_ext <<_ACEOF
13694/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013695
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013696#include <sys/param.h>
13697#ifdef _TOSHIBA_INET6
13698yes
13699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013700_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013702 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013703 ipv6type=$i;
13704 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013705 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013706fi
13707rm -f conftest*
13708
13709 ;;
13710 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013718#include </usr/local/v6/include/sys/v6config.h>
13719#ifdef __V6D__
13720yes
13721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013724 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013725 ipv6type=$i;
13726 ipv6lib=v6;
13727 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013728 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013729fi
13730rm -f conftest*
13731
13732 ;;
13733 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013735/* confdefs.h. */
13736_ACEOF
13737cat confdefs.h >>conftest.$ac_ext
13738cat >>conftest.$ac_ext <<_ACEOF
13739/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013741#include <sys/param.h>
13742#ifdef _ZETA_MINAMI_INET6
13743yes
13744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013745_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013747 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013748 ipv6type=$i;
13749 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013750 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013751fi
13752rm -f conftest*
13753
13754 ;;
13755 esac
13756 if test "$ipv6type" != "unknown"; then
13757 break
13758 fi
13759 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 echo "$as_me:$LINENO: result: $ipv6type" >&5
13761echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013762fi
13763
13764if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13765 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13766 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13767 echo "using lib$ipv6lib"
13768 else
13769 if test $ipv6trylibc = "yes"; then
13770 echo "using libc"
13771 else
13772 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13773 echo "You need to fetch lib$ipv6lib.a from appropriate"
13774 echo 'ipv6 kit and compile beforehand.'
13775 exit 1
13776 fi
13777 fi
13778fi
13779
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013780# Check for --with-doc-strings
13781echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13782echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13783
13784# Check whether --with-doc-strings or --without-doc-strings was given.
13785if test "${with_doc_strings+set}" = set; then
13786 withval="$with_doc_strings"
13787
13788fi;
13789
13790if test -z "$with_doc_strings"
13791then with_doc_strings="yes"
13792fi
13793if test "$with_doc_strings" != "no"
13794then
13795
13796cat >>confdefs.h <<\_ACEOF
13797#define WITH_DOC_STRINGS 1
13798_ACEOF
13799
13800fi
13801echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13802echo "${ECHO_T}$with_doc_strings" >&6
13803
Neil Schemenauera35c6882001-02-27 04:45:05 +000013804# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013805echo "$as_me:$LINENO: checking for --with-tsc" >&5
13806echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13807
13808# Check whether --with-tsc or --without-tsc was given.
13809if test "${with_tsc+set}" = set; then
13810 withval="$with_tsc"
13811
13812if test "$withval" != no
13813then
13814
13815cat >>confdefs.h <<\_ACEOF
13816#define WITH_TSC 1
13817_ACEOF
13818
13819 echo "$as_me:$LINENO: result: yes" >&5
13820echo "${ECHO_T}yes" >&6
13821else echo "$as_me:$LINENO: result: no" >&5
13822echo "${ECHO_T}no" >&6
13823fi
13824else
13825 echo "$as_me:$LINENO: result: no" >&5
13826echo "${ECHO_T}no" >&6
13827fi;
13828
13829# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013830echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13831echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13832
Neil Schemenauera35c6882001-02-27 04:45:05 +000013833# Check whether --with-pymalloc or --without-pymalloc was given.
13834if test "${with_pymalloc+set}" = set; then
13835 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013836
Martin v. Löwis11437992002-04-12 09:54:03 +000013837fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013838
Neil Schemenauer16c22972002-03-22 15:34:49 +000013839if test -z "$with_pymalloc"
13840then with_pymalloc="yes"
13841fi
13842if test "$with_pymalloc" != "no"
13843then
Martin v. Löwis11437992002-04-12 09:54:03 +000013844
13845cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013846#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013847_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013848
13849fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013850echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13851echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013852
Barry Warsawef82cd72000-06-30 16:21:01 +000013853# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013854echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13855echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13856
Barry Warsawef82cd72000-06-30 16:21:01 +000013857# Check whether --with-wctype-functions or --without-wctype-functions was given.
13858if test "${with_wctype_functions+set}" = set; then
13859 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Barry Warsawef82cd72000-06-30 16:21:01 +000013861if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013862then
13863
13864cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013865#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013866_ACEOF
13867
13868 echo "$as_me:$LINENO: result: yes" >&5
13869echo "${ECHO_T}yes" >&6
13870else echo "$as_me:$LINENO: result: no" >&5
13871echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013872fi
13873else
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 echo "$as_me:$LINENO: result: no" >&5
13875echo "${ECHO_T}no" >&6
13876fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013878# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013879
Guido van Rossum98935bf2001-09-05 19:13:16 +000013880DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013881
Guido van Rossume97ee181999-12-20 21:27:22 +000013882# the dlopen() function means we might want to use dynload_shlib.o. some
13883# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013884
Thomas Wouters3a584202000-08-05 23:28:51 +000013885for ac_func in dlopen
13886do
Martin v. Löwis11437992002-04-12 09:54:03 +000013887as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13888echo "$as_me:$LINENO: checking for $ac_func" >&5
13889echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13890if eval "test \"\${$as_ac_var+set}\" = set"; then
13891 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013892else
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013894/* confdefs.h. */
13895_ACEOF
13896cat confdefs.h >>conftest.$ac_ext
13897cat >>conftest.$ac_ext <<_ACEOF
13898/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013899/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13900 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13901#define $ac_func innocuous_$ac_func
13902
Guido van Rossume97ee181999-12-20 21:27:22 +000013903/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013904 which can conflict with char $ac_func (); below.
13905 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013906 <limits.h> exists even on freestanding compilers. */
13907
13908#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013909# include <limits.h>
13910#else
13911# include <assert.h>
13912#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013913
13914#undef $ac_func
13915
Guido van Rossume97ee181999-12-20 21:27:22 +000013916/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013917#ifdef __cplusplus
13918extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013919{
Martin v. Löwis11437992002-04-12 09:54:03 +000013920#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013921/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 builtin and then its argument prototype would still apply. */
13923char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013924/* The GNU C library defines this for functions which it implements
13925 to always fail with ENOSYS. Some functions are actually named
13926 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013927#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013928choke me
13929#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013930char (*f) () = $ac_func;
13931#endif
13932#ifdef __cplusplus
13933}
Guido van Rossume97ee181999-12-20 21:27:22 +000013934#endif
13935
Skip Montanaro6dead952003-09-25 14:50:04 +000013936int
13937main ()
13938{
13939return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 ;
13941 return 0;
13942}
13943_ACEOF
13944rm -f conftest.$ac_objext conftest$ac_exeext
13945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013946 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013948 grep -v '^ *+' conftest.er1 >conftest.err
13949 rm -f conftest.er1
13950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13952 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013953 { ac_try='test -z "$ac_c_werror_flag"
13954 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13956 (eval $ac_try) 2>&5
13957 ac_status=$?
13958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13959 (exit $ac_status); }; } &&
13960 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13962 (eval $ac_try) 2>&5
13963 ac_status=$?
13964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965 (exit $ac_status); }; }; then
13966 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013967else
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013969sed 's/^/| /' conftest.$ac_ext >&5
13970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013972fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013973rm -f conftest.err conftest.$ac_objext \
13974 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13977echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13978if test `eval echo '${'$as_ac_var'}'` = yes; then
13979 cat >>confdefs.h <<_ACEOF
13980#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13981_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013982
Guido van Rossume97ee181999-12-20 21:27:22 +000013983fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013984done
Guido van Rossume97ee181999-12-20 21:27:22 +000013985
Michael W. Hudson54241132001-12-07 15:38:26 +000013986
Guido van Rossume97ee181999-12-20 21:27:22 +000013987# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13988# loading of modules.
13989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13991echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013992if test -z "$DYNLOADFILE"
13993then
13994 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013995 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13996 if test "$ac_cv_func_dlopen" = yes
13997 then DYNLOADFILE="dynload_shlib.o"
13998 else DYNLOADFILE="dynload_aix.o"
13999 fi
14000 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000014001 BeOS*) DYNLOADFILE="dynload_beos.o";;
14002 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000014003 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
14004 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014005 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000014006 *)
14007 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
14008 # out any dynamic loading
14009 if test "$ac_cv_func_dlopen" = yes
14010 then DYNLOADFILE="dynload_shlib.o"
14011 else DYNLOADFILE="dynload_stub.o"
14012 fi
14013 ;;
14014 esac
14015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014016echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
14017echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014018if test "$DYNLOADFILE" != "dynload_stub.o"
14019then
Martin v. Löwis11437992002-04-12 09:54:03 +000014020
14021cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014022#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014023_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014024
14025fi
14026
Neil Schemenauer4e425612001-06-19 15:44:15 +000014027# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14028
Michael W. Hudson54241132001-12-07 15:38:26 +000014029
Martin v. Löwis11437992002-04-12 09:54:03 +000014030echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14031echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014032if test -z "$MACHDEP_OBJS"
14033then
Jack Jansene578a632001-08-15 01:27:14 +000014034 MACHDEP_OBJS=$extra_machdep_objs
14035else
14036 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014038echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14039echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014040
Guido van Rossum627b2d71993-12-24 10:39:16 +000014041# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
Martin v. Löwisd6320502004-08-12 13:45:08 +000014113
Martin v. Löwisc3001752005-01-23 09:27:24 +000014114
14115
Neal Norwitz05a45592006-03-20 06:30:08 +000014116
14117
Martin v. Löwisd6320502004-08-12 13:45:08 +000014118for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
14119 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000014120 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000014121 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000014122 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000014123 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000014124 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000014125 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000014126 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000014127 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000014128 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000014129 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000014130do
Martin v. Löwis11437992002-04-12 09:54:03 +000014131as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14132echo "$as_me:$LINENO: checking for $ac_func" >&5
14133echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14134if eval "test \"\${$as_ac_var+set}\" = set"; then
14135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014136else
Martin v. Löwis11437992002-04-12 09:54:03 +000014137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014138/* confdefs.h. */
14139_ACEOF
14140cat confdefs.h >>conftest.$ac_ext
14141cat >>conftest.$ac_ext <<_ACEOF
14142/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014143/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14144 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14145#define $ac_func innocuous_$ac_func
14146
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014147/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014148 which can conflict with char $ac_func (); below.
14149 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014150 <limits.h> exists even on freestanding compilers. */
14151
14152#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014153# include <limits.h>
14154#else
14155# include <assert.h>
14156#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014157
14158#undef $ac_func
14159
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014160/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014161#ifdef __cplusplus
14162extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014163{
Martin v. Löwis11437992002-04-12 09:54:03 +000014164#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014165/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014166 builtin and then its argument prototype would still apply. */
14167char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014168/* The GNU C library defines this for functions which it implements
14169 to always fail with ENOSYS. Some functions are actually named
14170 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014172choke me
14173#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014174char (*f) () = $ac_func;
14175#endif
14176#ifdef __cplusplus
14177}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014178#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014179
Skip Montanaro6dead952003-09-25 14:50:04 +000014180int
14181main ()
14182{
14183return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ;
14185 return 0;
14186}
14187_ACEOF
14188rm -f conftest.$ac_objext conftest$ac_exeext
14189if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014190 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014192 grep -v '^ *+' conftest.er1 >conftest.err
14193 rm -f conftest.er1
14194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014197 { ac_try='test -z "$ac_c_werror_flag"
14198 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14200 (eval $ac_try) 2>&5
14201 ac_status=$?
14202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14203 (exit $ac_status); }; } &&
14204 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14206 (eval $ac_try) 2>&5
14207 ac_status=$?
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); }; }; then
14210 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014211else
Martin v. Löwis11437992002-04-12 09:54:03 +000014212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014213sed 's/^/| /' conftest.$ac_ext >&5
14214
Martin v. Löwis11437992002-04-12 09:54:03 +000014215eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014216fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014217rm -f conftest.err conftest.$ac_objext \
14218 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014220echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14221echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14222if test `eval echo '${'$as_ac_var'}'` = yes; then
14223 cat >>confdefs.h <<_ACEOF
14224#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14225_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014227fi
14228done
14229
Michael W. Hudson54241132001-12-07 15:38:26 +000014230
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014231# For some functions, having a definition is not sufficient, since
14232# we want to take their address.
14233echo "$as_me:$LINENO: checking for chroot" >&5
14234echo $ECHO_N "checking for chroot... $ECHO_C" >&6
14235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014236/* confdefs.h. */
14237_ACEOF
14238cat confdefs.h >>conftest.$ac_ext
14239cat >>conftest.$ac_ext <<_ACEOF
14240/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014241#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014242int
14243main ()
14244{
14245void *x=chroot
14246 ;
14247 return 0;
14248}
14249_ACEOF
14250rm -f conftest.$ac_objext
14251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014252 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014254 grep -v '^ *+' conftest.er1 >conftest.err
14255 rm -f conftest.er1
14256 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14258 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014259 { ac_try='test -z "$ac_c_werror_flag"
14260 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14262 (eval $ac_try) 2>&5
14263 ac_status=$?
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); }; } &&
14266 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14268 (eval $ac_try) 2>&5
14269 ac_status=$?
14270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14271 (exit $ac_status); }; }; then
14272
14273cat >>confdefs.h <<\_ACEOF
14274#define HAVE_CHROOT 1
14275_ACEOF
14276
14277 echo "$as_me:$LINENO: result: yes" >&5
14278echo "${ECHO_T}yes" >&6
14279else
14280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014281sed 's/^/| /' conftest.$ac_ext >&5
14282
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014283echo "$as_me:$LINENO: result: no" >&5
14284echo "${ECHO_T}no" >&6
14285
14286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014288echo "$as_me:$LINENO: checking for link" >&5
14289echo $ECHO_N "checking for link... $ECHO_C" >&6
14290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014291/* confdefs.h. */
14292_ACEOF
14293cat confdefs.h >>conftest.$ac_ext
14294cat >>conftest.$ac_ext <<_ACEOF
14295/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014296#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014297int
14298main ()
14299{
14300void *x=link
14301 ;
14302 return 0;
14303}
14304_ACEOF
14305rm -f conftest.$ac_objext
14306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014307 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014309 grep -v '^ *+' conftest.er1 >conftest.err
14310 rm -f conftest.er1
14311 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14313 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014314 { ac_try='test -z "$ac_c_werror_flag"
14315 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14317 (eval $ac_try) 2>&5
14318 ac_status=$?
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); }; } &&
14321 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014322 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14323 (eval $ac_try) 2>&5
14324 ac_status=$?
14325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326 (exit $ac_status); }; }; then
14327
14328cat >>confdefs.h <<\_ACEOF
14329#define HAVE_LINK 1
14330_ACEOF
14331
14332 echo "$as_me:$LINENO: result: yes" >&5
14333echo "${ECHO_T}yes" >&6
14334else
14335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014336sed 's/^/| /' conftest.$ac_ext >&5
14337
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014338echo "$as_me:$LINENO: result: no" >&5
14339echo "${ECHO_T}no" >&6
14340
14341fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014342rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014343echo "$as_me:$LINENO: checking for symlink" >&5
14344echo $ECHO_N "checking for symlink... $ECHO_C" >&6
14345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014346/* confdefs.h. */
14347_ACEOF
14348cat confdefs.h >>conftest.$ac_ext
14349cat >>conftest.$ac_ext <<_ACEOF
14350/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014351#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014352int
14353main ()
14354{
14355void *x=symlink
14356 ;
14357 return 0;
14358}
14359_ACEOF
14360rm -f conftest.$ac_objext
14361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014364 grep -v '^ *+' conftest.er1 >conftest.err
14365 rm -f conftest.er1
14366 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014369 { ac_try='test -z "$ac_c_werror_flag"
14370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14372 (eval $ac_try) 2>&5
14373 ac_status=$?
14374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14375 (exit $ac_status); }; } &&
14376 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14378 (eval $ac_try) 2>&5
14379 ac_status=$?
14380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14381 (exit $ac_status); }; }; then
14382
14383cat >>confdefs.h <<\_ACEOF
14384#define HAVE_SYMLINK 1
14385_ACEOF
14386
14387 echo "$as_me:$LINENO: result: yes" >&5
14388echo "${ECHO_T}yes" >&6
14389else
14390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014391sed 's/^/| /' conftest.$ac_ext >&5
14392
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014393echo "$as_me:$LINENO: result: no" >&5
14394echo "${ECHO_T}no" >&6
14395
14396fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014397rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014398echo "$as_me:$LINENO: checking for fchdir" >&5
14399echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
14400cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014401/* confdefs.h. */
14402_ACEOF
14403cat confdefs.h >>conftest.$ac_ext
14404cat >>conftest.$ac_ext <<_ACEOF
14405/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014406#include <unistd.h>
14407int
14408main ()
14409{
14410void *x=fchdir
14411 ;
14412 return 0;
14413}
14414_ACEOF
14415rm -f conftest.$ac_objext
14416if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014417 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014419 grep -v '^ *+' conftest.er1 >conftest.err
14420 rm -f conftest.er1
14421 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14423 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014424 { ac_try='test -z "$ac_c_werror_flag"
14425 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14427 (eval $ac_try) 2>&5
14428 ac_status=$?
14429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14430 (exit $ac_status); }; } &&
14431 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14433 (eval $ac_try) 2>&5
14434 ac_status=$?
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); }; }; then
14437
14438cat >>confdefs.h <<\_ACEOF
14439#define HAVE_FCHDIR 1
14440_ACEOF
14441
14442 echo "$as_me:$LINENO: result: yes" >&5
14443echo "${ECHO_T}yes" >&6
14444else
14445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014446sed 's/^/| /' conftest.$ac_ext >&5
14447
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014448echo "$as_me:$LINENO: result: no" >&5
14449echo "${ECHO_T}no" >&6
14450
14451fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014453echo "$as_me:$LINENO: checking for fsync" >&5
14454echo $ECHO_N "checking for fsync... $ECHO_C" >&6
14455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014456/* confdefs.h. */
14457_ACEOF
14458cat confdefs.h >>conftest.$ac_ext
14459cat >>conftest.$ac_ext <<_ACEOF
14460/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014461#include <unistd.h>
14462int
14463main ()
14464{
14465void *x=fsync
14466 ;
14467 return 0;
14468}
14469_ACEOF
14470rm -f conftest.$ac_objext
14471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014472 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014474 grep -v '^ *+' conftest.er1 >conftest.err
14475 rm -f conftest.er1
14476 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014479 { ac_try='test -z "$ac_c_werror_flag"
14480 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14482 (eval $ac_try) 2>&5
14483 ac_status=$?
14484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14485 (exit $ac_status); }; } &&
14486 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14488 (eval $ac_try) 2>&5
14489 ac_status=$?
14490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14491 (exit $ac_status); }; }; then
14492
14493cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014494#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014495_ACEOF
14496
14497 echo "$as_me:$LINENO: result: yes" >&5
14498echo "${ECHO_T}yes" >&6
14499else
14500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014501sed 's/^/| /' conftest.$ac_ext >&5
14502
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014503echo "$as_me:$LINENO: result: no" >&5
14504echo "${ECHO_T}no" >&6
14505
14506fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014508echo "$as_me:$LINENO: checking for fdatasync" >&5
14509echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
14510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014516#include <unistd.h>
14517int
14518main ()
14519{
14520void *x=fdatasync
14521 ;
14522 return 0;
14523}
14524_ACEOF
14525rm -f conftest.$ac_objext
14526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014527 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014529 grep -v '^ *+' conftest.er1 >conftest.err
14530 rm -f conftest.er1
14531 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14533 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014534 { ac_try='test -z "$ac_c_werror_flag"
14535 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14537 (eval $ac_try) 2>&5
14538 ac_status=$?
14539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14540 (exit $ac_status); }; } &&
14541 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14543 (eval $ac_try) 2>&5
14544 ac_status=$?
14545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14546 (exit $ac_status); }; }; then
14547
14548cat >>confdefs.h <<\_ACEOF
14549#define HAVE_FDATASYNC 1
14550_ACEOF
14551
14552 echo "$as_me:$LINENO: result: yes" >&5
14553echo "${ECHO_T}yes" >&6
14554else
14555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014556sed 's/^/| /' conftest.$ac_ext >&5
14557
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014558echo "$as_me:$LINENO: result: no" >&5
14559echo "${ECHO_T}no" >&6
14560
14561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014563
Martin v. Löwisd5843682002-11-21 20:41:28 +000014564# On some systems (eg. FreeBSD 5), we would find a definition of the
14565# functions ctermid_r, setgroups in the library, but no prototype
14566# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14567# address to avoid compiler warnings and potential miscompilations
14568# because of the missing prototypes.
14569
14570echo "$as_me:$LINENO: checking for ctermid_r" >&5
14571echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
14572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014573/* confdefs.h. */
14574_ACEOF
14575cat confdefs.h >>conftest.$ac_ext
14576cat >>conftest.$ac_ext <<_ACEOF
14577/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014578
14579#include "confdefs.h"
14580#include <stdio.h>
14581
Martin v. Löwisd5843682002-11-21 20:41:28 +000014582int
14583main ()
14584{
14585void* p = ctermid_r
14586 ;
14587 return 0;
14588}
14589_ACEOF
14590rm -f conftest.$ac_objext
14591if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014592 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014594 grep -v '^ *+' conftest.er1 >conftest.err
14595 rm -f conftest.er1
14596 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14598 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014599 { ac_try='test -z "$ac_c_werror_flag"
14600 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14602 (eval $ac_try) 2>&5
14603 ac_status=$?
14604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14605 (exit $ac_status); }; } &&
14606 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14608 (eval $ac_try) 2>&5
14609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); }; }; then
14612
14613cat >>confdefs.h <<\_ACEOF
14614#define HAVE_CTERMID_R 1
14615_ACEOF
14616
14617 echo "$as_me:$LINENO: result: yes" >&5
14618echo "${ECHO_T}yes" >&6
14619else
14620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014621sed 's/^/| /' conftest.$ac_ext >&5
14622
Martin v. Löwisd5843682002-11-21 20:41:28 +000014623echo "$as_me:$LINENO: result: no" >&5
14624echo "${ECHO_T}no" >&6
14625
14626fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014627rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014628
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014629echo "$as_me:$LINENO: checking for flock" >&5
14630echo $ECHO_N "checking for flock... $ECHO_C" >&6
14631cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014632/* confdefs.h. */
14633_ACEOF
14634cat confdefs.h >>conftest.$ac_ext
14635cat >>conftest.$ac_ext <<_ACEOF
14636/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014637
14638#include "confdefs.h"
14639#include <sys/file.h>
14640
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014641int
14642main ()
14643{
14644void* p = flock
14645 ;
14646 return 0;
14647}
14648_ACEOF
14649rm -f conftest.$ac_objext
14650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014651 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014653 grep -v '^ *+' conftest.er1 >conftest.err
14654 rm -f conftest.er1
14655 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014658 { ac_try='test -z "$ac_c_werror_flag"
14659 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
14665 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14667 (eval $ac_try) 2>&5
14668 ac_status=$?
14669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14670 (exit $ac_status); }; }; then
14671
14672cat >>confdefs.h <<\_ACEOF
14673#define HAVE_FLOCK 1
14674_ACEOF
14675
14676 echo "$as_me:$LINENO: result: yes" >&5
14677echo "${ECHO_T}yes" >&6
14678else
14679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014680sed 's/^/| /' conftest.$ac_ext >&5
14681
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014682echo "$as_me:$LINENO: result: no" >&5
14683echo "${ECHO_T}no" >&6
14684
14685fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014686rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014687
14688echo "$as_me:$LINENO: checking for getpagesize" >&5
14689echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14690cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014691/* confdefs.h. */
14692_ACEOF
14693cat confdefs.h >>conftest.$ac_ext
14694cat >>conftest.$ac_ext <<_ACEOF
14695/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014696
14697#include "confdefs.h"
14698#include <unistd.h>
14699
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014700int
14701main ()
14702{
14703void* p = getpagesize
14704 ;
14705 return 0;
14706}
14707_ACEOF
14708rm -f conftest.$ac_objext
14709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014710 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014712 grep -v '^ *+' conftest.er1 >conftest.err
14713 rm -f conftest.er1
14714 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14716 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014717 { ac_try='test -z "$ac_c_werror_flag"
14718 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14720 (eval $ac_try) 2>&5
14721 ac_status=$?
14722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14723 (exit $ac_status); }; } &&
14724 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14727 ac_status=$?
14728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }; then
14730
14731cat >>confdefs.h <<\_ACEOF
14732#define HAVE_GETPAGESIZE 1
14733_ACEOF
14734
14735 echo "$as_me:$LINENO: result: yes" >&5
14736echo "${ECHO_T}yes" >&6
14737else
14738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014739sed 's/^/| /' conftest.$ac_ext >&5
14740
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014741echo "$as_me:$LINENO: result: no" >&5
14742echo "${ECHO_T}no" >&6
14743
14744fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014746
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014747for ac_prog in true
14748do
14749 # Extract the first word of "$ac_prog", so it can be a program name with args.
14750set dummy $ac_prog; ac_word=$2
14751echo "$as_me:$LINENO: checking for $ac_word" >&5
14752echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14753if test "${ac_cv_prog_TRUE+set}" = set; then
14754 echo $ECHO_N "(cached) $ECHO_C" >&6
14755else
14756 if test -n "$TRUE"; then
14757 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14758else
14759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14760for as_dir in $PATH
14761do
14762 IFS=$as_save_IFS
14763 test -z "$as_dir" && as_dir=.
14764 for ac_exec_ext in '' $ac_executable_extensions; do
14765 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14766 ac_cv_prog_TRUE="$ac_prog"
14767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14768 break 2
14769 fi
14770done
14771done
14772
14773fi
14774fi
14775TRUE=$ac_cv_prog_TRUE
14776if test -n "$TRUE"; then
14777 echo "$as_me:$LINENO: result: $TRUE" >&5
14778echo "${ECHO_T}$TRUE" >&6
14779else
14780 echo "$as_me:$LINENO: result: no" >&5
14781echo "${ECHO_T}no" >&6
14782fi
14783
14784 test -n "$TRUE" && break
14785done
14786test -n "$TRUE" || TRUE="/bin/true"
14787
14788
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014789echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14790echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14791if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14792 echo $ECHO_N "(cached) $ECHO_C" >&6
14793else
14794 ac_check_lib_save_LIBS=$LIBS
14795LIBS="-lc $LIBS"
14796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014797/* confdefs.h. */
14798_ACEOF
14799cat confdefs.h >>conftest.$ac_ext
14800cat >>conftest.$ac_ext <<_ACEOF
14801/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014802
14803/* Override any gcc2 internal prototype to avoid an error. */
14804#ifdef __cplusplus
14805extern "C"
14806#endif
14807/* We use char because int might match the return type of a gcc2
14808 builtin and then its argument prototype would still apply. */
14809char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014810int
14811main ()
14812{
14813inet_aton ();
14814 ;
14815 return 0;
14816}
14817_ACEOF
14818rm -f conftest.$ac_objext conftest$ac_exeext
14819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014820 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014822 grep -v '^ *+' conftest.er1 >conftest.err
14823 rm -f conftest.er1
14824 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014827 { ac_try='test -z "$ac_c_werror_flag"
14828 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14830 (eval $ac_try) 2>&5
14831 ac_status=$?
14832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14833 (exit $ac_status); }; } &&
14834 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14836 (eval $ac_try) 2>&5
14837 ac_status=$?
14838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839 (exit $ac_status); }; }; then
14840 ac_cv_lib_c_inet_aton=yes
14841else
14842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014843sed 's/^/| /' conftest.$ac_ext >&5
14844
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014845ac_cv_lib_c_inet_aton=no
14846fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014847rm -f conftest.err conftest.$ac_objext \
14848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014849LIBS=$ac_check_lib_save_LIBS
14850fi
14851echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14852echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14853if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014854 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014855else
14856
14857echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14858echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14859if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14860 echo $ECHO_N "(cached) $ECHO_C" >&6
14861else
14862 ac_check_lib_save_LIBS=$LIBS
14863LIBS="-lresolv $LIBS"
14864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014865/* confdefs.h. */
14866_ACEOF
14867cat confdefs.h >>conftest.$ac_ext
14868cat >>conftest.$ac_ext <<_ACEOF
14869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014870
14871/* Override any gcc2 internal prototype to avoid an error. */
14872#ifdef __cplusplus
14873extern "C"
14874#endif
14875/* We use char because int might match the return type of a gcc2
14876 builtin and then its argument prototype would still apply. */
14877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014878int
14879main ()
14880{
14881inet_aton ();
14882 ;
14883 return 0;
14884}
14885_ACEOF
14886rm -f conftest.$ac_objext conftest$ac_exeext
14887if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014888 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014890 grep -v '^ *+' conftest.er1 >conftest.err
14891 rm -f conftest.er1
14892 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14894 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014895 { ac_try='test -z "$ac_c_werror_flag"
14896 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14898 (eval $ac_try) 2>&5
14899 ac_status=$?
14900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14901 (exit $ac_status); }; } &&
14902 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14904 (eval $ac_try) 2>&5
14905 ac_status=$?
14906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); }; }; then
14908 ac_cv_lib_resolv_inet_aton=yes
14909else
14910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014911sed 's/^/| /' conftest.$ac_ext >&5
14912
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014913ac_cv_lib_resolv_inet_aton=no
14914fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014915rm -f conftest.err conftest.$ac_objext \
14916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014917LIBS=$ac_check_lib_save_LIBS
14918fi
14919echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14920echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14921if test $ac_cv_lib_resolv_inet_aton = yes; then
14922 cat >>confdefs.h <<_ACEOF
14923#define HAVE_LIBRESOLV 1
14924_ACEOF
14925
14926 LIBS="-lresolv $LIBS"
14927
14928fi
14929
14930
14931fi
14932
14933
Martin v. Löwise9416172003-05-03 10:12:45 +000014934echo "$as_me:$LINENO: checking for hstrerror" >&5
14935echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* confdefs.h. */
14938_ACEOF
14939cat confdefs.h >>conftest.$ac_ext
14940cat >>conftest.$ac_ext <<_ACEOF
14941/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014942
14943#include "confdefs.h"
14944#include <netdb.h>
14945
Martin v. Löwise9416172003-05-03 10:12:45 +000014946int
14947main ()
14948{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014949void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014950 ;
14951 return 0;
14952}
14953_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014954rm -f conftest.$ac_objext conftest$ac_exeext
14955if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014956 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014958 grep -v '^ *+' conftest.er1 >conftest.err
14959 rm -f conftest.er1
14960 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14962 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014963 { ac_try='test -z "$ac_c_werror_flag"
14964 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; } &&
14970 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972 (eval $ac_try) 2>&5
14973 ac_status=$?
14974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975 (exit $ac_status); }; }; then
14976
14977cat >>confdefs.h <<\_ACEOF
14978#define HAVE_HSTRERROR 1
14979_ACEOF
14980
14981 echo "$as_me:$LINENO: result: yes" >&5
14982echo "${ECHO_T}yes" >&6
14983else
14984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014985sed 's/^/| /' conftest.$ac_ext >&5
14986
Martin v. Löwise9416172003-05-03 10:12:45 +000014987echo "$as_me:$LINENO: result: no" >&5
14988echo "${ECHO_T}no" >&6
14989
14990fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014991rm -f conftest.err conftest.$ac_objext \
14992 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014993
14994echo "$as_me:$LINENO: checking for inet_aton" >&5
14995echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014997/* confdefs.h. */
14998_ACEOF
14999cat confdefs.h >>conftest.$ac_ext
15000cat >>conftest.$ac_ext <<_ACEOF
15001/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015002
15003#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000015004#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015005#include <sys/socket.h>
15006#include <netinet/in.h>
15007#include <arpa/inet.h>
15008
Martin v. Löwise9416172003-05-03 10:12:45 +000015009int
15010main ()
15011{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015012void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015013 ;
15014 return 0;
15015}
15016_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015017rm -f conftest.$ac_objext conftest$ac_exeext
15018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015019 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021 grep -v '^ *+' conftest.er1 >conftest.err
15022 rm -f conftest.er1
15023 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15025 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015026 { ac_try='test -z "$ac_c_werror_flag"
15027 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15029 (eval $ac_try) 2>&5
15030 ac_status=$?
15031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15032 (exit $ac_status); }; } &&
15033 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15035 (eval $ac_try) 2>&5
15036 ac_status=$?
15037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15038 (exit $ac_status); }; }; then
15039
15040cat >>confdefs.h <<\_ACEOF
15041#define HAVE_INET_ATON 1
15042_ACEOF
15043
15044 echo "$as_me:$LINENO: result: yes" >&5
15045echo "${ECHO_T}yes" >&6
15046else
15047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015048sed 's/^/| /' conftest.$ac_ext >&5
15049
Martin v. Löwise9416172003-05-03 10:12:45 +000015050echo "$as_me:$LINENO: result: no" >&5
15051echo "${ECHO_T}no" >&6
15052
15053fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015054rm -f conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015056
15057echo "$as_me:$LINENO: checking for inet_pton" >&5
15058echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
15059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015060/* confdefs.h. */
15061_ACEOF
15062cat confdefs.h >>conftest.$ac_ext
15063cat >>conftest.$ac_ext <<_ACEOF
15064/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015065
15066#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015067#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015068#include <sys/socket.h>
15069#include <netinet/in.h>
15070#include <arpa/inet.h>
15071
Martin v. Löwise9416172003-05-03 10:12:45 +000015072int
15073main ()
15074{
15075void* p = inet_pton
15076 ;
15077 return 0;
15078}
15079_ACEOF
15080rm -f conftest.$ac_objext
15081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015084 grep -v '^ *+' conftest.er1 >conftest.err
15085 rm -f conftest.er1
15086 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15088 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015089 { ac_try='test -z "$ac_c_werror_flag"
15090 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092 (eval $ac_try) 2>&5
15093 ac_status=$?
15094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095 (exit $ac_status); }; } &&
15096 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15098 (eval $ac_try) 2>&5
15099 ac_status=$?
15100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15101 (exit $ac_status); }; }; then
15102
15103cat >>confdefs.h <<\_ACEOF
15104#define HAVE_INET_PTON 1
15105_ACEOF
15106
15107 echo "$as_me:$LINENO: result: yes" >&5
15108echo "${ECHO_T}yes" >&6
15109else
15110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015111sed 's/^/| /' conftest.$ac_ext >&5
15112
Martin v. Löwise9416172003-05-03 10:12:45 +000015113echo "$as_me:$LINENO: result: no" >&5
15114echo "${ECHO_T}no" >&6
15115
15116fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015117rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015118
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015119# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000015120echo "$as_me:$LINENO: checking for setgroups" >&5
15121echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
15122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015123/* confdefs.h. */
15124_ACEOF
15125cat confdefs.h >>conftest.$ac_ext
15126cat >>conftest.$ac_ext <<_ACEOF
15127/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015128
15129#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015130#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015131#ifdef HAVE_GRP_H
15132#include <grp.h>
15133#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000015134
Martin v. Löwisd5843682002-11-21 20:41:28 +000015135int
15136main ()
15137{
15138void* p = setgroups
15139 ;
15140 return 0;
15141}
15142_ACEOF
15143rm -f conftest.$ac_objext
15144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015145 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015147 grep -v '^ *+' conftest.er1 >conftest.err
15148 rm -f conftest.er1
15149 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15151 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015152 { ac_try='test -z "$ac_c_werror_flag"
15153 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15155 (eval $ac_try) 2>&5
15156 ac_status=$?
15157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15158 (exit $ac_status); }; } &&
15159 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000015160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15161 (eval $ac_try) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); }; }; then
15165
15166cat >>confdefs.h <<\_ACEOF
15167#define HAVE_SETGROUPS 1
15168_ACEOF
15169
15170 echo "$as_me:$LINENO: result: yes" >&5
15171echo "${ECHO_T}yes" >&6
15172else
15173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015174sed 's/^/| /' conftest.$ac_ext >&5
15175
Martin v. Löwisd5843682002-11-21 20:41:28 +000015176echo "$as_me:$LINENO: result: no" >&5
15177echo "${ECHO_T}no" >&6
15178
15179fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015181
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015182# check for openpty and forkpty
15183
Martin v. Löwis11437992002-04-12 09:54:03 +000015184
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015185for ac_func in openpty
15186do
Martin v. Löwis11437992002-04-12 09:54:03 +000015187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15188echo "$as_me:$LINENO: checking for $ac_func" >&5
15189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15190if eval "test \"\${$as_ac_var+set}\" = set"; then
15191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015192else
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015194/* confdefs.h. */
15195_ACEOF
15196cat confdefs.h >>conftest.$ac_ext
15197cat >>conftest.$ac_ext <<_ACEOF
15198/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15201#define $ac_func innocuous_$ac_func
15202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015203/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015204 which can conflict with char $ac_func (); below.
15205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015206 <limits.h> exists even on freestanding compilers. */
15207
15208#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015209# include <limits.h>
15210#else
15211# include <assert.h>
15212#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015213
15214#undef $ac_func
15215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015216/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015217#ifdef __cplusplus
15218extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015219{
Martin v. Löwis11437992002-04-12 09:54:03 +000015220#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 builtin and then its argument prototype would still apply. */
15223char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015224/* The GNU C library defines this for functions which it implements
15225 to always fail with ENOSYS. Some functions are actually named
15226 something starting with __ and the normal name is an alias. */
15227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15228choke me
15229#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015230char (*f) () = $ac_func;
15231#endif
15232#ifdef __cplusplus
15233}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015234#endif
15235
Skip Montanaro6dead952003-09-25 14:50:04 +000015236int
15237main ()
15238{
15239return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 ;
15241 return 0;
15242}
15243_ACEOF
15244rm -f conftest.$ac_objext conftest$ac_exeext
15245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015246 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015248 grep -v '^ *+' conftest.er1 >conftest.err
15249 rm -f conftest.er1
15250 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15252 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015253 { ac_try='test -z "$ac_c_werror_flag"
15254 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15256 (eval $ac_try) 2>&5
15257 ac_status=$?
15258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15259 (exit $ac_status); }; } &&
15260 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15262 (eval $ac_try) 2>&5
15263 ac_status=$?
15264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15265 (exit $ac_status); }; }; then
15266 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015267else
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015269sed 's/^/| /' conftest.$ac_ext >&5
15270
Martin v. Löwis11437992002-04-12 09:54:03 +000015271eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015272fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015273rm -f conftest.err conftest.$ac_objext \
15274 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015276echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15277echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15278if test `eval echo '${'$as_ac_var'}'` = yes; then
15279 cat >>confdefs.h <<_ACEOF
15280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15281_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015282
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15285echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15286if test "${ac_cv_lib_util_openpty+set}" = set; then
15287 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015290LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015292/* confdefs.h. */
15293_ACEOF
15294cat confdefs.h >>conftest.$ac_ext
15295cat >>conftest.$ac_ext <<_ACEOF
15296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Fred Drake8cef4cf2000-06-28 16:40:38 +000015298/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015299#ifdef __cplusplus
15300extern "C"
15301#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015302/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 builtin and then its argument prototype would still apply. */
15304char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015305int
15306main ()
15307{
15308openpty ();
15309 ;
15310 return 0;
15311}
15312_ACEOF
15313rm -f conftest.$ac_objext conftest$ac_exeext
15314if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015315 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015317 grep -v '^ *+' conftest.er1 >conftest.err
15318 rm -f conftest.er1
15319 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015322 { ac_try='test -z "$ac_c_werror_flag"
15323 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325 (eval $ac_try) 2>&5
15326 ac_status=$?
15327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328 (exit $ac_status); }; } &&
15329 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15331 (eval $ac_try) 2>&5
15332 ac_status=$?
15333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334 (exit $ac_status); }; }; then
15335 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015336else
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015338sed 's/^/| /' conftest.$ac_ext >&5
15339
Martin v. Löwis11437992002-04-12 09:54:03 +000015340ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015341fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015342rm -f conftest.err conftest.$ac_objext \
15343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015344LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015345fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015346echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
15347echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15348if test $ac_cv_lib_util_openpty = yes; then
15349 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015350#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015351_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015352 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015353else
15354 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
15355echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
15356if test "${ac_cv_lib_bsd_openpty+set}" = set; then
15357 echo $ECHO_N "(cached) $ECHO_C" >&6
15358else
15359 ac_check_lib_save_LIBS=$LIBS
15360LIBS="-lbsd $LIBS"
15361cat >conftest.$ac_ext <<_ACEOF
15362/* confdefs.h. */
15363_ACEOF
15364cat confdefs.h >>conftest.$ac_ext
15365cat >>conftest.$ac_ext <<_ACEOF
15366/* end confdefs.h. */
15367
15368/* Override any gcc2 internal prototype to avoid an error. */
15369#ifdef __cplusplus
15370extern "C"
15371#endif
15372/* We use char because int might match the return type of a gcc2
15373 builtin and then its argument prototype would still apply. */
15374char openpty ();
15375int
15376main ()
15377{
15378openpty ();
15379 ;
15380 return 0;
15381}
15382_ACEOF
15383rm -f conftest.$ac_objext conftest$ac_exeext
15384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15385 (eval $ac_link) 2>conftest.er1
15386 ac_status=$?
15387 grep -v '^ *+' conftest.er1 >conftest.err
15388 rm -f conftest.er1
15389 cat conftest.err >&5
15390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15391 (exit $ac_status); } &&
15392 { ac_try='test -z "$ac_c_werror_flag"
15393 || test ! -s conftest.err'
15394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15395 (eval $ac_try) 2>&5
15396 ac_status=$?
15397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15398 (exit $ac_status); }; } &&
15399 { ac_try='test -s conftest$ac_exeext'
15400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15401 (eval $ac_try) 2>&5
15402 ac_status=$?
15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15404 (exit $ac_status); }; }; then
15405 ac_cv_lib_bsd_openpty=yes
15406else
15407 echo "$as_me: failed program was:" >&5
15408sed 's/^/| /' conftest.$ac_ext >&5
15409
15410ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015411fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015412rm -f conftest.err conftest.$ac_objext \
15413 conftest$ac_exeext conftest.$ac_ext
15414LIBS=$ac_check_lib_save_LIBS
15415fi
15416echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
15417echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
15418if test $ac_cv_lib_bsd_openpty = yes; then
15419 cat >>confdefs.h <<\_ACEOF
15420#define HAVE_OPENPTY 1
15421_ACEOF
15422 LIBS="$LIBS -lbsd"
15423fi
15424
15425
15426fi
15427
Fred Drake8cef4cf2000-06-28 16:40:38 +000015428
15429fi
15430done
15431
Martin v. Löwis11437992002-04-12 09:54:03 +000015432
Fred Drake8cef4cf2000-06-28 16:40:38 +000015433for ac_func in forkpty
15434do
Martin v. Löwis11437992002-04-12 09:54:03 +000015435as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15436echo "$as_me:$LINENO: checking for $ac_func" >&5
15437echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15438if eval "test \"\${$as_ac_var+set}\" = set"; then
15439 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015440else
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015442/* confdefs.h. */
15443_ACEOF
15444cat confdefs.h >>conftest.$ac_ext
15445cat >>conftest.$ac_ext <<_ACEOF
15446/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015447/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15448 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15449#define $ac_func innocuous_$ac_func
15450
Fred Drake8cef4cf2000-06-28 16:40:38 +000015451/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015452 which can conflict with char $ac_func (); below.
15453 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015454 <limits.h> exists even on freestanding compilers. */
15455
15456#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015457# include <limits.h>
15458#else
15459# include <assert.h>
15460#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015461
15462#undef $ac_func
15463
Fred Drake8cef4cf2000-06-28 16:40:38 +000015464/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015465#ifdef __cplusplus
15466extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015467{
Martin v. Löwis11437992002-04-12 09:54:03 +000015468#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015469/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 builtin and then its argument prototype would still apply. */
15471char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000015472/* The GNU C library defines this for functions which it implements
15473 to always fail with ENOSYS. Some functions are actually named
15474 something starting with __ and the normal name is an alias. */
15475#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15476choke me
15477#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015478char (*f) () = $ac_func;
15479#endif
15480#ifdef __cplusplus
15481}
Fred Drake8cef4cf2000-06-28 16:40:38 +000015482#endif
15483
Skip Montanaro6dead952003-09-25 14:50:04 +000015484int
15485main ()
15486{
15487return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015488 ;
15489 return 0;
15490}
15491_ACEOF
15492rm -f conftest.$ac_objext conftest$ac_exeext
15493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015494 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015496 grep -v '^ *+' conftest.er1 >conftest.err
15497 rm -f conftest.er1
15498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15500 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015501 { ac_try='test -z "$ac_c_werror_flag"
15502 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15504 (eval $ac_try) 2>&5
15505 ac_status=$?
15506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15507 (exit $ac_status); }; } &&
15508 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15510 (eval $ac_try) 2>&5
15511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); }; }; then
15514 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015515else
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015517sed 's/^/| /' conftest.$ac_ext >&5
15518
Martin v. Löwis11437992002-04-12 09:54:03 +000015519eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015521rm -f conftest.err conftest.$ac_objext \
15522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015524echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15525echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15526if test `eval echo '${'$as_ac_var'}'` = yes; then
15527 cat >>confdefs.h <<_ACEOF
15528#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15529_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015530
Fred Drake8cef4cf2000-06-28 16:40:38 +000015531else
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
15533echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
15534if test "${ac_cv_lib_util_forkpty+set}" = set; then
15535 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015536else
Martin v. Löwis11437992002-04-12 09:54:03 +000015537 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015538LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015540/* confdefs.h. */
15541_ACEOF
15542cat confdefs.h >>conftest.$ac_ext
15543cat >>conftest.$ac_ext <<_ACEOF
15544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
Fred Drake8cef4cf2000-06-28 16:40:38 +000015546/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015547#ifdef __cplusplus
15548extern "C"
15549#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015550/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 builtin and then its argument prototype would still apply. */
15552char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015553int
15554main ()
15555{
15556forkpty ();
15557 ;
15558 return 0;
15559}
15560_ACEOF
15561rm -f conftest.$ac_objext conftest$ac_exeext
15562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015563 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015565 grep -v '^ *+' conftest.er1 >conftest.err
15566 rm -f conftest.er1
15567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015570 { ac_try='test -z "$ac_c_werror_flag"
15571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15573 (eval $ac_try) 2>&5
15574 ac_status=$?
15575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15576 (exit $ac_status); }; } &&
15577 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15579 (eval $ac_try) 2>&5
15580 ac_status=$?
15581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15582 (exit $ac_status); }; }; then
15583 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015584else
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015586sed 's/^/| /' conftest.$ac_ext >&5
15587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015589fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015590rm -f conftest.err conftest.$ac_objext \
15591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015592LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015594echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
15595echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
15596if test $ac_cv_lib_util_forkpty = yes; then
15597 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015598#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015599_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015600 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015601else
15602 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
15603echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
15604if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
15605 echo $ECHO_N "(cached) $ECHO_C" >&6
15606else
15607 ac_check_lib_save_LIBS=$LIBS
15608LIBS="-lbsd $LIBS"
15609cat >conftest.$ac_ext <<_ACEOF
15610/* confdefs.h. */
15611_ACEOF
15612cat confdefs.h >>conftest.$ac_ext
15613cat >>conftest.$ac_ext <<_ACEOF
15614/* end confdefs.h. */
15615
15616/* Override any gcc2 internal prototype to avoid an error. */
15617#ifdef __cplusplus
15618extern "C"
15619#endif
15620/* We use char because int might match the return type of a gcc2
15621 builtin and then its argument prototype would still apply. */
15622char forkpty ();
15623int
15624main ()
15625{
15626forkpty ();
15627 ;
15628 return 0;
15629}
15630_ACEOF
15631rm -f conftest.$ac_objext conftest$ac_exeext
15632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15633 (eval $ac_link) 2>conftest.er1
15634 ac_status=$?
15635 grep -v '^ *+' conftest.er1 >conftest.err
15636 rm -f conftest.er1
15637 cat conftest.err >&5
15638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15639 (exit $ac_status); } &&
15640 { ac_try='test -z "$ac_c_werror_flag"
15641 || test ! -s conftest.err'
15642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15644 ac_status=$?
15645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15646 (exit $ac_status); }; } &&
15647 { ac_try='test -s conftest$ac_exeext'
15648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15649 (eval $ac_try) 2>&5
15650 ac_status=$?
15651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15652 (exit $ac_status); }; }; then
15653 ac_cv_lib_bsd_forkpty=yes
15654else
15655 echo "$as_me: failed program was:" >&5
15656sed 's/^/| /' conftest.$ac_ext >&5
15657
15658ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015659fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015660rm -f conftest.err conftest.$ac_objext \
15661 conftest$ac_exeext conftest.$ac_ext
15662LIBS=$ac_check_lib_save_LIBS
15663fi
15664echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15665echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15666if test $ac_cv_lib_bsd_forkpty = yes; then
15667 cat >>confdefs.h <<\_ACEOF
15668#define HAVE_FORKPTY 1
15669_ACEOF
15670 LIBS="$LIBS -lbsd"
15671fi
15672
15673
15674fi
15675
Fred Drake8cef4cf2000-06-28 16:40:38 +000015676
15677fi
15678done
15679
Jack Jansendd19cf82001-12-06 22:36:17 +000015680
Michael W. Hudson54241132001-12-07 15:38:26 +000015681# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
15683
15684
15685
15686
15687
Fred Drake8cef4cf2000-06-28 16:40:38 +000015688for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15689do
Martin v. Löwis11437992002-04-12 09:54:03 +000015690as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15691echo "$as_me:$LINENO: checking for $ac_func" >&5
15692echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15693if eval "test \"\${$as_ac_var+set}\" = set"; then
15694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015697/* confdefs.h. */
15698_ACEOF
15699cat confdefs.h >>conftest.$ac_ext
15700cat >>conftest.$ac_ext <<_ACEOF
15701/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015702/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15703 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15704#define $ac_func innocuous_$ac_func
15705
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015706/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015707 which can conflict with char $ac_func (); below.
15708 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015709 <limits.h> exists even on freestanding compilers. */
15710
15711#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015712# include <limits.h>
15713#else
15714# include <assert.h>
15715#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015716
15717#undef $ac_func
15718
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015719/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015720#ifdef __cplusplus
15721extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015722{
Martin v. Löwis11437992002-04-12 09:54:03 +000015723#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015724/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 builtin and then its argument prototype would still apply. */
15726char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015727/* The GNU C library defines this for functions which it implements
15728 to always fail with ENOSYS. Some functions are actually named
15729 something starting with __ and the normal name is an alias. */
15730#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15731choke me
15732#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015733char (*f) () = $ac_func;
15734#endif
15735#ifdef __cplusplus
15736}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015737#endif
15738
Skip Montanaro6dead952003-09-25 14:50:04 +000015739int
15740main ()
15741{
15742return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 ;
15744 return 0;
15745}
15746_ACEOF
15747rm -f conftest.$ac_objext conftest$ac_exeext
15748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015749 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015751 grep -v '^ *+' conftest.er1 >conftest.err
15752 rm -f conftest.er1
15753 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015756 { ac_try='test -z "$ac_c_werror_flag"
15757 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15759 (eval $ac_try) 2>&5
15760 ac_status=$?
15761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15762 (exit $ac_status); }; } &&
15763 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15765 (eval $ac_try) 2>&5
15766 ac_status=$?
15767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15768 (exit $ac_status); }; }; then
15769 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015770else
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015772sed 's/^/| /' conftest.$ac_ext >&5
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015775fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015776rm -f conftest.err conftest.$ac_objext \
15777 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015779echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15780echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15781if test `eval echo '${'$as_ac_var'}'` = yes; then
15782 cat >>confdefs.h <<_ACEOF
15783#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15784_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015785
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015786fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015787done
15788
Michael W. Hudson54241132001-12-07 15:38:26 +000015789
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
15791
15792
15793
15794
Martin v. Löwis1142de32002-03-29 16:28:31 +000015795for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015796do
Martin v. Löwis11437992002-04-12 09:54:03 +000015797as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15798echo "$as_me:$LINENO: checking for $ac_func" >&5
15799echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15800if eval "test \"\${$as_ac_var+set}\" = set"; then
15801 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015802else
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015804/* confdefs.h. */
15805_ACEOF
15806cat confdefs.h >>conftest.$ac_ext
15807cat >>conftest.$ac_ext <<_ACEOF
15808/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015809/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15810 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15811#define $ac_func innocuous_$ac_func
15812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015813/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015814 which can conflict with char $ac_func (); below.
15815 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015816 <limits.h> exists even on freestanding compilers. */
15817
15818#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015819# include <limits.h>
15820#else
15821# include <assert.h>
15822#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015823
15824#undef $ac_func
15825
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015826/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015827#ifdef __cplusplus
15828extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015829{
Martin v. Löwis11437992002-04-12 09:54:03 +000015830#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015831/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015832 builtin and then its argument prototype would still apply. */
15833char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015834/* The GNU C library defines this for functions which it implements
15835 to always fail with ENOSYS. Some functions are actually named
15836 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015837#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015838choke me
15839#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015840char (*f) () = $ac_func;
15841#endif
15842#ifdef __cplusplus
15843}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015844#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015845
Skip Montanaro6dead952003-09-25 14:50:04 +000015846int
15847main ()
15848{
15849return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 ;
15851 return 0;
15852}
15853_ACEOF
15854rm -f conftest.$ac_objext conftest$ac_exeext
15855if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015856 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015858 grep -v '^ *+' conftest.er1 >conftest.err
15859 rm -f conftest.er1
15860 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015863 { ac_try='test -z "$ac_c_werror_flag"
15864 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15866 (eval $ac_try) 2>&5
15867 ac_status=$?
15868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15869 (exit $ac_status); }; } &&
15870 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15872 (eval $ac_try) 2>&5
15873 ac_status=$?
15874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875 (exit $ac_status); }; }; then
15876 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015877else
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015879sed 's/^/| /' conftest.$ac_ext >&5
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015882fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015883rm -f conftest.err conftest.$ac_objext \
15884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015886echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15887echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15888if test `eval echo '${'$as_ac_var'}'` = yes; then
15889 cat >>confdefs.h <<_ACEOF
15890#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15891_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015892
Martin v. Löwis1142de32002-03-29 16:28:31 +000015893else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015894 case $LIBOBJS in
15895 "$ac_func.$ac_objext" | \
15896 *" $ac_func.$ac_objext" | \
15897 "$ac_func.$ac_objext "* | \
15898 *" $ac_func.$ac_objext "* ) ;;
15899 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15900esac
15901
Martin v. Löwis1142de32002-03-29 16:28:31 +000015902fi
15903done
15904
15905
Martin v. Löwis11437992002-04-12 09:54:03 +000015906
Martin v. Löwis1142de32002-03-29 16:28:31 +000015907for ac_func in getpgrp
15908do
Martin v. Löwis11437992002-04-12 09:54:03 +000015909as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15910echo "$as_me:$LINENO: checking for $ac_func" >&5
15911echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15912if eval "test \"\${$as_ac_var+set}\" = set"; then
15913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015914else
Martin v. Löwis11437992002-04-12 09:54:03 +000015915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015916/* confdefs.h. */
15917_ACEOF
15918cat confdefs.h >>conftest.$ac_ext
15919cat >>conftest.$ac_ext <<_ACEOF
15920/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015921/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15923#define $ac_func innocuous_$ac_func
15924
Martin v. Löwis1142de32002-03-29 16:28:31 +000015925/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015926 which can conflict with char $ac_func (); below.
15927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015928 <limits.h> exists even on freestanding compilers. */
15929
15930#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015931# include <limits.h>
15932#else
15933# include <assert.h>
15934#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015935
15936#undef $ac_func
15937
Martin v. Löwis1142de32002-03-29 16:28:31 +000015938/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015939#ifdef __cplusplus
15940extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015941{
Martin v. Löwis11437992002-04-12 09:54:03 +000015942#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015943/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 builtin and then its argument prototype would still apply. */
15945char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015946/* The GNU C library defines this for functions which it implements
15947 to always fail with ENOSYS. Some functions are actually named
15948 something starting with __ and the normal name is an alias. */
15949#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15950choke me
15951#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015952char (*f) () = $ac_func;
15953#endif
15954#ifdef __cplusplus
15955}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015956#endif
15957
Skip Montanaro6dead952003-09-25 14:50:04 +000015958int
15959main ()
15960{
15961return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 ;
15963 return 0;
15964}
15965_ACEOF
15966rm -f conftest.$ac_objext conftest$ac_exeext
15967if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 (eval $ac_link) 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_exeext'
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
15988 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015989else
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 +000015993eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015995rm -f conftest.err conftest.$ac_objext \
15996 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015997fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015998echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15999echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16000if test `eval echo '${'$as_ac_var'}'` = yes; then
16001 cat >>confdefs.h <<_ACEOF
16002#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16003_ACEOF
16004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016010#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016011int
16012main ()
16013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016014getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 ;
16016 return 0;
16017}
16018_ACEOF
16019rm -f conftest.$ac_objext
16020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016021 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016023 grep -v '^ *+' conftest.er1 >conftest.err
16024 rm -f conftest.er1
16025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016028 { ac_try='test -z "$ac_c_werror_flag"
16029 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16031 (eval $ac_try) 2>&5
16032 ac_status=$?
16033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16034 (exit $ac_status); }; } &&
16035 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16037 (eval $ac_try) 2>&5
16038 ac_status=$?
16039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16040 (exit $ac_status); }; }; then
16041
16042cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016043#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016045
Martin v. Löwis11437992002-04-12 09:54:03 +000016046
Guido van Rossumf78abae1997-01-21 22:02:36 +000016047else
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016049sed 's/^/| /' conftest.$ac_ext >&5
16050
Guido van Rossum627b2d71993-12-24 10:39:16 +000016051fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016053
Guido van Rossum627b2d71993-12-24 10:39:16 +000016054fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016055done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016056
Jack Jansen150753c2003-03-29 22:07:47 +000016057
16058for ac_func in setpgrp
16059do
16060as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16061echo "$as_me:$LINENO: checking for $ac_func" >&5
16062echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16063if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016064 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016065else
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016067/* confdefs.h. */
16068_ACEOF
16069cat confdefs.h >>conftest.$ac_ext
16070cat >>conftest.$ac_ext <<_ACEOF
16071/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016072/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16073 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16074#define $ac_func innocuous_$ac_func
16075
Jack Jansen150753c2003-03-29 22:07:47 +000016076/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016077 which can conflict with char $ac_func (); below.
16078 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016079 <limits.h> exists even on freestanding compilers. */
16080
16081#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016082# include <limits.h>
16083#else
16084# include <assert.h>
16085#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016086
16087#undef $ac_func
16088
Jack Jansen150753c2003-03-29 22:07:47 +000016089/* Override any gcc2 internal prototype to avoid an error. */
16090#ifdef __cplusplus
16091extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016092{
Martin v. Löwis11437992002-04-12 09:54:03 +000016093#endif
Jack Jansen150753c2003-03-29 22:07:47 +000016094/* We use char because int might match the return type of a gcc2
16095 builtin and then its argument prototype would still apply. */
16096char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000016097/* The GNU C library defines this for functions which it implements
16098 to always fail with ENOSYS. Some functions are actually named
16099 something starting with __ and the normal name is an alias. */
16100#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16101choke me
16102#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016103char (*f) () = $ac_func;
16104#endif
16105#ifdef __cplusplus
16106}
Jack Jansen150753c2003-03-29 22:07:47 +000016107#endif
16108
Skip Montanaro6dead952003-09-25 14:50:04 +000016109int
16110main ()
16111{
16112return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016113 ;
16114 return 0;
16115}
16116_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016117rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000016118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016119 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016121 grep -v '^ *+' conftest.er1 >conftest.err
16122 rm -f conftest.er1
16123 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016125 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016126 { ac_try='test -z "$ac_c_werror_flag"
16127 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16129 (eval $ac_try) 2>&5
16130 ac_status=$?
16131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16132 (exit $ac_status); }; } &&
16133 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16135 (eval $ac_try) 2>&5
16136 ac_status=$?
16137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16138 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000016139 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016140else
Jack Jansen150753c2003-03-29 22:07:47 +000016141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016142sed 's/^/| /' conftest.$ac_ext >&5
16143
Jack Jansen150753c2003-03-29 22:07:47 +000016144eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016145fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016146rm -f conftest.err conftest.$ac_objext \
16147 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016148fi
Jack Jansen150753c2003-03-29 22:07:47 +000016149echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16150echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16151if test `eval echo '${'$as_ac_var'}'` = yes; then
16152 cat >>confdefs.h <<_ACEOF
16153#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16154_ACEOF
16155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016156/* confdefs.h. */
16157_ACEOF
16158cat confdefs.h >>conftest.$ac_ext
16159cat >>conftest.$ac_ext <<_ACEOF
16160/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000016161#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000016162int
16163main ()
16164{
16165setpgrp(0,0);
16166 ;
16167 return 0;
16168}
16169_ACEOF
16170rm -f conftest.$ac_objext
16171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016172 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000016173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 grep -v '^ *+' conftest.er1 >conftest.err
16175 rm -f conftest.er1
16176 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16178 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016179 { ac_try='test -z "$ac_c_werror_flag"
16180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16182 (eval $ac_try) 2>&5
16183 ac_status=$?
16184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185 (exit $ac_status); }; } &&
16186 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000016187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16188 (eval $ac_try) 2>&5
16189 ac_status=$?
16190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016192
16193cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016194#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016195_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016196
Jack Jansen150753c2003-03-29 22:07:47 +000016197
16198else
16199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016200sed 's/^/| /' conftest.$ac_ext >&5
16201
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016202fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016203rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000016204
16205fi
16206done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016207
Martin v. Löwis11437992002-04-12 09:54:03 +000016208
Thomas Wouters3a584202000-08-05 23:28:51 +000016209for ac_func in gettimeofday
16210do
Martin v. Löwis11437992002-04-12 09:54:03 +000016211as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16212echo "$as_me:$LINENO: checking for $ac_func" >&5
16213echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16214if eval "test \"\${$as_ac_var+set}\" = set"; then
16215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016216else
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016218/* confdefs.h. */
16219_ACEOF
16220cat confdefs.h >>conftest.$ac_ext
16221cat >>conftest.$ac_ext <<_ACEOF
16222/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016223/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16224 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16225#define $ac_func innocuous_$ac_func
16226
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016227/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016228 which can conflict with char $ac_func (); below.
16229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016230 <limits.h> exists even on freestanding compilers. */
16231
16232#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016233# include <limits.h>
16234#else
16235# include <assert.h>
16236#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016237
16238#undef $ac_func
16239
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016240/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016241#ifdef __cplusplus
16242extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016243{
Martin v. Löwis11437992002-04-12 09:54:03 +000016244#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016245/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 builtin and then its argument prototype would still apply. */
16247char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016248/* The GNU C library defines this for functions which it implements
16249 to always fail with ENOSYS. Some functions are actually named
16250 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016251#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016252choke me
16253#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016254char (*f) () = $ac_func;
16255#endif
16256#ifdef __cplusplus
16257}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016258#endif
16259
Skip Montanaro6dead952003-09-25 14:50:04 +000016260int
16261main ()
16262{
16263return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016264 ;
16265 return 0;
16266}
16267_ACEOF
16268rm -f conftest.$ac_objext conftest$ac_exeext
16269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016270 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016272 grep -v '^ *+' conftest.er1 >conftest.err
16273 rm -f conftest.er1
16274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016277 { ac_try='test -z "$ac_c_werror_flag"
16278 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16280 (eval $ac_try) 2>&5
16281 ac_status=$?
16282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16283 (exit $ac_status); }; } &&
16284 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286 (eval $ac_try) 2>&5
16287 ac_status=$?
16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289 (exit $ac_status); }; }; then
16290 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016291else
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016293sed 's/^/| /' conftest.$ac_ext >&5
16294
Martin v. Löwis11437992002-04-12 09:54:03 +000016295eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016296fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297rm -f conftest.err conftest.$ac_objext \
16298 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016299fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016300echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16301echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16302if test `eval echo '${'$as_ac_var'}'` = yes; then
16303 cat >>confdefs.h <<_ACEOF
16304#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16305_ACEOF
16306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016307/* confdefs.h. */
16308_ACEOF
16309cat confdefs.h >>conftest.$ac_ext
16310cat >>conftest.$ac_ext <<_ACEOF
16311/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016312#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016313int
16314main ()
16315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016316gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 ;
16318 return 0;
16319}
16320_ACEOF
16321rm -f conftest.$ac_objext
16322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016323 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016325 grep -v '^ *+' conftest.er1 >conftest.err
16326 rm -f conftest.er1
16327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16329 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016330 { ac_try='test -z "$ac_c_werror_flag"
16331 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16333 (eval $ac_try) 2>&5
16334 ac_status=$?
16335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16336 (exit $ac_status); }; } &&
16337 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16339 (eval $ac_try) 2>&5
16340 ac_status=$?
16341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16342 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016343 :
16344else
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016346sed 's/^/| /' conftest.$ac_ext >&5
16347
Martin v. Löwis11437992002-04-12 09:54:03 +000016348
16349cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016350#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016351_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016352
Martin v. Löwis11437992002-04-12 09:54:03 +000016353
Guido van Rossum627b2d71993-12-24 10:39:16 +000016354fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016355rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016356
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016359
Michael W. Hudson54241132001-12-07 15:38:26 +000016360
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016361echo "$as_me:$LINENO: checking for major" >&5
16362echo $ECHO_N "checking for major... $ECHO_C" >&6
16363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016364/* confdefs.h. */
16365_ACEOF
16366cat confdefs.h >>conftest.$ac_ext
16367cat >>conftest.$ac_ext <<_ACEOF
16368/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016369
Neal Norwitz6eb37f02003-02-23 23:28:15 +000016370#if defined(MAJOR_IN_MKDEV)
16371#include <sys/mkdev.h>
16372#elif defined(MAJOR_IN_SYSMACROS)
16373#include <sys/sysmacros.h>
16374#else
16375#include <sys/types.h>
16376#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016378int
16379main ()
16380{
16381
16382 makedev(major(0),minor(0));
16383
16384 ;
16385 return 0;
16386}
16387_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000016388rm -f conftest.$ac_objext conftest$ac_exeext
16389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016390 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016392 grep -v '^ *+' conftest.er1 >conftest.err
16393 rm -f conftest.er1
16394 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16396 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016397 { ac_try='test -z "$ac_c_werror_flag"
16398 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16400 (eval $ac_try) 2>&5
16401 ac_status=$?
16402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16403 (exit $ac_status); }; } &&
16404 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16406 (eval $ac_try) 2>&5
16407 ac_status=$?
16408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16409 (exit $ac_status); }; }; then
16410
16411
16412cat >>confdefs.h <<\_ACEOF
16413#define HAVE_DEVICE_MACROS 1
16414_ACEOF
16415
16416 echo "$as_me:$LINENO: result: yes" >&5
16417echo "${ECHO_T}yes" >&6
16418
16419else
16420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016421sed 's/^/| /' conftest.$ac_ext >&5
16422
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016423
16424 echo "$as_me:$LINENO: result: no" >&5
16425echo "${ECHO_T}no" >&6
16426
16427fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016428rm -f conftest.err conftest.$ac_objext \
16429 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016430
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016431# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000016432# for [no]getaddrinfo in netdb.h.
16433echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16434echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
16435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016436/* confdefs.h. */
16437_ACEOF
16438cat confdefs.h >>conftest.$ac_ext
16439cat >>conftest.$ac_ext <<_ACEOF
16440/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016441
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016442#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016443#include <sys/socket.h>
16444#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016445#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016446
Martin v. Löwis11437992002-04-12 09:54:03 +000016447int
16448main ()
16449{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016450
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016451getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016452
Martin v. Löwis11437992002-04-12 09:54:03 +000016453 ;
16454 return 0;
16455}
16456_ACEOF
16457rm -f conftest.$ac_objext conftest$ac_exeext
16458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016459 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016461 grep -v '^ *+' conftest.er1 >conftest.err
16462 rm -f conftest.er1
16463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016466 { ac_try='test -z "$ac_c_werror_flag"
16467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16469 (eval $ac_try) 2>&5
16470 ac_status=$?
16471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16472 (exit $ac_status); }; } &&
16473 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16475 (eval $ac_try) 2>&5
16476 ac_status=$?
16477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478 (exit $ac_status); }; }; then
16479
16480echo "$as_me:$LINENO: result: yes" >&5
16481echo "${ECHO_T}yes" >&6
16482echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
16483echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016484if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 echo "$as_me:$LINENO: result: buggy" >&5
16486echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016487buggygetaddrinfo=yes
16488else
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016490/* confdefs.h. */
16491_ACEOF
16492cat confdefs.h >>conftest.$ac_ext
16493cat >>conftest.$ac_ext <<_ACEOF
16494/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016495
16496#include <sys/types.h>
16497#include <netdb.h>
16498#include <string.h>
16499#include <sys/socket.h>
16500#include <netinet/in.h>
16501
16502main()
16503{
16504 int passive, gaierr, inet4 = 0, inet6 = 0;
16505 struct addrinfo hints, *ai, *aitop;
16506 char straddr[INET6_ADDRSTRLEN], strport[16];
16507
16508 for (passive = 0; passive <= 1; passive++) {
16509 memset(&hints, 0, sizeof(hints));
16510 hints.ai_family = AF_UNSPEC;
16511 hints.ai_flags = passive ? AI_PASSIVE : 0;
16512 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000016513 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016514 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
16515 (void)gai_strerror(gaierr);
16516 goto bad;
16517 }
16518 for (ai = aitop; ai; ai = ai->ai_next) {
16519 if (ai->ai_addr == NULL ||
16520 ai->ai_addrlen == 0 ||
16521 getnameinfo(ai->ai_addr, ai->ai_addrlen,
16522 straddr, sizeof(straddr), strport, sizeof(strport),
16523 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
16524 goto bad;
16525 }
16526 switch (ai->ai_family) {
16527 case AF_INET:
16528 if (strcmp(strport, "54321") != 0) {
16529 goto bad;
16530 }
16531 if (passive) {
16532 if (strcmp(straddr, "0.0.0.0") != 0) {
16533 goto bad;
16534 }
16535 } else {
16536 if (strcmp(straddr, "127.0.0.1") != 0) {
16537 goto bad;
16538 }
16539 }
16540 inet4++;
16541 break;
16542 case AF_INET6:
16543 if (strcmp(strport, "54321") != 0) {
16544 goto bad;
16545 }
16546 if (passive) {
16547 if (strcmp(straddr, "::") != 0) {
16548 goto bad;
16549 }
16550 } else {
16551 if (strcmp(straddr, "::1") != 0) {
16552 goto bad;
16553 }
16554 }
16555 inet6++;
16556 break;
16557 case AF_UNSPEC:
16558 goto bad;
16559 break;
16560 default:
16561 /* another family support? */
16562 break;
16563 }
16564 }
16565 }
16566
16567 if (!(inet4 == 0 || inet4 == 2))
16568 goto bad;
16569 if (!(inet6 == 0 || inet6 == 2))
16570 goto bad;
16571
16572 if (aitop)
16573 freeaddrinfo(aitop);
16574 exit(0);
16575
16576 bad:
16577 if (aitop)
16578 freeaddrinfo(aitop);
16579 exit(1);
16580}
16581
Martin v. Löwis11437992002-04-12 09:54:03 +000016582_ACEOF
16583rm -f conftest$ac_exeext
16584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16585 (eval $ac_link) 2>&5
16586 ac_status=$?
16587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16590 (eval $ac_try) 2>&5
16591 ac_status=$?
16592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16593 (exit $ac_status); }; }; then
16594 echo "$as_me:$LINENO: result: good" >&5
16595echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016596buggygetaddrinfo=no
16597else
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 echo "$as_me: program exited with status $ac_status" >&5
16599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwis11437992002-04-12 09:54:03 +000016602( exit $ac_status )
16603echo "$as_me:$LINENO: result: buggy" >&5
16604echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016605buggygetaddrinfo=yes
16606fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016607rm -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 +000016608fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016609else
Martin v. Löwis11437992002-04-12 09:54:03 +000016610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016611sed 's/^/| /' conftest.$ac_ext >&5
16612
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
16614echo "$as_me:$LINENO: result: no" >&5
16615echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016616buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016617
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016618fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016619rm -f conftest.err conftest.$ac_objext \
16620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016621
16622if test "$buggygetaddrinfo" = "yes"; then
16623 if test "$ipv6" = "yes"; then
16624 echo 'Fatal: You must get working getaddrinfo() function.'
16625 echo ' or you can specify "--disable-ipv6"'.
16626 exit 1
16627 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016628else
Martin v. Löwis11437992002-04-12 09:54:03 +000016629
16630cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016631#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016632_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016633
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016635
Jack Jansen9a66b6d2001-08-08 13:56:14 +000016636for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016637do
Martin v. Löwis11437992002-04-12 09:54:03 +000016638as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16639echo "$as_me:$LINENO: checking for $ac_func" >&5
16640echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16641if eval "test \"\${$as_ac_var+set}\" = set"; then
16642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016643else
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016645/* confdefs.h. */
16646_ACEOF
16647cat confdefs.h >>conftest.$ac_ext
16648cat >>conftest.$ac_ext <<_ACEOF
16649/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016650/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16651 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16652#define $ac_func innocuous_$ac_func
16653
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016654/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016655 which can conflict with char $ac_func (); below.
16656 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016657 <limits.h> exists even on freestanding compilers. */
16658
16659#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016660# include <limits.h>
16661#else
16662# include <assert.h>
16663#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016664
16665#undef $ac_func
16666
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016668#ifdef __cplusplus
16669extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016670{
Martin v. Löwis11437992002-04-12 09:54:03 +000016671#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016672/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 builtin and then its argument prototype would still apply. */
16674char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016675/* The GNU C library defines this for functions which it implements
16676 to always fail with ENOSYS. Some functions are actually named
16677 something starting with __ and the normal name is an alias. */
16678#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16679choke me
16680#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016681char (*f) () = $ac_func;
16682#endif
16683#ifdef __cplusplus
16684}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016685#endif
16686
Skip Montanaro6dead952003-09-25 14:50:04 +000016687int
16688main ()
16689{
16690return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 ;
16692 return 0;
16693}
16694_ACEOF
16695rm -f conftest.$ac_objext conftest$ac_exeext
16696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016697 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016699 grep -v '^ *+' conftest.er1 >conftest.err
16700 rm -f conftest.er1
16701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16703 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016704 { ac_try='test -z "$ac_c_werror_flag"
16705 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16707 (eval $ac_try) 2>&5
16708 ac_status=$?
16709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16710 (exit $ac_status); }; } &&
16711 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16713 (eval $ac_try) 2>&5
16714 ac_status=$?
16715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16716 (exit $ac_status); }; }; then
16717 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016718else
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016720sed 's/^/| /' conftest.$ac_ext >&5
16721
Martin v. Löwis11437992002-04-12 09:54:03 +000016722eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016723fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016724rm -f conftest.err conftest.$ac_objext \
16725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016727echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16728echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16729if test `eval echo '${'$as_ac_var'}'` = yes; then
16730 cat >>confdefs.h <<_ACEOF
16731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16732_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016733
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016734fi
16735done
16736
Michael W. Hudson54241132001-12-07 15:38:26 +000016737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016738# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016739echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16740echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16741if test "${ac_cv_header_time+set}" = set; then
16742 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016743else
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016745/* confdefs.h. */
16746_ACEOF
16747cat confdefs.h >>conftest.$ac_ext
16748cat >>conftest.$ac_ext <<_ACEOF
16749/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016750#include <sys/types.h>
16751#include <sys/time.h>
16752#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016753
Martin v. Löwis11437992002-04-12 09:54:03 +000016754int
16755main ()
16756{
16757if ((struct tm *) 0)
16758return 0;
16759 ;
16760 return 0;
16761}
16762_ACEOF
16763rm -f conftest.$ac_objext
16764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016765 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016767 grep -v '^ *+' conftest.er1 >conftest.err
16768 rm -f conftest.er1
16769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016772 { ac_try='test -z "$ac_c_werror_flag"
16773 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16775 (eval $ac_try) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); }; } &&
16779 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16782 ac_status=$?
16783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16784 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016785 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016786else
Martin v. Löwis11437992002-04-12 09:54:03 +000016787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016788sed 's/^/| /' conftest.$ac_ext >&5
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016791fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016792rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016794echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16795echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016796if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016799#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016800_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016801
16802fi
16803
Martin v. Löwis11437992002-04-12 09:54:03 +000016804echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16805echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16806if test "${ac_cv_struct_tm+set}" = set; then
16807 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016808else
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016810/* confdefs.h. */
16811_ACEOF
16812cat confdefs.h >>conftest.$ac_ext
16813cat >>conftest.$ac_ext <<_ACEOF
16814/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016815#include <sys/types.h>
16816#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016817
Martin v. Löwis11437992002-04-12 09:54:03 +000016818int
16819main ()
16820{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016821struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 ;
16823 return 0;
16824}
16825_ACEOF
16826rm -f conftest.$ac_objext
16827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016830 grep -v '^ *+' conftest.er1 >conftest.err
16831 rm -f conftest.er1
16832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16834 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016835 { ac_try='test -z "$ac_c_werror_flag"
16836 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16838 (eval $ac_try) 2>&5
16839 ac_status=$?
16840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16841 (exit $ac_status); }; } &&
16842 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16844 (eval $ac_try) 2>&5
16845 ac_status=$?
16846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16847 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016848 ac_cv_struct_tm=time.h
16849else
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016851sed 's/^/| /' conftest.$ac_ext >&5
16852
Martin v. Löwis11437992002-04-12 09:54:03 +000016853ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016857echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16858echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016859if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016860
16861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016862#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016863_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016864
16865fi
16866
Martin v. Löwis11437992002-04-12 09:54:03 +000016867echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16868echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16869if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016871else
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016873/* confdefs.h. */
16874_ACEOF
16875cat confdefs.h >>conftest.$ac_ext
16876cat >>conftest.$ac_ext <<_ACEOF
16877/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016878#include <sys/types.h>
16879#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016880
16881
Martin v. Löwis11437992002-04-12 09:54:03 +000016882int
16883main ()
16884{
16885static struct tm ac_aggr;
16886if (ac_aggr.tm_zone)
16887return 0;
16888 ;
16889 return 0;
16890}
16891_ACEOF
16892rm -f conftest.$ac_objext
16893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016894 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016896 grep -v '^ *+' conftest.er1 >conftest.err
16897 rm -f conftest.er1
16898 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16900 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016901 { ac_try='test -z "$ac_c_werror_flag"
16902 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16904 (eval $ac_try) 2>&5
16905 ac_status=$?
16906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16907 (exit $ac_status); }; } &&
16908 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16910 (eval $ac_try) 2>&5
16911 ac_status=$?
16912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16913 (exit $ac_status); }; }; then
16914 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016915else
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016917sed 's/^/| /' conftest.$ac_ext >&5
16918
16919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016920/* confdefs.h. */
16921_ACEOF
16922cat confdefs.h >>conftest.$ac_ext
16923cat >>conftest.$ac_ext <<_ACEOF
16924/* end confdefs.h. */
16925#include <sys/types.h>
16926#include <$ac_cv_struct_tm>
16927
16928
16929int
16930main ()
16931{
16932static struct tm ac_aggr;
16933if (sizeof ac_aggr.tm_zone)
16934return 0;
16935 ;
16936 return 0;
16937}
16938_ACEOF
16939rm -f conftest.$ac_objext
16940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016941 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016943 grep -v '^ *+' conftest.er1 >conftest.err
16944 rm -f conftest.er1
16945 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016948 { ac_try='test -z "$ac_c_werror_flag"
16949 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16951 (eval $ac_try) 2>&5
16952 ac_status=$?
16953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954 (exit $ac_status); }; } &&
16955 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16957 (eval $ac_try) 2>&5
16958 ac_status=$?
16959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16960 (exit $ac_status); }; }; then
16961 ac_cv_member_struct_tm_tm_zone=yes
16962else
16963 echo "$as_me: failed program was:" >&5
16964sed 's/^/| /' conftest.$ac_ext >&5
16965
Martin v. Löwis11437992002-04-12 09:54:03 +000016966ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016967fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016969fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016970rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016972echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16973echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16974if test $ac_cv_member_struct_tm_tm_zone = yes; then
16975
16976cat >>confdefs.h <<_ACEOF
16977#define HAVE_STRUCT_TM_TM_ZONE 1
16978_ACEOF
16979
16980
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016981fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016982
Martin v. Löwis11437992002-04-12 09:54:03 +000016983if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16984
16985cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016986#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016987_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016988
16989else
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 echo "$as_me:$LINENO: checking for tzname" >&5
16991echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16992if test "${ac_cv_var_tzname+set}" = set; then
16993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016994else
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001#include <time.h>
17002#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017003extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017004#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Martin v. Löwis11437992002-04-12 09:54:03 +000017006int
17007main ()
17008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017009atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000017010 ;
17011 return 0;
17012}
17013_ACEOF
17014rm -f conftest.$ac_objext conftest$ac_exeext
17015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017016 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017018 grep -v '^ *+' conftest.er1 >conftest.err
17019 rm -f conftest.er1
17020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17022 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017023 { ac_try='test -z "$ac_c_werror_flag"
17024 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17026 (eval $ac_try) 2>&5
17027 ac_status=$?
17028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17029 (exit $ac_status); }; } &&
17030 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17032 (eval $ac_try) 2>&5
17033 ac_status=$?
17034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17035 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017036 ac_cv_var_tzname=yes
17037else
Martin v. Löwis11437992002-04-12 09:54:03 +000017038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017039sed 's/^/| /' conftest.$ac_ext >&5
17040
Martin v. Löwis11437992002-04-12 09:54:03 +000017041ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017042fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017043rm -f conftest.err conftest.$ac_objext \
17044 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017046echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17047echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017048 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017049
17050cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017051#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017052_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017053
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017054 fi
17055fi
17056
Martin v. Löwis11437992002-04-12 09:54:03 +000017057echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
17058echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
17059if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
17060 echo $ECHO_N "(cached) $ECHO_C" >&6
17061else
17062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017063/* confdefs.h. */
17064_ACEOF
17065cat confdefs.h >>conftest.$ac_ext
17066cat >>conftest.$ac_ext <<_ACEOF
17067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017068$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017069int
17070main ()
17071{
17072static struct stat ac_aggr;
17073if (ac_aggr.st_rdev)
17074return 0;
17075 ;
17076 return 0;
17077}
17078_ACEOF
17079rm -f conftest.$ac_objext
17080if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017081 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017083 grep -v '^ *+' conftest.er1 >conftest.err
17084 rm -f conftest.er1
17085 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17087 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017088 { ac_try='test -z "$ac_c_werror_flag"
17089 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17091 (eval $ac_try) 2>&5
17092 ac_status=$?
17093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17094 (exit $ac_status); }; } &&
17095 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17097 (eval $ac_try) 2>&5
17098 ac_status=$?
17099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17100 (exit $ac_status); }; }; then
17101 ac_cv_member_struct_stat_st_rdev=yes
17102else
17103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017104sed 's/^/| /' conftest.$ac_ext >&5
17105
17106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017107/* confdefs.h. */
17108_ACEOF
17109cat confdefs.h >>conftest.$ac_ext
17110cat >>conftest.$ac_ext <<_ACEOF
17111/* end confdefs.h. */
17112$ac_includes_default
17113int
17114main ()
17115{
17116static struct stat ac_aggr;
17117if (sizeof ac_aggr.st_rdev)
17118return 0;
17119 ;
17120 return 0;
17121}
17122_ACEOF
17123rm -f conftest.$ac_objext
17124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127 grep -v '^ *+' conftest.er1 >conftest.err
17128 rm -f conftest.er1
17129 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17131 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017132 { ac_try='test -z "$ac_c_werror_flag"
17133 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; } &&
17139 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); }; }; then
17145 ac_cv_member_struct_stat_st_rdev=yes
17146else
17147 echo "$as_me: failed program was:" >&5
17148sed 's/^/| /' conftest.$ac_ext >&5
17149
Martin v. Löwis11437992002-04-12 09:54:03 +000017150ac_cv_member_struct_stat_st_rdev=no
17151fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017152rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017153fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017156echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
17157echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
17158if test $ac_cv_member_struct_stat_st_rdev = yes; then
17159
17160cat >>confdefs.h <<_ACEOF
17161#define HAVE_STRUCT_STAT_ST_RDEV 1
17162_ACEOF
17163
17164
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017165fi
17166
Martin v. Löwis11437992002-04-12 09:54:03 +000017167echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
17168echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
17169if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
17170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017171else
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017173/* confdefs.h. */
17174_ACEOF
17175cat confdefs.h >>conftest.$ac_ext
17176cat >>conftest.$ac_ext <<_ACEOF
17177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017178$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017179int
17180main ()
17181{
17182static struct stat ac_aggr;
17183if (ac_aggr.st_blksize)
17184return 0;
17185 ;
17186 return 0;
17187}
17188_ACEOF
17189rm -f conftest.$ac_objext
17190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017191 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017193 grep -v '^ *+' conftest.er1 >conftest.err
17194 rm -f conftest.er1
17195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017198 { ac_try='test -z "$ac_c_werror_flag"
17199 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17201 (eval $ac_try) 2>&5
17202 ac_status=$?
17203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204 (exit $ac_status); }; } &&
17205 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17207 (eval $ac_try) 2>&5
17208 ac_status=$?
17209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210 (exit $ac_status); }; }; then
17211 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017212else
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017214sed 's/^/| /' conftest.$ac_ext >&5
17215
17216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017217/* confdefs.h. */
17218_ACEOF
17219cat confdefs.h >>conftest.$ac_ext
17220cat >>conftest.$ac_ext <<_ACEOF
17221/* end confdefs.h. */
17222$ac_includes_default
17223int
17224main ()
17225{
17226static struct stat ac_aggr;
17227if (sizeof ac_aggr.st_blksize)
17228return 0;
17229 ;
17230 return 0;
17231}
17232_ACEOF
17233rm -f conftest.$ac_objext
17234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017235 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017237 grep -v '^ *+' conftest.er1 >conftest.err
17238 rm -f conftest.er1
17239 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17241 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017242 { ac_try='test -z "$ac_c_werror_flag"
17243 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17245 (eval $ac_try) 2>&5
17246 ac_status=$?
17247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17248 (exit $ac_status); }; } &&
17249 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17251 (eval $ac_try) 2>&5
17252 ac_status=$?
17253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17254 (exit $ac_status); }; }; then
17255 ac_cv_member_struct_stat_st_blksize=yes
17256else
17257 echo "$as_me: failed program was:" >&5
17258sed 's/^/| /' conftest.$ac_ext >&5
17259
Martin v. Löwis11437992002-04-12 09:54:03 +000017260ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017261fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017262rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017263fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017265fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017266echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17267echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
17268if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017269
Martin v. Löwis11437992002-04-12 09:54:03 +000017270cat >>confdefs.h <<_ACEOF
17271#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17272_ACEOF
17273
17274
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017275fi
17276
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017277echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17278echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
17279if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17280 echo $ECHO_N "(cached) $ECHO_C" >&6
17281else
17282 cat >conftest.$ac_ext <<_ACEOF
17283/* confdefs.h. */
17284_ACEOF
17285cat confdefs.h >>conftest.$ac_ext
17286cat >>conftest.$ac_ext <<_ACEOF
17287/* end confdefs.h. */
17288$ac_includes_default
17289int
17290main ()
17291{
17292static struct stat ac_aggr;
17293if (ac_aggr.st_flags)
17294return 0;
17295 ;
17296 return 0;
17297}
17298_ACEOF
17299rm -f conftest.$ac_objext
17300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17301 (eval $ac_compile) 2>conftest.er1
17302 ac_status=$?
17303 grep -v '^ *+' conftest.er1 >conftest.err
17304 rm -f conftest.er1
17305 cat conftest.err >&5
17306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17307 (exit $ac_status); } &&
17308 { ac_try='test -z "$ac_c_werror_flag"
17309 || test ! -s conftest.err'
17310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17311 (eval $ac_try) 2>&5
17312 ac_status=$?
17313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17314 (exit $ac_status); }; } &&
17315 { ac_try='test -s conftest.$ac_objext'
17316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17317 (eval $ac_try) 2>&5
17318 ac_status=$?
17319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17320 (exit $ac_status); }; }; then
17321 ac_cv_member_struct_stat_st_flags=yes
17322else
17323 echo "$as_me: failed program was:" >&5
17324sed 's/^/| /' conftest.$ac_ext >&5
17325
17326cat >conftest.$ac_ext <<_ACEOF
17327/* confdefs.h. */
17328_ACEOF
17329cat confdefs.h >>conftest.$ac_ext
17330cat >>conftest.$ac_ext <<_ACEOF
17331/* end confdefs.h. */
17332$ac_includes_default
17333int
17334main ()
17335{
17336static struct stat ac_aggr;
17337if (sizeof ac_aggr.st_flags)
17338return 0;
17339 ;
17340 return 0;
17341}
17342_ACEOF
17343rm -f conftest.$ac_objext
17344if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17345 (eval $ac_compile) 2>conftest.er1
17346 ac_status=$?
17347 grep -v '^ *+' conftest.er1 >conftest.err
17348 rm -f conftest.er1
17349 cat conftest.err >&5
17350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17351 (exit $ac_status); } &&
17352 { ac_try='test -z "$ac_c_werror_flag"
17353 || test ! -s conftest.err'
17354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17355 (eval $ac_try) 2>&5
17356 ac_status=$?
17357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358 (exit $ac_status); }; } &&
17359 { ac_try='test -s conftest.$ac_objext'
17360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17361 (eval $ac_try) 2>&5
17362 ac_status=$?
17363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17364 (exit $ac_status); }; }; then
17365 ac_cv_member_struct_stat_st_flags=yes
17366else
17367 echo "$as_me: failed program was:" >&5
17368sed 's/^/| /' conftest.$ac_ext >&5
17369
17370ac_cv_member_struct_stat_st_flags=no
17371fi
17372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17373fi
17374rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17375fi
17376echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
17377echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
17378if test $ac_cv_member_struct_stat_st_flags = yes; then
17379
17380cat >>confdefs.h <<_ACEOF
17381#define HAVE_STRUCT_STAT_ST_FLAGS 1
17382_ACEOF
17383
17384
17385fi
17386
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017387echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
17388echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
17389if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
17390 echo $ECHO_N "(cached) $ECHO_C" >&6
17391else
17392 cat >conftest.$ac_ext <<_ACEOF
17393/* confdefs.h. */
17394_ACEOF
17395cat confdefs.h >>conftest.$ac_ext
17396cat >>conftest.$ac_ext <<_ACEOF
17397/* end confdefs.h. */
17398$ac_includes_default
17399int
17400main ()
17401{
17402static struct stat ac_aggr;
17403if (ac_aggr.st_gen)
17404return 0;
17405 ;
17406 return 0;
17407}
17408_ACEOF
17409rm -f conftest.$ac_objext
17410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17411 (eval $ac_compile) 2>conftest.er1
17412 ac_status=$?
17413 grep -v '^ *+' conftest.er1 >conftest.err
17414 rm -f conftest.er1
17415 cat conftest.err >&5
17416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17417 (exit $ac_status); } &&
17418 { ac_try='test -z "$ac_c_werror_flag"
17419 || test ! -s conftest.err'
17420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17421 (eval $ac_try) 2>&5
17422 ac_status=$?
17423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424 (exit $ac_status); }; } &&
17425 { ac_try='test -s conftest.$ac_objext'
17426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17427 (eval $ac_try) 2>&5
17428 ac_status=$?
17429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17430 (exit $ac_status); }; }; then
17431 ac_cv_member_struct_stat_st_gen=yes
17432else
17433 echo "$as_me: failed program was:" >&5
17434sed 's/^/| /' conftest.$ac_ext >&5
17435
17436cat >conftest.$ac_ext <<_ACEOF
17437/* confdefs.h. */
17438_ACEOF
17439cat confdefs.h >>conftest.$ac_ext
17440cat >>conftest.$ac_ext <<_ACEOF
17441/* end confdefs.h. */
17442$ac_includes_default
17443int
17444main ()
17445{
17446static struct stat ac_aggr;
17447if (sizeof ac_aggr.st_gen)
17448return 0;
17449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext
17454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17455 (eval $ac_compile) 2>conftest.er1
17456 ac_status=$?
17457 grep -v '^ *+' conftest.er1 >conftest.err
17458 rm -f conftest.er1
17459 cat conftest.err >&5
17460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17461 (exit $ac_status); } &&
17462 { ac_try='test -z "$ac_c_werror_flag"
17463 || test ! -s conftest.err'
17464 { (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'
17470 { (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
17475 ac_cv_member_struct_stat_st_gen=yes
17476else
17477 echo "$as_me: failed program was:" >&5
17478sed 's/^/| /' conftest.$ac_ext >&5
17479
17480ac_cv_member_struct_stat_st_gen=no
17481fi
17482rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17483fi
17484rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17485fi
17486echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
17487echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
17488if test $ac_cv_member_struct_stat_st_gen = yes; then
17489
17490cat >>confdefs.h <<_ACEOF
17491#define HAVE_STRUCT_STAT_ST_GEN 1
17492_ACEOF
17493
17494
17495fi
17496
17497echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
17498echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
17499if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
17500 echo $ECHO_N "(cached) $ECHO_C" >&6
17501else
17502 cat >conftest.$ac_ext <<_ACEOF
17503/* confdefs.h. */
17504_ACEOF
17505cat confdefs.h >>conftest.$ac_ext
17506cat >>conftest.$ac_ext <<_ACEOF
17507/* end confdefs.h. */
17508$ac_includes_default
17509int
17510main ()
17511{
17512static struct stat ac_aggr;
17513if (ac_aggr.st_birthtime)
17514return 0;
17515 ;
17516 return 0;
17517}
17518_ACEOF
17519rm -f conftest.$ac_objext
17520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17521 (eval $ac_compile) 2>conftest.er1
17522 ac_status=$?
17523 grep -v '^ *+' conftest.er1 >conftest.err
17524 rm -f conftest.er1
17525 cat conftest.err >&5
17526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17527 (exit $ac_status); } &&
17528 { ac_try='test -z "$ac_c_werror_flag"
17529 || test ! -s conftest.err'
17530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17532 ac_status=$?
17533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17534 (exit $ac_status); }; } &&
17535 { ac_try='test -s conftest.$ac_objext'
17536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17537 (eval $ac_try) 2>&5
17538 ac_status=$?
17539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17540 (exit $ac_status); }; }; then
17541 ac_cv_member_struct_stat_st_birthtime=yes
17542else
17543 echo "$as_me: failed program was:" >&5
17544sed 's/^/| /' conftest.$ac_ext >&5
17545
17546cat >conftest.$ac_ext <<_ACEOF
17547/* confdefs.h. */
17548_ACEOF
17549cat confdefs.h >>conftest.$ac_ext
17550cat >>conftest.$ac_ext <<_ACEOF
17551/* end confdefs.h. */
17552$ac_includes_default
17553int
17554main ()
17555{
17556static struct stat ac_aggr;
17557if (sizeof ac_aggr.st_birthtime)
17558return 0;
17559 ;
17560 return 0;
17561}
17562_ACEOF
17563rm -f conftest.$ac_objext
17564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17565 (eval $ac_compile) 2>conftest.er1
17566 ac_status=$?
17567 grep -v '^ *+' conftest.er1 >conftest.err
17568 rm -f conftest.er1
17569 cat conftest.err >&5
17570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17571 (exit $ac_status); } &&
17572 { ac_try='test -z "$ac_c_werror_flag"
17573 || test ! -s conftest.err'
17574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17575 (eval $ac_try) 2>&5
17576 ac_status=$?
17577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17578 (exit $ac_status); }; } &&
17579 { ac_try='test -s conftest.$ac_objext'
17580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17581 (eval $ac_try) 2>&5
17582 ac_status=$?
17583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17584 (exit $ac_status); }; }; then
17585 ac_cv_member_struct_stat_st_birthtime=yes
17586else
17587 echo "$as_me: failed program was:" >&5
17588sed 's/^/| /' conftest.$ac_ext >&5
17589
17590ac_cv_member_struct_stat_st_birthtime=no
17591fi
17592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17593fi
17594rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17595fi
17596echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
17597echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
17598if test $ac_cv_member_struct_stat_st_birthtime = yes; then
17599
17600cat >>confdefs.h <<_ACEOF
17601#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
17602_ACEOF
17603
17604
17605fi
17606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
17608echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
17609if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
17610 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017611else
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017613/* confdefs.h. */
17614_ACEOF
17615cat confdefs.h >>conftest.$ac_ext
17616cat >>conftest.$ac_ext <<_ACEOF
17617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017618$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017619int
17620main ()
17621{
17622static struct stat ac_aggr;
17623if (ac_aggr.st_blocks)
17624return 0;
17625 ;
17626 return 0;
17627}
17628_ACEOF
17629rm -f conftest.$ac_objext
17630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017631 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017633 grep -v '^ *+' conftest.er1 >conftest.err
17634 rm -f conftest.er1
17635 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017638 { ac_try='test -z "$ac_c_werror_flag"
17639 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17641 (eval $ac_try) 2>&5
17642 ac_status=$?
17643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17644 (exit $ac_status); }; } &&
17645 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17647 (eval $ac_try) 2>&5
17648 ac_status=$?
17649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17650 (exit $ac_status); }; }; then
17651 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017652else
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017654sed 's/^/| /' conftest.$ac_ext >&5
17655
17656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017657/* confdefs.h. */
17658_ACEOF
17659cat confdefs.h >>conftest.$ac_ext
17660cat >>conftest.$ac_ext <<_ACEOF
17661/* end confdefs.h. */
17662$ac_includes_default
17663int
17664main ()
17665{
17666static struct stat ac_aggr;
17667if (sizeof ac_aggr.st_blocks)
17668return 0;
17669 ;
17670 return 0;
17671}
17672_ACEOF
17673rm -f conftest.$ac_objext
17674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017675 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017677 grep -v '^ *+' conftest.er1 >conftest.err
17678 rm -f conftest.er1
17679 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017682 { ac_try='test -z "$ac_c_werror_flag"
17683 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17685 (eval $ac_try) 2>&5
17686 ac_status=$?
17687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17688 (exit $ac_status); }; } &&
17689 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17691 (eval $ac_try) 2>&5
17692 ac_status=$?
17693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17694 (exit $ac_status); }; }; then
17695 ac_cv_member_struct_stat_st_blocks=yes
17696else
17697 echo "$as_me: failed program was:" >&5
17698sed 's/^/| /' conftest.$ac_ext >&5
17699
Martin v. Löwis11437992002-04-12 09:54:03 +000017700ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017701fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017703fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017704rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017706echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17707echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17708if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017709
Martin v. Löwis11437992002-04-12 09:54:03 +000017710cat >>confdefs.h <<_ACEOF
17711#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17712_ACEOF
17713
17714
17715cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017716#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017717_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017718
17719else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017720 case $LIBOBJS in
17721 "fileblocks.$ac_objext" | \
17722 *" fileblocks.$ac_objext" | \
17723 "fileblocks.$ac_objext "* | \
17724 *" fileblocks.$ac_objext "* ) ;;
17725 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17726esac
17727
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017728fi
17729
Michael W. Hudson54241132001-12-07 15:38:26 +000017730
Martin v. Löwis11437992002-04-12 09:54:03 +000017731
17732echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17733echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17734if test "${ac_cv_header_time_altzone+set}" = set; then
17735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017736else
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017738/* confdefs.h. */
17739_ACEOF
17740cat confdefs.h >>conftest.$ac_ext
17741cat >>conftest.$ac_ext <<_ACEOF
17742/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017743#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017744int
17745main ()
17746{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017747return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017748 ;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017774 ac_cv_header_time_altzone=yes
17775else
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017777sed 's/^/| /' conftest.$ac_ext >&5
17778
Martin v. Löwis11437992002-04-12 09:54:03 +000017779ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017780fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017781rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017782fi
17783
Martin v. Löwis11437992002-04-12 09:54:03 +000017784echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17785echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017786if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017787
17788cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017789#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017790_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017791
17792fi
17793
Guido van Rossumda88dad1995-01-26 00:46:29 +000017794was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017795echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17796echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017798/* confdefs.h. */
17799_ACEOF
17800cat confdefs.h >>conftest.$ac_ext
17801cat >>conftest.$ac_ext <<_ACEOF
17802/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017803
17804#include <sys/types.h>
17805#include <sys/select.h>
17806#include <sys/time.h>
17807
Martin v. Löwis11437992002-04-12 09:54:03 +000017808int
17809main ()
17810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017811;
Martin v. Löwis11437992002-04-12 09:54:03 +000017812 ;
17813 return 0;
17814}
17815_ACEOF
17816rm -f conftest.$ac_objext
17817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017818 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017820 grep -v '^ *+' conftest.er1 >conftest.err
17821 rm -f conftest.er1
17822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17824 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017825 { ac_try='test -z "$ac_c_werror_flag"
17826 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17828 (eval $ac_try) 2>&5
17829 ac_status=$?
17830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17831 (exit $ac_status); }; } &&
17832 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17834 (eval $ac_try) 2>&5
17835 ac_status=$?
17836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17837 (exit $ac_status); }; }; then
17838
17839
17840cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017841#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017842_ACEOF
17843
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017844 was_it_defined=yes
17845
Guido van Rossumf78abae1997-01-21 22:02:36 +000017846else
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017848sed 's/^/| /' conftest.$ac_ext >&5
17849
Guido van Rossum7f43da71994-08-01 12:15:30 +000017850fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017851rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017852echo "$as_me:$LINENO: result: $was_it_defined" >&5
17853echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017854
Martin v. Löwis11437992002-04-12 09:54:03 +000017855echo "$as_me:$LINENO: checking for addrinfo" >&5
17856echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17857if test "${ac_cv_struct_addrinfo+set}" = set; then
17858 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017859else
Martin v. Löwis11437992002-04-12 09:54:03 +000017860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017861/* confdefs.h. */
17862_ACEOF
17863cat confdefs.h >>conftest.$ac_ext
17864cat >>conftest.$ac_ext <<_ACEOF
17865/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017866
17867# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017868int
17869main ()
17870{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017871struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 ;
17873 return 0;
17874}
17875_ACEOF
17876rm -f conftest.$ac_objext
17877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017878 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017880 grep -v '^ *+' conftest.er1 >conftest.err
17881 rm -f conftest.er1
17882 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17884 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017885 { ac_try='test -z "$ac_c_werror_flag"
17886 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17888 (eval $ac_try) 2>&5
17889 ac_status=$?
17890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17891 (exit $ac_status); }; } &&
17892 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17894 (eval $ac_try) 2>&5
17895 ac_status=$?
17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017898 ac_cv_struct_addrinfo=yes
17899else
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017901sed 's/^/| /' conftest.$ac_ext >&5
17902
Martin v. Löwis11437992002-04-12 09:54:03 +000017903ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017904fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017906fi
17907
Martin v. Löwis11437992002-04-12 09:54:03 +000017908echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17909echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017910if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017911
17912cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017913#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017914_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017915
17916fi
17917
Martin v. Löwis11437992002-04-12 09:54:03 +000017918echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17919echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17920if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017922else
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017924/* confdefs.h. */
17925_ACEOF
17926cat confdefs.h >>conftest.$ac_ext
17927cat >>conftest.$ac_ext <<_ACEOF
17928/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017929
17930# include <sys/types.h>
17931# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017932int
17933main ()
17934{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017935struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 ;
17937 return 0;
17938}
17939_ACEOF
17940rm -f conftest.$ac_objext
17941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017942 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017944 grep -v '^ *+' conftest.er1 >conftest.err
17945 rm -f conftest.er1
17946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017949 { ac_try='test -z "$ac_c_werror_flag"
17950 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17952 (eval $ac_try) 2>&5
17953 ac_status=$?
17954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17955 (exit $ac_status); }; } &&
17956 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17958 (eval $ac_try) 2>&5
17959 ac_status=$?
17960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17961 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017962 ac_cv_struct_sockaddr_storage=yes
17963else
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017965sed 's/^/| /' conftest.$ac_ext >&5
17966
Martin v. Löwis11437992002-04-12 09:54:03 +000017967ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017968fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017970fi
17971
Martin v. Löwis11437992002-04-12 09:54:03 +000017972echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17973echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017974if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017975
17976cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017977#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017978_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017979
17980fi
17981
Guido van Rossum627b2d71993-12-24 10:39:16 +000017982# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017983
Michael W. Hudson54241132001-12-07 15:38:26 +000017984
Martin v. Löwis11437992002-04-12 09:54:03 +000017985echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17986echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17987if test "${ac_cv_c_char_unsigned+set}" = set; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017989else
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017996$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017997int
17998main ()
17999{
18000static int test_array [1 - 2 * !(((char) -1) < 0)];
18001test_array [0] = 0
18002
18003 ;
18004 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000018005}
Martin v. Löwis11437992002-04-12 09:54:03 +000018006_ACEOF
18007rm -f conftest.$ac_objext
18008if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018009 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018011 grep -v '^ *+' conftest.er1 >conftest.err
18012 rm -f conftest.er1
18013 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18015 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018016 { ac_try='test -z "$ac_c_werror_flag"
18017 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018018 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18019 (eval $ac_try) 2>&5
18020 ac_status=$?
18021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18022 (exit $ac_status); }; } &&
18023 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18025 (eval $ac_try) 2>&5
18026 ac_status=$?
18027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18028 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018029 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018030else
18031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018032sed 's/^/| /' conftest.$ac_ext >&5
18033
Martin v. Löwis11437992002-04-12 09:54:03 +000018034ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018035fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018036rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018037fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018038echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18039echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018040if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018041 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018042#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018043_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018044
18045fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018046
Martin v. Löwis11437992002-04-12 09:54:03 +000018047echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18048echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18049if test "${ac_cv_c_const+set}" = set; then
18050 echo $ECHO_N "(cached) $ECHO_C" >&6
18051else
18052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018053/* confdefs.h. */
18054_ACEOF
18055cat confdefs.h >>conftest.$ac_ext
18056cat >>conftest.$ac_ext <<_ACEOF
18057/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018058
Martin v. Löwis11437992002-04-12 09:54:03 +000018059int
18060main ()
18061{
18062/* FIXME: Include the comments suggested by Paul. */
18063#ifndef __cplusplus
18064 /* Ultrix mips cc rejects this. */
18065 typedef int charset[2];
18066 const charset x;
18067 /* SunOS 4.1.1 cc rejects this. */
18068 char const *const *ccp;
18069 char **p;
18070 /* NEC SVR4.0.2 mips cc rejects this. */
18071 struct point {int x, y;};
18072 static struct point const zero = {0,0};
18073 /* AIX XL C 1.02.0.0 rejects this.
18074 It does not let you subtract one const X* pointer from another in
18075 an arm of an if-expression whose if-part is not a constant
18076 expression */
18077 const char *g = "string";
18078 ccp = &g + (g ? g-g : 0);
18079 /* HPUX 7.0 cc rejects these. */
18080 ++ccp;
18081 p = (char**) ccp;
18082 ccp = (char const *const *) p;
18083 { /* SCO 3.2v4 cc rejects this. */
18084 char *t;
18085 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018086
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 *t++ = 0;
18088 }
18089 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18090 int x[] = {25, 17};
18091 const int *foo = &x[0];
18092 ++foo;
18093 }
18094 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18095 typedef const int *iptr;
18096 iptr p = 0;
18097 ++p;
18098 }
18099 { /* AIX XL C 1.02.0.0 rejects this saying
18100 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18101 struct s { int j; const int *ap[3]; };
18102 struct s *b; b->j = 5;
18103 }
18104 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18105 const int foo = 10;
18106 }
18107#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018108
Martin v. Löwis11437992002-04-12 09:54:03 +000018109 ;
18110 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018111}
Martin v. Löwis11437992002-04-12 09:54:03 +000018112_ACEOF
18113rm -f conftest.$ac_objext
18114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018115 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018117 grep -v '^ *+' conftest.er1 >conftest.err
18118 rm -f conftest.er1
18119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18121 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018122 { ac_try='test -z "$ac_c_werror_flag"
18123 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125 (eval $ac_try) 2>&5
18126 ac_status=$?
18127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128 (exit $ac_status); }; } &&
18129 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18131 (eval $ac_try) 2>&5
18132 ac_status=$?
18133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018135 ac_cv_c_const=yes
18136else
Martin v. Löwis11437992002-04-12 09:54:03 +000018137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018138sed 's/^/| /' conftest.$ac_ext >&5
18139
Martin v. Löwis11437992002-04-12 09:54:03 +000018140ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018141fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018142rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018144echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
18145echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018146if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018147
18148cat >>confdefs.h <<\_ACEOF
18149#define const
18150_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018151
18152fi
18153
Michael W. Hudson54241132001-12-07 15:38:26 +000018154
Guido van Rossumda88dad1995-01-26 00:46:29 +000018155works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018156echo "$as_me:$LINENO: checking for working volatile" >&5
18157echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
18158cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018159/* confdefs.h. */
18160_ACEOF
18161cat confdefs.h >>conftest.$ac_ext
18162cat >>conftest.$ac_ext <<_ACEOF
18163/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018164
Martin v. Löwis11437992002-04-12 09:54:03 +000018165int
18166main ()
18167{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018168volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018169 ;
18170 return 0;
18171}
18172_ACEOF
18173rm -f conftest.$ac_objext
18174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018175 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018177 grep -v '^ *+' conftest.er1 >conftest.err
18178 rm -f conftest.er1
18179 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18181 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018182 { ac_try='test -z "$ac_c_werror_flag"
18183 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18185 (eval $ac_try) 2>&5
18186 ac_status=$?
18187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18188 (exit $ac_status); }; } &&
18189 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18191 (eval $ac_try) 2>&5
18192 ac_status=$?
18193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18194 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018195 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018196else
Martin v. Löwis11437992002-04-12 09:54:03 +000018197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018198sed 's/^/| /' conftest.$ac_ext >&5
18199
Martin v. Löwis11437992002-04-12 09:54:03 +000018200
18201cat >>confdefs.h <<\_ACEOF
18202#define volatile
18203_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018205
Guido van Rossum627b2d71993-12-24 10:39:16 +000018206fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018207rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018208echo "$as_me:$LINENO: result: $works" >&5
18209echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018210
Guido van Rossumda88dad1995-01-26 00:46:29 +000018211works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018212echo "$as_me:$LINENO: checking for working signed char" >&5
18213echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
18214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018220
Martin v. Löwis11437992002-04-12 09:54:03 +000018221int
18222main ()
18223{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018224signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 ;
18226 return 0;
18227}
18228_ACEOF
18229rm -f conftest.$ac_objext
18230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018231 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018233 grep -v '^ *+' conftest.er1 >conftest.err
18234 rm -f conftest.er1
18235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018238 { ac_try='test -z "$ac_c_werror_flag"
18239 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18241 (eval $ac_try) 2>&5
18242 ac_status=$?
18243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18244 (exit $ac_status); }; } &&
18245 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18247 (eval $ac_try) 2>&5
18248 ac_status=$?
18249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18250 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018251 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018252else
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018254sed 's/^/| /' conftest.$ac_ext >&5
18255
Martin v. Löwis11437992002-04-12 09:54:03 +000018256
18257cat >>confdefs.h <<\_ACEOF
18258#define signed
18259_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018261
Guido van Rossum7f43da71994-08-01 12:15:30 +000018262fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018264echo "$as_me:$LINENO: result: $works" >&5
18265echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018266
Guido van Rossumda88dad1995-01-26 00:46:29 +000018267have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018268echo "$as_me:$LINENO: checking for prototypes" >&5
18269echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
18270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018271/* confdefs.h. */
18272_ACEOF
18273cat confdefs.h >>conftest.$ac_ext
18274cat >>conftest.$ac_ext <<_ACEOF
18275/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018276int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018277int
18278main ()
18279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018280return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018281 ;
18282 return 0;
18283}
18284_ACEOF
18285rm -f conftest.$ac_objext
18286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018287 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018289 grep -v '^ *+' conftest.er1 >conftest.err
18290 rm -f conftest.er1
18291 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18293 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018294 { ac_try='test -z "$ac_c_werror_flag"
18295 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18297 (eval $ac_try) 2>&5
18298 ac_status=$?
18299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18300 (exit $ac_status); }; } &&
18301 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18303 (eval $ac_try) 2>&5
18304 ac_status=$?
18305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18306 (exit $ac_status); }; }; then
18307
18308
18309cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018310#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018311_ACEOF
18312
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018313 have_prototypes=yes
18314
Guido van Rossumf78abae1997-01-21 22:02:36 +000018315else
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018317sed 's/^/| /' conftest.$ac_ext >&5
18318
Guido van Rossum7f43da71994-08-01 12:15:30 +000018319fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018320rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018321echo "$as_me:$LINENO: result: $have_prototypes" >&5
18322echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018323
Guido van Rossumda88dad1995-01-26 00:46:29 +000018324works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018325echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
18326echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
18327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018328/* confdefs.h. */
18329_ACEOF
18330cat confdefs.h >>conftest.$ac_ext
18331cat >>conftest.$ac_ext <<_ACEOF
18332/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018333
18334#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000018335int foo(int x, ...) {
18336 va_list va;
18337 va_start(va, x);
18338 va_arg(va, int);
18339 va_arg(va, char *);
18340 va_arg(va, double);
18341 return 0;
18342}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018343
Martin v. Löwis11437992002-04-12 09:54:03 +000018344int
18345main ()
18346{
Guido van Rossum90eea071996-08-30 20:58:57 +000018347return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext
18353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018354 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018356 grep -v '^ *+' conftest.er1 >conftest.err
18357 rm -f conftest.er1
18358 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18360 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018361 { ac_try='test -z "$ac_c_werror_flag"
18362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18364 (eval $ac_try) 2>&5
18365 ac_status=$?
18366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18367 (exit $ac_status); }; } &&
18368 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18370 (eval $ac_try) 2>&5
18371 ac_status=$?
18372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18373 (exit $ac_status); }; }; then
18374
18375
18376cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018377#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018378_ACEOF
18379
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018380 works=yes
18381
Guido van Rossumf78abae1997-01-21 22:02:36 +000018382else
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018384sed 's/^/| /' conftest.$ac_ext >&5
18385
Guido van Rossum627b2d71993-12-24 10:39:16 +000018386fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018387rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018388echo "$as_me:$LINENO: result: $works" >&5
18389echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018390
Martin v. Löwisd6320502004-08-12 13:45:08 +000018391# check for socketpair
18392echo "$as_me:$LINENO: checking for socketpair" >&5
18393echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
18394cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000018395/* confdefs.h. */
18396_ACEOF
18397cat confdefs.h >>conftest.$ac_ext
18398cat >>conftest.$ac_ext <<_ACEOF
18399/* end confdefs.h. */
18400
18401#include <sys/types.h>
18402#include <sys/socket.h>
18403
18404int
18405main ()
18406{
18407void *x=socketpair
18408 ;
18409 return 0;
18410}
18411_ACEOF
18412rm -f conftest.$ac_objext
18413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018414 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000018415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 grep -v '^ *+' conftest.er1 >conftest.err
18417 rm -f conftest.er1
18418 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000018419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18420 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018421 { ac_try='test -z "$ac_c_werror_flag"
18422 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18424 (eval $ac_try) 2>&5
18425 ac_status=$?
18426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18427 (exit $ac_status); }; } &&
18428 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000018429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18430 (eval $ac_try) 2>&5
18431 ac_status=$?
18432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18433 (exit $ac_status); }; }; then
18434
18435cat >>confdefs.h <<\_ACEOF
18436#define HAVE_SOCKETPAIR 1
18437_ACEOF
18438
18439 echo "$as_me:$LINENO: result: yes" >&5
18440echo "${ECHO_T}yes" >&6
18441else
18442 echo "$as_me: failed program was:" >&5
18443sed 's/^/| /' conftest.$ac_ext >&5
18444
18445echo "$as_me:$LINENO: result: no" >&5
18446echo "${ECHO_T}no" >&6
18447
18448fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000018450
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018451# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000018452echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
18453echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
18454cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018455/* confdefs.h. */
18456_ACEOF
18457cat confdefs.h >>conftest.$ac_ext
18458cat >>conftest.$ac_ext <<_ACEOF
18459/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018460#include <sys/types.h>
18461#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018462int
18463main ()
18464{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018465struct sockaddr x;
18466x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018467 ;
18468 return 0;
18469}
18470_ACEOF
18471rm -f conftest.$ac_objext
18472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018473 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018475 grep -v '^ *+' conftest.er1 >conftest.err
18476 rm -f conftest.er1
18477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18479 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018480 { ac_try='test -z "$ac_c_werror_flag"
18481 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18483 (eval $ac_try) 2>&5
18484 ac_status=$?
18485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18486 (exit $ac_status); }; } &&
18487 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18489 (eval $ac_try) 2>&5
18490 ac_status=$?
18491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18492 (exit $ac_status); }; }; then
18493 echo "$as_me:$LINENO: result: yes" >&5
18494echo "${ECHO_T}yes" >&6
18495
18496cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018497#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018498_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018499
18500else
Martin v. Löwis11437992002-04-12 09:54:03 +000018501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018502sed 's/^/| /' conftest.$ac_ext >&5
18503
Martin v. Löwis11437992002-04-12 09:54:03 +000018504echo "$as_me:$LINENO: result: no" >&5
18505echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018506fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018508
Guido van Rossumda88dad1995-01-26 00:46:29 +000018509va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018510echo "$as_me:$LINENO: checking whether va_list is an array" >&5
18511echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
18512cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018513/* confdefs.h. */
18514_ACEOF
18515cat confdefs.h >>conftest.$ac_ext
18516cat >>conftest.$ac_ext <<_ACEOF
18517/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018518
18519#ifdef HAVE_STDARG_PROTOTYPES
18520#include <stdarg.h>
18521#else
18522#include <varargs.h>
18523#endif
18524
Martin v. Löwis11437992002-04-12 09:54:03 +000018525int
18526main ()
18527{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018528va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000018529 ;
18530 return 0;
18531}
18532_ACEOF
18533rm -f conftest.$ac_objext
18534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018535 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018537 grep -v '^ *+' conftest.er1 >conftest.err
18538 rm -f conftest.er1
18539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018542 { ac_try='test -z "$ac_c_werror_flag"
18543 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18545 (eval $ac_try) 2>&5
18546 ac_status=$?
18547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18548 (exit $ac_status); }; } &&
18549 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18551 (eval $ac_try) 2>&5
18552 ac_status=$?
18553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018555 :
18556else
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018558sed 's/^/| /' conftest.$ac_ext >&5
18559
Martin v. Löwis11437992002-04-12 09:54:03 +000018560
18561
18562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018563#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018564_ACEOF
18565
Guido van Rossumda88dad1995-01-26 00:46:29 +000018566 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018568fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018570echo "$as_me:$LINENO: result: $va_list_is_array" >&5
18571echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018573# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000018574
18575
18576
18577echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
18578echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
18579if test "${ac_cv_func_gethostbyname_r+set}" = set; then
18580 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018581else
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018583/* confdefs.h. */
18584_ACEOF
18585cat confdefs.h >>conftest.$ac_ext
18586cat >>conftest.$ac_ext <<_ACEOF
18587/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018588/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
18589 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18590#define gethostbyname_r innocuous_gethostbyname_r
18591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018592/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018593 which can conflict with char gethostbyname_r (); below.
18594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018595 <limits.h> exists even on freestanding compilers. */
18596
18597#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018598# include <limits.h>
18599#else
18600# include <assert.h>
18601#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018602
18603#undef gethostbyname_r
18604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018605/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018606#ifdef __cplusplus
18607extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018608{
Martin v. Löwis11437992002-04-12 09:54:03 +000018609#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018610/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 builtin and then its argument prototype would still apply. */
18612char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018613/* The GNU C library defines this for functions which it implements
18614 to always fail with ENOSYS. Some functions are actually named
18615 something starting with __ and the normal name is an alias. */
18616#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
18617choke me
18618#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018619char (*f) () = gethostbyname_r;
18620#endif
18621#ifdef __cplusplus
18622}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018623#endif
18624
Skip Montanaro6dead952003-09-25 14:50:04 +000018625int
18626main ()
18627{
18628return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000018629 ;
18630 return 0;
18631}
18632_ACEOF
18633rm -f conftest.$ac_objext conftest$ac_exeext
18634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018635 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018642 { ac_try='test -z "$ac_c_werror_flag"
18643 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18645 (eval $ac_try) 2>&5
18646 ac_status=$?
18647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18648 (exit $ac_status); }; } &&
18649 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18651 (eval $ac_try) 2>&5
18652 ac_status=$?
18653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18654 (exit $ac_status); }; }; then
18655 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018656else
Martin v. Löwis11437992002-04-12 09:54:03 +000018657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018658sed 's/^/| /' conftest.$ac_ext >&5
18659
Martin v. Löwis11437992002-04-12 09:54:03 +000018660ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018662rm -f conftest.err conftest.$ac_objext \
18663 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018664fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018665echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18666echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18667if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018668
Martin v. Löwis11437992002-04-12 09:54:03 +000018669 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018670#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018671_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018672
Martin v. Löwis11437992002-04-12 09:54:03 +000018673 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18674echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018675 OLD_CFLAGS=$CFLAGS
18676 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018678/* confdefs.h. */
18679_ACEOF
18680cat confdefs.h >>conftest.$ac_ext
18681cat >>conftest.$ac_ext <<_ACEOF
18682/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018683
18684# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018685
Martin v. Löwis11437992002-04-12 09:54:03 +000018686int
18687main ()
18688{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018689
18690 char *name;
18691 struct hostent *he, *res;
18692 char buffer[2048];
18693 int buflen = 2048;
18694 int h_errnop;
18695
18696 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018697
18698 ;
18699 return 0;
18700}
18701_ACEOF
18702rm -f conftest.$ac_objext
18703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018704 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018706 grep -v '^ *+' conftest.er1 >conftest.err
18707 rm -f conftest.er1
18708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18710 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018711 { ac_try='test -z "$ac_c_werror_flag"
18712 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18714 (eval $ac_try) 2>&5
18715 ac_status=$?
18716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18717 (exit $ac_status); }; } &&
18718 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18720 (eval $ac_try) 2>&5
18721 ac_status=$?
18722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18723 (exit $ac_status); }; }; then
18724
18725 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018726#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018727_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018728
Martin v. Löwis11437992002-04-12 09:54:03 +000018729
18730cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018731#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018732_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018733
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 echo "$as_me:$LINENO: result: yes" >&5
18735echo "${ECHO_T}yes" >&6
18736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018737else
Martin v. Löwis11437992002-04-12 09:54:03 +000018738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018739sed 's/^/| /' conftest.$ac_ext >&5
18740
Martin v. Löwis11437992002-04-12 09:54:03 +000018741
18742 echo "$as_me:$LINENO: result: no" >&5
18743echo "${ECHO_T}no" >&6
18744 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18745echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018747/* confdefs.h. */
18748_ACEOF
18749cat confdefs.h >>conftest.$ac_ext
18750cat >>conftest.$ac_ext <<_ACEOF
18751/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018752
18753# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018754
Martin v. Löwis11437992002-04-12 09:54:03 +000018755int
18756main ()
18757{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018758
18759 char *name;
18760 struct hostent *he;
18761 char buffer[2048];
18762 int buflen = 2048;
18763 int h_errnop;
18764
18765 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018766
18767 ;
18768 return 0;
18769}
18770_ACEOF
18771rm -f conftest.$ac_objext
18772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018775 grep -v '^ *+' conftest.er1 >conftest.err
18776 rm -f conftest.er1
18777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18779 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018780 { ac_try='test -z "$ac_c_werror_flag"
18781 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18783 (eval $ac_try) 2>&5
18784 ac_status=$?
18785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18786 (exit $ac_status); }; } &&
18787 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18789 (eval $ac_try) 2>&5
18790 ac_status=$?
18791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18792 (exit $ac_status); }; }; then
18793
18794 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018795#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018796_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018797
Martin v. Löwis11437992002-04-12 09:54:03 +000018798
18799cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018800#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018801_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018802
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 echo "$as_me:$LINENO: result: yes" >&5
18804echo "${ECHO_T}yes" >&6
18805
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018806else
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018808sed 's/^/| /' conftest.$ac_ext >&5
18809
Martin v. Löwis11437992002-04-12 09:54:03 +000018810
18811 echo "$as_me:$LINENO: result: no" >&5
18812echo "${ECHO_T}no" >&6
18813 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18814echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018816/* confdefs.h. */
18817_ACEOF
18818cat confdefs.h >>conftest.$ac_ext
18819cat >>conftest.$ac_ext <<_ACEOF
18820/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018821
18822# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018823
Martin v. Löwis11437992002-04-12 09:54:03 +000018824int
18825main ()
18826{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018827
18828 char *name;
18829 struct hostent *he;
18830 struct hostent_data data;
18831
18832 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018833
18834 ;
18835 return 0;
18836}
18837_ACEOF
18838rm -f conftest.$ac_objext
18839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018840 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018842 grep -v '^ *+' conftest.er1 >conftest.err
18843 rm -f conftest.er1
18844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18846 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018847 { ac_try='test -z "$ac_c_werror_flag"
18848 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18850 (eval $ac_try) 2>&5
18851 ac_status=$?
18852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18853 (exit $ac_status); }; } &&
18854 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18856 (eval $ac_try) 2>&5
18857 ac_status=$?
18858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18859 (exit $ac_status); }; }; then
18860
18861 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018862#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018863_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018864
Martin v. Löwis11437992002-04-12 09:54:03 +000018865
18866cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018867#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018868_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018869
Martin v. Löwis11437992002-04-12 09:54:03 +000018870 echo "$as_me:$LINENO: result: yes" >&5
18871echo "${ECHO_T}yes" >&6
18872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018873else
Martin v. Löwis11437992002-04-12 09:54:03 +000018874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018875sed 's/^/| /' conftest.$ac_ext >&5
18876
Martin v. Löwis11437992002-04-12 09:54:03 +000018877
18878 echo "$as_me:$LINENO: result: no" >&5
18879echo "${ECHO_T}no" >&6
18880
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018881fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018882rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018883
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018884fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018885rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018886
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018888rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018889 CFLAGS=$OLD_CFLAGS
18890
18891else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018892
Martin v. Löwis11437992002-04-12 09:54:03 +000018893
18894for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018895do
Martin v. Löwis11437992002-04-12 09:54:03 +000018896as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18897echo "$as_me:$LINENO: checking for $ac_func" >&5
18898echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18899if eval "test \"\${$as_ac_var+set}\" = set"; then
18900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018901else
Martin v. Löwis11437992002-04-12 09:54:03 +000018902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018903/* confdefs.h. */
18904_ACEOF
18905cat confdefs.h >>conftest.$ac_ext
18906cat >>conftest.$ac_ext <<_ACEOF
18907/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018908/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18909 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18910#define $ac_func innocuous_$ac_func
18911
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018912/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018913 which can conflict with char $ac_func (); below.
18914 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018915 <limits.h> exists even on freestanding compilers. */
18916
18917#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018918# include <limits.h>
18919#else
18920# include <assert.h>
18921#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018922
18923#undef $ac_func
18924
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018925/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018926#ifdef __cplusplus
18927extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018928{
Martin v. Löwis11437992002-04-12 09:54:03 +000018929#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 builtin and then its argument prototype would still apply. */
18932char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018933/* The GNU C library defines this for functions which it implements
18934 to always fail with ENOSYS. Some functions are actually named
18935 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018936#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018937choke me
18938#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018939char (*f) () = $ac_func;
18940#endif
18941#ifdef __cplusplus
18942}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018943#endif
18944
Skip Montanaro6dead952003-09-25 14:50:04 +000018945int
18946main ()
18947{
18948return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018949 ;
18950 return 0;
18951}
18952_ACEOF
18953rm -f conftest.$ac_objext conftest$ac_exeext
18954if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018955 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018957 grep -v '^ *+' conftest.er1 >conftest.err
18958 rm -f conftest.er1
18959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018962 { ac_try='test -z "$ac_c_werror_flag"
18963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18965 (eval $ac_try) 2>&5
18966 ac_status=$?
18967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18968 (exit $ac_status); }; } &&
18969 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18971 (eval $ac_try) 2>&5
18972 ac_status=$?
18973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18974 (exit $ac_status); }; }; then
18975 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018976else
Martin v. Löwis11437992002-04-12 09:54:03 +000018977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018978sed 's/^/| /' conftest.$ac_ext >&5
18979
Martin v. Löwis11437992002-04-12 09:54:03 +000018980eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018981fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018982rm -f conftest.err conftest.$ac_objext \
18983 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018984fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018985echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18986echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18987if test `eval echo '${'$as_ac_var'}'` = yes; then
18988 cat >>confdefs.h <<_ACEOF
18989#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18990_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018991
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018992fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018993done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018994
Michael W. Hudson54241132001-12-07 15:38:26 +000018995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018996fi
18997
Michael W. Hudson54241132001-12-07 15:38:26 +000018998
18999
19000
19001
19002
19003
Guido van Rossum627b2d71993-12-24 10:39:16 +000019004# checks for system services
19005# (none yet)
19006
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019007# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000019008echo "$as_me:$LINENO: checking for __fpu_control" >&5
19009echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
19010if test "${ac_cv_func___fpu_control+set}" = set; then
19011 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019012else
Martin v. Löwis11437992002-04-12 09:54:03 +000019013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019014/* confdefs.h. */
19015_ACEOF
19016cat confdefs.h >>conftest.$ac_ext
19017cat >>conftest.$ac_ext <<_ACEOF
19018/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019019/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19020 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19021#define __fpu_control innocuous___fpu_control
19022
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019023/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019024 which can conflict with char __fpu_control (); below.
19025 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019026 <limits.h> exists even on freestanding compilers. */
19027
19028#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019029# include <limits.h>
19030#else
19031# include <assert.h>
19032#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019033
19034#undef __fpu_control
19035
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019036/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019037#ifdef __cplusplus
19038extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019039{
Martin v. Löwis11437992002-04-12 09:54:03 +000019040#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019041/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019042 builtin and then its argument prototype would still apply. */
19043char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019044/* The GNU C library defines this for functions which it implements
19045 to always fail with ENOSYS. Some functions are actually named
19046 something starting with __ and the normal name is an alias. */
19047#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
19048choke me
19049#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019050char (*f) () = __fpu_control;
19051#endif
19052#ifdef __cplusplus
19053}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019054#endif
19055
Skip Montanaro6dead952003-09-25 14:50:04 +000019056int
19057main ()
19058{
19059return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000019060 ;
19061 return 0;
19062}
19063_ACEOF
19064rm -f conftest.$ac_objext conftest$ac_exeext
19065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019066 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019068 grep -v '^ *+' conftest.er1 >conftest.err
19069 rm -f conftest.er1
19070 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19072 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019073 { ac_try='test -z "$ac_c_werror_flag"
19074 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19076 (eval $ac_try) 2>&5
19077 ac_status=$?
19078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19079 (exit $ac_status); }; } &&
19080 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19082 (eval $ac_try) 2>&5
19083 ac_status=$?
19084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19085 (exit $ac_status); }; }; then
19086 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019087else
Martin v. Löwis11437992002-04-12 09:54:03 +000019088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019089sed 's/^/| /' conftest.$ac_ext >&5
19090
Martin v. Löwis11437992002-04-12 09:54:03 +000019091ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019092fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019093rm -f conftest.err conftest.$ac_objext \
19094 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019095fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019096echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19097echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
19098if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019099 :
19100else
Martin v. Löwis11437992002-04-12 09:54:03 +000019101
19102echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19103echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
19104if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019106else
Martin v. Löwis11437992002-04-12 09:54:03 +000019107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019108LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019110/* confdefs.h. */
19111_ACEOF
19112cat confdefs.h >>conftest.$ac_ext
19113cat >>conftest.$ac_ext <<_ACEOF
19114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019116/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019117#ifdef __cplusplus
19118extern "C"
19119#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019120/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019121 builtin and then its argument prototype would still apply. */
19122char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019123int
19124main ()
19125{
19126__fpu_control ();
19127 ;
19128 return 0;
19129}
19130_ACEOF
19131rm -f conftest.$ac_objext conftest$ac_exeext
19132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019133 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019135 grep -v '^ *+' conftest.er1 >conftest.err
19136 rm -f conftest.er1
19137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19139 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019140 { ac_try='test -z "$ac_c_werror_flag"
19141 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19143 (eval $ac_try) 2>&5
19144 ac_status=$?
19145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19146 (exit $ac_status); }; } &&
19147 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19149 (eval $ac_try) 2>&5
19150 ac_status=$?
19151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19152 (exit $ac_status); }; }; then
19153 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019154else
Martin v. Löwis11437992002-04-12 09:54:03 +000019155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019156sed 's/^/| /' conftest.$ac_ext >&5
19157
Martin v. Löwis11437992002-04-12 09:54:03 +000019158ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019160rm -f conftest.err conftest.$ac_objext \
19161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019162LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019163fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019164echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19165echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
19166if test $ac_cv_lib_ieee___fpu_control = yes; then
19167 cat >>confdefs.h <<_ACEOF
19168#define HAVE_LIBIEEE 1
19169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019170
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019171 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019172
Guido van Rossum627b2d71993-12-24 10:39:16 +000019173fi
19174
Michael W. Hudson54241132001-12-07 15:38:26 +000019175
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019176fi
19177
Michael W. Hudson54241132001-12-07 15:38:26 +000019178
Guido van Rossum7f253911997-05-09 02:42:48 +000019179# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000019180echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19181echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
19182
Guido van Rossum7f253911997-05-09 02:42:48 +000019183# Check whether --with-fpectl or --without-fpectl was given.
19184if test "${with_fpectl+set}" = set; then
19185 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000019186
Guido van Rossum7f253911997-05-09 02:42:48 +000019187if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019188then
19189
19190cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000019191#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019192_ACEOF
19193
19194 echo "$as_me:$LINENO: result: yes" >&5
19195echo "${ECHO_T}yes" >&6
19196else echo "$as_me:$LINENO: result: no" >&5
19197echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019198fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019199else
Martin v. Löwis11437992002-04-12 09:54:03 +000019200 echo "$as_me:$LINENO: result: no" >&5
19201echo "${ECHO_T}no" >&6
19202fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000019203
Guido van Rossum7f43da71994-08-01 12:15:30 +000019204# check for --with-libm=...
19205
Guido van Rossum563e7081996-09-10 18:20:48 +000019206case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019207Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000019208BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000019209*) LIBM=-lm
19210esac
Martin v. Löwis11437992002-04-12 09:54:03 +000019211echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
19212echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
19213
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019214# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019215if test "${with_libm+set}" = set; then
19216 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000019217
Guido van Rossum7f253911997-05-09 02:42:48 +000019218if test "$withval" = no
19219then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000019220 echo "$as_me:$LINENO: result: force LIBM empty" >&5
19221echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019222elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019223then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019224 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
19225echo "${ECHO_T}set LIBM=\"$withval\"" >&6
19226else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
19227echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
19228 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019229fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019230else
Martin v. Löwis11437992002-04-12 09:54:03 +000019231 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
19232echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
19233fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019234
19235# check for --with-libc=...
19236
Martin v. Löwis11437992002-04-12 09:54:03 +000019237echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
19238echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
19239
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019240# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019241if test "${with_libc+set}" = set; then
19242 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000019243
Guido van Rossum7f253911997-05-09 02:42:48 +000019244if test "$withval" = no
19245then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000019246 echo "$as_me:$LINENO: result: force LIBC empty" >&5
19247echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019248elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019249then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019250 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
19251echo "${ECHO_T}set LIBC=\"$withval\"" >&6
19252else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
19253echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
19254 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019255fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019256else
Martin v. Löwis11437992002-04-12 09:54:03 +000019257 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
19258echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
19259fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019260
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019261# check for hypot() in math library
19262LIBS_SAVE=$LIBS
19263LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000019264
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019265for ac_func in hypot
19266do
Martin v. Löwis11437992002-04-12 09:54:03 +000019267as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19268echo "$as_me:$LINENO: checking for $ac_func" >&5
19269echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19270if eval "test \"\${$as_ac_var+set}\" = set"; then
19271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019272else
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019274/* confdefs.h. */
19275_ACEOF
19276cat confdefs.h >>conftest.$ac_ext
19277cat >>conftest.$ac_ext <<_ACEOF
19278/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019279/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19281#define $ac_func innocuous_$ac_func
19282
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019283/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019284 which can conflict with char $ac_func (); below.
19285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019286 <limits.h> exists even on freestanding compilers. */
19287
19288#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019289# include <limits.h>
19290#else
19291# include <assert.h>
19292#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019293
19294#undef $ac_func
19295
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019296/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019297#ifdef __cplusplus
19298extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019299{
Martin v. Löwis11437992002-04-12 09:54:03 +000019300#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019301/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019302 builtin and then its argument prototype would still apply. */
19303char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019304/* The GNU C library defines this for functions which it implements
19305 to always fail with ENOSYS. Some functions are actually named
19306 something starting with __ and the normal name is an alias. */
19307#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19308choke me
19309#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019310char (*f) () = $ac_func;
19311#endif
19312#ifdef __cplusplus
19313}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019314#endif
19315
Skip Montanaro6dead952003-09-25 14:50:04 +000019316int
19317main ()
19318{
19319return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019320 ;
19321 return 0;
19322}
19323_ACEOF
19324rm -f conftest.$ac_objext conftest$ac_exeext
19325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019326 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019328 grep -v '^ *+' conftest.er1 >conftest.err
19329 rm -f conftest.er1
19330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19332 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019333 { ac_try='test -z "$ac_c_werror_flag"
19334 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19336 (eval $ac_try) 2>&5
19337 ac_status=$?
19338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19339 (exit $ac_status); }; } &&
19340 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19342 (eval $ac_try) 2>&5
19343 ac_status=$?
19344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19345 (exit $ac_status); }; }; then
19346 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019347else
Martin v. Löwis11437992002-04-12 09:54:03 +000019348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019349sed 's/^/| /' conftest.$ac_ext >&5
19350
Martin v. Löwis11437992002-04-12 09:54:03 +000019351eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019353rm -f conftest.err conftest.$ac_objext \
19354 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019356echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19357echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19358if test `eval echo '${'$as_ac_var'}'` = yes; then
19359 cat >>confdefs.h <<_ACEOF
19360#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19361_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019362
Michael W. Hudson54241132001-12-07 15:38:26 +000019363else
Skip Montanarof0d5f792004-08-15 14:08:23 +000019364 case $LIBOBJS in
19365 "$ac_func.$ac_objext" | \
19366 *" $ac_func.$ac_objext" | \
19367 "$ac_func.$ac_objext "* | \
19368 *" $ac_func.$ac_objext "* ) ;;
19369 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
19370esac
19371
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019372fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019373done
19374
Michael W. Hudson54241132001-12-07 15:38:26 +000019375
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019376LIBS=$LIBS_SAVE
19377
Guido van Rossumef2255b2000-03-10 22:30:29 +000019378# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000019379if test "${ac_cv_header_wchar_h+set}" = set; then
19380 echo "$as_me:$LINENO: checking for wchar.h" >&5
19381echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19382if test "${ac_cv_header_wchar_h+set}" = set; then
19383 echo $ECHO_N "(cached) $ECHO_C" >&6
19384fi
19385echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19386echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019387else
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 # Is the header compilable?
19389echo "$as_me:$LINENO: checking wchar.h usability" >&5
19390echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
19391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019392/* confdefs.h. */
19393_ACEOF
19394cat confdefs.h >>conftest.$ac_ext
19395cat >>conftest.$ac_ext <<_ACEOF
19396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019397$ac_includes_default
19398#include <wchar.h>
19399_ACEOF
19400rm -f conftest.$ac_objext
19401if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019402 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 grep -v '^ *+' conftest.er1 >conftest.err
19405 rm -f conftest.er1
19406 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19408 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019409 { ac_try='test -z "$ac_c_werror_flag"
19410 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19412 (eval $ac_try) 2>&5
19413 ac_status=$?
19414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19415 (exit $ac_status); }; } &&
19416 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19418 (eval $ac_try) 2>&5
19419 ac_status=$?
19420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421 (exit $ac_status); }; }; then
19422 ac_header_compiler=yes
19423else
19424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019425sed 's/^/| /' conftest.$ac_ext >&5
19426
Martin v. Löwis11437992002-04-12 09:54:03 +000019427ac_header_compiler=no
19428fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019430echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19431echo "${ECHO_T}$ac_header_compiler" >&6
19432
19433# Is the header present?
19434echo "$as_me:$LINENO: checking wchar.h presence" >&5
19435echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
19436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019437/* confdefs.h. */
19438_ACEOF
19439cat confdefs.h >>conftest.$ac_ext
19440cat >>conftest.$ac_ext <<_ACEOF
19441/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019442#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019443_ACEOF
19444if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19445 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19446 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019447 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000019448 rm -f conftest.er1
19449 cat conftest.err >&5
19450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19451 (exit $ac_status); } >/dev/null; then
19452 if test -s conftest.err; then
19453 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000019455 else
19456 ac_cpp_err=
19457 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019458else
Martin v. Löwis11437992002-04-12 09:54:03 +000019459 ac_cpp_err=yes
19460fi
19461if test -z "$ac_cpp_err"; then
19462 ac_header_preproc=yes
19463else
19464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019465sed 's/^/| /' conftest.$ac_ext >&5
19466
Martin v. Löwis11437992002-04-12 09:54:03 +000019467 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019468fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019469rm -f conftest.err conftest.$ac_ext
19470echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19471echo "${ECHO_T}$ac_header_preproc" >&6
19472
19473# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19475 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
19477echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
19479echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
19480 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019481 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019482 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019483 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
19484echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019485 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
19486echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
19487 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
19488echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
19489 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
19490echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019491 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
19492echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019493 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
19494echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019495 (
19496 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000019497## ------------------------------------------------ ##
19498## Report this to http://www.python.org/python-bugs ##
19499## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000019500_ASBOX
19501 ) |
19502 sed "s/^/$as_me: WARNING: /" >&2
19503 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019504esac
19505echo "$as_me:$LINENO: checking for wchar.h" >&5
19506echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19507if test "${ac_cv_header_wchar_h+set}" = set; then
19508 echo $ECHO_N "(cached) $ECHO_C" >&6
19509else
19510 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000019511fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019512echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19513echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
19514
19515fi
19516if test $ac_cv_header_wchar_h = yes; then
19517
19518
19519cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019520#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019521_ACEOF
19522
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019523 wchar_h="yes"
19524
Guido van Rossumef2255b2000-03-10 22:30:29 +000019525else
Martin v. Löwis11437992002-04-12 09:54:03 +000019526 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000019527
19528fi
19529
Michael W. Hudson54241132001-12-07 15:38:26 +000019530
Martin v. Löwis11437992002-04-12 09:54:03 +000019531
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019532# determine wchar_t size
19533if test "$wchar_h" = yes
19534then
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 echo "$as_me:$LINENO: checking for wchar_t" >&5
19536echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19537if test "${ac_cv_type_wchar_t+set}" = set; then
19538 echo $ECHO_N "(cached) $ECHO_C" >&6
19539else
19540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019541/* confdefs.h. */
19542_ACEOF
19543cat confdefs.h >>conftest.$ac_ext
19544cat >>conftest.$ac_ext <<_ACEOF
19545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019546#include <wchar.h>
19547
Martin v. Löwis11437992002-04-12 09:54:03 +000019548int
19549main ()
19550{
19551if ((wchar_t *) 0)
19552 return 0;
19553if (sizeof (wchar_t))
19554 return 0;
19555 ;
19556 return 0;
19557}
19558_ACEOF
19559rm -f conftest.$ac_objext
19560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019561 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019563 grep -v '^ *+' conftest.er1 >conftest.err
19564 rm -f conftest.er1
19565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019568 { ac_try='test -z "$ac_c_werror_flag"
19569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19571 (eval $ac_try) 2>&5
19572 ac_status=$?
19573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19574 (exit $ac_status); }; } &&
19575 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19577 (eval $ac_try) 2>&5
19578 ac_status=$?
19579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19580 (exit $ac_status); }; }; then
19581 ac_cv_type_wchar_t=yes
19582else
19583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019584sed 's/^/| /' conftest.$ac_ext >&5
19585
Martin v. Löwis11437992002-04-12 09:54:03 +000019586ac_cv_type_wchar_t=no
19587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019589fi
19590echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
19591echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19592
19593echo "$as_me:$LINENO: checking size of wchar_t" >&5
19594echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19595if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19596 echo $ECHO_N "(cached) $ECHO_C" >&6
19597else
19598 if test "$ac_cv_type_wchar_t" = yes; then
19599 # The cast to unsigned long works around a bug in the HP C Compiler
19600 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19601 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19602 # This bug is HP SR number 8606223364.
19603 if test "$cross_compiling" = yes; then
19604 # Depending upon the size, compute the lo and hi bounds.
19605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019606/* confdefs.h. */
19607_ACEOF
19608cat confdefs.h >>conftest.$ac_ext
19609cat >>conftest.$ac_ext <<_ACEOF
19610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019611#include <wchar.h>
19612
Martin v. Löwis11437992002-04-12 09:54:03 +000019613int
19614main ()
19615{
19616static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
19617test_array [0] = 0
19618
19619 ;
19620 return 0;
19621}
19622_ACEOF
19623rm -f conftest.$ac_objext
19624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019625 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019627 grep -v '^ *+' conftest.er1 >conftest.err
19628 rm -f conftest.er1
19629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19631 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019632 { ac_try='test -z "$ac_c_werror_flag"
19633 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19635 (eval $ac_try) 2>&5
19636 ac_status=$?
19637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19638 (exit $ac_status); }; } &&
19639 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19641 (eval $ac_try) 2>&5
19642 ac_status=$?
19643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19644 (exit $ac_status); }; }; then
19645 ac_lo=0 ac_mid=0
19646 while :; do
19647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019648/* confdefs.h. */
19649_ACEOF
19650cat confdefs.h >>conftest.$ac_ext
19651cat >>conftest.$ac_ext <<_ACEOF
19652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019653#include <wchar.h>
19654
Martin v. Löwis11437992002-04-12 09:54:03 +000019655int
19656main ()
19657{
19658static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19659test_array [0] = 0
19660
19661 ;
19662 return 0;
19663}
19664_ACEOF
19665rm -f conftest.$ac_objext
19666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019667 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 grep -v '^ *+' conftest.er1 >conftest.err
19670 rm -f conftest.er1
19671 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19673 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019674 { ac_try='test -z "$ac_c_werror_flag"
19675 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19677 (eval $ac_try) 2>&5
19678 ac_status=$?
19679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19680 (exit $ac_status); }; } &&
19681 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19683 (eval $ac_try) 2>&5
19684 ac_status=$?
19685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19686 (exit $ac_status); }; }; then
19687 ac_hi=$ac_mid; break
19688else
19689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019690sed 's/^/| /' conftest.$ac_ext >&5
19691
Martin v. Löwis11437992002-04-12 09:54:03 +000019692ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019693 if test $ac_lo -le $ac_mid; then
19694 ac_lo= ac_hi=
19695 break
19696 fi
19697 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019700 done
19701else
19702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019703sed 's/^/| /' conftest.$ac_ext >&5
19704
Martin v. Löwis11437992002-04-12 09:54:03 +000019705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019711#include <wchar.h>
19712
Martin v. Löwis11437992002-04-12 09:54:03 +000019713int
19714main ()
19715{
19716static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19717test_array [0] = 0
19718
19719 ;
19720 return 0;
19721}
19722_ACEOF
19723rm -f conftest.$ac_objext
19724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019725 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019727 grep -v '^ *+' conftest.er1 >conftest.err
19728 rm -f conftest.er1
19729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19731 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019732 { ac_try='test -z "$ac_c_werror_flag"
19733 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19735 (eval $ac_try) 2>&5
19736 ac_status=$?
19737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738 (exit $ac_status); }; } &&
19739 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19741 (eval $ac_try) 2>&5
19742 ac_status=$?
19743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744 (exit $ac_status); }; }; then
19745 ac_hi=-1 ac_mid=-1
19746 while :; do
19747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019748/* confdefs.h. */
19749_ACEOF
19750cat confdefs.h >>conftest.$ac_ext
19751cat >>conftest.$ac_ext <<_ACEOF
19752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019753#include <wchar.h>
19754
Martin v. Löwis11437992002-04-12 09:54:03 +000019755int
19756main ()
19757{
19758static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19759test_array [0] = 0
19760
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext
19766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019769 grep -v '^ *+' conftest.er1 >conftest.err
19770 rm -f conftest.er1
19771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19773 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019774 { ac_try='test -z "$ac_c_werror_flag"
19775 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19777 (eval $ac_try) 2>&5
19778 ac_status=$?
19779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19780 (exit $ac_status); }; } &&
19781 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19783 (eval $ac_try) 2>&5
19784 ac_status=$?
19785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19786 (exit $ac_status); }; }; then
19787 ac_lo=$ac_mid; break
19788else
19789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019790sed 's/^/| /' conftest.$ac_ext >&5
19791
Martin v. Löwis11437992002-04-12 09:54:03 +000019792ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019793 if test $ac_mid -le $ac_hi; then
19794 ac_lo= ac_hi=
19795 break
19796 fi
19797 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019798fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019799rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 done
19801else
19802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019803sed 's/^/| /' conftest.$ac_ext >&5
19804
Martin v. Löwis11437992002-04-12 09:54:03 +000019805ac_lo= ac_hi=
19806fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019807rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019808fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019809rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019810# Binary search between lo and hi bounds.
19811while test "x$ac_lo" != "x$ac_hi"; do
19812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019814/* confdefs.h. */
19815_ACEOF
19816cat confdefs.h >>conftest.$ac_ext
19817cat >>conftest.$ac_ext <<_ACEOF
19818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019819#include <wchar.h>
19820
Martin v. Löwis11437992002-04-12 09:54:03 +000019821int
19822main ()
19823{
19824static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19825test_array [0] = 0
19826
19827 ;
19828 return 0;
19829}
19830_ACEOF
19831rm -f conftest.$ac_objext
19832if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019833 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019835 grep -v '^ *+' conftest.er1 >conftest.err
19836 rm -f conftest.er1
19837 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19839 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019840 { ac_try='test -z "$ac_c_werror_flag"
19841 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19843 (eval $ac_try) 2>&5
19844 ac_status=$?
19845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19846 (exit $ac_status); }; } &&
19847 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19849 (eval $ac_try) 2>&5
19850 ac_status=$?
19851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19852 (exit $ac_status); }; }; then
19853 ac_hi=$ac_mid
19854else
19855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019856sed 's/^/| /' conftest.$ac_ext >&5
19857
Martin v. Löwis11437992002-04-12 09:54:03 +000019858ac_lo=`expr '(' $ac_mid ')' + 1`
19859fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019860rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019861done
19862case $ac_lo in
19863?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019864'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19865See \`config.log' for more details." >&5
19866echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19867See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019868 { (exit 1); exit 1; }; } ;;
19869esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019870else
19871 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019872 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19873See \`config.log' for more details." >&5
19874echo "$as_me: error: cannot run test program while cross compiling
19875See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019876 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019877else
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019879/* confdefs.h. */
19880_ACEOF
19881cat confdefs.h >>conftest.$ac_ext
19882cat >>conftest.$ac_ext <<_ACEOF
19883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019884#include <wchar.h>
19885
19886long longval () { return (long) (sizeof (wchar_t)); }
19887unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019888#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019889#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019890int
19891main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019892{
Martin v. Löwis11437992002-04-12 09:54:03 +000019893
19894 FILE *f = fopen ("conftest.val", "w");
19895 if (! f)
19896 exit (1);
19897 if (((long) (sizeof (wchar_t))) < 0)
19898 {
19899 long i = longval ();
19900 if (i != ((long) (sizeof (wchar_t))))
19901 exit (1);
19902 fprintf (f, "%ld\n", i);
19903 }
19904 else
19905 {
19906 unsigned long i = ulongval ();
19907 if (i != ((long) (sizeof (wchar_t))))
19908 exit (1);
19909 fprintf (f, "%lu\n", i);
19910 }
19911 exit (ferror (f) || fclose (f) != 0);
19912
19913 ;
19914 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019915}
Martin v. Löwis11437992002-04-12 09:54:03 +000019916_ACEOF
19917rm -f conftest$ac_exeext
19918if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19919 (eval $ac_link) 2>&5
19920 ac_status=$?
19921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19924 (eval $ac_try) 2>&5
19925 ac_status=$?
19926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19927 (exit $ac_status); }; }; then
19928 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019929else
Martin v. Löwis11437992002-04-12 09:54:03 +000019930 echo "$as_me: program exited with status $ac_status" >&5
19931echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019932sed 's/^/| /' conftest.$ac_ext >&5
19933
Martin v. Löwis11437992002-04-12 09:54:03 +000019934( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019935{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19936See \`config.log' for more details." >&5
19937echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19938See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019939 { (exit 1); exit 1; }; }
19940fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019941rm -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 +000019942fi
19943fi
19944rm -f conftest.val
19945else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019946 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019947fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019949echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19950echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19951cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019952#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019953_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019954
Michael W. Hudson54241132001-12-07 15:38:26 +000019955
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019956fi
19957
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019958echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19959echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19960have_ucs4_tcl=no
19961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019967
19968#include <tcl.h>
19969#if TCL_UTF_MAX != 6
19970# error "NOT UCS4_TCL"
19971#endif
19972int
19973main ()
19974{
19975
19976 ;
19977 return 0;
19978}
19979_ACEOF
19980rm -f conftest.$ac_objext
19981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019982 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019984 grep -v '^ *+' conftest.er1 >conftest.err
19985 rm -f conftest.er1
19986 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19988 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019989 { ac_try='test -z "$ac_c_werror_flag"
19990 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19992 (eval $ac_try) 2>&5
19993 ac_status=$?
19994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19995 (exit $ac_status); }; } &&
19996 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19998 (eval $ac_try) 2>&5
19999 ac_status=$?
20000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20001 (exit $ac_status); }; }; then
20002
20003
20004cat >>confdefs.h <<\_ACEOF
20005#define HAVE_UCS4_TCL 1
20006_ACEOF
20007
20008 have_ucs4_tcl=yes
20009
20010else
20011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020012sed 's/^/| /' conftest.$ac_ext >&5
20013
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020016echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20017echo "${ECHO_T}$have_ucs4_tcl" >&6
20018
Skip Montanaro6dead952003-09-25 14:50:04 +000020019# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020020if test "$wchar_h" = yes
20021then
20022 # check whether wchar_t is signed or not
20023 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20024echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
20025 if test "${ac_cv_wchar_t_signed+set}" = set; then
20026 echo $ECHO_N "(cached) $ECHO_C" >&6
20027else
20028
20029 if test "$cross_compiling" = yes; then
20030 ac_cv_wchar_t_signed=yes
20031else
20032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020033/* confdefs.h. */
20034_ACEOF
20035cat confdefs.h >>conftest.$ac_ext
20036cat >>conftest.$ac_ext <<_ACEOF
20037/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020038
20039 #include <wchar.h>
20040 int main()
20041 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000020042 /* Success: exit code 0 */
20043 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020044 }
20045
20046_ACEOF
20047rm -f conftest$ac_exeext
20048if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20049 (eval $ac_link) 2>&5
20050 ac_status=$?
20051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20054 (eval $ac_try) 2>&5
20055 ac_status=$?
20056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057 (exit $ac_status); }; }; then
20058 ac_cv_wchar_t_signed=yes
20059else
20060 echo "$as_me: program exited with status $ac_status" >&5
20061echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020062sed 's/^/| /' conftest.$ac_ext >&5
20063
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020064( exit $ac_status )
20065ac_cv_wchar_t_signed=no
20066fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020067rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020068fi
20069fi
20070
20071 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20072echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
20073fi
20074
Martin v. Löwis11437992002-04-12 09:54:03 +000020075echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20076echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020077# Check whether --enable-unicode or --disable-unicode was given.
20078if test "${enable_unicode+set}" = set; then
20079 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000020080
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020081else
20082 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000020083fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020084
20085if test $enable_unicode = yes
20086then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020087 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020088 case "$have_ucs4_tcl" in
20089 yes) enable_unicode="ucs4"
20090 ;;
20091 *) enable_unicode="ucs2"
20092 ;;
20093 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020094fi
20095
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020096
20097
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020098case "$enable_unicode" in
20099ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020100 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020101#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020102_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020103
20104 ;;
20105ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020106 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020107#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020108_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020109
20110 ;;
20111esac
20112
Michael W. Hudson54241132001-12-07 15:38:26 +000020113
Martin v. Löwis11437992002-04-12 09:54:03 +000020114
20115
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020116
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020117if test "$enable_unicode" = "no"
20118then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020119 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000020120 echo "$as_me:$LINENO: result: not used" >&5
20121echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020122else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020123 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020124
20125cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020126#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020127_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020128
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020129
20130 # wchar_t is only usable if it maps to an unsigned type
20131 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020132 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020133 then
20134 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020135
Martin v. Löwis11437992002-04-12 09:54:03 +000020136cat >>confdefs.h <<\_ACEOF
20137#define HAVE_USABLE_WCHAR_T 1
20138_ACEOF
20139
20140 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020141#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020142_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020143
20144 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20145 then
20146 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020148#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020149_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020150
20151 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20152 then
20153 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020155#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020156_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020157
20158 else
20159 PY_UNICODE_TYPE="no type found"
20160 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20162echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020163fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020164
20165# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020166echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20167echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
20168if test "${ac_cv_c_bigendian+set}" = set; then
20169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020170else
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 # See if sys/param.h defines the BYTE_ORDER macro.
20172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020173/* confdefs.h. */
20174_ACEOF
20175cat confdefs.h >>conftest.$ac_ext
20176cat >>conftest.$ac_ext <<_ACEOF
20177/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020178#include <sys/types.h>
20179#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020180
Martin v. Löwis11437992002-04-12 09:54:03 +000020181int
20182main ()
20183{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020184#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20185 bogus endian macros
20186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020187
20188 ;
20189 return 0;
20190}
20191_ACEOF
20192rm -f conftest.$ac_objext
20193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020194 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020196 grep -v '^ *+' conftest.er1 >conftest.err
20197 rm -f conftest.er1
20198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20200 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020201 { ac_try='test -z "$ac_c_werror_flag"
20202 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20204 (eval $ac_try) 2>&5
20205 ac_status=$?
20206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20207 (exit $ac_status); }; } &&
20208 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20210 (eval $ac_try) 2>&5
20211 ac_status=$?
20212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20213 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020214 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000020215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020216/* confdefs.h. */
20217_ACEOF
20218cat confdefs.h >>conftest.$ac_ext
20219cat >>conftest.$ac_ext <<_ACEOF
20220/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020221#include <sys/types.h>
20222#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020223
Martin v. Löwis11437992002-04-12 09:54:03 +000020224int
20225main ()
20226{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020227#if BYTE_ORDER != BIG_ENDIAN
20228 not big endian
20229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020230
20231 ;
20232 return 0;
20233}
20234_ACEOF
20235rm -f conftest.$ac_objext
20236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020237 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020239 grep -v '^ *+' conftest.er1 >conftest.err
20240 rm -f conftest.er1
20241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20243 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020244 { ac_try='test -z "$ac_c_werror_flag"
20245 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20247 (eval $ac_try) 2>&5
20248 ac_status=$?
20249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20250 (exit $ac_status); }; } &&
20251 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20253 (eval $ac_try) 2>&5
20254 ac_status=$?
20255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20256 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020257 ac_cv_c_bigendian=yes
20258else
Martin v. Löwis11437992002-04-12 09:54:03 +000020259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwis11437992002-04-12 09:54:03 +000020262ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020263fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020265else
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020267sed 's/^/| /' conftest.$ac_ext >&5
20268
Martin v. Löwis11437992002-04-12 09:54:03 +000020269# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000020270if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020271 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000020272 ac_cv_c_bigendian=unknown
20273 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020279short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20280short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20281void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
20282short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20283short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20284void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020285int
20286main ()
20287{
20288 _ascii (); _ebcdic ();
20289 ;
20290 return 0;
20291}
20292_ACEOF
20293rm -f conftest.$ac_objext
20294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020295 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020297 grep -v '^ *+' conftest.er1 >conftest.err
20298 rm -f conftest.er1
20299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020302 { ac_try='test -z "$ac_c_werror_flag"
20303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20305 (eval $ac_try) 2>&5
20306 ac_status=$?
20307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20308 (exit $ac_status); }; } &&
20309 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20311 (eval $ac_try) 2>&5
20312 ac_status=$?
20313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20314 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020315 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 ac_cv_c_bigendian=yes
20317fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020318if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020319 if test "$ac_cv_c_bigendian" = unknown; then
20320 ac_cv_c_bigendian=no
20321 else
20322 # finding both strings is unlikely to happen, but who knows?
20323 ac_cv_c_bigendian=unknown
20324 fi
20325fi
20326else
20327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020328sed 's/^/| /' conftest.$ac_ext >&5
20329
Martin v. Löwis11437992002-04-12 09:54:03 +000020330fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020332else
20333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020334/* confdefs.h. */
20335_ACEOF
20336cat confdefs.h >>conftest.$ac_ext
20337cat >>conftest.$ac_ext <<_ACEOF
20338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020339int
20340main ()
20341{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020342 /* Are we little or big endian? From Harbison&Steele. */
20343 union
20344 {
20345 long l;
20346 char c[sizeof (long)];
20347 } u;
20348 u.l = 1;
20349 exit (u.c[sizeof (long) - 1] == 1);
20350}
Martin v. Löwis11437992002-04-12 09:54:03 +000020351_ACEOF
20352rm -f conftest$ac_exeext
20353if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20354 (eval $ac_link) 2>&5
20355 ac_status=$?
20356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20357 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20359 (eval $ac_try) 2>&5
20360 ac_status=$?
20361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20362 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020363 ac_cv_c_bigendian=no
20364else
Martin v. Löwis11437992002-04-12 09:54:03 +000020365 echo "$as_me: program exited with status $ac_status" >&5
20366echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020367sed 's/^/| /' conftest.$ac_ext >&5
20368
Martin v. Löwis11437992002-04-12 09:54:03 +000020369( exit $ac_status )
20370ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000020371fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020372rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020374fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020375rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020376fi
20377echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
20378echo "${ECHO_T}$ac_cv_c_bigendian" >&6
20379case $ac_cv_c_bigendian in
20380 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000020381
Martin v. Löwis11437992002-04-12 09:54:03 +000020382cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020383#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020384_ACEOF
20385 ;;
20386 no)
20387 ;;
20388 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020389 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020390presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020391echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020392presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
20393 { (exit 1); exit 1; }; } ;;
20394esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000020395
Michael W. Hudson54241132001-12-07 15:38:26 +000020396
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020397# Check whether right shifting a negative integer extends the sign bit
20398# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000020399echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
20400echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
20401if test "${ac_cv_rshift_extends_sign+set}" = set; then
20402 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020403else
Martin v. Löwis11437992002-04-12 09:54:03 +000020404
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020405if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020406 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020407else
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020409/* confdefs.h. */
20410_ACEOF
20411cat confdefs.h >>conftest.$ac_ext
20412cat >>conftest.$ac_ext <<_ACEOF
20413/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020414
20415int main()
20416{
Vladimir Marangozova6180282000-07-12 05:05:06 +000020417 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020418}
20419
Martin v. Löwis11437992002-04-12 09:54:03 +000020420_ACEOF
20421rm -f conftest$ac_exeext
20422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20423 (eval $ac_link) 2>&5
20424 ac_status=$?
20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20426 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20428 (eval $ac_try) 2>&5
20429 ac_status=$?
20430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20431 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000020432 ac_cv_rshift_extends_sign=yes
20433else
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 echo "$as_me: program exited with status $ac_status" >&5
20435echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020436sed 's/^/| /' conftest.$ac_ext >&5
20437
Martin v. Löwis11437992002-04-12 09:54:03 +000020438( exit $ac_status )
20439ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000020440fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020441rm -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 +000020442fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000020443fi
20444
Martin v. Löwis11437992002-04-12 09:54:03 +000020445echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
20446echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020447if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020448then
Martin v. Löwis11437992002-04-12 09:54:03 +000020449
20450cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020451#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020453
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020454fi
20455
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020456# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020457echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
20458echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
20459if test "${ac_cv_have_getc_unlocked+set}" = set; then
20460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020461else
Martin v. Löwis11437992002-04-12 09:54:03 +000020462
20463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020464/* confdefs.h. */
20465_ACEOF
20466cat confdefs.h >>conftest.$ac_ext
20467cat >>conftest.$ac_ext <<_ACEOF
20468/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020469#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020470int
20471main ()
20472{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020473
20474 FILE *f = fopen("/dev/null", "r");
20475 flockfile(f);
20476 getc_unlocked(f);
20477 funlockfile(f);
20478
Martin v. Löwis11437992002-04-12 09:54:03 +000020479 ;
20480 return 0;
20481}
20482_ACEOF
20483rm -f conftest.$ac_objext conftest$ac_exeext
20484if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020485 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20491 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020492 { ac_try='test -z "$ac_c_werror_flag"
20493 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20495 (eval $ac_try) 2>&5
20496 ac_status=$?
20497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20498 (exit $ac_status); }; } &&
20499 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20501 (eval $ac_try) 2>&5
20502 ac_status=$?
20503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20504 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020505 ac_cv_have_getc_unlocked=yes
20506else
Martin v. Löwis11437992002-04-12 09:54:03 +000020507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020508sed 's/^/| /' conftest.$ac_ext >&5
20509
Martin v. Löwis11437992002-04-12 09:54:03 +000020510ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020511fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020512rm -f conftest.err conftest.$ac_objext \
20513 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020514fi
20515
Martin v. Löwis11437992002-04-12 09:54:03 +000020516echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
20517echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020518if test "$ac_cv_have_getc_unlocked" = yes
20519then
Martin v. Löwis11437992002-04-12 09:54:03 +000020520
20521cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020522#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020523_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020524
20525fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020526
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020527# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000020528# save the value of LIBS so we don't actually link Python with readline
20529LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020530
20531echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
20532echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
20533if test "${ac_cv_lib_readline_readline+set}" = set; then
20534 echo $ECHO_N "(cached) $ECHO_C" >&6
20535else
20536 ac_check_lib_save_LIBS=$LIBS
20537LIBS="-lreadline $LIBS"
20538cat >conftest.$ac_ext <<_ACEOF
20539/* confdefs.h. */
20540_ACEOF
20541cat confdefs.h >>conftest.$ac_ext
20542cat >>conftest.$ac_ext <<_ACEOF
20543/* end confdefs.h. */
20544
20545/* Override any gcc2 internal prototype to avoid an error. */
20546#ifdef __cplusplus
20547extern "C"
20548#endif
20549/* We use char because int might match the return type of a gcc2
20550 builtin and then its argument prototype would still apply. */
20551char readline ();
20552int
20553main ()
20554{
20555readline ();
20556 ;
20557 return 0;
20558}
20559_ACEOF
20560rm -f conftest.$ac_objext conftest$ac_exeext
20561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20562 (eval $ac_link) 2>conftest.er1
20563 ac_status=$?
20564 grep -v '^ *+' conftest.er1 >conftest.err
20565 rm -f conftest.er1
20566 cat conftest.err >&5
20567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20568 (exit $ac_status); } &&
20569 { ac_try='test -z "$ac_c_werror_flag"
20570 || test ! -s conftest.err'
20571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20572 (eval $ac_try) 2>&5
20573 ac_status=$?
20574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20575 (exit $ac_status); }; } &&
20576 { ac_try='test -s conftest$ac_exeext'
20577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20578 (eval $ac_try) 2>&5
20579 ac_status=$?
20580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20581 (exit $ac_status); }; }; then
20582 ac_cv_lib_readline_readline=yes
20583else
20584 echo "$as_me: failed program was:" >&5
20585sed 's/^/| /' conftest.$ac_ext >&5
20586
20587ac_cv_lib_readline_readline=no
20588fi
20589rm -f conftest.err conftest.$ac_objext \
20590 conftest$ac_exeext conftest.$ac_ext
20591LIBS=$ac_check_lib_save_LIBS
20592fi
20593echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
20594echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
20595if test $ac_cv_lib_readline_readline = yes; then
20596 cat >>confdefs.h <<_ACEOF
20597#define HAVE_LIBREADLINE 1
20598_ACEOF
20599
20600 LIBS="-lreadline $LIBS"
20601
20602fi
20603
20604if test "$ac_cv_have_readline_readline" = no
20605then
20606
20607echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
20608echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
20609if test "${ac_cv_lib_termcap_readline+set}" = set; then
20610 echo $ECHO_N "(cached) $ECHO_C" >&6
20611else
20612 ac_check_lib_save_LIBS=$LIBS
20613LIBS="-ltermcap $LIBS"
20614cat >conftest.$ac_ext <<_ACEOF
20615/* confdefs.h. */
20616_ACEOF
20617cat confdefs.h >>conftest.$ac_ext
20618cat >>conftest.$ac_ext <<_ACEOF
20619/* end confdefs.h. */
20620
20621/* Override any gcc2 internal prototype to avoid an error. */
20622#ifdef __cplusplus
20623extern "C"
20624#endif
20625/* We use char because int might match the return type of a gcc2
20626 builtin and then its argument prototype would still apply. */
20627char readline ();
20628int
20629main ()
20630{
20631readline ();
20632 ;
20633 return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext conftest$ac_exeext
20637if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20638 (eval $ac_link) 2>conftest.er1
20639 ac_status=$?
20640 grep -v '^ *+' conftest.er1 >conftest.err
20641 rm -f conftest.er1
20642 cat conftest.err >&5
20643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20644 (exit $ac_status); } &&
20645 { ac_try='test -z "$ac_c_werror_flag"
20646 || test ! -s conftest.err'
20647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20648 (eval $ac_try) 2>&5
20649 ac_status=$?
20650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20651 (exit $ac_status); }; } &&
20652 { ac_try='test -s conftest$ac_exeext'
20653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20654 (eval $ac_try) 2>&5
20655 ac_status=$?
20656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20657 (exit $ac_status); }; }; then
20658 ac_cv_lib_termcap_readline=yes
20659else
20660 echo "$as_me: failed program was:" >&5
20661sed 's/^/| /' conftest.$ac_ext >&5
20662
20663ac_cv_lib_termcap_readline=no
20664fi
20665rm -f conftest.err conftest.$ac_objext \
20666 conftest$ac_exeext conftest.$ac_ext
20667LIBS=$ac_check_lib_save_LIBS
20668fi
20669echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
20670echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
20671if test $ac_cv_lib_termcap_readline = yes; then
20672 cat >>confdefs.h <<_ACEOF
20673#define HAVE_LIBTERMCAP 1
20674_ACEOF
20675
20676 LIBS="-ltermcap $LIBS"
20677
20678fi
20679
20680fi
20681
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020682# check for readline 2.1
20683echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20684echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20685if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20686 echo $ECHO_N "(cached) $ECHO_C" >&6
20687else
20688 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020689LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020690cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020691/* confdefs.h. */
20692_ACEOF
20693cat confdefs.h >>conftest.$ac_ext
20694cat >>conftest.$ac_ext <<_ACEOF
20695/* end confdefs.h. */
20696
20697/* Override any gcc2 internal prototype to avoid an error. */
20698#ifdef __cplusplus
20699extern "C"
20700#endif
20701/* We use char because int might match the return type of a gcc2
20702 builtin and then its argument prototype would still apply. */
20703char rl_callback_handler_install ();
20704int
20705main ()
20706{
20707rl_callback_handler_install ();
20708 ;
20709 return 0;
20710}
20711_ACEOF
20712rm -f conftest.$ac_objext conftest$ac_exeext
20713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020714 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020716 grep -v '^ *+' conftest.er1 >conftest.err
20717 rm -f conftest.er1
20718 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20720 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020721 { ac_try='test -z "$ac_c_werror_flag"
20722 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20724 (eval $ac_try) 2>&5
20725 ac_status=$?
20726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20727 (exit $ac_status); }; } &&
20728 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20730 (eval $ac_try) 2>&5
20731 ac_status=$?
20732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20733 (exit $ac_status); }; }; then
20734 ac_cv_lib_readline_rl_callback_handler_install=yes
20735else
20736 echo "$as_me: failed program was:" >&5
20737sed 's/^/| /' conftest.$ac_ext >&5
20738
20739ac_cv_lib_readline_rl_callback_handler_install=no
20740fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020741rm -f conftest.err conftest.$ac_objext \
20742 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020743LIBS=$ac_check_lib_save_LIBS
20744fi
20745echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20746echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20747if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20748
20749cat >>confdefs.h <<\_ACEOF
20750#define HAVE_RL_CALLBACK 1
20751_ACEOF
20752
20753fi
20754
20755
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020756# check for readline 2.2
20757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020758/* confdefs.h. */
20759_ACEOF
20760cat confdefs.h >>conftest.$ac_ext
20761cat >>conftest.$ac_ext <<_ACEOF
20762/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020763#include <readline/readline.h>
20764_ACEOF
20765if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20766 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20767 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020768 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020769 rm -f conftest.er1
20770 cat conftest.err >&5
20771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20772 (exit $ac_status); } >/dev/null; then
20773 if test -s conftest.err; then
20774 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020775 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020776 else
20777 ac_cpp_err=
20778 fi
20779else
20780 ac_cpp_err=yes
20781fi
20782if test -z "$ac_cpp_err"; then
20783 have_readline=yes
20784else
20785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020786sed 's/^/| /' conftest.$ac_ext >&5
20787
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020788 have_readline=no
20789fi
20790rm -f conftest.err conftest.$ac_ext
20791if test $have_readline = yes
20792then
20793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020794/* confdefs.h. */
20795_ACEOF
20796cat confdefs.h >>conftest.$ac_ext
20797cat >>conftest.$ac_ext <<_ACEOF
20798/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020799#include <readline/readline.h>
20800
20801_ACEOF
20802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020803 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020804
20805cat >>confdefs.h <<\_ACEOF
20806#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20807_ACEOF
20808
20809fi
20810rm -f conftest*
20811
20812fi
20813
Martin v. Löwis0daad592001-09-30 21:09:59 +000020814# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020815echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20816echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20817if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020819else
Martin v. Löwis11437992002-04-12 09:54:03 +000020820 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020821LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020823/* confdefs.h. */
20824_ACEOF
20825cat confdefs.h >>conftest.$ac_ext
20826cat >>conftest.$ac_ext <<_ACEOF
20827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020828
Guido van Rossum353ae582001-07-10 16:45:32 +000020829/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020830#ifdef __cplusplus
20831extern "C"
20832#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020833/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 builtin and then its argument prototype would still apply. */
20835char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020836int
20837main ()
20838{
20839rl_pre_input_hook ();
20840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext conftest$ac_exeext
20845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020846 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020848 grep -v '^ *+' conftest.er1 >conftest.err
20849 rm -f conftest.er1
20850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20852 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020853 { ac_try='test -z "$ac_c_werror_flag"
20854 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20856 (eval $ac_try) 2>&5
20857 ac_status=$?
20858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20859 (exit $ac_status); }; } &&
20860 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20862 (eval $ac_try) 2>&5
20863 ac_status=$?
20864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20865 (exit $ac_status); }; }; then
20866 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020867else
Martin v. Löwis11437992002-04-12 09:54:03 +000020868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020869sed 's/^/| /' conftest.$ac_ext >&5
20870
Martin v. Löwis11437992002-04-12 09:54:03 +000020871ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020872fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020873rm -f conftest.err conftest.$ac_objext \
20874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020875LIBS=$ac_check_lib_save_LIBS
20876fi
20877echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20878echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20879if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020880
Martin v. Löwis11437992002-04-12 09:54:03 +000020881cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020882#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020883_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020884
Martin v. Löwis0daad592001-09-30 21:09:59 +000020885fi
20886
Michael W. Hudson54241132001-12-07 15:38:26 +000020887
Martin v. Löwis0daad592001-09-30 21:09:59 +000020888# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020889echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20890echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20891if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20892 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020893else
Martin v. Löwis11437992002-04-12 09:54:03 +000020894 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020895LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020897/* confdefs.h. */
20898_ACEOF
20899cat confdefs.h >>conftest.$ac_ext
20900cat >>conftest.$ac_ext <<_ACEOF
20901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020902
Martin v. Löwis0daad592001-09-30 21:09:59 +000020903/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020904#ifdef __cplusplus
20905extern "C"
20906#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020907/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020908 builtin and then its argument prototype would still apply. */
20909char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020910int
20911main ()
20912{
20913rl_completion_matches ();
20914 ;
20915 return 0;
20916}
20917_ACEOF
20918rm -f conftest.$ac_objext conftest$ac_exeext
20919if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020922 grep -v '^ *+' conftest.er1 >conftest.err
20923 rm -f conftest.er1
20924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20926 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020927 { ac_try='test -z "$ac_c_werror_flag"
20928 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20930 (eval $ac_try) 2>&5
20931 ac_status=$?
20932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20933 (exit $ac_status); }; } &&
20934 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20936 (eval $ac_try) 2>&5
20937 ac_status=$?
20938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20939 (exit $ac_status); }; }; then
20940 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020941else
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Martin v. Löwis11437992002-04-12 09:54:03 +000020945ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020946fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020947rm -f conftest.err conftest.$ac_objext \
20948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020949LIBS=$ac_check_lib_save_LIBS
20950fi
20951echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20952echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20953if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020954
Martin v. Löwis11437992002-04-12 09:54:03 +000020955cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020956#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020957_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020958
Guido van Rossum353ae582001-07-10 16:45:32 +000020959fi
20960
Jack Jansendd19cf82001-12-06 22:36:17 +000020961
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020962# also in readline 4.2
20963cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020964/* confdefs.h. */
20965_ACEOF
20966cat confdefs.h >>conftest.$ac_ext
20967cat >>conftest.$ac_ext <<_ACEOF
20968/* end confdefs.h. */
20969#include <readline/readline.h>
20970_ACEOF
20971if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20972 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20973 ac_status=$?
20974 grep -v '^ *+' conftest.er1 >conftest.err
20975 rm -f conftest.er1
20976 cat conftest.err >&5
20977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20978 (exit $ac_status); } >/dev/null; then
20979 if test -s conftest.err; then
20980 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020981 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020982 else
20983 ac_cpp_err=
20984 fi
20985else
20986 ac_cpp_err=yes
20987fi
20988if test -z "$ac_cpp_err"; then
20989 have_readline=yes
20990else
20991 echo "$as_me: failed program was:" >&5
20992sed 's/^/| /' conftest.$ac_ext >&5
20993
20994 have_readline=no
20995fi
20996rm -f conftest.err conftest.$ac_ext
20997if test $have_readline = yes
20998then
20999 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021000/* confdefs.h. */
21001_ACEOF
21002cat confdefs.h >>conftest.$ac_ext
21003cat >>conftest.$ac_ext <<_ACEOF
21004/* end confdefs.h. */
21005#include <readline/readline.h>
21006
21007_ACEOF
21008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21009 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
21010
21011cat >>confdefs.h <<\_ACEOF
21012#define HAVE_RL_CATCH_SIGNAL 1
21013_ACEOF
21014
21015fi
21016rm -f conftest*
21017
21018fi
21019
Martin v. Löwis82bca632006-02-10 20:49:30 +000021020# End of readline checks: restore LIBS
21021LIBS=$LIBS_no_readline
21022
Martin v. Löwis11437992002-04-12 09:54:03 +000021023echo "$as_me:$LINENO: checking for broken nice()" >&5
21024echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
21025if test "${ac_cv_broken_nice+set}" = set; then
21026 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021027else
Martin v. Löwis11437992002-04-12 09:54:03 +000021028
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021029if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021030 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021031else
Martin v. Löwis11437992002-04-12 09:54:03 +000021032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021033/* confdefs.h. */
21034_ACEOF
21035cat confdefs.h >>conftest.$ac_ext
21036cat >>conftest.$ac_ext <<_ACEOF
21037/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021038
21039int main()
21040{
21041 int val1 = nice(1);
21042 if (val1 != -1 && val1 == nice(2))
21043 exit(0);
21044 exit(1);
21045}
21046
Martin v. Löwis11437992002-04-12 09:54:03 +000021047_ACEOF
21048rm -f conftest$ac_exeext
21049if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21050 (eval $ac_link) 2>&5
21051 ac_status=$?
21052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21053 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21055 (eval $ac_try) 2>&5
21056 ac_status=$?
21057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21058 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021059 ac_cv_broken_nice=yes
21060else
Martin v. Löwis11437992002-04-12 09:54:03 +000021061 echo "$as_me: program exited with status $ac_status" >&5
21062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021063sed 's/^/| /' conftest.$ac_ext >&5
21064
Martin v. Löwis11437992002-04-12 09:54:03 +000021065( exit $ac_status )
21066ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021067fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021068rm -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 +000021069fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021070fi
21071
Martin v. Löwis11437992002-04-12 09:54:03 +000021072echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21073echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021074if test "$ac_cv_broken_nice" = yes
21075then
Martin v. Löwis11437992002-04-12 09:54:03 +000021076
21077cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021078#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021079_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021080
21081fi
21082
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021083echo "$as_me:$LINENO: checking for broken poll()" >&5
21084echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
21085if test "$cross_compiling" = yes; then
21086 ac_cv_broken_poll=no
21087else
21088 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021089/* confdefs.h. */
21090_ACEOF
21091cat confdefs.h >>conftest.$ac_ext
21092cat >>conftest.$ac_ext <<_ACEOF
21093/* end confdefs.h. */
21094
21095#include <poll.h>
21096
21097int main (void)
21098 {
21099 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21100
21101 close (42);
21102
21103 int poll_test = poll (&poll_struct, 1, 0);
21104
21105 if (poll_test < 0)
21106 {
21107 exit(0);
21108 }
21109 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21110 {
21111 exit(0);
21112 }
21113 else
21114 {
21115 exit(1);
21116 }
21117 }
21118
21119_ACEOF
21120rm -f conftest$ac_exeext
21121if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21122 (eval $ac_link) 2>&5
21123 ac_status=$?
21124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21127 (eval $ac_try) 2>&5
21128 ac_status=$?
21129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21130 (exit $ac_status); }; }; then
21131 ac_cv_broken_poll=yes
21132else
21133 echo "$as_me: program exited with status $ac_status" >&5
21134echo "$as_me: failed program was:" >&5
21135sed 's/^/| /' conftest.$ac_ext >&5
21136
21137( exit $ac_status )
21138ac_cv_broken_poll=no
21139fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021140rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021141fi
21142echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21143echo "${ECHO_T}$ac_cv_broken_poll" >&6
21144if test "$ac_cv_broken_poll" = yes
21145then
21146
21147cat >>confdefs.h <<\_ACEOF
21148#define HAVE_BROKEN_POLL 1
21149_ACEOF
21150
21151fi
21152
Brett Cannon43802422005-02-10 20:48:03 +000021153# 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 +000021154# (which is not required by ISO C or UNIX spec) and/or if we support
21155# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000021156echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21157echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
21158if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21159 echo $ECHO_N "(cached) $ECHO_C" >&6
21160else
21161 cat >conftest.$ac_ext <<_ACEOF
21162/* confdefs.h. */
21163_ACEOF
21164cat confdefs.h >>conftest.$ac_ext
21165cat >>conftest.$ac_ext <<_ACEOF
21166/* end confdefs.h. */
21167#include <sys/types.h>
21168#include <$ac_cv_struct_tm>
21169
21170
21171int
21172main ()
21173{
21174static struct tm ac_aggr;
21175if (ac_aggr.tm_zone)
21176return 0;
21177 ;
21178 return 0;
21179}
21180_ACEOF
21181rm -f conftest.$ac_objext
21182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21183 (eval $ac_compile) 2>conftest.er1
21184 ac_status=$?
21185 grep -v '^ *+' conftest.er1 >conftest.err
21186 rm -f conftest.er1
21187 cat conftest.err >&5
21188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21189 (exit $ac_status); } &&
21190 { ac_try='test -z "$ac_c_werror_flag"
21191 || test ! -s conftest.err'
21192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21193 (eval $ac_try) 2>&5
21194 ac_status=$?
21195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21196 (exit $ac_status); }; } &&
21197 { ac_try='test -s conftest.$ac_objext'
21198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21199 (eval $ac_try) 2>&5
21200 ac_status=$?
21201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21202 (exit $ac_status); }; }; then
21203 ac_cv_member_struct_tm_tm_zone=yes
21204else
21205 echo "$as_me: failed program was:" >&5
21206sed 's/^/| /' conftest.$ac_ext >&5
21207
21208cat >conftest.$ac_ext <<_ACEOF
21209/* confdefs.h. */
21210_ACEOF
21211cat confdefs.h >>conftest.$ac_ext
21212cat >>conftest.$ac_ext <<_ACEOF
21213/* end confdefs.h. */
21214#include <sys/types.h>
21215#include <$ac_cv_struct_tm>
21216
21217
21218int
21219main ()
21220{
21221static struct tm ac_aggr;
21222if (sizeof ac_aggr.tm_zone)
21223return 0;
21224 ;
21225 return 0;
21226}
21227_ACEOF
21228rm -f conftest.$ac_objext
21229if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21230 (eval $ac_compile) 2>conftest.er1
21231 ac_status=$?
21232 grep -v '^ *+' conftest.er1 >conftest.err
21233 rm -f conftest.er1
21234 cat conftest.err >&5
21235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21236 (exit $ac_status); } &&
21237 { ac_try='test -z "$ac_c_werror_flag"
21238 || test ! -s conftest.err'
21239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21240 (eval $ac_try) 2>&5
21241 ac_status=$?
21242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21243 (exit $ac_status); }; } &&
21244 { ac_try='test -s conftest.$ac_objext'
21245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21246 (eval $ac_try) 2>&5
21247 ac_status=$?
21248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21249 (exit $ac_status); }; }; then
21250 ac_cv_member_struct_tm_tm_zone=yes
21251else
21252 echo "$as_me: failed program was:" >&5
21253sed 's/^/| /' conftest.$ac_ext >&5
21254
21255ac_cv_member_struct_tm_tm_zone=no
21256fi
21257rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21258fi
21259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21260fi
21261echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21262echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21263if test $ac_cv_member_struct_tm_tm_zone = yes; then
21264
21265cat >>confdefs.h <<_ACEOF
21266#define HAVE_STRUCT_TM_TM_ZONE 1
21267_ACEOF
21268
21269
21270fi
21271
21272if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21273
21274cat >>confdefs.h <<\_ACEOF
21275#define HAVE_TM_ZONE 1
21276_ACEOF
21277
21278else
21279 echo "$as_me:$LINENO: checking for tzname" >&5
21280echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21281if test "${ac_cv_var_tzname+set}" = set; then
21282 echo $ECHO_N "(cached) $ECHO_C" >&6
21283else
21284 cat >conftest.$ac_ext <<_ACEOF
21285/* confdefs.h. */
21286_ACEOF
21287cat confdefs.h >>conftest.$ac_ext
21288cat >>conftest.$ac_ext <<_ACEOF
21289/* end confdefs.h. */
21290#include <time.h>
21291#ifndef tzname /* For SGI. */
21292extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21293#endif
21294
21295int
21296main ()
21297{
21298atoi(*tzname);
21299 ;
21300 return 0;
21301}
21302_ACEOF
21303rm -f conftest.$ac_objext conftest$ac_exeext
21304if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21305 (eval $ac_link) 2>conftest.er1
21306 ac_status=$?
21307 grep -v '^ *+' conftest.er1 >conftest.err
21308 rm -f conftest.er1
21309 cat conftest.err >&5
21310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21311 (exit $ac_status); } &&
21312 { ac_try='test -z "$ac_c_werror_flag"
21313 || test ! -s conftest.err'
21314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21315 (eval $ac_try) 2>&5
21316 ac_status=$?
21317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21318 (exit $ac_status); }; } &&
21319 { ac_try='test -s conftest$ac_exeext'
21320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21321 (eval $ac_try) 2>&5
21322 ac_status=$?
21323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21324 (exit $ac_status); }; }; then
21325 ac_cv_var_tzname=yes
21326else
21327 echo "$as_me: failed program was:" >&5
21328sed 's/^/| /' conftest.$ac_ext >&5
21329
21330ac_cv_var_tzname=no
21331fi
21332rm -f conftest.err conftest.$ac_objext \
21333 conftest$ac_exeext conftest.$ac_ext
21334fi
21335echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21336echo "${ECHO_T}$ac_cv_var_tzname" >&6
21337 if test $ac_cv_var_tzname = yes; then
21338
21339cat >>confdefs.h <<\_ACEOF
21340#define HAVE_TZNAME 1
21341_ACEOF
21342
21343 fi
21344fi
21345
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021346
Martin v. Löwis1d459062005-03-14 21:23:33 +000021347# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021348echo "$as_me:$LINENO: checking for working tzset()" >&5
21349echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
21350if test "${ac_cv_working_tzset+set}" = set; then
21351 echo $ECHO_N "(cached) $ECHO_C" >&6
21352else
21353
21354if test "$cross_compiling" = yes; then
21355 ac_cv_working_tzset=no
21356else
21357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021358/* confdefs.h. */
21359_ACEOF
21360cat confdefs.h >>conftest.$ac_ext
21361cat >>conftest.$ac_ext <<_ACEOF
21362/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021363
21364#include <stdlib.h>
21365#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000021366#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000021367
21368#if HAVE_TZNAME
21369extern char *tzname[];
21370#endif
21371
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021372int main()
21373{
Brett Cannon18367812003-09-19 00:59:16 +000021374 /* Note that we need to ensure that not only does tzset(3)
21375 do 'something' with localtime, but it works as documented
21376 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000021377 This includes making sure that tzname is set properly if
21378 tm->tm_zone does not exist since it is the alternative way
21379 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000021380
21381 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000021382 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000021383 */
21384
Martin v. Löwis1d459062005-03-14 21:23:33 +000021385 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000021386 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
21387
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021388 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021389 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021390 if (localtime(&groundhogday)->tm_hour != 0)
21391 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021392#if HAVE_TZNAME
21393 /* For UTC, tzname[1] is sometimes "", sometimes " " */
21394 if (strcmp(tzname[0], "UTC") ||
21395 (tzname[1][0] != 0 && tzname[1][0] != ' '))
21396 exit(1);
21397#endif
Brett Cannon18367812003-09-19 00:59:16 +000021398
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021399 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021400 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021401 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021402 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021403#if HAVE_TZNAME
21404 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
21405 exit(1);
21406#endif
Brett Cannon18367812003-09-19 00:59:16 +000021407
21408 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
21409 tzset();
21410 if (localtime(&groundhogday)->tm_hour != 11)
21411 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021412#if HAVE_TZNAME
21413 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
21414 exit(1);
21415#endif
21416
21417#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000021418 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
21419 exit(1);
21420 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
21421 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021422#endif
Brett Cannon18367812003-09-19 00:59:16 +000021423
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021424 exit(0);
21425}
21426
21427_ACEOF
21428rm -f conftest$ac_exeext
21429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21430 (eval $ac_link) 2>&5
21431 ac_status=$?
21432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21435 (eval $ac_try) 2>&5
21436 ac_status=$?
21437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21438 (exit $ac_status); }; }; then
21439 ac_cv_working_tzset=yes
21440else
21441 echo "$as_me: program exited with status $ac_status" >&5
21442echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021443sed 's/^/| /' conftest.$ac_ext >&5
21444
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021445( exit $ac_status )
21446ac_cv_working_tzset=no
21447fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021448rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021449fi
21450fi
21451
21452echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
21453echo "${ECHO_T}$ac_cv_working_tzset" >&6
21454if test "$ac_cv_working_tzset" = yes
21455then
21456
21457cat >>confdefs.h <<\_ACEOF
21458#define HAVE_WORKING_TZSET 1
21459_ACEOF
21460
21461fi
21462
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021463# Look for subsecond timestamps in struct stat
21464echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
21465echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
21466if test "${ac_cv_stat_tv_nsec+set}" = set; then
21467 echo $ECHO_N "(cached) $ECHO_C" >&6
21468else
21469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021470/* confdefs.h. */
21471_ACEOF
21472cat confdefs.h >>conftest.$ac_ext
21473cat >>conftest.$ac_ext <<_ACEOF
21474/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021475#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021476int
21477main ()
21478{
21479
21480struct stat st;
21481st.st_mtim.tv_nsec = 1;
21482
21483 ;
21484 return 0;
21485}
21486_ACEOF
21487rm -f conftest.$ac_objext
21488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021489 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021491 grep -v '^ *+' conftest.er1 >conftest.err
21492 rm -f conftest.er1
21493 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21495 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021496 { ac_try='test -z "$ac_c_werror_flag"
21497 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21499 (eval $ac_try) 2>&5
21500 ac_status=$?
21501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21502 (exit $ac_status); }; } &&
21503 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21505 (eval $ac_try) 2>&5
21506 ac_status=$?
21507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21508 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000021509 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021510else
21511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021512sed 's/^/| /' conftest.$ac_ext >&5
21513
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021514ac_cv_stat_tv_nsec=no
21515fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021517fi
21518
21519echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
21520echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
21521if test "$ac_cv_stat_tv_nsec" = yes
21522then
21523
21524cat >>confdefs.h <<\_ACEOF
21525#define HAVE_STAT_TV_NSEC 1
21526_ACEOF
21527
21528fi
21529
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021530# Look for BSD style subsecond timestamps in struct stat
21531echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
21532echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
21533if test "${ac_cv_stat_tv_nsec2+set}" = set; then
21534 echo $ECHO_N "(cached) $ECHO_C" >&6
21535else
21536 cat >conftest.$ac_ext <<_ACEOF
21537/* confdefs.h. */
21538_ACEOF
21539cat confdefs.h >>conftest.$ac_ext
21540cat >>conftest.$ac_ext <<_ACEOF
21541/* end confdefs.h. */
21542#include <sys/stat.h>
21543int
21544main ()
21545{
21546
21547struct stat st;
21548st.st_mtimespec.tv_nsec = 1;
21549
21550 ;
21551 return 0;
21552}
21553_ACEOF
21554rm -f conftest.$ac_objext
21555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21556 (eval $ac_compile) 2>conftest.er1
21557 ac_status=$?
21558 grep -v '^ *+' conftest.er1 >conftest.err
21559 rm -f conftest.er1
21560 cat conftest.err >&5
21561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21562 (exit $ac_status); } &&
21563 { ac_try='test -z "$ac_c_werror_flag"
21564 || test ! -s conftest.err'
21565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21566 (eval $ac_try) 2>&5
21567 ac_status=$?
21568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21569 (exit $ac_status); }; } &&
21570 { ac_try='test -s conftest.$ac_objext'
21571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21572 (eval $ac_try) 2>&5
21573 ac_status=$?
21574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21575 (exit $ac_status); }; }; then
21576 ac_cv_stat_tv_nsec2=yes
21577else
21578 echo "$as_me: failed program was:" >&5
21579sed 's/^/| /' conftest.$ac_ext >&5
21580
21581ac_cv_stat_tv_nsec2=no
21582fi
21583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21584fi
21585
21586echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
21587echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
21588if test "$ac_cv_stat_tv_nsec2" = yes
21589then
21590
21591cat >>confdefs.h <<\_ACEOF
21592#define HAVE_STAT_TV_NSEC2 1
21593_ACEOF
21594
21595fi
21596
Jack Jansen666b1e72001-10-31 12:11:48 +000021597# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000021598echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
21599echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
21600if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
21601 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021602else
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021604/* confdefs.h. */
21605_ACEOF
21606cat confdefs.h >>conftest.$ac_ext
21607cat >>conftest.$ac_ext <<_ACEOF
21608/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021609#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021610int
21611main ()
21612{
Jack Jansen666b1e72001-10-31 12:11:48 +000021613
21614 int rtn;
21615 rtn = mvwdelch(0,0,0);
21616
Martin v. Löwis11437992002-04-12 09:54:03 +000021617 ;
21618 return 0;
21619}
21620_ACEOF
21621rm -f conftest.$ac_objext
21622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021623 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021625 grep -v '^ *+' conftest.er1 >conftest.err
21626 rm -f conftest.er1
21627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21629 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021630 { ac_try='test -z "$ac_c_werror_flag"
21631 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21633 (eval $ac_try) 2>&5
21634 ac_status=$?
21635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21636 (exit $ac_status); }; } &&
21637 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21639 (eval $ac_try) 2>&5
21640 ac_status=$?
21641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21642 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021643 ac_cv_mvwdelch_is_expression=yes
21644else
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021646sed 's/^/| /' conftest.$ac_ext >&5
21647
Martin v. Löwis11437992002-04-12 09:54:03 +000021648ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021649fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021651fi
21652
Martin v. Löwis11437992002-04-12 09:54:03 +000021653echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
21654echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021655
21656if test "$ac_cv_mvwdelch_is_expression" = yes
21657then
Martin v. Löwis11437992002-04-12 09:54:03 +000021658
21659cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021660#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021661_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021662
21663fi
21664
Martin v. Löwis11437992002-04-12 09:54:03 +000021665echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
21666echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
21667if test "${ac_cv_window_has_flags+set}" = set; then
21668 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021669else
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021676#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021677int
21678main ()
21679{
Jack Jansen666b1e72001-10-31 12:11:48 +000021680
21681 WINDOW *w;
21682 w->_flags = 0;
21683
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 ;
21685 return 0;
21686}
21687_ACEOF
21688rm -f conftest.$ac_objext
21689if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021690 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021692 grep -v '^ *+' conftest.er1 >conftest.err
21693 rm -f conftest.er1
21694 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21696 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021697 { ac_try='test -z "$ac_c_werror_flag"
21698 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021699 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21700 (eval $ac_try) 2>&5
21701 ac_status=$?
21702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21703 (exit $ac_status); }; } &&
21704 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21706 (eval $ac_try) 2>&5
21707 ac_status=$?
21708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21709 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021710 ac_cv_window_has_flags=yes
21711else
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021713sed 's/^/| /' conftest.$ac_ext >&5
21714
Martin v. Löwis11437992002-04-12 09:54:03 +000021715ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021716fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021717rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021718fi
21719
Martin v. Löwis11437992002-04-12 09:54:03 +000021720echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21721echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021722
Jack Jansen666b1e72001-10-31 12:11:48 +000021723
21724if test "$ac_cv_window_has_flags" = yes
21725then
Martin v. Löwis11437992002-04-12 09:54:03 +000021726
21727cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021728#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021729_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021730
21731fi
21732
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021733echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21734echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21735
21736if test -e /dev/ptmx
21737then
21738 echo "$as_me:$LINENO: result: yes" >&5
21739echo "${ECHO_T}yes" >&6
21740
21741cat >>confdefs.h <<\_ACEOF
21742#define HAVE_DEV_PTMX 1
21743_ACEOF
21744
21745else
21746 echo "$as_me:$LINENO: result: no" >&5
21747echo "${ECHO_T}no" >&6
21748fi
21749
Neal Norwitz865400f2003-03-21 01:42:58 +000021750echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21751echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21752
21753if test -e /dev/ptc
21754then
21755 echo "$as_me:$LINENO: result: yes" >&5
21756echo "${ECHO_T}yes" >&6
21757
21758cat >>confdefs.h <<\_ACEOF
21759#define HAVE_DEV_PTC 1
21760_ACEOF
21761
21762else
21763 echo "$as_me:$LINENO: result: no" >&5
21764echo "${ECHO_T}no" >&6
21765fi
21766
Martin v. Löwis11437992002-04-12 09:54:03 +000021767echo "$as_me:$LINENO: checking for socklen_t" >&5
21768echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21769if test "${ac_cv_type_socklen_t+set}" = set; then
21770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021771else
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021773/* confdefs.h. */
21774_ACEOF
21775cat confdefs.h >>conftest.$ac_ext
21776cat >>conftest.$ac_ext <<_ACEOF
21777/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021778
21779#ifdef HAVE_SYS_TYPES_H
21780#include <sys/types.h>
21781#endif
21782#ifdef HAVE_SYS_SOCKET_H
21783#include <sys/socket.h>
21784#endif
21785
21786
Martin v. Löwis11437992002-04-12 09:54:03 +000021787int
21788main ()
21789{
21790if ((socklen_t *) 0)
21791 return 0;
21792if (sizeof (socklen_t))
21793 return 0;
21794 ;
21795 return 0;
21796}
21797_ACEOF
21798rm -f conftest.$ac_objext
21799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021800 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802 grep -v '^ *+' conftest.er1 >conftest.err
21803 rm -f conftest.er1
21804 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21806 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021807 { ac_try='test -z "$ac_c_werror_flag"
21808 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21810 (eval $ac_try) 2>&5
21811 ac_status=$?
21812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21813 (exit $ac_status); }; } &&
21814 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21816 (eval $ac_try) 2>&5
21817 ac_status=$?
21818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21819 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021820 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021821else
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021823sed 's/^/| /' conftest.$ac_ext >&5
21824
Martin v. Löwis11437992002-04-12 09:54:03 +000021825ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021826fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021828fi
21829echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21830echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21831if test $ac_cv_type_socklen_t = yes; then
21832 :
21833else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021834
Martin v. Löwis01c04012002-11-11 14:58:44 +000021835cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021836#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021837_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021838
21839fi
21840
Michael W. Hudson54241132001-12-07 15:38:26 +000021841
Michael W. Hudson54241132001-12-07 15:38:26 +000021842
21843
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021844for h in `(cd $srcdir;echo Python/thread_*.h)`
21845do
21846 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21847done
21848
Michael W. Hudson54241132001-12-07 15:38:26 +000021849
Neal Norwitzd24499d2005-12-18 21:36:39 +000021850SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021851echo "$as_me:$LINENO: checking for build directories" >&5
21852echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021853for dir in $SRCDIRS; do
21854 if test ! -d $dir; then
21855 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021856 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021857done
Martin v. Löwis11437992002-04-12 09:54:03 +000021858echo "$as_me:$LINENO: result: done" >&5
21859echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021860
Guido van Rossum627b2d71993-12-24 10:39:16 +000021861# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021862 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021863
Martin v. Löwis11437992002-04-12 09:54:03 +000021864cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021865# This file is a shell script that caches the results of configure
21866# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021867# scripts and configure runs, see configure's option --config-cache.
21868# It is not useful on other systems. If it contains results you don't
21869# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021870#
Martin v. Löwis11437992002-04-12 09:54:03 +000021871# config.status only pays attention to the cache file if you give it
21872# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021873#
Skip Montanaro6dead952003-09-25 14:50:04 +000021874# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021875# loading this file, other *unset* `ac_cv_foo' will be assigned the
21876# following values.
21877
21878_ACEOF
21879
Guido van Rossumf78abae1997-01-21 22:02:36 +000021880# The following way of writing the cache mishandles newlines in values,
21881# but we know of no workaround that is simple, portable, and efficient.
21882# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021883# Ultrix sh set writes to stderr and can't be redirected directly,
21884# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021885{
21886 (set) 2>&1 |
21887 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21888 *ac_space=\ *)
21889 # `set' does not quote correctly, so add quotes (double-quote
21890 # substitution turns \\\\ into \\, and sed turns \\ into \).
21891 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021892 "s/'/'\\\\''/g;
21893 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021894 ;;
21895 *)
21896 # `set' quotes correctly as required by POSIX, so do not add quotes.
21897 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021898 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021899 ;;
21900 esac;
21901} |
21902 sed '
21903 t clear
21904 : clear
21905 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21906 t end
21907 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21908 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021909if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021910 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021911 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21912 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021913 else
21914 echo "not updating unwritable cache $cache_file"
21915 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021916fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021917rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021919test "x$prefix" = xNONE && prefix=$ac_default_prefix
21920# Let make expand exec_prefix.
21921test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021922
Martin v. Löwis11437992002-04-12 09:54:03 +000021923# VPATH may cause trouble with some makes, so we remove $(srcdir),
21924# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21925# trailing colons and then remove the whole line if VPATH becomes empty
21926# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021927if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021928 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021929s/:*\$(srcdir):*/:/;
21930s/:*\${srcdir}:*/:/;
21931s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021932s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021933s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021934s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021935}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021936fi
21937
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021938DEFS=-DHAVE_CONFIG_H
21939
Skip Montanaro6dead952003-09-25 14:50:04 +000021940ac_libobjs=
21941ac_ltlibobjs=
21942for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21943 # 1. Remove the extension, and $U if already installed.
21944 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021945 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021946 # 2. Add them.
21947 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21948 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21949done
21950LIBOBJS=$ac_libobjs
21951
21952LTLIBOBJS=$ac_ltlibobjs
21953
21954
Martin v. Löwis11437992002-04-12 09:54:03 +000021955
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021956: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021957ac_clean_files_save=$ac_clean_files
21958ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21959{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21960echo "$as_me: creating $CONFIG_STATUS" >&6;}
21961cat >$CONFIG_STATUS <<_ACEOF
21962#! $SHELL
21963# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021964# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021965# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021966# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021967
Martin v. Löwis11437992002-04-12 09:54:03 +000021968debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021969ac_cs_recheck=false
21970ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021971SHELL=\${CONFIG_SHELL-$SHELL}
21972_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021973
Martin v. Löwis11437992002-04-12 09:54:03 +000021974cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021975## --------------------- ##
21976## M4sh Initialization. ##
21977## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021978
Martin v. Löwis11437992002-04-12 09:54:03 +000021979# Be Bourne compatible
21980if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21981 emulate sh
21982 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021983 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21984 # is contrary to our usage. Disable this feature.
21985 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021986elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21987 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021988fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021989DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021990
Martin v. Löwis11437992002-04-12 09:54:03 +000021991# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021992if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021993 as_unset=unset
21994else
21995 as_unset=false
21996fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021997
Skip Montanaro6dead952003-09-25 14:50:04 +000021998
21999# Work around bugs in pre-3.0 UWIN ksh.
22000$as_unset ENV MAIL MAILPATH
22001PS1='$ '
22002PS2='> '
22003PS4='+ '
22004
22005# NLS nuisances.
22006for as_var in \
22007 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22008 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22009 LC_TELEPHONE LC_TIME
22010do
Skip Montanarof0d5f792004-08-15 14:08:23 +000022011 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000022012 eval $as_var=C; export $as_var
22013 else
22014 $as_unset $as_var
22015 fi
22016done
22017
22018# Required to use basename.
22019if expr a : '\(a\)' >/dev/null 2>&1; then
22020 as_expr=expr
22021else
22022 as_expr=false
22023fi
22024
22025if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22026 as_basename=basename
22027else
22028 as_basename=false
22029fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022030
22031
22032# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000022033as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022034$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22035 X"$0" : 'X\(//\)$' \| \
22036 X"$0" : 'X\(/\)$' \| \
22037 . : '\(.\)' 2>/dev/null ||
22038echo X/"$0" |
22039 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22040 /^X\/\(\/\/\)$/{ s//\1/; q; }
22041 /^X\/\(\/\).*/{ s//\1/; q; }
22042 s/.*/./; q'`
22043
Skip Montanaro6dead952003-09-25 14:50:04 +000022044
Martin v. Löwis11437992002-04-12 09:54:03 +000022045# PATH needs CR, and LINENO needs CR and PATH.
22046# Avoid depending upon Character Ranges.
22047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22050as_cr_digits='0123456789'
22051as_cr_alnum=$as_cr_Letters$as_cr_digits
22052
22053# The user is always right.
22054if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022055 echo "#! /bin/sh" >conf$$.sh
22056 echo "exit 0" >>conf$$.sh
22057 chmod +x conf$$.sh
22058 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022059 PATH_SEPARATOR=';'
22060 else
22061 PATH_SEPARATOR=:
22062 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022063 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000022064fi
22065
22066
22067 as_lineno_1=$LINENO
22068 as_lineno_2=$LINENO
22069 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22070 test "x$as_lineno_1" != "x$as_lineno_2" &&
22071 test "x$as_lineno_3" = "x$as_lineno_2" || {
22072 # Find who we are. Look in the path if we contain no path at all
22073 # relative or not.
22074 case $0 in
22075 *[\\/]* ) as_myself=$0 ;;
22076 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22077for as_dir in $PATH
22078do
22079 IFS=$as_save_IFS
22080 test -z "$as_dir" && as_dir=.
22081 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22082done
22083
22084 ;;
22085 esac
22086 # We did not find ourselves, most probably we were run as `sh COMMAND'
22087 # in which case we are not to be found in the path.
22088 if test "x$as_myself" = x; then
22089 as_myself=$0
22090 fi
22091 if test ! -f "$as_myself"; then
22092 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22093echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22094 { (exit 1); exit 1; }; }
22095 fi
22096 case $CONFIG_SHELL in
22097 '')
22098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22099for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22100do
22101 IFS=$as_save_IFS
22102 test -z "$as_dir" && as_dir=.
22103 for as_base in sh bash ksh sh5; do
22104 case $as_dir in
22105 /*)
22106 if ("$as_dir/$as_base" -c '
22107 as_lineno_1=$LINENO
22108 as_lineno_2=$LINENO
22109 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22110 test "x$as_lineno_1" != "x$as_lineno_2" &&
22111 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022112 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22113 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022114 CONFIG_SHELL=$as_dir/$as_base
22115 export CONFIG_SHELL
22116 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22117 fi;;
22118 esac
22119 done
22120done
22121;;
Jack Jansendd19cf82001-12-06 22:36:17 +000022122 esac
22123
Martin v. Löwis11437992002-04-12 09:54:03 +000022124 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22125 # uniformly replaced by the line number. The first 'sed' inserts a
22126 # line-number line before each line; the second 'sed' does the real
22127 # work. The second script uses 'N' to pair each line-number line
22128 # with the numbered line, and appends trailing '-' during
22129 # substitution so that $LINENO is not a special case at line end.
22130 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22131 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22132 sed '=' <$as_myself |
22133 sed '
22134 N
22135 s,$,-,
22136 : loop
22137 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22138 t loop
22139 s,-$,,
22140 s,^['$as_cr_digits']*\n,,
22141 ' >$as_me.lineno &&
22142 chmod +x $as_me.lineno ||
22143 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22144echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22145 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022146
Martin v. Löwis11437992002-04-12 09:54:03 +000022147 # Don't try to exec as it changes $[0], causing all sort of problems
22148 # (the dirname of $[0] is not the place where we might find the
22149 # original and so on. Autoconf is especially sensible to this).
22150 . ./$as_me.lineno
22151 # Exit status is that of the last command.
22152 exit
22153}
22154
22155
22156case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22157 *c*,-n*) ECHO_N= ECHO_C='
22158' ECHO_T=' ' ;;
22159 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22160 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22161esac
22162
22163if expr a : '\(a\)' >/dev/null 2>&1; then
22164 as_expr=expr
22165else
22166 as_expr=false
22167fi
22168
22169rm -f conf$$ conf$$.exe conf$$.file
22170echo >conf$$.file
22171if ln -s conf$$.file conf$$ 2>/dev/null; then
22172 # We could just check for DJGPP; but this test a) works b) is more generic
22173 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22174 if test -f conf$$.exe; then
22175 # Don't use ln at all; we don't have any links
22176 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022177 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022178 as_ln_s='ln -s'
22179 fi
22180elif ln conf$$.file conf$$ 2>/dev/null; then
22181 as_ln_s=ln
22182else
22183 as_ln_s='cp -p'
22184fi
22185rm -f conf$$ conf$$.exe conf$$.file
22186
Skip Montanaro6dead952003-09-25 14:50:04 +000022187if mkdir -p . 2>/dev/null; then
22188 as_mkdir_p=:
22189else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022190 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000022191 as_mkdir_p=false
22192fi
22193
Martin v. Löwis11437992002-04-12 09:54:03 +000022194as_executable_p="test -f"
22195
22196# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022197as_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 +000022198
22199# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022200as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000022201
22202
22203# IFS
22204# We need space, tab and new line, in precisely that order.
22205as_nl='
22206'
22207IFS=" $as_nl"
22208
22209# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000022210$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000022211
22212exec 6>&1
22213
22214# Open the log real soon, to keep \$[0] and so on meaningful, and to
22215# report actual input values of CONFIG_FILES etc. instead of their
22216# values after options handling. Logging --version etc. is OK.
22217exec 5>>config.log
22218{
22219 echo
22220 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22221## Running $as_me. ##
22222_ASBOX
22223} >&5
22224cat >&5 <<_CSEOF
22225
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022226This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000022227generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000022228
22229 CONFIG_FILES = $CONFIG_FILES
22230 CONFIG_HEADERS = $CONFIG_HEADERS
22231 CONFIG_LINKS = $CONFIG_LINKS
22232 CONFIG_COMMANDS = $CONFIG_COMMANDS
22233 $ $0 $@
22234
22235_CSEOF
22236echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22237echo >&5
22238_ACEOF
22239
22240# Files that config.status was made for.
22241if test -n "$ac_config_files"; then
22242 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22243fi
22244
22245if test -n "$ac_config_headers"; then
22246 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22247fi
22248
22249if test -n "$ac_config_links"; then
22250 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22251fi
22252
22253if test -n "$ac_config_commands"; then
22254 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22255fi
22256
22257cat >>$CONFIG_STATUS <<\_ACEOF
22258
22259ac_cs_usage="\
22260\`$as_me' instantiates files from templates according to the
22261current configuration.
22262
22263Usage: $0 [OPTIONS] [FILE]...
22264
22265 -h, --help print this help, then exit
22266 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000022267 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000022268 -d, --debug don't remove temporary files
22269 --recheck update $as_me by reconfiguring in the same conditions
22270 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022271 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022272 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022273 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022274
22275Configuration files:
22276$config_files
22277
22278Configuration headers:
22279$config_headers
22280
22281Report bugs to <bug-autoconf@gnu.org>."
22282_ACEOF
22283
22284cat >>$CONFIG_STATUS <<_ACEOF
22285ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022286python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022287configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000022288 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22289
Skip Montanarof0d5f792004-08-15 14:08:23 +000022290Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000022291This config.status script is free software; the Free Software Foundation
22292gives unlimited permission to copy, distribute and modify it."
22293srcdir=$srcdir
22294INSTALL="$INSTALL"
22295_ACEOF
22296
22297cat >>$CONFIG_STATUS <<\_ACEOF
22298# If no file are specified by the user, then we need to provide default
22299# value. By we need to know if files were specified by the user.
22300ac_need_defaults=:
22301while test $# != 0
22302do
22303 case $1 in
22304 --*=*)
22305 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22306 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022307 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022309 -*)
22310 ac_option=$1
22311 ac_optarg=$2
22312 ac_shift=shift
22313 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022314 *) # This is not an option, so the user has probably given explicit
22315 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000022316 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000022317 ac_need_defaults=false;;
22318 esac
22319
Skip Montanaro6dead952003-09-25 14:50:04 +000022320 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000022321 # Handling of the options.
22322_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022323cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022324 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22325 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022326 --version | --vers* | -V )
22327 echo "$ac_cs_version"; exit 0 ;;
22328 --he | --h)
22329 # Conflict between --help and --header
22330 { { echo "$as_me:$LINENO: error: ambiguous option: $1
22331Try \`$0 --help' for more information." >&5
22332echo "$as_me: error: ambiguous option: $1
22333Try \`$0 --help' for more information." >&2;}
22334 { (exit 1); exit 1; }; };;
22335 --help | --hel | -h )
22336 echo "$ac_cs_usage"; exit 0 ;;
22337 --debug | --d* | -d )
22338 debug=: ;;
22339 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000022340 $ac_shift
22341 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022342 ac_need_defaults=false;;
22343 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000022344 $ac_shift
22345 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022346 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22348 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22349 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022350
22351 # This is an error.
22352 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22353Try \`$0 --help' for more information." >&5
22354echo "$as_me: error: unrecognized option: $1
22355Try \`$0 --help' for more information." >&2;}
22356 { (exit 1); exit 1; }; } ;;
22357
22358 *) ac_config_targets="$ac_config_targets $1" ;;
22359
22360 esac
22361 shift
22362done
22363
Skip Montanaro6dead952003-09-25 14:50:04 +000022364ac_configure_extra_args=
22365
22366if $ac_cs_silent; then
22367 exec 6>/dev/null
22368 ac_configure_extra_args="$ac_configure_extra_args --silent"
22369fi
22370
22371_ACEOF
22372cat >>$CONFIG_STATUS <<_ACEOF
22373if \$ac_cs_recheck; then
22374 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22375 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22376fi
22377
Martin v. Löwis11437992002-04-12 09:54:03 +000022378_ACEOF
22379
22380
22381
22382
22383
22384cat >>$CONFIG_STATUS <<\_ACEOF
22385for ac_config_target in $ac_config_targets
22386do
22387 case "$ac_config_target" in
22388 # Handling of arguments.
22389 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
22390 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
22391 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
22392 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22393echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22394 { (exit 1); exit 1; }; };;
22395 esac
22396done
22397
22398# If the user did not use the arguments to specify the items to instantiate,
22399# then the envvar interface is used. Set only those that are not.
22400# We use the long form for the default assignment because of an extremely
22401# bizarre bug on SunOS 4.1.3.
22402if $ac_need_defaults; then
22403 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22404 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22405fi
22406
Skip Montanaro6dead952003-09-25 14:50:04 +000022407# Have a temporary directory for convenience. Make it in the build tree
22408# simply because there is no reason to put it here, and in addition,
22409# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000022410# Create a temporary directory, and hook for its removal unless debugging.
22411$debug ||
22412{
22413 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22414 trap '{ (exit 1); exit 1; }' 1 2 13 15
22415}
22416
22417# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000022418
Martin v. Löwis11437992002-04-12 09:54:03 +000022419{
Skip Montanaro6dead952003-09-25 14:50:04 +000022420 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000022421 test -n "$tmp" && test -d "$tmp"
22422} ||
22423{
Skip Montanaro6dead952003-09-25 14:50:04 +000022424 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 (umask 077 && mkdir $tmp)
22426} ||
22427{
Skip Montanaro6dead952003-09-25 14:50:04 +000022428 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000022429 { (exit 1); exit 1; }
22430}
22431
22432_ACEOF
22433
22434cat >>$CONFIG_STATUS <<_ACEOF
22435
22436#
22437# CONFIG_FILES section.
22438#
22439
22440# No need to generate the scripts if there are no CONFIG_FILES.
22441# This happens for instance when ./config.status config.h
22442if test -n "\$CONFIG_FILES"; then
22443 # Protect against being on the right side of a sed subst in config.status.
22444 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22445 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22446s,@SHELL@,$SHELL,;t t
22447s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22448s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22449s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22450s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22451s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22452s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22453s,@exec_prefix@,$exec_prefix,;t t
22454s,@prefix@,$prefix,;t t
22455s,@program_transform_name@,$program_transform_name,;t t
22456s,@bindir@,$bindir,;t t
22457s,@sbindir@,$sbindir,;t t
22458s,@libexecdir@,$libexecdir,;t t
22459s,@datadir@,$datadir,;t t
22460s,@sysconfdir@,$sysconfdir,;t t
22461s,@sharedstatedir@,$sharedstatedir,;t t
22462s,@localstatedir@,$localstatedir,;t t
22463s,@libdir@,$libdir,;t t
22464s,@includedir@,$includedir,;t t
22465s,@oldincludedir@,$oldincludedir,;t t
22466s,@infodir@,$infodir,;t t
22467s,@mandir@,$mandir,;t t
22468s,@build_alias@,$build_alias,;t t
22469s,@host_alias@,$host_alias,;t t
22470s,@target_alias@,$target_alias,;t t
22471s,@DEFS@,$DEFS,;t t
22472s,@ECHO_C@,$ECHO_C,;t t
22473s,@ECHO_N@,$ECHO_N,;t t
22474s,@ECHO_T@,$ECHO_T,;t t
22475s,@LIBS@,$LIBS,;t t
22476s,@VERSION@,$VERSION,;t t
22477s,@SOVERSION@,$SOVERSION,;t t
22478s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
22479s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
22480s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
22481s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
22482s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
22483s,@MACHDEP@,$MACHDEP,;t t
22484s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000022485s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000022486s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000022487s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022488s,@CXX@,$CXX,;t t
22489s,@MAINOBJ@,$MAINOBJ,;t t
22490s,@EXEEXT@,$EXEEXT,;t t
22491s,@CC@,$CC,;t t
22492s,@CFLAGS@,$CFLAGS,;t t
22493s,@LDFLAGS@,$LDFLAGS,;t t
22494s,@CPPFLAGS@,$CPPFLAGS,;t t
22495s,@ac_ct_CC@,$ac_ct_CC,;t t
22496s,@OBJEXT@,$OBJEXT,;t t
22497s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022498s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022499s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
22500s,@LIBRARY@,$LIBRARY,;t t
22501s,@LDLIBRARY@,$LDLIBRARY,;t t
22502s,@DLLLIBRARY@,$DLLLIBRARY,;t t
22503s,@BLDLIBRARY@,$BLDLIBRARY,;t t
22504s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
22505s,@INSTSONAME@,$INSTSONAME,;t t
22506s,@RUNSHARED@,$RUNSHARED,;t t
22507s,@LINKCC@,$LINKCC,;t t
22508s,@RANLIB@,$RANLIB,;t t
22509s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22510s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000022511s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022512s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22513s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22514s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22515s,@LN@,$LN,;t t
22516s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000022517s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000022518s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022519s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
22520s,@SO@,$SO,;t t
22521s,@LDSHARED@,$LDSHARED,;t t
22522s,@BLDSHARED@,$BLDSHARED,;t t
22523s,@CCSHARED@,$CCSHARED,;t t
22524s,@LINKFORSHARED@,$LINKFORSHARED,;t t
22525s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000022526s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022527s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
22528s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
22529s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
22530s,@LDLAST@,$LDLAST,;t t
22531s,@THREADOBJ@,$THREADOBJ,;t t
22532s,@DLINCLDIR@,$DLINCLDIR,;t t
22533s,@DYNLOADFILE@,$DYNLOADFILE,;t t
22534s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000022535s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022536s,@LIBOBJS@,$LIBOBJS,;t t
22537s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
22538s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
22539s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
22540s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
22541s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
22542s,@LIBM@,$LIBM,;t t
22543s,@LIBC@,$LIBC,;t t
22544s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
22545s,@THREADHEADERS@,$THREADHEADERS,;t t
22546s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022547s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022548CEOF
22549
22550_ACEOF
22551
22552 cat >>$CONFIG_STATUS <<\_ACEOF
22553 # Split the substitutions into bite-sized pieces for seds with
22554 # small command number limits, like on Digital OSF/1 and HP-UX.
22555 ac_max_sed_lines=48
22556 ac_sed_frag=1 # Number of current file.
22557 ac_beg=1 # First line for current file.
22558 ac_end=$ac_max_sed_lines # Line after last line for current file.
22559 ac_more_lines=:
22560 ac_sed_cmds=
22561 while $ac_more_lines; do
22562 if test $ac_beg -gt 1; then
22563 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22564 else
22565 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22566 fi
22567 if test ! -s $tmp/subs.frag; then
22568 ac_more_lines=false
22569 else
22570 # The purpose of the label and of the branching condition is to
22571 # speed up the sed processing (if there are no `@' at all, there
22572 # is no need to browse any of the substitutions).
22573 # These are the two extra sed commands mentioned above.
22574 (echo ':t
22575 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22576 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000022577 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022578 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022579 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 fi
22581 ac_sed_frag=`expr $ac_sed_frag + 1`
22582 ac_beg=$ac_end
22583 ac_end=`expr $ac_end + $ac_max_sed_lines`
22584 fi
22585 done
22586 if test -z "$ac_sed_cmds"; then
22587 ac_sed_cmds=cat
22588 fi
22589fi # test -n "$CONFIG_FILES"
22590
22591_ACEOF
22592cat >>$CONFIG_STATUS <<\_ACEOF
22593for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22594 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22595 case $ac_file in
22596 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022597 cat >$tmp/stdin
22598 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22599 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022600 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022601 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022602 * ) ac_file_in=$ac_file.in ;;
22603 esac
22604
22605 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22606 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22607$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022608 X"$ac_file" : 'X\(//\)[^/]' \| \
22609 X"$ac_file" : 'X\(//\)$' \| \
22610 X"$ac_file" : 'X\(/\)' \| \
22611 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022612echo X"$ac_file" |
22613 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22614 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22615 /^X\(\/\/\)$/{ s//\1/; q; }
22616 /^X\(\/\).*/{ s//\1/; q; }
22617 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022618 { if $as_mkdir_p; then
22619 mkdir -p "$ac_dir"
22620 else
22621 as_dir="$ac_dir"
22622 as_dirs=
22623 while test ! -d "$as_dir"; do
22624 as_dirs="$as_dir $as_dirs"
22625 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22626$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022627 X"$as_dir" : 'X\(//\)[^/]' \| \
22628 X"$as_dir" : 'X\(//\)$' \| \
22629 X"$as_dir" : 'X\(/\)' \| \
22630 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022631echo X"$as_dir" |
22632 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22633 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22634 /^X\(\/\/\)$/{ s//\1/; q; }
22635 /^X\(\/\).*/{ s//\1/; q; }
22636 s/.*/./; q'`
22637 done
22638 test ! -n "$as_dirs" || mkdir $as_dirs
22639 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22640echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22641 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022642
22643 ac_builddir=.
22644
22645if test "$ac_dir" != .; then
22646 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22647 # A "../" for each directory in $ac_dir_suffix.
22648 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22649else
22650 ac_dir_suffix= ac_top_builddir=
22651fi
22652
22653case $srcdir in
22654 .) # No --srcdir option. We are building in place.
22655 ac_srcdir=.
22656 if test -z "$ac_top_builddir"; then
22657 ac_top_srcdir=.
22658 else
22659 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22660 fi ;;
22661 [\\/]* | ?:[\\/]* ) # Absolute path.
22662 ac_srcdir=$srcdir$ac_dir_suffix;
22663 ac_top_srcdir=$srcdir ;;
22664 *) # Relative path.
22665 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22666 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22667esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000022668
22669# Do not use `cd foo && pwd` to compute absolute paths, because
22670# the directories may not exist.
22671case `pwd` in
22672.) ac_abs_builddir="$ac_dir";;
22673*)
22674 case "$ac_dir" in
22675 .) ac_abs_builddir=`pwd`;;
22676 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22677 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22678 esac;;
22679esac
22680case $ac_abs_builddir in
22681.) ac_abs_top_builddir=${ac_top_builddir}.;;
22682*)
22683 case ${ac_top_builddir}. in
22684 .) ac_abs_top_builddir=$ac_abs_builddir;;
22685 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22686 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22687 esac;;
22688esac
22689case $ac_abs_builddir in
22690.) ac_abs_srcdir=$ac_srcdir;;
22691*)
22692 case $ac_srcdir in
22693 .) ac_abs_srcdir=$ac_abs_builddir;;
22694 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22695 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22696 esac;;
22697esac
22698case $ac_abs_builddir in
22699.) ac_abs_top_srcdir=$ac_top_srcdir;;
22700*)
22701 case $ac_top_srcdir in
22702 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22703 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22704 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22705 esac;;
22706esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022707
22708
22709 case $INSTALL in
22710 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22711 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22712 esac
22713
Brett Cannon43802422005-02-10 20:48:03 +000022714 if test x"$ac_file" != x-; then
22715 { echo "$as_me:$LINENO: creating $ac_file" >&5
22716echo "$as_me: creating $ac_file" >&6;}
22717 rm -f "$ac_file"
22718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022719 # Let's still pretend it is `configure' which instantiates (i.e., don't
22720 # use $as_me), people would be surprised to read:
22721 # /* config.h. Generated by config.status. */
22722 if test x"$ac_file" = x-; then
22723 configure_input=
22724 else
22725 configure_input="$ac_file. "
22726 fi
22727 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022728 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
22730 # First look for the input files in the build tree, otherwise in the
22731 # src tree.
22732 ac_file_inputs=`IFS=:
22733 for f in $ac_file_in; do
22734 case $f in
22735 -) echo $tmp/stdin ;;
22736 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022737 # Absolute (can't be DOS-style, as IFS=:)
22738 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022739echo "$as_me: error: cannot find input file: $f" >&2;}
22740 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022741 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022742 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022743 if test -f "$f"; then
22744 # Build tree
22745 echo "$f"
22746 elif test -f "$srcdir/$f"; then
22747 # Source tree
22748 echo "$srcdir/$f"
22749 else
22750 # /dev/null tree
22751 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022752echo "$as_me: error: cannot find input file: $f" >&2;}
22753 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022754 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022755 esac
22756 done` || { (exit 1); exit 1; }
22757_ACEOF
22758cat >>$CONFIG_STATUS <<_ACEOF
22759 sed "$ac_vpsub
22760$extrasub
22761_ACEOF
22762cat >>$CONFIG_STATUS <<\_ACEOF
22763:t
22764/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22765s,@configure_input@,$configure_input,;t t
22766s,@srcdir@,$ac_srcdir,;t t
22767s,@abs_srcdir@,$ac_abs_srcdir,;t t
22768s,@top_srcdir@,$ac_top_srcdir,;t t
22769s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22770s,@builddir@,$ac_builddir,;t t
22771s,@abs_builddir@,$ac_abs_builddir,;t t
22772s,@top_builddir@,$ac_top_builddir,;t t
22773s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22774s,@INSTALL@,$ac_INSTALL,;t t
22775" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22776 rm -f $tmp/stdin
22777 if test x"$ac_file" != x-; then
22778 mv $tmp/out $ac_file
22779 else
22780 cat $tmp/out
22781 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022782 fi
22783
Martin v. Löwis11437992002-04-12 09:54:03 +000022784done
22785_ACEOF
22786cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022787
Martin v. Löwis11437992002-04-12 09:54:03 +000022788#
22789# CONFIG_HEADER section.
22790#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022792# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22793# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022794#
22795# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022796ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22797ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022798ac_dC=' '
22799ac_dD=',;t'
22800# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022801ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022802ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022803ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022804ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022805
Martin v. Löwis11437992002-04-12 09:54:03 +000022806for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022807 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 case $ac_file in
22809 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022810 cat >$tmp/stdin
22811 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22812 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022813 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022814 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022815 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022816 esac
22817
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22819echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022820
Martin v. Löwis11437992002-04-12 09:54:03 +000022821 # First look for the input files in the build tree, otherwise in the
22822 # src tree.
22823 ac_file_inputs=`IFS=:
22824 for f in $ac_file_in; do
22825 case $f in
22826 -) echo $tmp/stdin ;;
22827 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022828 # Absolute (can't be DOS-style, as IFS=:)
22829 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022830echo "$as_me: error: cannot find input file: $f" >&2;}
22831 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022832 # Do quote $f, to prevent DOS paths from being IFS'd.
22833 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022834 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022835 if test -f "$f"; then
22836 # Build tree
22837 echo "$f"
22838 elif test -f "$srcdir/$f"; then
22839 # Source tree
22840 echo "$srcdir/$f"
22841 else
22842 # /dev/null tree
22843 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022844echo "$as_me: error: cannot find input file: $f" >&2;}
22845 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022846 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022847 esac
22848 done` || { (exit 1); exit 1; }
22849 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022850 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022851
Martin v. Löwis11437992002-04-12 09:54:03 +000022852_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022853
Martin v. Löwis11437992002-04-12 09:54:03 +000022854# Transform confdefs.h into two sed scripts, `conftest.defines' and
22855# `conftest.undefs', that substitutes the proper values into
22856# config.h.in to produce config.h. The first handles `#define'
22857# templates, and the second `#undef' templates.
22858# And first: Protect against being on the right side of a sed subst in
22859# config.status. Protect against being in an unquoted here document
22860# in config.status.
22861rm -f conftest.defines conftest.undefs
22862# Using a here document instead of a string reduces the quoting nightmare.
22863# Putting comments in sed scripts is not portable.
22864#
22865# `end' is used to avoid that the second main sed command (meant for
22866# 0-ary CPP macros) applies to n-ary macro definitions.
22867# See the Autoconf documentation for `clear'.
22868cat >confdef2sed.sed <<\_ACEOF
22869s/[\\&,]/\\&/g
22870s,[\\$`],\\&,g
22871t clear
22872: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022873s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022874t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022875s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022876: end
22877_ACEOF
22878# If some macros were called several times there might be several times
22879# the same #defines, which is useless. Nevertheless, we may not want to
22880# sort them, since we want the *last* AC-DEFINE to be honored.
22881uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22882sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22883rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022884
22885# This sed command replaces #undef with comments. This is necessary, for
22886# example, in the case of _POSIX_SOURCE, which is predefined and required
22887# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022888cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022889s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022890_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022891
Martin v. Löwis11437992002-04-12 09:54:03 +000022892# Break up conftest.defines because some shells have a limit on the size
22893# of here documents, and old seds have small limits too (100 cmds).
22894echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022895echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022896echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22897echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022898rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022899while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022900do
Martin v. Löwis11437992002-04-12 09:54:03 +000022901 # Write a limited-size here document to $tmp/defines.sed.
22902 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22903 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022904 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022905 # Work around the forget-to-reset-the-flag bug.
22906 echo 't clr' >>$CONFIG_STATUS
22907 echo ': clr' >>$CONFIG_STATUS
22908 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022909 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022910 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22911 rm -f $tmp/in
22912 mv $tmp/out $tmp/in
22913' >>$CONFIG_STATUS
22914 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22915 rm -f conftest.defines
22916 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022917done
Martin v. Löwis11437992002-04-12 09:54:03 +000022918rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022919echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022920echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022921
Martin v. Löwis11437992002-04-12 09:54:03 +000022922# Break up conftest.undefs because some shells have a limit on the size
22923# of here documents, and old seds have small limits too (100 cmds).
22924echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22925rm -f conftest.tail
22926while grep . conftest.undefs >/dev/null
22927do
22928 # Write a limited-size here document to $tmp/undefs.sed.
22929 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22930 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022931 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022932 # Work around the forget-to-reset-the-flag bug.
22933 echo 't clr' >>$CONFIG_STATUS
22934 echo ': clr' >>$CONFIG_STATUS
22935 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22936 echo 'CEOF
22937 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22938 rm -f $tmp/in
22939 mv $tmp/out $tmp/in
22940' >>$CONFIG_STATUS
22941 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22942 rm -f conftest.undefs
22943 mv conftest.tail conftest.undefs
22944done
22945rm -f conftest.undefs
22946
22947cat >>$CONFIG_STATUS <<\_ACEOF
22948 # Let's still pretend it is `configure' which instantiates (i.e., don't
22949 # use $as_me), people would be surprised to read:
22950 # /* config.h. Generated by config.status. */
22951 if test x"$ac_file" = x-; then
22952 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022953 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022954 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022956 cat $tmp/in >>$tmp/config.h
22957 rm -f $tmp/in
22958 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022959 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22961echo "$as_me: $ac_file is unchanged" >&6;}
22962 else
22963 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22964$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022965 X"$ac_file" : 'X\(//\)[^/]' \| \
22966 X"$ac_file" : 'X\(//\)$' \| \
22967 X"$ac_file" : 'X\(/\)' \| \
22968 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022969echo X"$ac_file" |
22970 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22971 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22972 /^X\(\/\/\)$/{ s//\1/; q; }
22973 /^X\(\/\).*/{ s//\1/; q; }
22974 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022975 { if $as_mkdir_p; then
22976 mkdir -p "$ac_dir"
22977 else
22978 as_dir="$ac_dir"
22979 as_dirs=
22980 while test ! -d "$as_dir"; do
22981 as_dirs="$as_dir $as_dirs"
22982 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22983$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022984 X"$as_dir" : 'X\(//\)[^/]' \| \
22985 X"$as_dir" : 'X\(//\)$' \| \
22986 X"$as_dir" : 'X\(/\)' \| \
22987 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022988echo X"$as_dir" |
22989 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22990 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22991 /^X\(\/\/\)$/{ s//\1/; q; }
22992 /^X\(\/\).*/{ s//\1/; q; }
22993 s/.*/./; q'`
22994 done
22995 test ! -n "$as_dirs" || mkdir $as_dirs
22996 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22997echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22998 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022999
Martin v. Löwis11437992002-04-12 09:54:03 +000023000 rm -f $ac_file
23001 mv $tmp/config.h $ac_file
23002 fi
23003 else
23004 cat $tmp/config.h
23005 rm -f $tmp/config.h
23006 fi
23007done
23008_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000023009
Martin v. Löwis11437992002-04-12 09:54:03 +000023010cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000023011
Martin v. Löwis11437992002-04-12 09:54:03 +000023012{ (exit 0); exit 0; }
23013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023014chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000023015ac_clean_files=$ac_clean_files_save
23016
23017
23018# configure is writing to config.log, and then calls config.status.
23019# config.status does its own redirection, appending to config.log.
23020# Unfortunately, on DOS this fails, as config.log is still kept open
23021# by configure, so config.status won't be able to write to it; its
23022# output is simply discarded. So we exec the FD to /dev/null,
23023# effectively closing config.log, so it can be properly (re)opened and
23024# appended to by config.status. When coming back to configure, we
23025# need to make the FD available again.
23026if test "$no_create" != yes; then
23027 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023028 ac_config_status_args=
23029 test "$silent" = yes &&
23030 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000023031 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000023032 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023033 exec 5>>config.log
23034 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23035 # would make configure fail if this is the last instruction.
23036 $ac_cs_success || { (exit 1); exit 1; }
23037fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000023038
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023039
23040echo "creating Setup"
23041if test ! -f Modules/Setup
23042then
23043 cp $srcdir/Modules/Setup.dist Modules/Setup
23044fi
23045
23046echo "creating Setup.local"
23047if test ! -f Modules/Setup.local
23048then
23049 echo "# Edit this file for local setup changes" >Modules/Setup.local
23050fi
23051
23052echo "creating Makefile"
23053$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
23054 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000023055 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000023056mv config.c Modules