blob: f1f7bdfdd27c70a4596d006bac46d629a3503f3c [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis9176fc12006-04-11 11:12:43 +00002# From configure.in Revision: 45264 .
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)
3795 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003796 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003797 if test "$Py_DEBUG" = 'true' ; then
3798 # Optimization messes up debuggers, so turn it off for
3799 # debug builds.
3800 OPT="-g -Wall -Wstrict-prototypes"
3801 else
3802 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003803 fi
3804 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003805 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806 OPT="-O3 -Wall -Wstrict-prototypes"
3807 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003808 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003809 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3811 ;;
3812 esac
Fred Drake109d9862001-07-11 06:27:56 +00003813 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003814
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003815 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003816 OPT="-O"
3817 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003818 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819
3820 # The current (beta) Monterey compiler dies with optimizations
3821 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003822 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003823 Monterey*)
3824 OPT=""
3825 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003826 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003827
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003828fi
3829
Skip Montanarodecc6a42003-01-01 20:07:49 +00003830
3831# tweak BASECFLAGS based on compiler and platform
3832case $GCC in
3833yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003834 # Python violates C99 rules, by casting between incompatible
3835 # pointer types. GCC may generate bad code as a result of that,
3836 # so use -fno-strict-aliasing if supported.
3837 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3838echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3839 ac_save_cc="$CC"
3840 CC="$CC -fno-strict-aliasing"
3841 if test "$cross_compiling" = yes; then
3842 ac_cv_no_strict_aliasing_ok=no
3843else
3844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003845/* confdefs.h. */
3846_ACEOF
3847cat confdefs.h >>conftest.$ac_ext
3848cat >>conftest.$ac_ext <<_ACEOF
3849/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003850int main() { return 0; }
3851_ACEOF
3852rm -f conftest$ac_exeext
3853if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3854 (eval $ac_link) 2>&5
3855 ac_status=$?
3856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3859 (eval $ac_try) 2>&5
3860 ac_status=$?
3861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3862 (exit $ac_status); }; }; then
3863 ac_cv_no_strict_aliasing_ok=yes
3864else
3865 echo "$as_me: program exited with status $ac_status" >&5
3866echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003867sed 's/^/| /' conftest.$ac_ext >&5
3868
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003869( exit $ac_status )
3870ac_cv_no_strict_aliasing_ok=no
3871fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003872rm -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 +00003873fi
3874 CC="$ac_save_cc"
3875 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3876echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3877 if test $ac_cv_no_strict_aliasing_ok = yes
3878 then
3879 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3880 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003881 case $ac_sys_system in
3882 SCO_SV*)
3883 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3884 ;;
3885 # is there any other compiler on Darwin besides gcc?
3886 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003887 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003888 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00003889 OSF*)
3890 BASECFLAGS="$BASECFLAGS -mieee"
3891 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003892 esac
3893 ;;
3894
3895*)
3896 case $ac_sys_system in
3897 OpenUNIX*|UnixWare*)
3898 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3899 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003900 OSF*)
3901 BASECFLAGS="$BASECFLAGS -ieee -std"
3902 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003903 SCO_SV*)
3904 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3905 ;;
3906 esac
3907 ;;
3908esac
3909
Fred Drakee1ceaa02001-12-04 20:55:47 +00003910if test "$Py_DEBUG" = 'true'; then
3911 :
3912else
3913 OPT="-DNDEBUG $OPT"
3914fi
3915
Guido van Rossum563e7081996-09-10 18:20:48 +00003916if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003917then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003918 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003919fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003920
Neal Norwitz020c46a2006-01-07 21:39:28 +00003921# disable check for icc since it seems to pass, but generates a warning
3922if test "$CC" = icc
3923then
3924 ac_cv_opt_olimit_ok=no
3925fi
3926
Martin v. Löwis11437992002-04-12 09:54:03 +00003927echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3928echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3929if test "${ac_cv_opt_olimit_ok+set}" = set; then
3930 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003931else
3932 ac_save_cc="$CC"
3933CC="$CC -OPT:Olimit=0"
3934if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003935 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003936else
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003938/* confdefs.h. */
3939_ACEOF
3940cat confdefs.h >>conftest.$ac_ext
3941cat >>conftest.$ac_ext <<_ACEOF
3942/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003943int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003944_ACEOF
3945rm -f conftest$ac_exeext
3946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3947 (eval $ac_link) 2>&5
3948 ac_status=$?
3949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3952 (eval $ac_try) 2>&5
3953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003956 ac_cv_opt_olimit_ok=yes
3957else
Martin v. Löwis11437992002-04-12 09:54:03 +00003958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003960sed 's/^/| /' conftest.$ac_ext >&5
3961
Martin v. Löwis11437992002-04-12 09:54:03 +00003962( exit $ac_status )
3963ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003964fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003966fi
Guido van Rossum91922671997-10-09 20:24:13 +00003967CC="$ac_save_cc"
3968fi
3969
Martin v. Löwis11437992002-04-12 09:54:03 +00003970echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3971echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003972if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003973 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003974 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3975 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3976 # environment?
3977 Darwin*)
3978 ;;
3979 *)
3980 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3981 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003982 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003983else
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3985echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3986 if test "${ac_cv_olimit_ok+set}" = set; then
3987 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003988else
3989 ac_save_cc="$CC"
3990 CC="$CC -Olimit 1500"
3991 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003992 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003993else
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003995/* confdefs.h. */
3996_ACEOF
3997cat confdefs.h >>conftest.$ac_ext
3998cat >>conftest.$ac_ext <<_ACEOF
3999/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004000int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004001_ACEOF
4002rm -f conftest$ac_exeext
4003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4004 (eval $ac_link) 2>&5
4005 ac_status=$?
4006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4009 (eval $ac_try) 2>&5
4010 ac_status=$?
4011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004013 ac_cv_olimit_ok=yes
4014else
Martin v. Löwis11437992002-04-12 09:54:03 +00004015 echo "$as_me: program exited with status $ac_status" >&5
4016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004017sed 's/^/| /' conftest.$ac_ext >&5
4018
Martin v. Löwis11437992002-04-12 09:54:03 +00004019( exit $ac_status )
4020ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004021fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004022rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004023fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004024 CC="$ac_save_cc"
4025fi
4026
Martin v. Löwis11437992002-04-12 09:54:03 +00004027 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4028echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004029 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004030 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004031 fi
4032fi
4033
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004034# On some compilers, pthreads are available without further options
4035# (e.g. MacOS X). On some of these systems, the compiler will not
4036# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4037# So we have to see first whether pthreads are available without
4038# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004039echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4040echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4041if test "${ac_cv_pthread_is_default+set}" = set; then
4042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004043else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004044 if test "$cross_compiling" = yes; then
4045 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004046else
Martin v. Löwis11437992002-04-12 09:54:03 +00004047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004048/* confdefs.h. */
4049_ACEOF
4050cat confdefs.h >>conftest.$ac_ext
4051cat >>conftest.$ac_ext <<_ACEOF
4052/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004053
Martin v. Löwis130fb172001-07-19 11:00:41 +00004054#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004055
4056void* routine(void* p){return NULL;}
4057
4058int main(){
4059 pthread_t p;
4060 if(pthread_create(&p,NULL,routine,NULL)!=0)
4061 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004062 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004063 return 0;
4064}
4065
Martin v. Löwis11437992002-04-12 09:54:03 +00004066_ACEOF
4067rm -f conftest$ac_exeext
4068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4069 (eval $ac_link) 2>&5
4070 ac_status=$?
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4074 (eval $ac_try) 2>&5
4075 ac_status=$?
4076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4077 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004078
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004079 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004080 ac_cv_kthread=no
4081 ac_cv_pthread=no
4082
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004083else
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 echo "$as_me: program exited with status $ac_status" >&5
4085echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004086sed 's/^/| /' conftest.$ac_ext >&5
4087
Martin v. Löwis11437992002-04-12 09:54:03 +00004088( exit $ac_status )
4089ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004090fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004091rm -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 +00004092fi
4093
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004094fi
4095
Martin v. Löwis11437992002-04-12 09:54:03 +00004096echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4097echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004098
Michael W. Hudson54241132001-12-07 15:38:26 +00004099
Martin v. Löwis11437992002-04-12 09:54:03 +00004100if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004101then
4102 ac_cv_kpthread=no
4103else
4104# -Kpthread, if available, provides the right #defines
4105# and linker options to make pthread_create available
4106# Some compilers won't report that they do not support -Kpthread,
4107# so we need to run a program to see whether it really made the
4108# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004109echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4110echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4111if test "${ac_cv_kpthread+set}" = set; then
4112 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004113else
4114 ac_save_cc="$CC"
4115CC="$CC -Kpthread"
4116if test "$cross_compiling" = yes; then
4117 ac_cv_kpthread=no
4118else
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004120/* confdefs.h. */
4121_ACEOF
4122cat confdefs.h >>conftest.$ac_ext
4123cat >>conftest.$ac_ext <<_ACEOF
4124/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004125
4126#include <pthread.h>
4127
4128void* routine(void* p){return NULL;}
4129
4130int main(){
4131 pthread_t p;
4132 if(pthread_create(&p,NULL,routine,NULL)!=0)
4133 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004134 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004135 return 0;
4136}
4137
Martin v. Löwis11437992002-04-12 09:54:03 +00004138_ACEOF
4139rm -f conftest$ac_exeext
4140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4141 (eval $ac_link) 2>&5
4142 ac_status=$?
4143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4144 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4146 (eval $ac_try) 2>&5
4147 ac_status=$?
4148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4149 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004150 ac_cv_kpthread=yes
4151else
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 echo "$as_me: program exited with status $ac_status" >&5
4153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004154sed 's/^/| /' conftest.$ac_ext >&5
4155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156( exit $ac_status )
4157ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004158fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004159rm -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 +00004160fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004161CC="$ac_save_cc"
4162fi
4163
Martin v. Löwis11437992002-04-12 09:54:03 +00004164echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4165echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004166fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004167
Skip Montanarod8d39a02003-07-10 20:44:10 +00004168if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004169then
4170# -Kthread, if available, provides the right #defines
4171# and linker options to make pthread_create available
4172# Some compilers won't report that they do not support -Kthread,
4173# so we need to run a program to see whether it really made the
4174# function available.
4175echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4176echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4177if test "${ac_cv_kthread+set}" = set; then
4178 echo $ECHO_N "(cached) $ECHO_C" >&6
4179else
4180 ac_save_cc="$CC"
4181CC="$CC -Kthread"
4182if test "$cross_compiling" = yes; then
4183 ac_cv_kthread=no
4184else
4185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* confdefs.h. */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004191
4192#include <pthread.h>
4193
4194void* routine(void* p){return NULL;}
4195
4196int main(){
4197 pthread_t p;
4198 if(pthread_create(&p,NULL,routine,NULL)!=0)
4199 return 1;
4200 (void)pthread_detach(p);
4201 return 0;
4202}
4203
4204_ACEOF
4205rm -f conftest$ac_exeext
4206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4207 (eval $ac_link) 2>&5
4208 ac_status=$?
4209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212 (eval $ac_try) 2>&5
4213 ac_status=$?
4214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215 (exit $ac_status); }; }; then
4216 ac_cv_kthread=yes
4217else
4218 echo "$as_me: program exited with status $ac_status" >&5
4219echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004220sed 's/^/| /' conftest.$ac_ext >&5
4221
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004222( exit $ac_status )
4223ac_cv_kthread=no
4224fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225rm -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 +00004226fi
4227CC="$ac_save_cc"
4228fi
4229
4230echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4231echo "${ECHO_T}$ac_cv_kthread" >&6
4232fi
4233
Skip Montanarod8d39a02003-07-10 20:44:10 +00004234if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004235then
4236# -pthread, if available, provides the right #defines
4237# and linker options to make pthread_create available
4238# Some compilers won't report that they do not support -pthread,
4239# so we need to run a program to see whether it really made the
4240# function available.
4241echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4242echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4243if test "${ac_cv_thread+set}" = set; then
4244 echo $ECHO_N "(cached) $ECHO_C" >&6
4245else
4246 ac_save_cc="$CC"
4247CC="$CC -pthread"
4248if test "$cross_compiling" = yes; then
4249 ac_cv_pthread=no
4250else
4251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004252/* confdefs.h. */
4253_ACEOF
4254cat confdefs.h >>conftest.$ac_ext
4255cat >>conftest.$ac_ext <<_ACEOF
4256/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004257
4258#include <pthread.h>
4259
4260void* routine(void* p){return NULL;}
4261
4262int main(){
4263 pthread_t p;
4264 if(pthread_create(&p,NULL,routine,NULL)!=0)
4265 return 1;
4266 (void)pthread_detach(p);
4267 return 0;
4268}
4269
4270_ACEOF
4271rm -f conftest$ac_exeext
4272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4273 (eval $ac_link) 2>&5
4274 ac_status=$?
4275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4281 (exit $ac_status); }; }; then
4282 ac_cv_pthread=yes
4283else
4284 echo "$as_me: program exited with status $ac_status" >&5
4285echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004286sed 's/^/| /' conftest.$ac_ext >&5
4287
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004288( exit $ac_status )
4289ac_cv_pthread=no
4290fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004291rm -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 +00004292fi
4293CC="$ac_save_cc"
4294fi
4295
4296echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4297echo "${ECHO_T}$ac_cv_pthread" >&6
4298fi
4299
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004300# If we have set a CC compiler flag for thread support then
4301# check if it works for CXX, too.
4302ac_cv_cxx_thread=no
4303if test ! -z "$CXX"
4304then
4305echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4306echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4307ac_save_cxx="$CXX"
4308
4309if test "$ac_cv_kpthread" = "yes"
4310then
4311 CXX="$CXX -Kpthread"
4312 ac_cv_cxx_thread=yes
4313elif test "$ac_cv_kthread" = "yes"
4314then
4315 CXX="$CXX -Kthread"
4316 ac_cv_cxx_thread=yes
4317elif test "$ac_cv_pthread" = "yes"
4318then
4319 CXX="$CXX -pthread"
4320 ac_cv_cxx_thread=yes
4321fi
4322
4323if test $ac_cv_cxx_thread = yes
4324then
4325 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4326 $CXX -c conftest.$ac_ext 2>&5
4327 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4328 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4329 then
4330 ac_cv_cxx_thread=yes
4331 else
4332 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004333 fi
4334 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004335fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004336echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4337echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004338fi
4339CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004340
Michael W. Hudson54241132001-12-07 15:38:26 +00004341
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004342# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004343echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4344echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4345if test "${ac_cv_header_stdc+set}" = set; then
4346 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347else
Martin v. Löwis11437992002-04-12 09:54:03 +00004348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004349/* confdefs.h. */
4350_ACEOF
4351cat confdefs.h >>conftest.$ac_ext
4352cat >>conftest.$ac_ext <<_ACEOF
4353/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004354#include <stdlib.h>
4355#include <stdarg.h>
4356#include <string.h>
4357#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004358
Skip Montanaro6dead952003-09-25 14:50:04 +00004359int
4360main ()
4361{
4362
4363 ;
4364 return 0;
4365}
Martin v. Löwis11437992002-04-12 09:54:03 +00004366_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004367rm -f conftest.$ac_objext
4368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004369 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004371 grep -v '^ *+' conftest.er1 >conftest.err
4372 rm -f conftest.er1
4373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004375 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004376 { ac_try='test -z "$ac_c_werror_flag"
4377 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4379 (eval $ac_try) 2>&5
4380 ac_status=$?
4381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4382 (exit $ac_status); }; } &&
4383 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4385 (eval $ac_try) 2>&5
4386 ac_status=$?
4387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4388 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389 ac_cv_header_stdc=yes
4390else
Martin v. Löwis11437992002-04-12 09:54:03 +00004391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004392sed 's/^/| /' conftest.$ac_ext >&5
4393
4394ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397
4398if test $ac_cv_header_stdc = yes; then
4399 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004401/* confdefs.h. */
4402_ACEOF
4403cat confdefs.h >>conftest.$ac_ext
4404cat >>conftest.$ac_ext <<_ACEOF
4405/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004407
4408_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004410 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004411 :
4412else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413 ac_cv_header_stdc=no
4414fi
4415rm -f conftest*
4416
4417fi
4418
4419if test $ac_cv_header_stdc = yes; then
4420 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004422/* confdefs.h. */
4423_ACEOF
4424cat confdefs.h >>conftest.$ac_ext
4425cat >>conftest.$ac_ext <<_ACEOF
4426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004428
4429_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004431 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432 :
4433else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434 ac_cv_header_stdc=no
4435fi
4436rm -f conftest*
4437
4438fi
4439
4440if test $ac_cv_header_stdc = yes; then
4441 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004442 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004443 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444else
Martin v. Löwis11437992002-04-12 09:54:03 +00004445 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004446/* confdefs.h. */
4447_ACEOF
4448cat confdefs.h >>conftest.$ac_ext
4449cat >>conftest.$ac_ext <<_ACEOF
4450/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004451#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004452#if ((' ' & 0x0FF) == 0x020)
4453# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4454# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4455#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004456# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004457 (('a' <= (c) && (c) <= 'i') \
4458 || ('j' <= (c) && (c) <= 'r') \
4459 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004460# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4461#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004462
Martin v. Löwis11437992002-04-12 09:54:03 +00004463#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4464int
4465main ()
4466{
4467 int i;
4468 for (i = 0; i < 256; i++)
4469 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004470 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004471 exit(2);
4472 exit (0);
4473}
4474_ACEOF
4475rm -f conftest$ac_exeext
4476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4477 (eval $ac_link) 2>&5
4478 ac_status=$?
4479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4480 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4482 (eval $ac_try) 2>&5
4483 ac_status=$?
4484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4485 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486 :
4487else
Martin v. Löwis11437992002-04-12 09:54:03 +00004488 echo "$as_me: program exited with status $ac_status" >&5
4489echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004490sed 's/^/| /' conftest.$ac_ext >&5
4491
Martin v. Löwis11437992002-04-12 09:54:03 +00004492( exit $ac_status )
4493ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004494fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004495rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004496fi
4497fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004498fi
4499echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4500echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004501if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004502
4503cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004505_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506
4507fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004508
Skip Montanarob9820a32004-01-17 00:16:12 +00004509# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004520 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004521do
4522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4523echo "$as_me:$LINENO: checking for $ac_header" >&5
4524echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4525if eval "test \"\${$as_ac_Header+set}\" = set"; then
4526 echo $ECHO_N "(cached) $ECHO_C" >&6
4527else
4528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004529/* confdefs.h. */
4530_ACEOF
4531cat confdefs.h >>conftest.$ac_ext
4532cat >>conftest.$ac_ext <<_ACEOF
4533/* end confdefs.h. */
4534$ac_includes_default
4535
4536#include <$ac_header>
4537_ACEOF
4538rm -f conftest.$ac_objext
4539if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004540 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004542 grep -v '^ *+' conftest.er1 >conftest.err
4543 rm -f conftest.er1
4544 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4546 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004547 { ac_try='test -z "$ac_c_werror_flag"
4548 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4550 (eval $ac_try) 2>&5
4551 ac_status=$?
4552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4553 (exit $ac_status); }; } &&
4554 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4556 (eval $ac_try) 2>&5
4557 ac_status=$?
4558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4559 (exit $ac_status); }; }; then
4560 eval "$as_ac_Header=yes"
4561else
4562 echo "$as_me: failed program was:" >&5
4563sed 's/^/| /' conftest.$ac_ext >&5
4564
4565eval "$as_ac_Header=no"
4566fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004568fi
4569echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4570echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4571if test `eval echo '${'$as_ac_Header'}'` = yes; then
4572 cat >>confdefs.h <<_ACEOF
4573#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4574_ACEOF
4575
4576fi
4577
4578done
4579
4580
Martin v. Löwis11437992002-04-12 09:54:03 +00004581
4582
4583
4584
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00004617
Martin v. Löwisc3001752005-01-23 09:27:24 +00004618
Martin v. Löwis11017b12006-01-14 18:12:57 +00004619
4620for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
4621shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004622stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004623unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004624sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4625sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004626sys/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 +00004627sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004628sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4629bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630do
Martin v. Löwis11437992002-04-12 09:54:03 +00004631as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4632if eval "test \"\${$as_ac_Header+set}\" = set"; then
4633 echo "$as_me:$LINENO: checking for $ac_header" >&5
4634echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4635if eval "test \"\${$as_ac_Header+set}\" = set"; then
4636 echo $ECHO_N "(cached) $ECHO_C" >&6
4637fi
4638echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4639echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640else
Martin v. Löwis11437992002-04-12 09:54:03 +00004641 # Is the header compilable?
4642echo "$as_me:$LINENO: checking $ac_header usability" >&5
4643echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004645/* confdefs.h. */
4646_ACEOF
4647cat confdefs.h >>conftest.$ac_ext
4648cat >>conftest.$ac_ext <<_ACEOF
4649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004650$ac_includes_default
4651#include <$ac_header>
4652_ACEOF
4653rm -f conftest.$ac_objext
4654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004655 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004657 grep -v '^ *+' conftest.er1 >conftest.err
4658 rm -f conftest.er1
4659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4661 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004662 { ac_try='test -z "$ac_c_werror_flag"
4663 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4665 (eval $ac_try) 2>&5
4666 ac_status=$?
4667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4668 (exit $ac_status); }; } &&
4669 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4671 (eval $ac_try) 2>&5
4672 ac_status=$?
4673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4674 (exit $ac_status); }; }; then
4675 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004676else
Martin v. Löwis11437992002-04-12 09:54:03 +00004677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004678sed 's/^/| /' conftest.$ac_ext >&5
4679
Martin v. Löwis11437992002-04-12 09:54:03 +00004680ac_header_compiler=no
4681fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004682rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004683echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4684echo "${ECHO_T}$ac_header_compiler" >&6
4685
4686# Is the header present?
4687echo "$as_me:$LINENO: checking $ac_header presence" >&5
4688echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004690/* confdefs.h. */
4691_ACEOF
4692cat confdefs.h >>conftest.$ac_ext
4693cat >>conftest.$ac_ext <<_ACEOF
4694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004695#include <$ac_header>
4696_ACEOF
4697if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4698 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4699 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004700 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004701 rm -f conftest.er1
4702 cat conftest.err >&5
4703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4704 (exit $ac_status); } >/dev/null; then
4705 if test -s conftest.err; then
4706 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004707 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004708 else
4709 ac_cpp_err=
4710 fi
4711else
4712 ac_cpp_err=yes
4713fi
4714if test -z "$ac_cpp_err"; then
4715 ac_header_preproc=yes
4716else
4717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004718sed 's/^/| /' conftest.$ac_ext >&5
4719
Martin v. Löwis11437992002-04-12 09:54:03 +00004720 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004722rm -f conftest.err conftest.$ac_ext
4723echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4724echo "${ECHO_T}$ac_header_preproc" >&6
4725
4726# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004727case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4728 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4730echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004731 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4732echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4733 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004734 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004735 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004736 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4737echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004738 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4739echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4740 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4741echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4742 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4743echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004744 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4745echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004746 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4747echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004748 (
4749 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004750## ------------------------------------------------ ##
4751## Report this to http://www.python.org/python-bugs ##
4752## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004753_ASBOX
4754 ) |
4755 sed "s/^/$as_me: WARNING: /" >&2
4756 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004757esac
4758echo "$as_me:$LINENO: checking for $ac_header" >&5
4759echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4760if eval "test \"\${$as_ac_Header+set}\" = set"; then
4761 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004762else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004763 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004765echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4766echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4767
4768fi
4769if test `eval echo '${'$as_ac_Header'}'` = yes; then
4770 cat >>confdefs.h <<_ACEOF
4771#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4772_ACEOF
4773
4774fi
4775
Guido van Rossum627b2d71993-12-24 10:39:16 +00004776done
4777
Martin v. Löwis11437992002-04-12 09:54:03 +00004778
4779
4780
4781
4782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004784for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4785 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4786echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4787echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4788if eval "test \"\${$as_ac_Header+set}\" = set"; then
4789 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004790else
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004792/* confdefs.h. */
4793_ACEOF
4794cat confdefs.h >>conftest.$ac_ext
4795cat >>conftest.$ac_ext <<_ACEOF
4796/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797#include <sys/types.h>
4798#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004799
Martin v. Löwis11437992002-04-12 09:54:03 +00004800int
4801main ()
4802{
4803if ((DIR *) 0)
4804return 0;
4805 ;
4806 return 0;
4807}
4808_ACEOF
4809rm -f conftest.$ac_objext
4810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004811 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004813 grep -v '^ *+' conftest.er1 >conftest.err
4814 rm -f conftest.er1
4815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004818 { ac_try='test -z "$ac_c_werror_flag"
4819 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4821 (eval $ac_try) 2>&5
4822 ac_status=$?
4823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); }; } &&
4825 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4827 (eval $ac_try) 2>&5
4828 ac_status=$?
4829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4830 (exit $ac_status); }; }; then
4831 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004832else
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004834sed 's/^/| /' conftest.$ac_ext >&5
4835
Martin v. Löwis11437992002-04-12 09:54:03 +00004836eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004838rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004839fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004840echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4841echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4842if test `eval echo '${'$as_ac_Header'}'` = yes; then
4843 cat >>confdefs.h <<_ACEOF
4844#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4845_ACEOF
4846
4847ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004848fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004850done
4851# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4852if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4854echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4855if test "${ac_cv_search_opendir+set}" = set; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004857else
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 ac_func_search_save_LIBS=$LIBS
4859ac_cv_search_opendir=no
4860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004861/* confdefs.h. */
4862_ACEOF
4863cat confdefs.h >>conftest.$ac_ext
4864cat >>conftest.$ac_ext <<_ACEOF
4865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004866
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004867/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004868#ifdef __cplusplus
4869extern "C"
4870#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004871/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 builtin and then its argument prototype would still apply. */
4873char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004874int
4875main ()
4876{
4877opendir ();
4878 ;
4879 return 0;
4880}
4881_ACEOF
4882rm -f conftest.$ac_objext conftest$ac_exeext
4883if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004884 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004886 grep -v '^ *+' conftest.er1 >conftest.err
4887 rm -f conftest.er1
4888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004891 { ac_try='test -z "$ac_c_werror_flag"
4892 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4894 (eval $ac_try) 2>&5
4895 ac_status=$?
4896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4897 (exit $ac_status); }; } &&
4898 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4900 (eval $ac_try) 2>&5
4901 ac_status=$?
4902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4903 (exit $ac_status); }; }; then
4904 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905else
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004907sed 's/^/| /' conftest.$ac_ext >&5
4908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004909fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004910rm -f conftest.err conftest.$ac_objext \
4911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004912if test "$ac_cv_search_opendir" = no; then
4913 for ac_lib in dir; do
4914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004916/* confdefs.h. */
4917_ACEOF
4918cat confdefs.h >>conftest.$ac_ext
4919cat >>conftest.$ac_ext <<_ACEOF
4920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004923#ifdef __cplusplus
4924extern "C"
4925#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004926/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 builtin and then its argument prototype would still apply. */
4928char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004929int
4930main ()
4931{
4932opendir ();
4933 ;
4934 return 0;
4935}
4936_ACEOF
4937rm -f conftest.$ac_objext conftest$ac_exeext
4938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004939 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004941 grep -v '^ *+' conftest.er1 >conftest.err
4942 rm -f conftest.er1
4943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4945 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004946 { ac_try='test -z "$ac_c_werror_flag"
4947 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4949 (eval $ac_try) 2>&5
4950 ac_status=$?
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); }; } &&
4953 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4955 (eval $ac_try) 2>&5
4956 ac_status=$?
4957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958 (exit $ac_status); }; }; then
4959 ac_cv_search_opendir="-l$ac_lib"
4960break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961else
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004963sed 's/^/| /' conftest.$ac_ext >&5
4964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004966rm -f conftest.err conftest.$ac_objext \
4967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004968 done
4969fi
4970LIBS=$ac_func_search_save_LIBS
4971fi
4972echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4973echo "${ECHO_T}$ac_cv_search_opendir" >&6
4974if test "$ac_cv_search_opendir" != no; then
4975 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004978
Michael W. Hudson54241132001-12-07 15:38:26 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4981echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4982if test "${ac_cv_search_opendir+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
4984else
4985 ac_func_search_save_LIBS=$LIBS
4986ac_cv_search_opendir=no
4987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004988/* confdefs.h. */
4989_ACEOF
4990cat confdefs.h >>conftest.$ac_ext
4991cat >>conftest.$ac_ext <<_ACEOF
4992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004993
4994/* Override any gcc2 internal prototype to avoid an error. */
4995#ifdef __cplusplus
4996extern "C"
4997#endif
4998/* We use char because int might match the return type of a gcc2
4999 builtin and then its argument prototype would still apply. */
5000char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005001int
5002main ()
5003{
5004opendir ();
5005 ;
5006 return 0;
5007}
5008_ACEOF
5009rm -f conftest.$ac_objext conftest$ac_exeext
5010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005011 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005013 grep -v '^ *+' conftest.er1 >conftest.err
5014 rm -f conftest.er1
5015 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005018 { ac_try='test -z "$ac_c_werror_flag"
5019 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5021 (eval $ac_try) 2>&5
5022 ac_status=$?
5023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5024 (exit $ac_status); }; } &&
5025 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5027 (eval $ac_try) 2>&5
5028 ac_status=$?
5029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5030 (exit $ac_status); }; }; then
5031 ac_cv_search_opendir="none required"
5032else
5033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005034sed 's/^/| /' conftest.$ac_ext >&5
5035
Martin v. Löwis11437992002-04-12 09:54:03 +00005036fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005037rm -f conftest.err conftest.$ac_objext \
5038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005039if test "$ac_cv_search_opendir" = no; then
5040 for ac_lib in x; do
5041 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005043/* confdefs.h. */
5044_ACEOF
5045cat confdefs.h >>conftest.$ac_ext
5046cat >>conftest.$ac_ext <<_ACEOF
5047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005048
5049/* Override any gcc2 internal prototype to avoid an error. */
5050#ifdef __cplusplus
5051extern "C"
5052#endif
5053/* We use char because int might match the return type of a gcc2
5054 builtin and then its argument prototype would still apply. */
5055char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005056int
5057main ()
5058{
5059opendir ();
5060 ;
5061 return 0;
5062}
5063_ACEOF
5064rm -f conftest.$ac_objext conftest$ac_exeext
5065if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005066 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005068 grep -v '^ *+' conftest.er1 >conftest.err
5069 rm -f conftest.er1
5070 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005073 { ac_try='test -z "$ac_c_werror_flag"
5074 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5076 (eval $ac_try) 2>&5
5077 ac_status=$?
5078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5079 (exit $ac_status); }; } &&
5080 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5082 (eval $ac_try) 2>&5
5083 ac_status=$?
5084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5085 (exit $ac_status); }; }; then
5086 ac_cv_search_opendir="-l$ac_lib"
5087break
5088else
5089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005090sed 's/^/| /' conftest.$ac_ext >&5
5091
Martin v. Löwis11437992002-04-12 09:54:03 +00005092fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005093rm -f conftest.err conftest.$ac_objext \
5094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005095 done
5096fi
5097LIBS=$ac_func_search_save_LIBS
5098fi
5099echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5100echo "${ECHO_T}$ac_cv_search_opendir" >&6
5101if test "$ac_cv_search_opendir" != no; then
5102 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104fi
5105
5106fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005107
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005108echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5109echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5110if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5111 echo $ECHO_N "(cached) $ECHO_C" >&6
5112else
5113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005114/* confdefs.h. */
5115_ACEOF
5116cat confdefs.h >>conftest.$ac_ext
5117cat >>conftest.$ac_ext <<_ACEOF
5118/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005119#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005120int
5121main ()
5122{
5123return makedev(0, 0);
5124 ;
5125 return 0;
5126}
5127_ACEOF
5128rm -f conftest.$ac_objext conftest$ac_exeext
5129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005130 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005132 grep -v '^ *+' conftest.er1 >conftest.err
5133 rm -f conftest.er1
5134 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5136 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005137 { ac_try='test -z "$ac_c_werror_flag"
5138 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5140 (eval $ac_try) 2>&5
5141 ac_status=$?
5142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5143 (exit $ac_status); }; } &&
5144 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5146 (eval $ac_try) 2>&5
5147 ac_status=$?
5148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5149 (exit $ac_status); }; }; then
5150 ac_cv_header_sys_types_h_makedev=yes
5151else
5152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005153sed 's/^/| /' conftest.$ac_ext >&5
5154
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005155ac_cv_header_sys_types_h_makedev=no
5156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005157rm -f conftest.err conftest.$ac_objext \
5158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005159
5160fi
5161echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5162echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5163
5164if test $ac_cv_header_sys_types_h_makedev = no; then
5165if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5166 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5167echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5168if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5169 echo $ECHO_N "(cached) $ECHO_C" >&6
5170fi
5171echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5172echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5173else
5174 # Is the header compilable?
5175echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5176echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005178/* confdefs.h. */
5179_ACEOF
5180cat confdefs.h >>conftest.$ac_ext
5181cat >>conftest.$ac_ext <<_ACEOF
5182/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005183$ac_includes_default
5184#include <sys/mkdev.h>
5185_ACEOF
5186rm -f conftest.$ac_objext
5187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005188 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005190 grep -v '^ *+' conftest.er1 >conftest.err
5191 rm -f conftest.er1
5192 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5194 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005195 { ac_try='test -z "$ac_c_werror_flag"
5196 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5198 (eval $ac_try) 2>&5
5199 ac_status=$?
5200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201 (exit $ac_status); }; } &&
5202 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5204 (eval $ac_try) 2>&5
5205 ac_status=$?
5206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5207 (exit $ac_status); }; }; then
5208 ac_header_compiler=yes
5209else
5210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005211sed 's/^/| /' conftest.$ac_ext >&5
5212
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005213ac_header_compiler=no
5214fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005215rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005216echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5217echo "${ECHO_T}$ac_header_compiler" >&6
5218
5219# Is the header present?
5220echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5221echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005223/* confdefs.h. */
5224_ACEOF
5225cat confdefs.h >>conftest.$ac_ext
5226cat >>conftest.$ac_ext <<_ACEOF
5227/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005228#include <sys/mkdev.h>
5229_ACEOF
5230if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5231 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5232 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005233 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005234 rm -f conftest.er1
5235 cat conftest.err >&5
5236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5237 (exit $ac_status); } >/dev/null; then
5238 if test -s conftest.err; then
5239 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005240 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005241 else
5242 ac_cpp_err=
5243 fi
5244else
5245 ac_cpp_err=yes
5246fi
5247if test -z "$ac_cpp_err"; then
5248 ac_header_preproc=yes
5249else
5250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005251sed 's/^/| /' conftest.$ac_ext >&5
5252
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005253 ac_header_preproc=no
5254fi
5255rm -f conftest.err conftest.$ac_ext
5256echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5257echo "${ECHO_T}$ac_header_preproc" >&6
5258
5259# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005260case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5261 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005262 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5263echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005264 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5265echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5266 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005267 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005268 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005269 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5270echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005271 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5272echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5273 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5274echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5275 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5276echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005277 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5278echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005279 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5280echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005281 (
5282 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005283## ------------------------------------------------ ##
5284## Report this to http://www.python.org/python-bugs ##
5285## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005286_ASBOX
5287 ) |
5288 sed "s/^/$as_me: WARNING: /" >&2
5289 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005290esac
5291echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5292echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5293if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5294 echo $ECHO_N "(cached) $ECHO_C" >&6
5295else
5296 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5297fi
5298echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5299echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5300
5301fi
5302if test $ac_cv_header_sys_mkdev_h = yes; then
5303
5304cat >>confdefs.h <<\_ACEOF
5305#define MAJOR_IN_MKDEV 1
5306_ACEOF
5307
5308fi
5309
5310
5311
5312 if test $ac_cv_header_sys_mkdev_h = no; then
5313 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5314 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5315echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5316if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5317 echo $ECHO_N "(cached) $ECHO_C" >&6
5318fi
5319echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5320echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5321else
5322 # Is the header compilable?
5323echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5324echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005331$ac_includes_default
5332#include <sys/sysmacros.h>
5333_ACEOF
5334rm -f conftest.$ac_objext
5335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005336 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005338 grep -v '^ *+' conftest.er1 >conftest.err
5339 rm -f conftest.er1
5340 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5342 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005343 { ac_try='test -z "$ac_c_werror_flag"
5344 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5346 (eval $ac_try) 2>&5
5347 ac_status=$?
5348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5349 (exit $ac_status); }; } &&
5350 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5352 (eval $ac_try) 2>&5
5353 ac_status=$?
5354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5355 (exit $ac_status); }; }; then
5356 ac_header_compiler=yes
5357else
5358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005359sed 's/^/| /' conftest.$ac_ext >&5
5360
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005361ac_header_compiler=no
5362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005364echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5365echo "${ECHO_T}$ac_header_compiler" >&6
5366
5367# Is the header present?
5368echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5369echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5370cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005376#include <sys/sysmacros.h>
5377_ACEOF
5378if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5379 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5380 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005381 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005382 rm -f conftest.er1
5383 cat conftest.err >&5
5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385 (exit $ac_status); } >/dev/null; then
5386 if test -s conftest.err; then
5387 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005388 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005389 else
5390 ac_cpp_err=
5391 fi
5392else
5393 ac_cpp_err=yes
5394fi
5395if test -z "$ac_cpp_err"; then
5396 ac_header_preproc=yes
5397else
5398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005399sed 's/^/| /' conftest.$ac_ext >&5
5400
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005401 ac_header_preproc=no
5402fi
5403rm -f conftest.err conftest.$ac_ext
5404echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5405echo "${ECHO_T}$ac_header_preproc" >&6
5406
5407# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005408case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5409 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005410 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5411echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005412 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5413echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5414 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005415 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005416 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5418echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5420echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5421 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5422echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5423 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5424echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005425 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5426echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005427 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5428echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005429 (
5430 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005431## ------------------------------------------------ ##
5432## Report this to http://www.python.org/python-bugs ##
5433## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005434_ASBOX
5435 ) |
5436 sed "s/^/$as_me: WARNING: /" >&2
5437 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005438esac
5439echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5440echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5441if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443else
5444 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5445fi
5446echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5447echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5448
5449fi
5450if test $ac_cv_header_sys_sysmacros_h = yes; then
5451
5452cat >>confdefs.h <<\_ACEOF
5453#define MAJOR_IN_SYSMACROS 1
5454_ACEOF
5455
5456fi
5457
5458
5459 fi
5460fi
5461
Michael W. Hudson54241132001-12-07 15:38:26 +00005462
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005463# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005464
5465for ac_header in term.h
5466do
5467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5468echo "$as_me:$LINENO: checking for $ac_header" >&5
5469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5470if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005471 echo $ECHO_N "(cached) $ECHO_C" >&6
5472else
5473 cat >conftest.$ac_ext <<_ACEOF
5474/* confdefs.h. */
5475_ACEOF
5476cat confdefs.h >>conftest.$ac_ext
5477cat >>conftest.$ac_ext <<_ACEOF
5478/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005479
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005480#ifdef HAVE_CURSES_H
5481#include <curses.h>
5482#endif
5483
5484
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005485#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005486_ACEOF
5487rm -f conftest.$ac_objext
5488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5489 (eval $ac_compile) 2>conftest.er1
5490 ac_status=$?
5491 grep -v '^ *+' conftest.er1 >conftest.err
5492 rm -f conftest.er1
5493 cat conftest.err >&5
5494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005496 { ac_try='test -z "$ac_c_werror_flag"
5497 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502 (exit $ac_status); }; } &&
5503 { ac_try='test -s conftest.$ac_objext'
5504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5505 (eval $ac_try) 2>&5
5506 ac_status=$?
5507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005509 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005510else
5511 echo "$as_me: failed program was:" >&5
5512sed 's/^/| /' conftest.$ac_ext >&5
5513
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005514eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005515fi
5516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5517fi
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005518echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5519echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5520if test `eval echo '${'$as_ac_Header'}'` = yes; then
5521 cat >>confdefs.h <<_ACEOF
5522#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5523_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005524
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005525fi
5526
5527done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005528
5529
Martin v. Löwis11017b12006-01-14 18:12:57 +00005530# On Linux, netlink.h requires asm/types.h
5531
5532for ac_header in linux/netlink.h
5533do
5534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5535echo "$as_me:$LINENO: checking for $ac_header" >&5
5536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5537if eval "test \"\${$as_ac_Header+set}\" = set"; then
5538 echo $ECHO_N "(cached) $ECHO_C" >&6
5539else
5540 cat >conftest.$ac_ext <<_ACEOF
5541/* confdefs.h. */
5542_ACEOF
5543cat confdefs.h >>conftest.$ac_ext
5544cat >>conftest.$ac_ext <<_ACEOF
5545/* end confdefs.h. */
5546
5547#ifdef HAVE_ASM_TYPES_H
5548#include <asm/types.h>
5549#endif
5550#ifdef HAVE_SYS_SOCKET_H
5551#include <sys/socket.h>
5552#endif
5553
5554
5555#include <$ac_header>
5556_ACEOF
5557rm -f conftest.$ac_objext
5558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5559 (eval $ac_compile) 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } &&
5566 { ac_try='test -z "$ac_c_werror_flag"
5567 || test ! -s conftest.err'
5568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); }; } &&
5573 { ac_try='test -s conftest.$ac_objext'
5574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575 (eval $ac_try) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); }; }; then
5579 eval "$as_ac_Header=yes"
5580else
5581 echo "$as_me: failed program was:" >&5
5582sed 's/^/| /' conftest.$ac_ext >&5
5583
5584eval "$as_ac_Header=no"
5585fi
5586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5589echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5590if test `eval echo '${'$as_ac_Header'}'` = yes; then
5591 cat >>confdefs.h <<_ACEOF
5592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5593_ACEOF
5594
5595fi
5596
5597done
5598
5599
Guido van Rossum627b2d71993-12-24 10:39:16 +00005600# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005601was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005602echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5603echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005605/* confdefs.h. */
5606_ACEOF
5607cat confdefs.h >>conftest.$ac_ext
5608cat >>conftest.$ac_ext <<_ACEOF
5609/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005610#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005611
5612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005614 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005615 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005616else
Martin v. Löwis11437992002-04-12 09:54:03 +00005617
5618
5619cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005620#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005621_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005622
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005623
Guido van Rossum627b2d71993-12-24 10:39:16 +00005624fi
5625rm -f conftest*
5626
Martin v. Löwis11437992002-04-12 09:54:03 +00005627echo "$as_me:$LINENO: result: $was_it_defined" >&5
5628echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005629
Neal Norwitz11690112002-07-30 01:08:28 +00005630# Check whether using makedev requires defining _OSF_SOURCE
5631echo "$as_me:$LINENO: checking for makedev" >&5
5632echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005634/* confdefs.h. */
5635_ACEOF
5636cat confdefs.h >>conftest.$ac_ext
5637cat >>conftest.$ac_ext <<_ACEOF
5638/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005639#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005640int
5641main ()
5642{
5643 makedev(0, 0)
5644 ;
5645 return 0;
5646}
5647_ACEOF
5648rm -f conftest.$ac_objext conftest$ac_exeext
5649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005650 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005652 grep -v '^ *+' conftest.er1 >conftest.err
5653 rm -f conftest.er1
5654 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005657 { ac_try='test -z "$ac_c_werror_flag"
5658 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5660 (eval $ac_try) 2>&5
5661 ac_status=$?
5662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5663 (exit $ac_status); }; } &&
5664 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5666 (eval $ac_try) 2>&5
5667 ac_status=$?
5668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5669 (exit $ac_status); }; }; then
5670 ac_cv_has_makedev=yes
5671else
5672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005673sed 's/^/| /' conftest.$ac_ext >&5
5674
Neal Norwitz11690112002-07-30 01:08:28 +00005675ac_cv_has_makedev=no
5676fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005677rm -f conftest.err conftest.$ac_objext \
5678 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005679if test "$ac_cv_has_makedev" = "no"; then
5680 # we didn't link, try if _OSF_SOURCE will allow us to link
5681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005682/* confdefs.h. */
5683_ACEOF
5684cat confdefs.h >>conftest.$ac_ext
5685cat >>conftest.$ac_ext <<_ACEOF
5686/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005687
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005688#define _OSF_SOURCE 1
5689#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005690
Neal Norwitz11690112002-07-30 01:08:28 +00005691int
5692main ()
5693{
5694 makedev(0, 0)
5695 ;
5696 return 0;
5697}
5698_ACEOF
5699rm -f conftest.$ac_objext conftest$ac_exeext
5700if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005703 grep -v '^ *+' conftest.er1 >conftest.err
5704 rm -f conftest.er1
5705 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005708 { ac_try='test -z "$ac_c_werror_flag"
5709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5711 (eval $ac_try) 2>&5
5712 ac_status=$?
5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5714 (exit $ac_status); }; } &&
5715 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5717 (eval $ac_try) 2>&5
5718 ac_status=$?
5719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5720 (exit $ac_status); }; }; then
5721 ac_cv_has_makedev=yes
5722else
5723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005724sed 's/^/| /' conftest.$ac_ext >&5
5725
Neal Norwitz11690112002-07-30 01:08:28 +00005726ac_cv_has_makedev=no
5727fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728rm -f conftest.err conftest.$ac_objext \
5729 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005730 if test "$ac_cv_has_makedev" = "yes"; then
5731
5732cat >>confdefs.h <<\_ACEOF
5733#define _OSF_SOURCE 1
5734_ACEOF
5735
5736 fi
5737fi
5738echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5739echo "${ECHO_T}$ac_cv_has_makedev" >&6
5740if test "$ac_cv_has_makedev" = "yes"; then
5741
5742cat >>confdefs.h <<\_ACEOF
5743#define HAVE_MAKEDEV 1
5744_ACEOF
5745
5746fi
5747
Martin v. Löwis399a6892002-10-04 10:22:02 +00005748# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5749# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5750# defined, but the compiler does not support pragma redefine_extname,
5751# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5752# structures (such as rlimit64) without declaring them. As a
5753# work-around, disable LFS on such configurations
5754
5755use_lfs=yes
5756echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5757echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005759/* confdefs.h. */
5760_ACEOF
5761cat confdefs.h >>conftest.$ac_ext
5762cat >>conftest.$ac_ext <<_ACEOF
5763/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005764
5765#define _LARGEFILE_SOURCE 1
5766#define _FILE_OFFSET_BITS 64
5767#include <sys/resource.h>
5768
Martin v. Löwis399a6892002-10-04 10:22:02 +00005769int
5770main ()
5771{
5772struct rlimit foo;
5773 ;
5774 return 0;
5775}
5776_ACEOF
5777rm -f conftest.$ac_objext
5778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 grep -v '^ *+' conftest.er1 >conftest.err
5782 rm -f conftest.er1
5783 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005786 { ac_try='test -z "$ac_c_werror_flag"
5787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5789 (eval $ac_try) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); }; } &&
5793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
5799 sol_lfs_bug=no
5800else
5801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005802sed 's/^/| /' conftest.$ac_ext >&5
5803
Martin v. Löwis399a6892002-10-04 10:22:02 +00005804sol_lfs_bug=yes
5805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005807echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5808echo "${ECHO_T}$sol_lfs_bug" >&6
5809if test "$sol_lfs_bug" = "yes"; then
5810 use_lfs=no
5811fi
5812
5813if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005814# Two defines needed to enable largefile support on various platforms
5815# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005816
Martin v. Löwis11437992002-04-12 09:54:03 +00005817cat >>confdefs.h <<\_ACEOF
5818#define _LARGEFILE_SOURCE 1
5819_ACEOF
5820
5821
5822cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005823#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005824_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005825
Martin v. Löwis399a6892002-10-04 10:22:02 +00005826fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005827
Guido van Rossum84e7b241996-08-19 21:59:00 +00005828# Add some code to confdefs.h so that the test for off_t works on SCO
5829cat >> confdefs.h <<\EOF
5830#if defined(SCO_DS)
5831#undef _OFF_T
5832#endif
5833EOF
5834
Guido van Rossumef2255b2000-03-10 22:30:29 +00005835# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005836echo "$as_me:$LINENO: checking for mode_t" >&5
5837echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5838if test "${ac_cv_type_mode_t+set}" = set; then
5839 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005840else
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005842/* confdefs.h. */
5843_ACEOF
5844cat confdefs.h >>conftest.$ac_ext
5845cat >>conftest.$ac_ext <<_ACEOF
5846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005848int
5849main ()
5850{
5851if ((mode_t *) 0)
5852 return 0;
5853if (sizeof (mode_t))
5854 return 0;
5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
5860if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005861 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005863 grep -v '^ *+' conftest.er1 >conftest.err
5864 rm -f conftest.er1
5865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005868 { ac_try='test -z "$ac_c_werror_flag"
5869 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5871 (eval $ac_try) 2>&5
5872 ac_status=$?
5873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5874 (exit $ac_status); }; } &&
5875 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5877 (eval $ac_try) 2>&5
5878 ac_status=$?
5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5880 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005881 ac_cv_type_mode_t=yes
5882else
Martin v. Löwis11437992002-04-12 09:54:03 +00005883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005884sed 's/^/| /' conftest.$ac_ext >&5
5885
Martin v. Löwis11437992002-04-12 09:54:03 +00005886ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005888rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005889fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005890echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5891echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5892if test $ac_cv_type_mode_t = yes; then
5893 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005894else
Martin v. Löwis11437992002-04-12 09:54:03 +00005895
5896cat >>confdefs.h <<_ACEOF
5897#define mode_t int
5898_ACEOF
5899
5900fi
5901
5902echo "$as_me:$LINENO: checking for off_t" >&5
5903echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5904if test "${ac_cv_type_off_t+set}" = set; then
5905 echo $ECHO_N "(cached) $ECHO_C" >&6
5906else
5907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005908/* confdefs.h. */
5909_ACEOF
5910cat confdefs.h >>conftest.$ac_ext
5911cat >>conftest.$ac_ext <<_ACEOF
5912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005914int
5915main ()
5916{
5917if ((off_t *) 0)
5918 return 0;
5919if (sizeof (off_t))
5920 return 0;
5921 ;
5922 return 0;
5923}
5924_ACEOF
5925rm -f conftest.$ac_objext
5926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005927 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005929 grep -v '^ *+' conftest.er1 >conftest.err
5930 rm -f conftest.er1
5931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5933 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005934 { ac_try='test -z "$ac_c_werror_flag"
5935 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937 (eval $ac_try) 2>&5
5938 ac_status=$?
5939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940 (exit $ac_status); }; } &&
5941 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005947 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005948else
Martin v. Löwis11437992002-04-12 09:54:03 +00005949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005950sed 's/^/| /' conftest.$ac_ext >&5
5951
Martin v. Löwis11437992002-04-12 09:54:03 +00005952ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005955fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005956echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5957echo "${ECHO_T}$ac_cv_type_off_t" >&6
5958if test $ac_cv_type_off_t = yes; then
5959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960else
Martin v. Löwis11437992002-04-12 09:54:03 +00005961
5962cat >>confdefs.h <<_ACEOF
5963#define off_t long
5964_ACEOF
5965
5966fi
5967
5968echo "$as_me:$LINENO: checking for pid_t" >&5
5969echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5970if test "${ac_cv_type_pid_t+set}" = set; then
5971 echo $ECHO_N "(cached) $ECHO_C" >&6
5972else
5973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005974/* confdefs.h. */
5975_ACEOF
5976cat confdefs.h >>conftest.$ac_ext
5977cat >>conftest.$ac_ext <<_ACEOF
5978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005979$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005980int
5981main ()
5982{
5983if ((pid_t *) 0)
5984 return 0;
5985if (sizeof (pid_t))
5986 return 0;
5987 ;
5988 return 0;
5989}
5990_ACEOF
5991rm -f conftest.$ac_objext
5992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005993 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006000 { ac_try='test -z "$ac_c_werror_flag"
6001 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6003 (eval $ac_try) 2>&5
6004 ac_status=$?
6005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006 (exit $ac_status); }; } &&
6007 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009 (eval $ac_try) 2>&5
6010 ac_status=$?
6011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006013 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006014else
Martin v. Löwis11437992002-04-12 09:54:03 +00006015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006016sed 's/^/| /' conftest.$ac_ext >&5
6017
Martin v. Löwis11437992002-04-12 09:54:03 +00006018ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006019fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006021fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006022echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6023echo "${ECHO_T}$ac_cv_type_pid_t" >&6
6024if test $ac_cv_type_pid_t = yes; then
6025 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006026else
Martin v. Löwis11437992002-04-12 09:54:03 +00006027
6028cat >>confdefs.h <<_ACEOF
6029#define pid_t int
6030_ACEOF
6031
6032fi
6033
6034echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6035echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6036if test "${ac_cv_type_signal+set}" = set; then
6037 echo $ECHO_N "(cached) $ECHO_C" >&6
6038else
6039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* confdefs.h. */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006045#include <sys/types.h>
6046#include <signal.h>
6047#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006048# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006050#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006051extern "C" void (*signal (int, void (*)(int)))(int);
6052#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006053void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006054#endif
6055
Martin v. Löwis11437992002-04-12 09:54:03 +00006056int
6057main ()
6058{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006059int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006060 ;
6061 return 0;
6062}
6063_ACEOF
6064rm -f conftest.$ac_objext
6065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006066 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006068 grep -v '^ *+' conftest.er1 >conftest.err
6069 rm -f conftest.er1
6070 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6072 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006073 { ac_try='test -z "$ac_c_werror_flag"
6074 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6076 (eval $ac_try) 2>&5
6077 ac_status=$?
6078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6079 (exit $ac_status); }; } &&
6080 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6082 (eval $ac_try) 2>&5
6083 ac_status=$?
6084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6085 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006086 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006087else
Martin v. Löwis11437992002-04-12 09:54:03 +00006088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006089sed 's/^/| /' conftest.$ac_ext >&5
6090
Martin v. Löwis11437992002-04-12 09:54:03 +00006091ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006092fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006095echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6096echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006097
Martin v. Löwis11437992002-04-12 09:54:03 +00006098cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006100_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006101
Michael W. Hudson54241132001-12-07 15:38:26 +00006102
Martin v. Löwis11437992002-04-12 09:54:03 +00006103echo "$as_me:$LINENO: checking for size_t" >&5
6104echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6105if test "${ac_cv_type_size_t+set}" = set; then
6106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107else
Martin v. Löwis11437992002-04-12 09:54:03 +00006108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* confdefs.h. */
6110_ACEOF
6111cat confdefs.h >>conftest.$ac_ext
6112cat >>conftest.$ac_ext <<_ACEOF
6113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006114$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006115int
6116main ()
6117{
6118if ((size_t *) 0)
6119 return 0;
6120if (sizeof (size_t))
6121 return 0;
6122 ;
6123 return 0;
6124}
6125_ACEOF
6126rm -f conftest.$ac_objext
6127if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 grep -v '^ *+' conftest.er1 >conftest.err
6131 rm -f conftest.er1
6132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6134 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006135 { ac_try='test -z "$ac_c_werror_flag"
6136 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6138 (eval $ac_try) 2>&5
6139 ac_status=$?
6140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6141 (exit $ac_status); }; } &&
6142 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144 (eval $ac_try) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006148 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006149else
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006151sed 's/^/| /' conftest.$ac_ext >&5
6152
Martin v. Löwis11437992002-04-12 09:54:03 +00006153ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006155rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006157echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6158echo "${ECHO_T}$ac_cv_type_size_t" >&6
6159if test $ac_cv_type_size_t = yes; then
6160 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161else
Martin v. Löwis11437992002-04-12 09:54:03 +00006162
6163cat >>confdefs.h <<_ACEOF
6164#define size_t unsigned
6165_ACEOF
6166
6167fi
6168
6169echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6170echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6171if test "${ac_cv_type_uid_t+set}" = set; then
6172 echo $ECHO_N "(cached) $ECHO_C" >&6
6173else
6174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006180#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006181
6182_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006184 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006185 ac_cv_type_uid_t=yes
6186else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006187 ac_cv_type_uid_t=no
6188fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006189rm -f conftest*
6190
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006192echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6193echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006194if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195
Martin v. Löwis11437992002-04-12 09:54:03 +00006196cat >>confdefs.h <<\_ACEOF
6197#define uid_t int
6198_ACEOF
6199
6200
6201cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006203_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006204
6205fi
6206
Martin v. Löwis18e16552006-02-15 17:27:45 +00006207echo "$as_me:$LINENO: checking for ssize_t" >&5
6208echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6209if test "${ac_cv_type_ssize_t+set}" = set; then
6210 echo $ECHO_N "(cached) $ECHO_C" >&6
6211else
6212 cat >conftest.$ac_ext <<_ACEOF
6213/* confdefs.h. */
6214_ACEOF
6215cat confdefs.h >>conftest.$ac_ext
6216cat >>conftest.$ac_ext <<_ACEOF
6217/* end confdefs.h. */
6218$ac_includes_default
6219int
6220main ()
6221{
6222if ((ssize_t *) 0)
6223 return 0;
6224if (sizeof (ssize_t))
6225 return 0;
6226 ;
6227 return 0;
6228}
6229_ACEOF
6230rm -f conftest.$ac_objext
6231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6232 (eval $ac_compile) 2>conftest.er1
6233 ac_status=$?
6234 grep -v '^ *+' conftest.er1 >conftest.err
6235 rm -f conftest.er1
6236 cat conftest.err >&5
6237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6238 (exit $ac_status); } &&
6239 { ac_try='test -z "$ac_c_werror_flag"
6240 || test ! -s conftest.err'
6241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6242 (eval $ac_try) 2>&5
6243 ac_status=$?
6244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6245 (exit $ac_status); }; } &&
6246 { ac_try='test -s conftest.$ac_objext'
6247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6248 (eval $ac_try) 2>&5
6249 ac_status=$?
6250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6251 (exit $ac_status); }; }; then
6252 ac_cv_type_ssize_t=yes
6253else
6254 echo "$as_me: failed program was:" >&5
6255sed 's/^/| /' conftest.$ac_ext >&5
6256
6257ac_cv_type_ssize_t=no
6258fi
6259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6260fi
6261echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6262echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
6263if test $ac_cv_type_ssize_t = yes; then
6264
6265cat >>confdefs.h <<\_ACEOF
6266#define HAVE_SSIZE_T 1
6267_ACEOF
6268
6269fi
6270
Jack Jansendd19cf82001-12-06 22:36:17 +00006271
Michael W. Hudson54241132001-12-07 15:38:26 +00006272# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006273# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006274echo "$as_me:$LINENO: checking for int" >&5
6275echo $ECHO_N "checking for int... $ECHO_C" >&6
6276if test "${ac_cv_type_int+set}" = set; then
6277 echo $ECHO_N "(cached) $ECHO_C" >&6
6278else
6279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006280/* confdefs.h. */
6281_ACEOF
6282cat confdefs.h >>conftest.$ac_ext
6283cat >>conftest.$ac_ext <<_ACEOF
6284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006285$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006286int
6287main ()
6288{
6289if ((int *) 0)
6290 return 0;
6291if (sizeof (int))
6292 return 0;
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297rm -f conftest.$ac_objext
6298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006299 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006301 grep -v '^ *+' conftest.er1 >conftest.err
6302 rm -f conftest.er1
6303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6305 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006306 { ac_try='test -z "$ac_c_werror_flag"
6307 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6309 (eval $ac_try) 2>&5
6310 ac_status=$?
6311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6312 (exit $ac_status); }; } &&
6313 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6315 (eval $ac_try) 2>&5
6316 ac_status=$?
6317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6318 (exit $ac_status); }; }; then
6319 ac_cv_type_int=yes
6320else
6321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006322sed 's/^/| /' conftest.$ac_ext >&5
6323
Martin v. Löwis11437992002-04-12 09:54:03 +00006324ac_cv_type_int=no
6325fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006327fi
6328echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6329echo "${ECHO_T}$ac_cv_type_int" >&6
6330
6331echo "$as_me:$LINENO: checking size of int" >&5
6332echo $ECHO_N "checking size of int... $ECHO_C" >&6
6333if test "${ac_cv_sizeof_int+set}" = set; then
6334 echo $ECHO_N "(cached) $ECHO_C" >&6
6335else
6336 if test "$ac_cv_type_int" = yes; then
6337 # The cast to unsigned long works around a bug in the HP C Compiler
6338 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6339 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6340 # This bug is HP SR number 8606223364.
6341 if test "$cross_compiling" = yes; then
6342 # Depending upon the size, compute the lo and hi bounds.
6343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006344/* confdefs.h. */
6345_ACEOF
6346cat confdefs.h >>conftest.$ac_ext
6347cat >>conftest.$ac_ext <<_ACEOF
6348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006349$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006350int
6351main ()
6352{
6353static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6354test_array [0] = 0
6355
6356 ;
6357 return 0;
6358}
6359_ACEOF
6360rm -f conftest.$ac_objext
6361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006364 grep -v '^ *+' conftest.er1 >conftest.err
6365 rm -f conftest.er1
6366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006369 { ac_try='test -z "$ac_c_werror_flag"
6370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6372 (eval $ac_try) 2>&5
6373 ac_status=$?
6374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375 (exit $ac_status); }; } &&
6376 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6378 (eval $ac_try) 2>&5
6379 ac_status=$?
6380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6381 (exit $ac_status); }; }; then
6382 ac_lo=0 ac_mid=0
6383 while :; do
6384 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006390$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006391int
6392main ()
6393{
6394static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6395test_array [0] = 0
6396
6397 ;
6398 return 0;
6399}
6400_ACEOF
6401rm -f conftest.$ac_objext
6402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006403 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6409 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006410 { ac_try='test -z "$ac_c_werror_flag"
6411 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413 (eval $ac_try) 2>&5
6414 ac_status=$?
6415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416 (exit $ac_status); }; } &&
6417 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6419 (eval $ac_try) 2>&5
6420 ac_status=$?
6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6422 (exit $ac_status); }; }; then
6423 ac_hi=$ac_mid; break
6424else
6425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006426sed 's/^/| /' conftest.$ac_ext >&5
6427
Martin v. Löwis11437992002-04-12 09:54:03 +00006428ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006429 if test $ac_lo -le $ac_mid; then
6430 ac_lo= ac_hi=
6431 break
6432 fi
6433 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006434fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006436 done
6437else
6438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006439sed 's/^/| /' conftest.$ac_ext >&5
6440
Martin v. Löwis11437992002-04-12 09:54:03 +00006441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* confdefs.h. */
6443_ACEOF
6444cat confdefs.h >>conftest.$ac_ext
6445cat >>conftest.$ac_ext <<_ACEOF
6446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006448int
6449main ()
6450{
6451static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6452test_array [0] = 0
6453
6454 ;
6455 return 0;
6456}
6457_ACEOF
6458rm -f conftest.$ac_objext
6459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006460 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006462 grep -v '^ *+' conftest.er1 >conftest.err
6463 rm -f conftest.er1
6464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6466 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006467 { ac_try='test -z "$ac_c_werror_flag"
6468 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6470 (eval $ac_try) 2>&5
6471 ac_status=$?
6472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6473 (exit $ac_status); }; } &&
6474 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6476 (eval $ac_try) 2>&5
6477 ac_status=$?
6478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6479 (exit $ac_status); }; }; then
6480 ac_hi=-1 ac_mid=-1
6481 while :; do
6482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006483/* confdefs.h. */
6484_ACEOF
6485cat confdefs.h >>conftest.$ac_ext
6486cat >>conftest.$ac_ext <<_ACEOF
6487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006488$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006489int
6490main ()
6491{
6492static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6493test_array [0] = 0
6494
6495 ;
6496 return 0;
6497}
6498_ACEOF
6499rm -f conftest.$ac_objext
6500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006501 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006503 grep -v '^ *+' conftest.er1 >conftest.err
6504 rm -f conftest.er1
6505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006508 { ac_try='test -z "$ac_c_werror_flag"
6509 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6511 (eval $ac_try) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); }; } &&
6515 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6517 (eval $ac_try) 2>&5
6518 ac_status=$?
6519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520 (exit $ac_status); }; }; then
6521 ac_lo=$ac_mid; break
6522else
6523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006524sed 's/^/| /' conftest.$ac_ext >&5
6525
Martin v. Löwis11437992002-04-12 09:54:03 +00006526ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006527 if test $ac_mid -le $ac_hi; then
6528 ac_lo= ac_hi=
6529 break
6530 fi
6531 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006532fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006533rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006534 done
6535else
6536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006537sed 's/^/| /' conftest.$ac_ext >&5
6538
Martin v. Löwis11437992002-04-12 09:54:03 +00006539ac_lo= ac_hi=
6540fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006541rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006542fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006544# Binary search between lo and hi bounds.
6545while test "x$ac_lo" != "x$ac_hi"; do
6546 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006548/* confdefs.h. */
6549_ACEOF
6550cat confdefs.h >>conftest.$ac_ext
6551cat >>conftest.$ac_ext <<_ACEOF
6552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006554int
6555main ()
6556{
6557static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6558test_array [0] = 0
6559
6560 ;
6561 return 0;
6562}
6563_ACEOF
6564rm -f conftest.$ac_objext
6565if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006568 grep -v '^ *+' conftest.er1 >conftest.err
6569 rm -f conftest.er1
6570 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6572 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006573 { ac_try='test -z "$ac_c_werror_flag"
6574 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6576 (eval $ac_try) 2>&5
6577 ac_status=$?
6578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579 (exit $ac_status); }; } &&
6580 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6582 (eval $ac_try) 2>&5
6583 ac_status=$?
6584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585 (exit $ac_status); }; }; then
6586 ac_hi=$ac_mid
6587else
6588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006589sed 's/^/| /' conftest.$ac_ext >&5
6590
Martin v. Löwis11437992002-04-12 09:54:03 +00006591ac_lo=`expr '(' $ac_mid ')' + 1`
6592fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006594done
6595case $ac_lo in
6596?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006597'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6598See \`config.log' for more details." >&5
6599echo "$as_me: error: cannot compute sizeof (int), 77
6600See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006601 { (exit 1); exit 1; }; } ;;
6602esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006603else
6604 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006605 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6606See \`config.log' for more details." >&5
6607echo "$as_me: error: cannot run test program while cross compiling
6608See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006609 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610else
Martin v. Löwis11437992002-04-12 09:54:03 +00006611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006612/* confdefs.h. */
6613_ACEOF
6614cat confdefs.h >>conftest.$ac_ext
6615cat >>conftest.$ac_ext <<_ACEOF
6616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006617$ac_includes_default
6618long longval () { return (long) (sizeof (int)); }
6619unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006620#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006621#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006624{
Martin v. Löwis11437992002-04-12 09:54:03 +00006625
6626 FILE *f = fopen ("conftest.val", "w");
6627 if (! f)
6628 exit (1);
6629 if (((long) (sizeof (int))) < 0)
6630 {
6631 long i = longval ();
6632 if (i != ((long) (sizeof (int))))
6633 exit (1);
6634 fprintf (f, "%ld\n", i);
6635 }
6636 else
6637 {
6638 unsigned long i = ulongval ();
6639 if (i != ((long) (sizeof (int))))
6640 exit (1);
6641 fprintf (f, "%lu\n", i);
6642 }
6643 exit (ferror (f) || fclose (f) != 0);
6644
6645 ;
6646 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006647}
Martin v. Löwis11437992002-04-12 09:54:03 +00006648_ACEOF
6649rm -f conftest$ac_exeext
6650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6651 (eval $ac_link) 2>&5
6652 ac_status=$?
6653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6656 (eval $ac_try) 2>&5
6657 ac_status=$?
6658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6659 (exit $ac_status); }; }; then
6660 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006661else
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 echo "$as_me: program exited with status $ac_status" >&5
6663echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006664sed 's/^/| /' conftest.$ac_ext >&5
6665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006667{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6668See \`config.log' for more details." >&5
6669echo "$as_me: error: cannot compute sizeof (int), 77
6670See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006671 { (exit 1); exit 1; }; }
6672fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006673rm -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 +00006674fi
6675fi
6676rm -f conftest.val
6677else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006678 ac_cv_sizeof_int=0
6679fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006680fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006681echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6682echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6683cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006684#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006685_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006686
6687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688echo "$as_me:$LINENO: checking for long" >&5
6689echo $ECHO_N "checking for long... $ECHO_C" >&6
6690if test "${ac_cv_type_long+set}" = set; then
6691 echo $ECHO_N "(cached) $ECHO_C" >&6
6692else
6693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006694/* confdefs.h. */
6695_ACEOF
6696cat confdefs.h >>conftest.$ac_ext
6697cat >>conftest.$ac_ext <<_ACEOF
6698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006699$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006700int
6701main ()
6702{
6703if ((long *) 0)
6704 return 0;
6705if (sizeof (long))
6706 return 0;
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711rm -f conftest.$ac_objext
6712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006713 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006715 grep -v '^ *+' conftest.er1 >conftest.err
6716 rm -f conftest.er1
6717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6719 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006720 { ac_try='test -z "$ac_c_werror_flag"
6721 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6723 (eval $ac_try) 2>&5
6724 ac_status=$?
6725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6726 (exit $ac_status); }; } &&
6727 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6729 (eval $ac_try) 2>&5
6730 ac_status=$?
6731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6732 (exit $ac_status); }; }; then
6733 ac_cv_type_long=yes
6734else
6735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006736sed 's/^/| /' conftest.$ac_ext >&5
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738ac_cv_type_long=no
6739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006741fi
6742echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6743echo "${ECHO_T}$ac_cv_type_long" >&6
6744
6745echo "$as_me:$LINENO: checking size of long" >&5
6746echo $ECHO_N "checking size of long... $ECHO_C" >&6
6747if test "${ac_cv_sizeof_long+set}" = set; then
6748 echo $ECHO_N "(cached) $ECHO_C" >&6
6749else
6750 if test "$ac_cv_type_long" = yes; then
6751 # The cast to unsigned long works around a bug in the HP C Compiler
6752 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6753 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6754 # This bug is HP SR number 8606223364.
6755 if test "$cross_compiling" = yes; then
6756 # Depending upon the size, compute the lo and hi bounds.
6757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006758/* confdefs.h. */
6759_ACEOF
6760cat confdefs.h >>conftest.$ac_ext
6761cat >>conftest.$ac_ext <<_ACEOF
6762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006763$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006764int
6765main ()
6766{
6767static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6768test_array [0] = 0
6769
6770 ;
6771 return 0;
6772}
6773_ACEOF
6774rm -f conftest.$ac_objext
6775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006776 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006778 grep -v '^ *+' conftest.er1 >conftest.err
6779 rm -f conftest.er1
6780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6782 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006783 { ac_try='test -z "$ac_c_werror_flag"
6784 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6786 (eval $ac_try) 2>&5
6787 ac_status=$?
6788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6789 (exit $ac_status); }; } &&
6790 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6792 (eval $ac_try) 2>&5
6793 ac_status=$?
6794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6795 (exit $ac_status); }; }; then
6796 ac_lo=0 ac_mid=0
6797 while :; do
6798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006799/* confdefs.h. */
6800_ACEOF
6801cat confdefs.h >>conftest.$ac_ext
6802cat >>conftest.$ac_ext <<_ACEOF
6803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006804$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006805int
6806main ()
6807{
6808static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6809test_array [0] = 0
6810
6811 ;
6812 return 0;
6813}
6814_ACEOF
6815rm -f conftest.$ac_objext
6816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006817 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006819 grep -v '^ *+' conftest.er1 >conftest.err
6820 rm -f conftest.er1
6821 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006824 { ac_try='test -z "$ac_c_werror_flag"
6825 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6827 (eval $ac_try) 2>&5
6828 ac_status=$?
6829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830 (exit $ac_status); }; } &&
6831 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833 (eval $ac_try) 2>&5
6834 ac_status=$?
6835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836 (exit $ac_status); }; }; then
6837 ac_hi=$ac_mid; break
6838else
6839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006843 if test $ac_lo -le $ac_mid; then
6844 ac_lo= ac_hi=
6845 break
6846 fi
6847 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006848fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006849rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 done
6851else
6852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006853sed 's/^/| /' conftest.$ac_ext >&5
6854
Martin v. Löwis11437992002-04-12 09:54:03 +00006855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006862int
6863main ()
6864{
6865static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6866test_array [0] = 0
6867
6868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
6873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006874 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006876 grep -v '^ *+' conftest.er1 >conftest.err
6877 rm -f conftest.er1
6878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6880 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006881 { ac_try='test -z "$ac_c_werror_flag"
6882 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6884 (eval $ac_try) 2>&5
6885 ac_status=$?
6886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6887 (exit $ac_status); }; } &&
6888 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6890 (eval $ac_try) 2>&5
6891 ac_status=$?
6892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6893 (exit $ac_status); }; }; then
6894 ac_hi=-1 ac_mid=-1
6895 while :; do
6896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006897/* confdefs.h. */
6898_ACEOF
6899cat confdefs.h >>conftest.$ac_ext
6900cat >>conftest.$ac_ext <<_ACEOF
6901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006902$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006903int
6904main ()
6905{
6906static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6907test_array [0] = 0
6908
6909 ;
6910 return 0;
6911}
6912_ACEOF
6913rm -f conftest.$ac_objext
6914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006915 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006917 grep -v '^ *+' conftest.er1 >conftest.err
6918 rm -f conftest.er1
6919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6921 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006922 { ac_try='test -z "$ac_c_werror_flag"
6923 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6925 (eval $ac_try) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); }; } &&
6929 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_lo=$ac_mid; break
6936else
6937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006938sed 's/^/| /' conftest.$ac_ext >&5
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006941 if test $ac_mid -le $ac_hi; then
6942 ac_lo= ac_hi=
6943 break
6944 fi
6945 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006946fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006947rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 done
6949else
6950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006951sed 's/^/| /' conftest.$ac_ext >&5
6952
Martin v. Löwis11437992002-04-12 09:54:03 +00006953ac_lo= ac_hi=
6954fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006955rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006956fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006958# Binary search between lo and hi bounds.
6959while test "x$ac_lo" != "x$ac_hi"; do
6960 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006962/* confdefs.h. */
6963_ACEOF
6964cat confdefs.h >>conftest.$ac_ext
6965cat >>conftest.$ac_ext <<_ACEOF
6966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006967$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006968int
6969main ()
6970{
6971static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6972test_array [0] = 0
6973
6974 ;
6975 return 0;
6976}
6977_ACEOF
6978rm -f conftest.$ac_objext
6979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006980 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006982 grep -v '^ *+' conftest.er1 >conftest.err
6983 rm -f conftest.er1
6984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6986 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006987 { ac_try='test -z "$ac_c_werror_flag"
6988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6990 (eval $ac_try) 2>&5
6991 ac_status=$?
6992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6993 (exit $ac_status); }; } &&
6994 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6996 (eval $ac_try) 2>&5
6997 ac_status=$?
6998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999 (exit $ac_status); }; }; then
7000 ac_hi=$ac_mid
7001else
7002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007003sed 's/^/| /' conftest.$ac_ext >&5
7004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005ac_lo=`expr '(' $ac_mid ')' + 1`
7006fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007008done
7009case $ac_lo in
7010?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007011'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7012See \`config.log' for more details." >&5
7013echo "$as_me: error: cannot compute sizeof (long), 77
7014See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 { (exit 1); exit 1; }; } ;;
7016esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007017else
7018 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007019 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7020See \`config.log' for more details." >&5
7021echo "$as_me: error: cannot run test program while cross compiling
7022See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007024else
Martin v. Löwis11437992002-04-12 09:54:03 +00007025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007026/* confdefs.h. */
7027_ACEOF
7028cat confdefs.h >>conftest.$ac_ext
7029cat >>conftest.$ac_ext <<_ACEOF
7030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007031$ac_includes_default
7032long longval () { return (long) (sizeof (long)); }
7033unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007034#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007035#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007038{
Martin v. Löwis11437992002-04-12 09:54:03 +00007039
7040 FILE *f = fopen ("conftest.val", "w");
7041 if (! f)
7042 exit (1);
7043 if (((long) (sizeof (long))) < 0)
7044 {
7045 long i = longval ();
7046 if (i != ((long) (sizeof (long))))
7047 exit (1);
7048 fprintf (f, "%ld\n", i);
7049 }
7050 else
7051 {
7052 unsigned long i = ulongval ();
7053 if (i != ((long) (sizeof (long))))
7054 exit (1);
7055 fprintf (f, "%lu\n", i);
7056 }
7057 exit (ferror (f) || fclose (f) != 0);
7058
7059 ;
7060 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007061}
Martin v. Löwis11437992002-04-12 09:54:03 +00007062_ACEOF
7063rm -f conftest$ac_exeext
7064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7065 (eval $ac_link) 2>&5
7066 ac_status=$?
7067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7070 (eval $ac_try) 2>&5
7071 ac_status=$?
7072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7073 (exit $ac_status); }; }; then
7074 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007075else
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 echo "$as_me: program exited with status $ac_status" >&5
7077echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007078sed 's/^/| /' conftest.$ac_ext >&5
7079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007081{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7082See \`config.log' for more details." >&5
7083echo "$as_me: error: cannot compute sizeof (long), 77
7084See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007085 { (exit 1); exit 1; }; }
7086fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007087rm -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 +00007088fi
7089fi
7090rm -f conftest.val
7091else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007092 ac_cv_sizeof_long=0
7093fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007095echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7096echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7097cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007098#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007099_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007100
7101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102echo "$as_me:$LINENO: checking for void *" >&5
7103echo $ECHO_N "checking for void *... $ECHO_C" >&6
7104if test "${ac_cv_type_void_p+set}" = set; then
7105 echo $ECHO_N "(cached) $ECHO_C" >&6
7106else
7107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007108/* confdefs.h. */
7109_ACEOF
7110cat confdefs.h >>conftest.$ac_ext
7111cat >>conftest.$ac_ext <<_ACEOF
7112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007113$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007114int
7115main ()
7116{
7117if ((void * *) 0)
7118 return 0;
7119if (sizeof (void *))
7120 return 0;
7121 ;
7122 return 0;
7123}
7124_ACEOF
7125rm -f conftest.$ac_objext
7126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007127 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007129 grep -v '^ *+' conftest.er1 >conftest.err
7130 rm -f conftest.er1
7131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007134 { ac_try='test -z "$ac_c_werror_flag"
7135 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7137 (eval $ac_try) 2>&5
7138 ac_status=$?
7139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7140 (exit $ac_status); }; } &&
7141 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7143 (eval $ac_try) 2>&5
7144 ac_status=$?
7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7146 (exit $ac_status); }; }; then
7147 ac_cv_type_void_p=yes
7148else
7149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007150sed 's/^/| /' conftest.$ac_ext >&5
7151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152ac_cv_type_void_p=no
7153fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007154rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007155fi
7156echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7157echo "${ECHO_T}$ac_cv_type_void_p" >&6
7158
7159echo "$as_me:$LINENO: checking size of void *" >&5
7160echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7161if test "${ac_cv_sizeof_void_p+set}" = set; then
7162 echo $ECHO_N "(cached) $ECHO_C" >&6
7163else
7164 if test "$ac_cv_type_void_p" = yes; then
7165 # The cast to unsigned long works around a bug in the HP C Compiler
7166 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7167 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7168 # This bug is HP SR number 8606223364.
7169 if test "$cross_compiling" = yes; then
7170 # Depending upon the size, compute the lo and hi bounds.
7171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007172/* confdefs.h. */
7173_ACEOF
7174cat confdefs.h >>conftest.$ac_ext
7175cat >>conftest.$ac_ext <<_ACEOF
7176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007177$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
7181static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7182test_array [0] = 0
7183
7184 ;
7185 return 0;
7186}
7187_ACEOF
7188rm -f conftest.$ac_objext
7189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007190 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007192 grep -v '^ *+' conftest.er1 >conftest.err
7193 rm -f conftest.er1
7194 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7196 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007197 { ac_try='test -z "$ac_c_werror_flag"
7198 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203 (exit $ac_status); }; } &&
7204 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7206 (eval $ac_try) 2>&5
7207 ac_status=$?
7208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209 (exit $ac_status); }; }; then
7210 ac_lo=0 ac_mid=0
7211 while :; do
7212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007218$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007219int
7220main ()
7221{
7222static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7223test_array [0] = 0
7224
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229rm -f conftest.$ac_objext
7230if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007231 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007233 grep -v '^ *+' conftest.er1 >conftest.err
7234 rm -f conftest.er1
7235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7237 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007238 { ac_try='test -z "$ac_c_werror_flag"
7239 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7241 (eval $ac_try) 2>&5
7242 ac_status=$?
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); }; } &&
7245 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247 (eval $ac_try) 2>&5
7248 ac_status=$?
7249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250 (exit $ac_status); }; }; then
7251 ac_hi=$ac_mid; break
7252else
7253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
Martin v. Löwis11437992002-04-12 09:54:03 +00007256ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007257 if test $ac_lo -le $ac_mid; then
7258 ac_lo= ac_hi=
7259 break
7260 fi
7261 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007262fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007264 done
7265else
7266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007267sed 's/^/| /' conftest.$ac_ext >&5
7268
Martin v. Löwis11437992002-04-12 09:54:03 +00007269cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007270/* confdefs.h. */
7271_ACEOF
7272cat confdefs.h >>conftest.$ac_ext
7273cat >>conftest.$ac_ext <<_ACEOF
7274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007275$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007276int
7277main ()
7278{
7279static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7280test_array [0] = 0
7281
7282 ;
7283 return 0;
7284}
7285_ACEOF
7286rm -f conftest.$ac_objext
7287if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007288 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007290 grep -v '^ *+' conftest.er1 >conftest.err
7291 rm -f conftest.er1
7292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007295 { ac_try='test -z "$ac_c_werror_flag"
7296 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7298 (eval $ac_try) 2>&5
7299 ac_status=$?
7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); }; } &&
7302 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7304 (eval $ac_try) 2>&5
7305 ac_status=$?
7306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7307 (exit $ac_status); }; }; then
7308 ac_hi=-1 ac_mid=-1
7309 while :; do
7310 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* confdefs.h. */
7312_ACEOF
7313cat confdefs.h >>conftest.$ac_ext
7314cat >>conftest.$ac_ext <<_ACEOF
7315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007316$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007317int
7318main ()
7319{
7320static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7321test_array [0] = 0
7322
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
7328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007329 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007336 { ac_try='test -z "$ac_c_werror_flag"
7337 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; } &&
7343 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_lo=$ac_mid; break
7350else
7351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007352sed 's/^/| /' conftest.$ac_ext >&5
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007355 if test $ac_mid -le $ac_hi; then
7356 ac_lo= ac_hi=
7357 break
7358 fi
7359 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007360fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007361rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007362 done
7363else
7364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007365sed 's/^/| /' conftest.$ac_ext >&5
7366
Martin v. Löwis11437992002-04-12 09:54:03 +00007367ac_lo= ac_hi=
7368fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007372# Binary search between lo and hi bounds.
7373while test "x$ac_lo" != "x$ac_hi"; do
7374 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007376/* confdefs.h. */
7377_ACEOF
7378cat confdefs.h >>conftest.$ac_ext
7379cat >>conftest.$ac_ext <<_ACEOF
7380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007381$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
7384{
7385static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7386test_array [0] = 0
7387
7388 ;
7389 return 0;
7390}
7391_ACEOF
7392rm -f conftest.$ac_objext
7393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007394 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007396 grep -v '^ *+' conftest.er1 >conftest.err
7397 rm -f conftest.er1
7398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7400 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007401 { ac_try='test -z "$ac_c_werror_flag"
7402 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7404 (eval $ac_try) 2>&5
7405 ac_status=$?
7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407 (exit $ac_status); }; } &&
7408 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7410 (eval $ac_try) 2>&5
7411 ac_status=$?
7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413 (exit $ac_status); }; }; then
7414 ac_hi=$ac_mid
7415else
7416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007417sed 's/^/| /' conftest.$ac_ext >&5
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419ac_lo=`expr '(' $ac_mid ')' + 1`
7420fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007422done
7423case $ac_lo in
7424?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007425'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7426See \`config.log' for more details." >&5
7427echo "$as_me: error: cannot compute sizeof (void *), 77
7428See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 { (exit 1); exit 1; }; } ;;
7430esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007431else
7432 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007433 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7434See \`config.log' for more details." >&5
7435echo "$as_me: error: cannot run test program while cross compiling
7436See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007438else
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007440/* confdefs.h. */
7441_ACEOF
7442cat confdefs.h >>conftest.$ac_ext
7443cat >>conftest.$ac_ext <<_ACEOF
7444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007445$ac_includes_default
7446long longval () { return (long) (sizeof (void *)); }
7447unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007448#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007449#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007450int
7451main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007452{
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454 FILE *f = fopen ("conftest.val", "w");
7455 if (! f)
7456 exit (1);
7457 if (((long) (sizeof (void *))) < 0)
7458 {
7459 long i = longval ();
7460 if (i != ((long) (sizeof (void *))))
7461 exit (1);
7462 fprintf (f, "%ld\n", i);
7463 }
7464 else
7465 {
7466 unsigned long i = ulongval ();
7467 if (i != ((long) (sizeof (void *))))
7468 exit (1);
7469 fprintf (f, "%lu\n", i);
7470 }
7471 exit (ferror (f) || fclose (f) != 0);
7472
7473 ;
7474 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007475}
Martin v. Löwis11437992002-04-12 09:54:03 +00007476_ACEOF
7477rm -f conftest$ac_exeext
7478if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7479 (eval $ac_link) 2>&5
7480 ac_status=$?
7481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7484 (eval $ac_try) 2>&5
7485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); }; }; then
7488 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007489else
Martin v. Löwis11437992002-04-12 09:54:03 +00007490 echo "$as_me: program exited with status $ac_status" >&5
7491echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007492sed 's/^/| /' conftest.$ac_ext >&5
7493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007495{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7496See \`config.log' for more details." >&5
7497echo "$as_me: error: cannot compute sizeof (void *), 77
7498See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 { (exit 1); exit 1; }; }
7500fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007501rm -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 +00007502fi
7503fi
7504rm -f conftest.val
7505else
Guido van Rossumad678af1998-10-02 14:42:15 +00007506 ac_cv_sizeof_void_p=0
7507fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007509echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7510echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7511cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007512#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007514
7515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516echo "$as_me:$LINENO: checking for short" >&5
7517echo $ECHO_N "checking for short... $ECHO_C" >&6
7518if test "${ac_cv_type_short+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7520else
7521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007522/* confdefs.h. */
7523_ACEOF
7524cat confdefs.h >>conftest.$ac_ext
7525cat >>conftest.$ac_ext <<_ACEOF
7526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007527$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
7530{
7531if ((short *) 0)
7532 return 0;
7533if (sizeof (short))
7534 return 0;
7535 ;
7536 return 0;
7537}
7538_ACEOF
7539rm -f conftest.$ac_objext
7540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007541 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007548 { ac_try='test -z "$ac_c_werror_flag"
7549 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7551 (eval $ac_try) 2>&5
7552 ac_status=$?
7553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554 (exit $ac_status); }; } &&
7555 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
7559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7560 (exit $ac_status); }; }; then
7561 ac_cv_type_short=yes
7562else
7563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007564sed 's/^/| /' conftest.$ac_ext >&5
7565
Martin v. Löwis11437992002-04-12 09:54:03 +00007566ac_cv_type_short=no
7567fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007569fi
7570echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7571echo "${ECHO_T}$ac_cv_type_short" >&6
7572
7573echo "$as_me:$LINENO: checking size of short" >&5
7574echo $ECHO_N "checking size of short... $ECHO_C" >&6
7575if test "${ac_cv_sizeof_short+set}" = set; then
7576 echo $ECHO_N "(cached) $ECHO_C" >&6
7577else
7578 if test "$ac_cv_type_short" = yes; then
7579 # The cast to unsigned long works around a bug in the HP C Compiler
7580 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7581 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7582 # This bug is HP SR number 8606223364.
7583 if test "$cross_compiling" = yes; then
7584 # Depending upon the size, compute the lo and hi bounds.
7585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* confdefs.h. */
7587_ACEOF
7588cat confdefs.h >>conftest.$ac_ext
7589cat >>conftest.$ac_ext <<_ACEOF
7590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
7595static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7596test_array [0] = 0
7597
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602rm -f conftest.$ac_objext
7603if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007604 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007606 grep -v '^ *+' conftest.er1 >conftest.err
7607 rm -f conftest.er1
7608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7610 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007611 { ac_try='test -z "$ac_c_werror_flag"
7612 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7614 (eval $ac_try) 2>&5
7615 ac_status=$?
7616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7617 (exit $ac_status); }; } &&
7618 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7620 (eval $ac_try) 2>&5
7621 ac_status=$?
7622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7623 (exit $ac_status); }; }; then
7624 ac_lo=0 ac_mid=0
7625 while :; do
7626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007627/* confdefs.h. */
7628_ACEOF
7629cat confdefs.h >>conftest.$ac_ext
7630cat >>conftest.$ac_ext <<_ACEOF
7631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007633int
7634main ()
7635{
7636static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7637test_array [0] = 0
7638
7639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
7644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007645 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007647 grep -v '^ *+' conftest.er1 >conftest.err
7648 rm -f conftest.er1
7649 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7651 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007652 { ac_try='test -z "$ac_c_werror_flag"
7653 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7655 (eval $ac_try) 2>&5
7656 ac_status=$?
7657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7658 (exit $ac_status); }; } &&
7659 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7661 (eval $ac_try) 2>&5
7662 ac_status=$?
7663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7664 (exit $ac_status); }; }; then
7665 ac_hi=$ac_mid; break
7666else
7667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007668sed 's/^/| /' conftest.$ac_ext >&5
7669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 if test $ac_lo -le $ac_mid; then
7672 ac_lo= ac_hi=
7673 break
7674 fi
7675 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007677rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 done
7679else
7680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007681sed 's/^/| /' conftest.$ac_ext >&5
7682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007690int
7691main ()
7692{
7693static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7694test_array [0] = 0
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
7700rm -f conftest.$ac_objext
7701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007702 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007704 grep -v '^ *+' conftest.er1 >conftest.err
7705 rm -f conftest.er1
7706 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7708 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007709 { ac_try='test -z "$ac_c_werror_flag"
7710 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7712 (eval $ac_try) 2>&5
7713 ac_status=$?
7714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7715 (exit $ac_status); }; } &&
7716 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7718 (eval $ac_try) 2>&5
7719 ac_status=$?
7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7721 (exit $ac_status); }; }; then
7722 ac_hi=-1 ac_mid=-1
7723 while :; do
7724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007725/* confdefs.h. */
7726_ACEOF
7727cat confdefs.h >>conftest.$ac_ext
7728cat >>conftest.$ac_ext <<_ACEOF
7729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007730$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007731int
7732main ()
7733{
7734static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7735test_array [0] = 0
7736
7737 ;
7738 return 0;
7739}
7740_ACEOF
7741rm -f conftest.$ac_objext
7742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007743 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007745 grep -v '^ *+' conftest.er1 >conftest.err
7746 rm -f conftest.er1
7747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007750 { ac_try='test -z "$ac_c_werror_flag"
7751 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7753 (eval $ac_try) 2>&5
7754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); }; } &&
7757 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7759 (eval $ac_try) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 ac_lo=$ac_mid; break
7764else
7765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007766sed 's/^/| /' conftest.$ac_ext >&5
7767
Martin v. Löwis11437992002-04-12 09:54:03 +00007768ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769 if test $ac_mid -le $ac_hi; then
7770 ac_lo= ac_hi=
7771 break
7772 fi
7773 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 done
7777else
7778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007779sed 's/^/| /' conftest.$ac_ext >&5
7780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781ac_lo= ac_hi=
7782fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007783rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007785rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007786# Binary search between lo and hi bounds.
7787while test "x$ac_lo" != "x$ac_hi"; do
7788 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* confdefs.h. */
7791_ACEOF
7792cat confdefs.h >>conftest.$ac_ext
7793cat >>conftest.$ac_ext <<_ACEOF
7794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007796int
7797main ()
7798{
7799static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7800test_array [0] = 0
7801
7802 ;
7803 return 0;
7804}
7805_ACEOF
7806rm -f conftest.$ac_objext
7807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007808 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007810 grep -v '^ *+' conftest.er1 >conftest.err
7811 rm -f conftest.er1
7812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007815 { ac_try='test -z "$ac_c_werror_flag"
7816 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7818 (eval $ac_try) 2>&5
7819 ac_status=$?
7820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7821 (exit $ac_status); }; } &&
7822 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7824 (eval $ac_try) 2>&5
7825 ac_status=$?
7826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827 (exit $ac_status); }; }; then
7828 ac_hi=$ac_mid
7829else
7830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833ac_lo=`expr '(' $ac_mid ')' + 1`
7834fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007836done
7837case $ac_lo in
7838?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007839'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7840See \`config.log' for more details." >&5
7841echo "$as_me: error: cannot compute sizeof (short), 77
7842See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 { (exit 1); exit 1; }; } ;;
7844esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007845else
7846 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007847 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7848See \`config.log' for more details." >&5
7849echo "$as_me: error: cannot run test program while cross compiling
7850See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007852else
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007854/* confdefs.h. */
7855_ACEOF
7856cat confdefs.h >>conftest.$ac_ext
7857cat >>conftest.$ac_ext <<_ACEOF
7858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007859$ac_includes_default
7860long longval () { return (long) (sizeof (short)); }
7861unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007862#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007863#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007866{
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868 FILE *f = fopen ("conftest.val", "w");
7869 if (! f)
7870 exit (1);
7871 if (((long) (sizeof (short))) < 0)
7872 {
7873 long i = longval ();
7874 if (i != ((long) (sizeof (short))))
7875 exit (1);
7876 fprintf (f, "%ld\n", i);
7877 }
7878 else
7879 {
7880 unsigned long i = ulongval ();
7881 if (i != ((long) (sizeof (short))))
7882 exit (1);
7883 fprintf (f, "%lu\n", i);
7884 }
7885 exit (ferror (f) || fclose (f) != 0);
7886
7887 ;
7888 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007889}
Martin v. Löwis11437992002-04-12 09:54:03 +00007890_ACEOF
7891rm -f conftest$ac_exeext
7892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7893 (eval $ac_link) 2>&5
7894 ac_status=$?
7895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7897 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7898 (eval $ac_try) 2>&5
7899 ac_status=$?
7900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7901 (exit $ac_status); }; }; then
7902 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007903else
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 echo "$as_me: program exited with status $ac_status" >&5
7905echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007906sed 's/^/| /' conftest.$ac_ext >&5
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007909{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7910See \`config.log' for more details." >&5
7911echo "$as_me: error: cannot compute sizeof (short), 77
7912See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 { (exit 1); exit 1; }; }
7914fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007915rm -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 +00007916fi
7917fi
7918rm -f conftest.val
7919else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007920 ac_cv_sizeof_short=0
7921fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007923echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7924echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7925cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007926#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007927_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007928
7929
Martin v. Löwis11437992002-04-12 09:54:03 +00007930echo "$as_me:$LINENO: checking for float" >&5
7931echo $ECHO_N "checking for float... $ECHO_C" >&6
7932if test "${ac_cv_type_float+set}" = set; then
7933 echo $ECHO_N "(cached) $ECHO_C" >&6
7934else
7935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007936/* confdefs.h. */
7937_ACEOF
7938cat confdefs.h >>conftest.$ac_ext
7939cat >>conftest.$ac_ext <<_ACEOF
7940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007941$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
7945if ((float *) 0)
7946 return 0;
7947if (sizeof (float))
7948 return 0;
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953rm -f conftest.$ac_objext
7954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7961 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007962 { ac_try='test -z "$ac_c_werror_flag"
7963 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7965 (eval $ac_try) 2>&5
7966 ac_status=$?
7967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7968 (exit $ac_status); }; } &&
7969 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971 (eval $ac_try) 2>&5
7972 ac_status=$?
7973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974 (exit $ac_status); }; }; then
7975 ac_cv_type_float=yes
7976else
7977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007978sed 's/^/| /' conftest.$ac_ext >&5
7979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980ac_cv_type_float=no
7981fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007982rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007983fi
7984echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7985echo "${ECHO_T}$ac_cv_type_float" >&6
7986
7987echo "$as_me:$LINENO: checking size of float" >&5
7988echo $ECHO_N "checking size of float... $ECHO_C" >&6
7989if test "${ac_cv_sizeof_float+set}" = set; then
7990 echo $ECHO_N "(cached) $ECHO_C" >&6
7991else
7992 if test "$ac_cv_type_float" = yes; then
7993 # The cast to unsigned long works around a bug in the HP C Compiler
7994 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7995 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7996 # This bug is HP SR number 8606223364.
7997 if test "$cross_compiling" = yes; then
7998 # Depending upon the size, compute the lo and hi bounds.
7999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008000/* confdefs.h. */
8001_ACEOF
8002cat confdefs.h >>conftest.$ac_ext
8003cat >>conftest.$ac_ext <<_ACEOF
8004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008005$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008006int
8007main ()
8008{
8009static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
8010test_array [0] = 0
8011
8012 ;
8013 return 0;
8014}
8015_ACEOF
8016rm -f conftest.$ac_objext
8017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008018 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 grep -v '^ *+' conftest.er1 >conftest.err
8021 rm -f conftest.er1
8022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8024 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008025 { ac_try='test -z "$ac_c_werror_flag"
8026 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8028 (eval $ac_try) 2>&5
8029 ac_status=$?
8030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8031 (exit $ac_status); }; } &&
8032 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8034 (eval $ac_try) 2>&5
8035 ac_status=$?
8036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8037 (exit $ac_status); }; }; then
8038 ac_lo=0 ac_mid=0
8039 while :; do
8040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008041/* confdefs.h. */
8042_ACEOF
8043cat confdefs.h >>conftest.$ac_ext
8044cat >>conftest.$ac_ext <<_ACEOF
8045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008046$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008047int
8048main ()
8049{
8050static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8051test_array [0] = 0
8052
8053 ;
8054 return 0;
8055}
8056_ACEOF
8057rm -f conftest.$ac_objext
8058if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008059 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008061 grep -v '^ *+' conftest.er1 >conftest.err
8062 rm -f conftest.er1
8063 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008066 { ac_try='test -z "$ac_c_werror_flag"
8067 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8069 (eval $ac_try) 2>&5
8070 ac_status=$?
8071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8072 (exit $ac_status); }; } &&
8073 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8075 (eval $ac_try) 2>&5
8076 ac_status=$?
8077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8078 (exit $ac_status); }; }; then
8079 ac_hi=$ac_mid; break
8080else
8081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008082sed 's/^/| /' conftest.$ac_ext >&5
8083
Martin v. Löwis11437992002-04-12 09:54:03 +00008084ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008085 if test $ac_lo -le $ac_mid; then
8086 ac_lo= ac_hi=
8087 break
8088 fi
8089 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008090fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008091rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 done
8093else
8094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008095sed 's/^/| /' conftest.$ac_ext >&5
8096
Martin v. Löwis11437992002-04-12 09:54:03 +00008097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* confdefs.h. */
8099_ACEOF
8100cat confdefs.h >>conftest.$ac_ext
8101cat >>conftest.$ac_ext <<_ACEOF
8102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008104int
8105main ()
8106{
8107static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
8108test_array [0] = 0
8109
8110 ;
8111 return 0;
8112}
8113_ACEOF
8114rm -f conftest.$ac_objext
8115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008118 grep -v '^ *+' conftest.er1 >conftest.err
8119 rm -f conftest.er1
8120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008123 { ac_try='test -z "$ac_c_werror_flag"
8124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8126 (eval $ac_try) 2>&5
8127 ac_status=$?
8128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8129 (exit $ac_status); }; } &&
8130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8132 (eval $ac_try) 2>&5
8133 ac_status=$?
8134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135 (exit $ac_status); }; }; then
8136 ac_hi=-1 ac_mid=-1
8137 while :; do
8138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008139/* confdefs.h. */
8140_ACEOF
8141cat confdefs.h >>conftest.$ac_ext
8142cat >>conftest.$ac_ext <<_ACEOF
8143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008144$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008145int
8146main ()
8147{
8148static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8149test_array [0] = 0
8150
8151 ;
8152 return 0;
8153}
8154_ACEOF
8155rm -f conftest.$ac_objext
8156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008157 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008159 grep -v '^ *+' conftest.er1 >conftest.err
8160 rm -f conftest.er1
8161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008164 { ac_try='test -z "$ac_c_werror_flag"
8165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8167 (eval $ac_try) 2>&5
8168 ac_status=$?
8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170 (exit $ac_status); }; } &&
8171 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8173 (eval $ac_try) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); }; }; then
8177 ac_lo=$ac_mid; break
8178else
8179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008180sed 's/^/| /' conftest.$ac_ext >&5
8181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008183 if test $ac_mid -le $ac_hi; then
8184 ac_lo= ac_hi=
8185 break
8186 fi
8187 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 done
8191else
8192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008193sed 's/^/| /' conftest.$ac_ext >&5
8194
Martin v. Löwis11437992002-04-12 09:54:03 +00008195ac_lo= ac_hi=
8196fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008197rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008200# Binary search between lo and hi bounds.
8201while test "x$ac_lo" != "x$ac_hi"; do
8202 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008204/* confdefs.h. */
8205_ACEOF
8206cat confdefs.h >>conftest.$ac_ext
8207cat >>conftest.$ac_ext <<_ACEOF
8208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008209$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008210int
8211main ()
8212{
8213static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8214test_array [0] = 0
8215
8216 ;
8217 return 0;
8218}
8219_ACEOF
8220rm -f conftest.$ac_objext
8221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008222 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008224 grep -v '^ *+' conftest.er1 >conftest.err
8225 rm -f conftest.er1
8226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008229 { ac_try='test -z "$ac_c_werror_flag"
8230 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8232 (eval $ac_try) 2>&5
8233 ac_status=$?
8234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235 (exit $ac_status); }; } &&
8236 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8238 (eval $ac_try) 2>&5
8239 ac_status=$?
8240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8241 (exit $ac_status); }; }; then
8242 ac_hi=$ac_mid
8243else
8244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008245sed 's/^/| /' conftest.$ac_ext >&5
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247ac_lo=`expr '(' $ac_mid ')' + 1`
8248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008250done
8251case $ac_lo in
8252?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008253'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8254See \`config.log' for more details." >&5
8255echo "$as_me: error: cannot compute sizeof (float), 77
8256See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 { (exit 1); exit 1; }; } ;;
8258esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008259else
8260 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008261 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8262See \`config.log' for more details." >&5
8263echo "$as_me: error: cannot run test program while cross compiling
8264See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008266else
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008268/* confdefs.h. */
8269_ACEOF
8270cat confdefs.h >>conftest.$ac_ext
8271cat >>conftest.$ac_ext <<_ACEOF
8272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008273$ac_includes_default
8274long longval () { return (long) (sizeof (float)); }
8275unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008276#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008277#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008278int
8279main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008280{
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
8282 FILE *f = fopen ("conftest.val", "w");
8283 if (! f)
8284 exit (1);
8285 if (((long) (sizeof (float))) < 0)
8286 {
8287 long i = longval ();
8288 if (i != ((long) (sizeof (float))))
8289 exit (1);
8290 fprintf (f, "%ld\n", i);
8291 }
8292 else
8293 {
8294 unsigned long i = ulongval ();
8295 if (i != ((long) (sizeof (float))))
8296 exit (1);
8297 fprintf (f, "%lu\n", i);
8298 }
8299 exit (ferror (f) || fclose (f) != 0);
8300
8301 ;
8302 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008303}
Martin v. Löwis11437992002-04-12 09:54:03 +00008304_ACEOF
8305rm -f conftest$ac_exeext
8306if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8307 (eval $ac_link) 2>&5
8308 ac_status=$?
8309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008317else
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 echo "$as_me: program exited with status $ac_status" >&5
8319echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008320sed 's/^/| /' conftest.$ac_ext >&5
8321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008323{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8324See \`config.log' for more details." >&5
8325echo "$as_me: error: cannot compute sizeof (float), 77
8326See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008327 { (exit 1); exit 1; }; }
8328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008329rm -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 +00008330fi
8331fi
8332rm -f conftest.val
8333else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008334 ac_cv_sizeof_float=0
8335fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008337echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8338echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8339cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008340#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008341_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008342
8343
Martin v. Löwis11437992002-04-12 09:54:03 +00008344echo "$as_me:$LINENO: checking for double" >&5
8345echo $ECHO_N "checking for double... $ECHO_C" >&6
8346if test "${ac_cv_type_double+set}" = set; then
8347 echo $ECHO_N "(cached) $ECHO_C" >&6
8348else
8349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008355$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008356int
8357main ()
8358{
8359if ((double *) 0)
8360 return 0;
8361if (sizeof (double))
8362 return 0;
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext
8368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008369 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8375 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008376 { ac_try='test -z "$ac_c_werror_flag"
8377 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8379 (eval $ac_try) 2>&5
8380 ac_status=$?
8381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382 (exit $ac_status); }; } &&
8383 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8385 (eval $ac_try) 2>&5
8386 ac_status=$?
8387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8388 (exit $ac_status); }; }; then
8389 ac_cv_type_double=yes
8390else
8391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008392sed 's/^/| /' conftest.$ac_ext >&5
8393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394ac_cv_type_double=no
8395fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008396rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
8398echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8399echo "${ECHO_T}$ac_cv_type_double" >&6
8400
8401echo "$as_me:$LINENO: checking size of double" >&5
8402echo $ECHO_N "checking size of double... $ECHO_C" >&6
8403if test "${ac_cv_sizeof_double+set}" = set; then
8404 echo $ECHO_N "(cached) $ECHO_C" >&6
8405else
8406 if test "$ac_cv_type_double" = yes; then
8407 # The cast to unsigned long works around a bug in the HP C Compiler
8408 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8409 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8410 # This bug is HP SR number 8606223364.
8411 if test "$cross_compiling" = yes; then
8412 # Depending upon the size, compute the lo and hi bounds.
8413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008414/* confdefs.h. */
8415_ACEOF
8416cat confdefs.h >>conftest.$ac_ext
8417cat >>conftest.$ac_ext <<_ACEOF
8418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008419$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008420int
8421main ()
8422{
8423static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8424test_array [0] = 0
8425
8426 ;
8427 return 0;
8428}
8429_ACEOF
8430rm -f conftest.$ac_objext
8431if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008432 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8438 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008439 { ac_try='test -z "$ac_c_werror_flag"
8440 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8442 (eval $ac_try) 2>&5
8443 ac_status=$?
8444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8445 (exit $ac_status); }; } &&
8446 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8448 (eval $ac_try) 2>&5
8449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); }; }; then
8452 ac_lo=0 ac_mid=0
8453 while :; do
8454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008461int
8462main ()
8463{
8464static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8465test_array [0] = 0
8466
8467 ;
8468 return 0;
8469}
8470_ACEOF
8471rm -f conftest.$ac_objext
8472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008473 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008475 grep -v '^ *+' conftest.er1 >conftest.err
8476 rm -f conftest.er1
8477 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8479 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008480 { ac_try='test -z "$ac_c_werror_flag"
8481 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8483 (eval $ac_try) 2>&5
8484 ac_status=$?
8485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8486 (exit $ac_status); }; } &&
8487 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8489 (eval $ac_try) 2>&5
8490 ac_status=$?
8491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492 (exit $ac_status); }; }; then
8493 ac_hi=$ac_mid; break
8494else
8495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008496sed 's/^/| /' conftest.$ac_ext >&5
8497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008499 if test $ac_lo -le $ac_mid; then
8500 ac_lo= ac_hi=
8501 break
8502 fi
8503 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008505rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 done
8507else
8508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008509sed 's/^/| /' conftest.$ac_ext >&5
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* confdefs.h. */
8513_ACEOF
8514cat confdefs.h >>conftest.$ac_ext
8515cat >>conftest.$ac_ext <<_ACEOF
8516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008517$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008518int
8519main ()
8520{
8521static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8522test_array [0] = 0
8523
8524 ;
8525 return 0;
8526}
8527_ACEOF
8528rm -f conftest.$ac_objext
8529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008530 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008532 grep -v '^ *+' conftest.er1 >conftest.err
8533 rm -f conftest.er1
8534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8536 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008537 { ac_try='test -z "$ac_c_werror_flag"
8538 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8540 (eval $ac_try) 2>&5
8541 ac_status=$?
8542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8543 (exit $ac_status); }; } &&
8544 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8546 (eval $ac_try) 2>&5
8547 ac_status=$?
8548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8549 (exit $ac_status); }; }; then
8550 ac_hi=-1 ac_mid=-1
8551 while :; do
8552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008553/* confdefs.h. */
8554_ACEOF
8555cat confdefs.h >>conftest.$ac_ext
8556cat >>conftest.$ac_ext <<_ACEOF
8557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008558$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008559int
8560main ()
8561{
8562static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8563test_array [0] = 0
8564
8565 ;
8566 return 0;
8567}
8568_ACEOF
8569rm -f conftest.$ac_objext
8570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008571 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008573 grep -v '^ *+' conftest.er1 >conftest.err
8574 rm -f conftest.er1
8575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008578 { ac_try='test -z "$ac_c_werror_flag"
8579 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8581 (eval $ac_try) 2>&5
8582 ac_status=$?
8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8584 (exit $ac_status); }; } &&
8585 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8587 (eval $ac_try) 2>&5
8588 ac_status=$?
8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8590 (exit $ac_status); }; }; then
8591 ac_lo=$ac_mid; break
8592else
8593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008594sed 's/^/| /' conftest.$ac_ext >&5
8595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008597 if test $ac_mid -le $ac_hi; then
8598 ac_lo= ac_hi=
8599 break
8600 fi
8601 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008602fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 done
8605else
8606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008607sed 's/^/| /' conftest.$ac_ext >&5
8608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609ac_lo= ac_hi=
8610fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008612fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008613rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008614# Binary search between lo and hi bounds.
8615while test "x$ac_lo" != "x$ac_hi"; do
8616 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* confdefs.h. */
8619_ACEOF
8620cat confdefs.h >>conftest.$ac_ext
8621cat >>conftest.$ac_ext <<_ACEOF
8622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008623$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008624int
8625main ()
8626{
8627static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8628test_array [0] = 0
8629
8630 ;
8631 return 0;
8632}
8633_ACEOF
8634rm -f conftest.$ac_objext
8635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008636 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008638 grep -v '^ *+' conftest.er1 >conftest.err
8639 rm -f conftest.er1
8640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8642 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008643 { ac_try='test -z "$ac_c_werror_flag"
8644 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8646 (eval $ac_try) 2>&5
8647 ac_status=$?
8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8649 (exit $ac_status); }; } &&
8650 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652 (eval $ac_try) 2>&5
8653 ac_status=$?
8654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655 (exit $ac_status); }; }; then
8656 ac_hi=$ac_mid
8657else
8658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008659sed 's/^/| /' conftest.$ac_ext >&5
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661ac_lo=`expr '(' $ac_mid ')' + 1`
8662fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008664done
8665case $ac_lo in
8666?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008667'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8668See \`config.log' for more details." >&5
8669echo "$as_me: error: cannot compute sizeof (double), 77
8670See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 { (exit 1); exit 1; }; } ;;
8672esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008673else
8674 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008675 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8676See \`config.log' for more details." >&5
8677echo "$as_me: error: cannot run test program while cross compiling
8678See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008680else
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008682/* confdefs.h. */
8683_ACEOF
8684cat confdefs.h >>conftest.$ac_ext
8685cat >>conftest.$ac_ext <<_ACEOF
8686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008687$ac_includes_default
8688long longval () { return (long) (sizeof (double)); }
8689unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008690#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008691#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008694{
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
8696 FILE *f = fopen ("conftest.val", "w");
8697 if (! f)
8698 exit (1);
8699 if (((long) (sizeof (double))) < 0)
8700 {
8701 long i = longval ();
8702 if (i != ((long) (sizeof (double))))
8703 exit (1);
8704 fprintf (f, "%ld\n", i);
8705 }
8706 else
8707 {
8708 unsigned long i = ulongval ();
8709 if (i != ((long) (sizeof (double))))
8710 exit (1);
8711 fprintf (f, "%lu\n", i);
8712 }
8713 exit (ferror (f) || fclose (f) != 0);
8714
8715 ;
8716 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008717}
Martin v. Löwis11437992002-04-12 09:54:03 +00008718_ACEOF
8719rm -f conftest$ac_exeext
8720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8721 (eval $ac_link) 2>&5
8722 ac_status=$?
8723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8726 (eval $ac_try) 2>&5
8727 ac_status=$?
8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729 (exit $ac_status); }; }; then
8730 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008731else
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 echo "$as_me: program exited with status $ac_status" >&5
8733echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008734sed 's/^/| /' conftest.$ac_ext >&5
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008737{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8738See \`config.log' for more details." >&5
8739echo "$as_me: error: cannot compute sizeof (double), 77
8740See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 { (exit 1); exit 1; }; }
8742fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008743rm -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 +00008744fi
8745fi
8746rm -f conftest.val
8747else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008748 ac_cv_sizeof_double=0
8749fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008751echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8752echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8753cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008754#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008755_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008756
8757
Martin v. Löwis11437992002-04-12 09:54:03 +00008758echo "$as_me:$LINENO: checking for fpos_t" >&5
8759echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8760if test "${ac_cv_type_fpos_t+set}" = set; then
8761 echo $ECHO_N "(cached) $ECHO_C" >&6
8762else
8763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* confdefs.h. */
8765_ACEOF
8766cat confdefs.h >>conftest.$ac_ext
8767cat >>conftest.$ac_ext <<_ACEOF
8768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
8773if ((fpos_t *) 0)
8774 return 0;
8775if (sizeof (fpos_t))
8776 return 0;
8777 ;
8778 return 0;
8779}
8780_ACEOF
8781rm -f conftest.$ac_objext
8782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008785 grep -v '^ *+' conftest.er1 >conftest.err
8786 rm -f conftest.er1
8787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008790 { ac_try='test -z "$ac_c_werror_flag"
8791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8793 (eval $ac_try) 2>&5
8794 ac_status=$?
8795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796 (exit $ac_status); }; } &&
8797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799 (eval $ac_try) 2>&5
8800 ac_status=$?
8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802 (exit $ac_status); }; }; then
8803 ac_cv_type_fpos_t=yes
8804else
8805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Martin v. Löwis11437992002-04-12 09:54:03 +00008808ac_cv_type_fpos_t=no
8809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008811fi
8812echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8813echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8814
8815echo "$as_me:$LINENO: checking size of fpos_t" >&5
8816echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8817if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8818 echo $ECHO_N "(cached) $ECHO_C" >&6
8819else
8820 if test "$ac_cv_type_fpos_t" = yes; then
8821 # The cast to unsigned long works around a bug in the HP C Compiler
8822 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8823 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8824 # This bug is HP SR number 8606223364.
8825 if test "$cross_compiling" = yes; then
8826 # Depending upon the size, compute the lo and hi bounds.
8827cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008828/* confdefs.h. */
8829_ACEOF
8830cat confdefs.h >>conftest.$ac_ext
8831cat >>conftest.$ac_ext <<_ACEOF
8832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008834int
8835main ()
8836{
8837static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8838test_array [0] = 0
8839
8840 ;
8841 return 0;
8842}
8843_ACEOF
8844rm -f conftest.$ac_objext
8845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008846 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008848 grep -v '^ *+' conftest.er1 >conftest.err
8849 rm -f conftest.er1
8850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8852 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008853 { ac_try='test -z "$ac_c_werror_flag"
8854 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8856 (eval $ac_try) 2>&5
8857 ac_status=$?
8858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8859 (exit $ac_status); }; } &&
8860 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8862 (eval $ac_try) 2>&5
8863 ac_status=$?
8864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8865 (exit $ac_status); }; }; then
8866 ac_lo=0 ac_mid=0
8867 while :; do
8868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008869/* confdefs.h. */
8870_ACEOF
8871cat confdefs.h >>conftest.$ac_ext
8872cat >>conftest.$ac_ext <<_ACEOF
8873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008875int
8876main ()
8877{
8878static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8879test_array [0] = 0
8880
8881 ;
8882 return 0;
8883}
8884_ACEOF
8885rm -f conftest.$ac_objext
8886if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008887 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008889 grep -v '^ *+' conftest.er1 >conftest.err
8890 rm -f conftest.er1
8891 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8893 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008894 { ac_try='test -z "$ac_c_werror_flag"
8895 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900 (exit $ac_status); }; } &&
8901 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8903 (eval $ac_try) 2>&5
8904 ac_status=$?
8905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8906 (exit $ac_status); }; }; then
8907 ac_hi=$ac_mid; break
8908else
8909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008910sed 's/^/| /' conftest.$ac_ext >&5
8911
Martin v. Löwis11437992002-04-12 09:54:03 +00008912ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008913 if test $ac_lo -le $ac_mid; then
8914 ac_lo= ac_hi=
8915 break
8916 fi
8917 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008919rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 done
8921else
8922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008923sed 's/^/| /' conftest.$ac_ext >&5
8924
Martin v. Löwis11437992002-04-12 09:54:03 +00008925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* confdefs.h. */
8927_ACEOF
8928cat confdefs.h >>conftest.$ac_ext
8929cat >>conftest.$ac_ext <<_ACEOF
8930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008931$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
8935static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8936test_array [0] = 0
8937
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
8943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008944 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008946 grep -v '^ *+' conftest.er1 >conftest.err
8947 rm -f conftest.er1
8948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008951 { ac_try='test -z "$ac_c_werror_flag"
8952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8954 (eval $ac_try) 2>&5
8955 ac_status=$?
8956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8957 (exit $ac_status); }; } &&
8958 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8960 (eval $ac_try) 2>&5
8961 ac_status=$?
8962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8963 (exit $ac_status); }; }; then
8964 ac_hi=-1 ac_mid=-1
8965 while :; do
8966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* confdefs.h. */
8968_ACEOF
8969cat confdefs.h >>conftest.$ac_ext
8970cat >>conftest.$ac_ext <<_ACEOF
8971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008973int
8974main ()
8975{
8976static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8977test_array [0] = 0
8978
8979 ;
8980 return 0;
8981}
8982_ACEOF
8983rm -f conftest.$ac_objext
8984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008987 grep -v '^ *+' conftest.er1 >conftest.err
8988 rm -f conftest.er1
8989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8991 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008992 { ac_try='test -z "$ac_c_werror_flag"
8993 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995 (eval $ac_try) 2>&5
8996 ac_status=$?
8997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998 (exit $ac_status); }; } &&
8999 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9001 (eval $ac_try) 2>&5
9002 ac_status=$?
9003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9004 (exit $ac_status); }; }; then
9005 ac_lo=$ac_mid; break
9006else
9007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009008sed 's/^/| /' conftest.$ac_ext >&5
9009
Martin v. Löwis11437992002-04-12 09:54:03 +00009010ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009011 if test $ac_mid -le $ac_hi; then
9012 ac_lo= ac_hi=
9013 break
9014 fi
9015 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 done
9019else
9020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009021sed 's/^/| /' conftest.$ac_ext >&5
9022
Martin v. Löwis11437992002-04-12 09:54:03 +00009023ac_lo= ac_hi=
9024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009026fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009027rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009028# Binary search between lo and hi bounds.
9029while test "x$ac_lo" != "x$ac_hi"; do
9030 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009032/* confdefs.h. */
9033_ACEOF
9034cat confdefs.h >>conftest.$ac_ext
9035cat >>conftest.$ac_ext <<_ACEOF
9036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009037$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009038int
9039main ()
9040{
9041static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
9042test_array [0] = 0
9043
9044 ;
9045 return 0;
9046}
9047_ACEOF
9048rm -f conftest.$ac_objext
9049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009052 grep -v '^ *+' conftest.er1 >conftest.err
9053 rm -f conftest.er1
9054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009057 { ac_try='test -z "$ac_c_werror_flag"
9058 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9060 (eval $ac_try) 2>&5
9061 ac_status=$?
9062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9063 (exit $ac_status); }; } &&
9064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9066 (eval $ac_try) 2>&5
9067 ac_status=$?
9068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9069 (exit $ac_status); }; }; then
9070 ac_hi=$ac_mid
9071else
9072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009073sed 's/^/| /' conftest.$ac_ext >&5
9074
Martin v. Löwis11437992002-04-12 09:54:03 +00009075ac_lo=`expr '(' $ac_mid ')' + 1`
9076fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009078done
9079case $ac_lo in
9080?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009081'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9082See \`config.log' for more details." >&5
9083echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9084See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 { (exit 1); exit 1; }; } ;;
9086esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009087else
9088 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009089 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9090See \`config.log' for more details." >&5
9091echo "$as_me: error: cannot run test program while cross compiling
9092See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009094else
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009101$ac_includes_default
9102long longval () { return (long) (sizeof (fpos_t)); }
9103unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009104#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009105#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009106int
9107main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009108{
Martin v. Löwis11437992002-04-12 09:54:03 +00009109
9110 FILE *f = fopen ("conftest.val", "w");
9111 if (! f)
9112 exit (1);
9113 if (((long) (sizeof (fpos_t))) < 0)
9114 {
9115 long i = longval ();
9116 if (i != ((long) (sizeof (fpos_t))))
9117 exit (1);
9118 fprintf (f, "%ld\n", i);
9119 }
9120 else
9121 {
9122 unsigned long i = ulongval ();
9123 if (i != ((long) (sizeof (fpos_t))))
9124 exit (1);
9125 fprintf (f, "%lu\n", i);
9126 }
9127 exit (ferror (f) || fclose (f) != 0);
9128
9129 ;
9130 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009131}
Martin v. Löwis11437992002-04-12 09:54:03 +00009132_ACEOF
9133rm -f conftest$ac_exeext
9134if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9135 (eval $ac_link) 2>&5
9136 ac_status=$?
9137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9140 (eval $ac_try) 2>&5
9141 ac_status=$?
9142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9143 (exit $ac_status); }; }; then
9144 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009145else
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 echo "$as_me: program exited with status $ac_status" >&5
9147echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009148sed 's/^/| /' conftest.$ac_ext >&5
9149
Martin v. Löwis11437992002-04-12 09:54:03 +00009150( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009151{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9152See \`config.log' for more details." >&5
9153echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9154See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 { (exit 1); exit 1; }; }
9156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009157rm -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 +00009158fi
9159fi
9160rm -f conftest.val
9161else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009162 ac_cv_sizeof_fpos_t=0
9163fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009165echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9166echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9167cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009168#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009169_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009170
Michael W. Hudson54241132001-12-07 15:38:26 +00009171
Martin v. Löwis18e16552006-02-15 17:27:45 +00009172echo "$as_me:$LINENO: checking for size_t" >&5
9173echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9174if test "${ac_cv_type_size_t+set}" = set; then
9175 echo $ECHO_N "(cached) $ECHO_C" >&6
9176else
9177 cat >conftest.$ac_ext <<_ACEOF
9178/* confdefs.h. */
9179_ACEOF
9180cat confdefs.h >>conftest.$ac_ext
9181cat >>conftest.$ac_ext <<_ACEOF
9182/* end confdefs.h. */
9183$ac_includes_default
9184int
9185main ()
9186{
9187if ((size_t *) 0)
9188 return 0;
9189if (sizeof (size_t))
9190 return 0;
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext
9196if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9197 (eval $ac_compile) 2>conftest.er1
9198 ac_status=$?
9199 grep -v '^ *+' conftest.er1 >conftest.err
9200 rm -f conftest.er1
9201 cat conftest.err >&5
9202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9203 (exit $ac_status); } &&
9204 { ac_try='test -z "$ac_c_werror_flag"
9205 || test ! -s conftest.err'
9206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9207 (eval $ac_try) 2>&5
9208 ac_status=$?
9209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); }; } &&
9211 { ac_try='test -s conftest.$ac_objext'
9212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9213 (eval $ac_try) 2>&5
9214 ac_status=$?
9215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9216 (exit $ac_status); }; }; then
9217 ac_cv_type_size_t=yes
9218else
9219 echo "$as_me: failed program was:" >&5
9220sed 's/^/| /' conftest.$ac_ext >&5
9221
9222ac_cv_type_size_t=no
9223fi
9224rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9225fi
9226echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9227echo "${ECHO_T}$ac_cv_type_size_t" >&6
9228
9229echo "$as_me:$LINENO: checking size of size_t" >&5
9230echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
9231if test "${ac_cv_sizeof_size_t+set}" = set; then
9232 echo $ECHO_N "(cached) $ECHO_C" >&6
9233else
9234 if test "$ac_cv_type_size_t" = yes; then
9235 # The cast to unsigned long works around a bug in the HP C Compiler
9236 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9237 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9238 # This bug is HP SR number 8606223364.
9239 if test "$cross_compiling" = yes; then
9240 # Depending upon the size, compute the lo and hi bounds.
9241cat >conftest.$ac_ext <<_ACEOF
9242/* confdefs.h. */
9243_ACEOF
9244cat confdefs.h >>conftest.$ac_ext
9245cat >>conftest.$ac_ext <<_ACEOF
9246/* end confdefs.h. */
9247$ac_includes_default
9248int
9249main ()
9250{
9251static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
9252test_array [0] = 0
9253
9254 ;
9255 return 0;
9256}
9257_ACEOF
9258rm -f conftest.$ac_objext
9259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9260 (eval $ac_compile) 2>conftest.er1
9261 ac_status=$?
9262 grep -v '^ *+' conftest.er1 >conftest.err
9263 rm -f conftest.er1
9264 cat conftest.err >&5
9265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9266 (exit $ac_status); } &&
9267 { ac_try='test -z "$ac_c_werror_flag"
9268 || test ! -s conftest.err'
9269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9270 (eval $ac_try) 2>&5
9271 ac_status=$?
9272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 (exit $ac_status); }; } &&
9274 { ac_try='test -s conftest.$ac_objext'
9275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9276 (eval $ac_try) 2>&5
9277 ac_status=$?
9278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279 (exit $ac_status); }; }; then
9280 ac_lo=0 ac_mid=0
9281 while :; do
9282 cat >conftest.$ac_ext <<_ACEOF
9283/* confdefs.h. */
9284_ACEOF
9285cat confdefs.h >>conftest.$ac_ext
9286cat >>conftest.$ac_ext <<_ACEOF
9287/* end confdefs.h. */
9288$ac_includes_default
9289int
9290main ()
9291{
9292static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9293test_array [0] = 0
9294
9295 ;
9296 return 0;
9297}
9298_ACEOF
9299rm -f conftest.$ac_objext
9300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9301 (eval $ac_compile) 2>conftest.er1
9302 ac_status=$?
9303 grep -v '^ *+' conftest.er1 >conftest.err
9304 rm -f conftest.er1
9305 cat conftest.err >&5
9306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9307 (exit $ac_status); } &&
9308 { ac_try='test -z "$ac_c_werror_flag"
9309 || test ! -s conftest.err'
9310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9311 (eval $ac_try) 2>&5
9312 ac_status=$?
9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314 (exit $ac_status); }; } &&
9315 { ac_try='test -s conftest.$ac_objext'
9316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9317 (eval $ac_try) 2>&5
9318 ac_status=$?
9319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320 (exit $ac_status); }; }; then
9321 ac_hi=$ac_mid; break
9322else
9323 echo "$as_me: failed program was:" >&5
9324sed 's/^/| /' conftest.$ac_ext >&5
9325
9326ac_lo=`expr $ac_mid + 1`
9327 if test $ac_lo -le $ac_mid; then
9328 ac_lo= ac_hi=
9329 break
9330 fi
9331 ac_mid=`expr 2 '*' $ac_mid + 1`
9332fi
9333rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9334 done
9335else
9336 echo "$as_me: failed program was:" >&5
9337sed 's/^/| /' conftest.$ac_ext >&5
9338
9339cat >conftest.$ac_ext <<_ACEOF
9340/* confdefs.h. */
9341_ACEOF
9342cat confdefs.h >>conftest.$ac_ext
9343cat >>conftest.$ac_ext <<_ACEOF
9344/* end confdefs.h. */
9345$ac_includes_default
9346int
9347main ()
9348{
9349static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
9350test_array [0] = 0
9351
9352 ;
9353 return 0;
9354}
9355_ACEOF
9356rm -f conftest.$ac_objext
9357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9358 (eval $ac_compile) 2>conftest.er1
9359 ac_status=$?
9360 grep -v '^ *+' conftest.er1 >conftest.err
9361 rm -f conftest.er1
9362 cat conftest.err >&5
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); } &&
9365 { ac_try='test -z "$ac_c_werror_flag"
9366 || test ! -s conftest.err'
9367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9368 (eval $ac_try) 2>&5
9369 ac_status=$?
9370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9371 (exit $ac_status); }; } &&
9372 { ac_try='test -s conftest.$ac_objext'
9373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9374 (eval $ac_try) 2>&5
9375 ac_status=$?
9376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9377 (exit $ac_status); }; }; then
9378 ac_hi=-1 ac_mid=-1
9379 while :; do
9380 cat >conftest.$ac_ext <<_ACEOF
9381/* confdefs.h. */
9382_ACEOF
9383cat confdefs.h >>conftest.$ac_ext
9384cat >>conftest.$ac_ext <<_ACEOF
9385/* end confdefs.h. */
9386$ac_includes_default
9387int
9388main ()
9389{
9390static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
9391test_array [0] = 0
9392
9393 ;
9394 return 0;
9395}
9396_ACEOF
9397rm -f conftest.$ac_objext
9398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9399 (eval $ac_compile) 2>conftest.er1
9400 ac_status=$?
9401 grep -v '^ *+' conftest.er1 >conftest.err
9402 rm -f conftest.er1
9403 cat conftest.err >&5
9404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9405 (exit $ac_status); } &&
9406 { ac_try='test -z "$ac_c_werror_flag"
9407 || test ! -s conftest.err'
9408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9409 (eval $ac_try) 2>&5
9410 ac_status=$?
9411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9412 (exit $ac_status); }; } &&
9413 { ac_try='test -s conftest.$ac_objext'
9414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9415 (eval $ac_try) 2>&5
9416 ac_status=$?
9417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9418 (exit $ac_status); }; }; then
9419 ac_lo=$ac_mid; break
9420else
9421 echo "$as_me: failed program was:" >&5
9422sed 's/^/| /' conftest.$ac_ext >&5
9423
9424ac_hi=`expr '(' $ac_mid ')' - 1`
9425 if test $ac_mid -le $ac_hi; then
9426 ac_lo= ac_hi=
9427 break
9428 fi
9429 ac_mid=`expr 2 '*' $ac_mid`
9430fi
9431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9432 done
9433else
9434 echo "$as_me: failed program was:" >&5
9435sed 's/^/| /' conftest.$ac_ext >&5
9436
9437ac_lo= ac_hi=
9438fi
9439rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9440fi
9441rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9442# Binary search between lo and hi bounds.
9443while test "x$ac_lo" != "x$ac_hi"; do
9444 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9445 cat >conftest.$ac_ext <<_ACEOF
9446/* confdefs.h. */
9447_ACEOF
9448cat confdefs.h >>conftest.$ac_ext
9449cat >>conftest.$ac_ext <<_ACEOF
9450/* end confdefs.h. */
9451$ac_includes_default
9452int
9453main ()
9454{
9455static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9456test_array [0] = 0
9457
9458 ;
9459 return 0;
9460}
9461_ACEOF
9462rm -f conftest.$ac_objext
9463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9464 (eval $ac_compile) 2>conftest.er1
9465 ac_status=$?
9466 grep -v '^ *+' conftest.er1 >conftest.err
9467 rm -f conftest.er1
9468 cat conftest.err >&5
9469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9470 (exit $ac_status); } &&
9471 { ac_try='test -z "$ac_c_werror_flag"
9472 || test ! -s conftest.err'
9473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9474 (eval $ac_try) 2>&5
9475 ac_status=$?
9476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9477 (exit $ac_status); }; } &&
9478 { ac_try='test -s conftest.$ac_objext'
9479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9480 (eval $ac_try) 2>&5
9481 ac_status=$?
9482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9483 (exit $ac_status); }; }; then
9484 ac_hi=$ac_mid
9485else
9486 echo "$as_me: failed program was:" >&5
9487sed 's/^/| /' conftest.$ac_ext >&5
9488
9489ac_lo=`expr '(' $ac_mid ')' + 1`
9490fi
9491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9492done
9493case $ac_lo in
9494?*) ac_cv_sizeof_size_t=$ac_lo;;
9495'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9496See \`config.log' for more details." >&5
9497echo "$as_me: error: cannot compute sizeof (size_t), 77
9498See \`config.log' for more details." >&2;}
9499 { (exit 1); exit 1; }; } ;;
9500esac
9501else
9502 if test "$cross_compiling" = yes; then
9503 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9504See \`config.log' for more details." >&5
9505echo "$as_me: error: cannot run test program while cross compiling
9506See \`config.log' for more details." >&2;}
9507 { (exit 1); exit 1; }; }
9508else
9509 cat >conftest.$ac_ext <<_ACEOF
9510/* confdefs.h. */
9511_ACEOF
9512cat confdefs.h >>conftest.$ac_ext
9513cat >>conftest.$ac_ext <<_ACEOF
9514/* end confdefs.h. */
9515$ac_includes_default
9516long longval () { return (long) (sizeof (size_t)); }
9517unsigned long ulongval () { return (long) (sizeof (size_t)); }
9518#include <stdio.h>
9519#include <stdlib.h>
9520int
9521main ()
9522{
9523
9524 FILE *f = fopen ("conftest.val", "w");
9525 if (! f)
9526 exit (1);
9527 if (((long) (sizeof (size_t))) < 0)
9528 {
9529 long i = longval ();
9530 if (i != ((long) (sizeof (size_t))))
9531 exit (1);
9532 fprintf (f, "%ld\n", i);
9533 }
9534 else
9535 {
9536 unsigned long i = ulongval ();
9537 if (i != ((long) (sizeof (size_t))))
9538 exit (1);
9539 fprintf (f, "%lu\n", i);
9540 }
9541 exit (ferror (f) || fclose (f) != 0);
9542
9543 ;
9544 return 0;
9545}
9546_ACEOF
9547rm -f conftest$ac_exeext
9548if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9549 (eval $ac_link) 2>&5
9550 ac_status=$?
9551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9554 (eval $ac_try) 2>&5
9555 ac_status=$?
9556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557 (exit $ac_status); }; }; then
9558 ac_cv_sizeof_size_t=`cat conftest.val`
9559else
9560 echo "$as_me: program exited with status $ac_status" >&5
9561echo "$as_me: failed program was:" >&5
9562sed 's/^/| /' conftest.$ac_ext >&5
9563
9564( exit $ac_status )
9565{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9566See \`config.log' for more details." >&5
9567echo "$as_me: error: cannot compute sizeof (size_t), 77
9568See \`config.log' for more details." >&2;}
9569 { (exit 1); exit 1; }; }
9570fi
9571rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9572fi
9573fi
9574rm -f conftest.val
9575else
9576 ac_cv_sizeof_size_t=0
9577fi
9578fi
9579echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9580echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
9581cat >>confdefs.h <<_ACEOF
9582#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9583_ACEOF
9584
9585
Michael W. Hudson54241132001-12-07 15:38:26 +00009586
Martin v. Löwis11437992002-04-12 09:54:03 +00009587echo "$as_me:$LINENO: checking for long long support" >&5
9588echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009589have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009591/* confdefs.h. */
9592_ACEOF
9593cat confdefs.h >>conftest.$ac_ext
9594cat >>conftest.$ac_ext <<_ACEOF
9595/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597int
9598main ()
9599{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009600long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ;
9602 return 0;
9603}
9604_ACEOF
9605rm -f conftest.$ac_objext
9606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009607 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009609 grep -v '^ *+' conftest.er1 >conftest.err
9610 rm -f conftest.er1
9611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9613 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009614 { ac_try='test -z "$ac_c_werror_flag"
9615 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9617 (eval $ac_try) 2>&5
9618 ac_status=$?
9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620 (exit $ac_status); }; } &&
9621 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9623 (eval $ac_try) 2>&5
9624 ac_status=$?
9625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); }; }; then
9627
9628
9629cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009630#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009631_ACEOF
9632
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009633 have_long_long=yes
9634
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009635else
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009637sed 's/^/| /' conftest.$ac_ext >&5
9638
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009639fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009640rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009641echo "$as_me:$LINENO: result: $have_long_long" >&5
9642echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009643if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009644echo "$as_me:$LINENO: checking for long long" >&5
9645echo $ECHO_N "checking for long long... $ECHO_C" >&6
9646if test "${ac_cv_type_long_long+set}" = set; then
9647 echo $ECHO_N "(cached) $ECHO_C" >&6
9648else
9649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* confdefs.h. */
9651_ACEOF
9652cat confdefs.h >>conftest.$ac_ext
9653cat >>conftest.$ac_ext <<_ACEOF
9654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009656int
9657main ()
9658{
9659if ((long long *) 0)
9660 return 0;
9661if (sizeof (long long))
9662 return 0;
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
9668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009669 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009671 grep -v '^ *+' conftest.er1 >conftest.err
9672 rm -f conftest.er1
9673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9675 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009676 { ac_try='test -z "$ac_c_werror_flag"
9677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9679 (eval $ac_try) 2>&5
9680 ac_status=$?
9681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682 (exit $ac_status); }; } &&
9683 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9685 (eval $ac_try) 2>&5
9686 ac_status=$?
9687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9688 (exit $ac_status); }; }; then
9689 ac_cv_type_long_long=yes
9690else
9691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009692sed 's/^/| /' conftest.$ac_ext >&5
9693
Martin v. Löwis11437992002-04-12 09:54:03 +00009694ac_cv_type_long_long=no
9695fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009697fi
9698echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9699echo "${ECHO_T}$ac_cv_type_long_long" >&6
9700
9701echo "$as_me:$LINENO: checking size of long long" >&5
9702echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9703if test "${ac_cv_sizeof_long_long+set}" = set; then
9704 echo $ECHO_N "(cached) $ECHO_C" >&6
9705else
9706 if test "$ac_cv_type_long_long" = yes; then
9707 # The cast to unsigned long works around a bug in the HP C Compiler
9708 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9709 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9710 # This bug is HP SR number 8606223364.
9711 if test "$cross_compiling" = yes; then
9712 # Depending upon the size, compute the lo and hi bounds.
9713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* confdefs.h. */
9715_ACEOF
9716cat confdefs.h >>conftest.$ac_ext
9717cat >>conftest.$ac_ext <<_ACEOF
9718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009720int
9721main ()
9722{
9723static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9724test_array [0] = 0
9725
9726 ;
9727 return 0;
9728}
9729_ACEOF
9730rm -f conftest.$ac_objext
9731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009734 grep -v '^ *+' conftest.er1 >conftest.err
9735 rm -f conftest.er1
9736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009739 { ac_try='test -z "$ac_c_werror_flag"
9740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9742 (eval $ac_try) 2>&5
9743 ac_status=$?
9744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9745 (exit $ac_status); }; } &&
9746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9748 (eval $ac_try) 2>&5
9749 ac_status=$?
9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 (exit $ac_status); }; }; then
9752 ac_lo=0 ac_mid=0
9753 while :; do
9754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* confdefs.h. */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009761int
9762main ()
9763{
9764static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9765test_array [0] = 0
9766
9767 ;
9768 return 0;
9769}
9770_ACEOF
9771rm -f conftest.$ac_objext
9772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009775 grep -v '^ *+' conftest.er1 >conftest.err
9776 rm -f conftest.er1
9777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009780 { ac_try='test -z "$ac_c_werror_flag"
9781 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9783 (eval $ac_try) 2>&5
9784 ac_status=$?
9785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9786 (exit $ac_status); }; } &&
9787 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9789 (eval $ac_try) 2>&5
9790 ac_status=$?
9791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9792 (exit $ac_status); }; }; then
9793 ac_hi=$ac_mid; break
9794else
9795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009796sed 's/^/| /' conftest.$ac_ext >&5
9797
Martin v. Löwis11437992002-04-12 09:54:03 +00009798ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009799 if test $ac_lo -le $ac_mid; then
9800 ac_lo= ac_hi=
9801 break
9802 fi
9803 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 done
9807else
9808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009809sed 's/^/| /' conftest.$ac_ext >&5
9810
Martin v. Löwis11437992002-04-12 09:54:03 +00009811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009812/* confdefs.h. */
9813_ACEOF
9814cat confdefs.h >>conftest.$ac_ext
9815cat >>conftest.$ac_ext <<_ACEOF
9816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009818int
9819main ()
9820{
9821static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9822test_array [0] = 0
9823
9824 ;
9825 return 0;
9826}
9827_ACEOF
9828rm -f conftest.$ac_objext
9829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009830 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009832 grep -v '^ *+' conftest.er1 >conftest.err
9833 rm -f conftest.er1
9834 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9836 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009837 { ac_try='test -z "$ac_c_werror_flag"
9838 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9840 (eval $ac_try) 2>&5
9841 ac_status=$?
9842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9843 (exit $ac_status); }; } &&
9844 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9846 (eval $ac_try) 2>&5
9847 ac_status=$?
9848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9849 (exit $ac_status); }; }; then
9850 ac_hi=-1 ac_mid=-1
9851 while :; do
9852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009853/* confdefs.h. */
9854_ACEOF
9855cat confdefs.h >>conftest.$ac_ext
9856cat >>conftest.$ac_ext <<_ACEOF
9857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009859int
9860main ()
9861{
9862static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9863test_array [0] = 0
9864
9865 ;
9866 return 0;
9867}
9868_ACEOF
9869rm -f conftest.$ac_objext
9870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009871 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009873 grep -v '^ *+' conftest.er1 >conftest.err
9874 rm -f conftest.er1
9875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9877 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009878 { ac_try='test -z "$ac_c_werror_flag"
9879 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9881 (eval $ac_try) 2>&5
9882 ac_status=$?
9883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9884 (exit $ac_status); }; } &&
9885 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
9889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9890 (exit $ac_status); }; }; then
9891 ac_lo=$ac_mid; break
9892else
9893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009894sed 's/^/| /' conftest.$ac_ext >&5
9895
Martin v. Löwis11437992002-04-12 09:54:03 +00009896ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009897 if test $ac_mid -le $ac_hi; then
9898 ac_lo= ac_hi=
9899 break
9900 fi
9901 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009902fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009904 done
9905else
9906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009907sed 's/^/| /' conftest.$ac_ext >&5
9908
Martin v. Löwis11437992002-04-12 09:54:03 +00009909ac_lo= ac_hi=
9910fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009912fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009914# Binary search between lo and hi bounds.
9915while test "x$ac_lo" != "x$ac_hi"; do
9916 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* confdefs.h. */
9919_ACEOF
9920cat confdefs.h >>conftest.$ac_ext
9921cat >>conftest.$ac_ext <<_ACEOF
9922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009923$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009924int
9925main ()
9926{
9927static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9928test_array [0] = 0
9929
9930 ;
9931 return 0;
9932}
9933_ACEOF
9934rm -f conftest.$ac_objext
9935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009936 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009938 grep -v '^ *+' conftest.er1 >conftest.err
9939 rm -f conftest.er1
9940 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009943 { ac_try='test -z "$ac_c_werror_flag"
9944 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9946 (eval $ac_try) 2>&5
9947 ac_status=$?
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 (exit $ac_status); }; } &&
9950 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9952 (eval $ac_try) 2>&5
9953 ac_status=$?
9954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9955 (exit $ac_status); }; }; then
9956 ac_hi=$ac_mid
9957else
9958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009959sed 's/^/| /' conftest.$ac_ext >&5
9960
Martin v. Löwis11437992002-04-12 09:54:03 +00009961ac_lo=`expr '(' $ac_mid ')' + 1`
9962fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009963rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009964done
9965case $ac_lo in
9966?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009967'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9968See \`config.log' for more details." >&5
9969echo "$as_me: error: cannot compute sizeof (long long), 77
9970See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 { (exit 1); exit 1; }; } ;;
9972esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009973else
9974 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009975 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9976See \`config.log' for more details." >&5
9977echo "$as_me: error: cannot run test program while cross compiling
9978See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* confdefs.h. */
9983_ACEOF
9984cat confdefs.h >>conftest.$ac_ext
9985cat >>conftest.$ac_ext <<_ACEOF
9986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009987$ac_includes_default
9988long longval () { return (long) (sizeof (long long)); }
9989unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009990#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009991#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009994{
Martin v. Löwis11437992002-04-12 09:54:03 +00009995
9996 FILE *f = fopen ("conftest.val", "w");
9997 if (! f)
9998 exit (1);
9999 if (((long) (sizeof (long long))) < 0)
10000 {
10001 long i = longval ();
10002 if (i != ((long) (sizeof (long long))))
10003 exit (1);
10004 fprintf (f, "%ld\n", i);
10005 }
10006 else
10007 {
10008 unsigned long i = ulongval ();
10009 if (i != ((long) (sizeof (long long))))
10010 exit (1);
10011 fprintf (f, "%lu\n", i);
10012 }
10013 exit (ferror (f) || fclose (f) != 0);
10014
10015 ;
10016 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010017}
Martin v. Löwis11437992002-04-12 09:54:03 +000010018_ACEOF
10019rm -f conftest$ac_exeext
10020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10021 (eval $ac_link) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10026 (eval $ac_try) 2>&5
10027 ac_status=$?
10028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); }; }; then
10030 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 echo "$as_me: program exited with status $ac_status" >&5
10033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Martin v. Löwis11437992002-04-12 09:54:03 +000010036( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010037{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
10038See \`config.log' for more details." >&5
10039echo "$as_me: error: cannot compute sizeof (long long), 77
10040See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 { (exit 1); exit 1; }; }
10042fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010043rm -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 +000010044fi
10045fi
10046rm -f conftest.val
10047else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010048 ac_cv_sizeof_long_long=0
10049fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010050fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010051echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10052echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
10053cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010054#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010055_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010056
Michael W. Hudson54241132001-12-07 15:38:26 +000010057
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010058fi
10059
Martin v. Löwis11437992002-04-12 09:54:03 +000010060echo "$as_me:$LINENO: checking for uintptr_t support" >&5
10061echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010062have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010063cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010064/* confdefs.h. */
10065_ACEOF
10066cat confdefs.h >>conftest.$ac_ext
10067cat >>conftest.$ac_ext <<_ACEOF
10068/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010069
Martin v. Löwis11437992002-04-12 09:54:03 +000010070int
10071main ()
10072{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010073uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ;
10075 return 0;
10076}
10077_ACEOF
10078rm -f conftest.$ac_objext
10079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010087 { ac_try='test -z "$ac_c_werror_flag"
10088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10090 (eval $ac_try) 2>&5
10091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); }; } &&
10094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10097 ac_status=$?
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); }; }; then
10100
10101
10102cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010103#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104_ACEOF
10105
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010106 have_uintptr_t=yes
10107
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010112fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010114echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
10115echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010116if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010117echo "$as_me:$LINENO: checking for uintptr_t" >&5
10118echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
10119if test "${ac_cv_type_uintptr_t+set}" = set; then
10120 echo $ECHO_N "(cached) $ECHO_C" >&6
10121else
10122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* confdefs.h. */
10124_ACEOF
10125cat confdefs.h >>conftest.$ac_ext
10126cat >>conftest.$ac_ext <<_ACEOF
10127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010129int
10130main ()
10131{
10132if ((uintptr_t *) 0)
10133 return 0;
10134if (sizeof (uintptr_t))
10135 return 0;
10136 ;
10137 return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext
10141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010142 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010144 grep -v '^ *+' conftest.er1 >conftest.err
10145 rm -f conftest.er1
10146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10148 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010149 { ac_try='test -z "$ac_c_werror_flag"
10150 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10152 (eval $ac_try) 2>&5
10153 ac_status=$?
10154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155 (exit $ac_status); }; } &&
10156 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10158 (eval $ac_try) 2>&5
10159 ac_status=$?
10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161 (exit $ac_status); }; }; then
10162 ac_cv_type_uintptr_t=yes
10163else
10164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010165sed 's/^/| /' conftest.$ac_ext >&5
10166
Martin v. Löwis11437992002-04-12 09:54:03 +000010167ac_cv_type_uintptr_t=no
10168fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010170fi
10171echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10172echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
10173
10174echo "$as_me:$LINENO: checking size of uintptr_t" >&5
10175echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
10176if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
10177 echo $ECHO_N "(cached) $ECHO_C" >&6
10178else
10179 if test "$ac_cv_type_uintptr_t" = yes; then
10180 # The cast to unsigned long works around a bug in the HP C Compiler
10181 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10182 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10183 # This bug is HP SR number 8606223364.
10184 if test "$cross_compiling" = yes; then
10185 # Depending upon the size, compute the lo and hi bounds.
10186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010187/* confdefs.h. */
10188_ACEOF
10189cat confdefs.h >>conftest.$ac_ext
10190cat >>conftest.$ac_ext <<_ACEOF
10191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010192$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010193int
10194main ()
10195{
10196static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
10197test_array [0] = 0
10198
10199 ;
10200 return 0;
10201}
10202_ACEOF
10203rm -f conftest.$ac_objext
10204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010205 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010207 grep -v '^ *+' conftest.er1 >conftest.err
10208 rm -f conftest.er1
10209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10211 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010212 { ac_try='test -z "$ac_c_werror_flag"
10213 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10215 (eval $ac_try) 2>&5
10216 ac_status=$?
10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10218 (exit $ac_status); }; } &&
10219 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10221 (eval $ac_try) 2>&5
10222 ac_status=$?
10223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10224 (exit $ac_status); }; }; then
10225 ac_lo=0 ac_mid=0
10226 while :; do
10227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* confdefs.h. */
10229_ACEOF
10230cat confdefs.h >>conftest.$ac_ext
10231cat >>conftest.$ac_ext <<_ACEOF
10232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010234int
10235main ()
10236{
10237static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10238test_array [0] = 0
10239
10240 ;
10241 return 0;
10242}
10243_ACEOF
10244rm -f conftest.$ac_objext
10245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010246 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010248 grep -v '^ *+' conftest.er1 >conftest.err
10249 rm -f conftest.er1
10250 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10252 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010253 { ac_try='test -z "$ac_c_werror_flag"
10254 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10256 (eval $ac_try) 2>&5
10257 ac_status=$?
10258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10259 (exit $ac_status); }; } &&
10260 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10262 (eval $ac_try) 2>&5
10263 ac_status=$?
10264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10265 (exit $ac_status); }; }; then
10266 ac_hi=$ac_mid; break
10267else
10268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010269sed 's/^/| /' conftest.$ac_ext >&5
10270
Martin v. Löwis11437992002-04-12 09:54:03 +000010271ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010272 if test $ac_lo -le $ac_mid; then
10273 ac_lo= ac_hi=
10274 break
10275 fi
10276 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010277fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010278rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010279 done
10280else
10281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010282sed 's/^/| /' conftest.$ac_ext >&5
10283
Martin v. Löwis11437992002-04-12 09:54:03 +000010284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010285/* confdefs.h. */
10286_ACEOF
10287cat confdefs.h >>conftest.$ac_ext
10288cat >>conftest.$ac_ext <<_ACEOF
10289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010290$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010291int
10292main ()
10293{
10294static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
10295test_array [0] = 0
10296
10297 ;
10298 return 0;
10299}
10300_ACEOF
10301rm -f conftest.$ac_objext
10302if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010303 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010305 grep -v '^ *+' conftest.er1 >conftest.err
10306 rm -f conftest.er1
10307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10309 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010310 { ac_try='test -z "$ac_c_werror_flag"
10311 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10313 (eval $ac_try) 2>&5
10314 ac_status=$?
10315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10316 (exit $ac_status); }; } &&
10317 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10319 (eval $ac_try) 2>&5
10320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; }; then
10323 ac_hi=-1 ac_mid=-1
10324 while :; do
10325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* confdefs.h. */
10327_ACEOF
10328cat confdefs.h >>conftest.$ac_ext
10329cat >>conftest.$ac_ext <<_ACEOF
10330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010332int
10333main ()
10334{
10335static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
10336test_array [0] = 0
10337
10338 ;
10339 return 0;
10340}
10341_ACEOF
10342rm -f conftest.$ac_objext
10343if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010344 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10350 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010351 { ac_try='test -z "$ac_c_werror_flag"
10352 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10354 (eval $ac_try) 2>&5
10355 ac_status=$?
10356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10357 (exit $ac_status); }; } &&
10358 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10360 (eval $ac_try) 2>&5
10361 ac_status=$?
10362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10363 (exit $ac_status); }; }; then
10364 ac_lo=$ac_mid; break
10365else
10366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010367sed 's/^/| /' conftest.$ac_ext >&5
10368
Martin v. Löwis11437992002-04-12 09:54:03 +000010369ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010370 if test $ac_mid -le $ac_hi; then
10371 ac_lo= ac_hi=
10372 break
10373 fi
10374 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010375fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 done
10378else
10379 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010380sed 's/^/| /' conftest.$ac_ext >&5
10381
Martin v. Löwis11437992002-04-12 09:54:03 +000010382ac_lo= ac_hi=
10383fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010385fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010387# Binary search between lo and hi bounds.
10388while test "x$ac_lo" != "x$ac_hi"; do
10389 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* confdefs.h. */
10392_ACEOF
10393cat confdefs.h >>conftest.$ac_ext
10394cat >>conftest.$ac_ext <<_ACEOF
10395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010397int
10398main ()
10399{
10400static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10401test_array [0] = 0
10402
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407rm -f conftest.$ac_objext
10408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010409 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010411 grep -v '^ *+' conftest.er1 >conftest.err
10412 rm -f conftest.er1
10413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10415 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010416 { ac_try='test -z "$ac_c_werror_flag"
10417 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10419 (eval $ac_try) 2>&5
10420 ac_status=$?
10421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10422 (exit $ac_status); }; } &&
10423 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10425 (eval $ac_try) 2>&5
10426 ac_status=$?
10427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428 (exit $ac_status); }; }; then
10429 ac_hi=$ac_mid
10430else
10431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010432sed 's/^/| /' conftest.$ac_ext >&5
10433
Martin v. Löwis11437992002-04-12 09:54:03 +000010434ac_lo=`expr '(' $ac_mid ')' + 1`
10435fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010436rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010437done
10438case $ac_lo in
10439?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000010440'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10441See \`config.log' for more details." >&5
10442echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10443See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 { (exit 1); exit 1; }; } ;;
10445esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010446else
10447 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000010448 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10449See \`config.log' for more details." >&5
10450echo "$as_me: error: cannot run test program while cross compiling
10451See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010453else
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010455/* confdefs.h. */
10456_ACEOF
10457cat confdefs.h >>conftest.$ac_ext
10458cat >>conftest.$ac_ext <<_ACEOF
10459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460$ac_includes_default
10461long longval () { return (long) (sizeof (uintptr_t)); }
10462unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010463#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010465int
10466main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010467{
Martin v. Löwis11437992002-04-12 09:54:03 +000010468
10469 FILE *f = fopen ("conftest.val", "w");
10470 if (! f)
10471 exit (1);
10472 if (((long) (sizeof (uintptr_t))) < 0)
10473 {
10474 long i = longval ();
10475 if (i != ((long) (sizeof (uintptr_t))))
10476 exit (1);
10477 fprintf (f, "%ld\n", i);
10478 }
10479 else
10480 {
10481 unsigned long i = ulongval ();
10482 if (i != ((long) (sizeof (uintptr_t))))
10483 exit (1);
10484 fprintf (f, "%lu\n", i);
10485 }
10486 exit (ferror (f) || fclose (f) != 0);
10487
10488 ;
10489 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010490}
Martin v. Löwis11437992002-04-12 09:54:03 +000010491_ACEOF
10492rm -f conftest$ac_exeext
10493if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10494 (eval $ac_link) 2>&5
10495 ac_status=$?
10496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10499 (eval $ac_try) 2>&5
10500 ac_status=$?
10501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10502 (exit $ac_status); }; }; then
10503 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010504else
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 echo "$as_me: program exited with status $ac_status" >&5
10506echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010507sed 's/^/| /' conftest.$ac_ext >&5
10508
Martin v. Löwis11437992002-04-12 09:54:03 +000010509( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010510{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10511See \`config.log' for more details." >&5
10512echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10513See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 { (exit 1); exit 1; }; }
10515fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010516rm -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 +000010517fi
10518fi
10519rm -f conftest.val
10520else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010521 ac_cv_sizeof_uintptr_t=0
10522fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010524echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
10525echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
10526cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010527#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010528_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010529
Michael W. Hudson54241132001-12-07 15:38:26 +000010530
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010531fi
10532
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010533# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010534echo "$as_me:$LINENO: checking size of off_t" >&5
10535echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
10536if test "${ac_cv_sizeof_off_t+set}" = set; then
10537 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010538else
10539 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010540 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* confdefs.h. */
10544_ACEOF
10545cat confdefs.h >>conftest.$ac_ext
10546cat >>conftest.$ac_ext <<_ACEOF
10547/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010548#include <stdio.h>
10549#include <sys/types.h>
10550main()
10551{
10552 FILE *f=fopen("conftestval", "w");
10553 if (!f) exit(1);
10554 fprintf(f, "%d\n", sizeof(off_t));
10555 exit(0);
10556}
Martin v. Löwis11437992002-04-12 09:54:03 +000010557_ACEOF
10558rm -f conftest$ac_exeext
10559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10560 (eval $ac_link) 2>&5
10561 ac_status=$?
10562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10565 (eval $ac_try) 2>&5
10566 ac_status=$?
10567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10568 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010569 ac_cv_sizeof_off_t=`cat conftestval`
10570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 echo "$as_me: program exited with status $ac_status" >&5
10572echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010573sed 's/^/| /' conftest.$ac_ext >&5
10574
Martin v. Löwis11437992002-04-12 09:54:03 +000010575( exit $ac_status )
10576ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010577fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010578rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010579fi
10580
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010581fi
10582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10584echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10585
10586cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010587#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010588_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010589
Michael W. Hudson54241132001-12-07 15:38:26 +000010590
Martin v. Löwis11437992002-04-12 09:54:03 +000010591echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10592echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010593if test "$have_long_long" = yes -a \
10594 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10595 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597cat >>confdefs.h <<\_ACEOF
10598#define HAVE_LARGEFILE_SUPPORT 1
10599_ACEOF
10600
10601 echo "$as_me:$LINENO: result: yes" >&5
10602echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604 echo "$as_me:$LINENO: result: no" >&5
10605echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010606fi
10607
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010608# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010609echo "$as_me:$LINENO: checking size of time_t" >&5
10610echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10611if test "${ac_cv_sizeof_time_t+set}" = set; then
10612 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010613else
10614 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010615 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010616else
Martin v. Löwis11437992002-04-12 09:54:03 +000010617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* confdefs.h. */
10619_ACEOF
10620cat confdefs.h >>conftest.$ac_ext
10621cat >>conftest.$ac_ext <<_ACEOF
10622/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010623#include <stdio.h>
10624#include <time.h>
10625main()
10626{
10627 FILE *f=fopen("conftestval", "w");
10628 if (!f) exit(1);
10629 fprintf(f, "%d\n", sizeof(time_t));
10630 exit(0);
10631}
Martin v. Löwis11437992002-04-12 09:54:03 +000010632_ACEOF
10633rm -f conftest$ac_exeext
10634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10635 (eval $ac_link) 2>&5
10636 ac_status=$?
10637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10640 (eval $ac_try) 2>&5
10641 ac_status=$?
10642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10643 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010644 ac_cv_sizeof_time_t=`cat conftestval`
10645else
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 echo "$as_me: program exited with status $ac_status" >&5
10647echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010648sed 's/^/| /' conftest.$ac_ext >&5
10649
Martin v. Löwis11437992002-04-12 09:54:03 +000010650( exit $ac_status )
10651ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010652fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010653rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010654fi
10655
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010656fi
10657
Martin v. Löwis11437992002-04-12 09:54:03 +000010658echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10659echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10660
10661cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010662#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010663_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010664
Michael W. Hudson54241132001-12-07 15:38:26 +000010665
10666
Trent Mick635f6fb2000-08-23 21:33:05 +000010667# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010668ac_save_cc="$CC"
10669if test "$ac_cv_kpthread" = "yes"
10670then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010671elif test "$ac_cv_kthread" = "yes"
10672then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673elif test "$ac_cv_pthread" = "yes"
10674then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010676echo "$as_me:$LINENO: checking for pthread_t" >&5
10677echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010678have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010680/* confdefs.h. */
10681_ACEOF
10682cat confdefs.h >>conftest.$ac_ext
10683cat >>conftest.$ac_ext <<_ACEOF
10684/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010685#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
Guido van Rossum12580492000-09-24 16:47:19 +000010689pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 ;
10691 return 0;
10692}
10693_ACEOF
10694rm -f conftest.$ac_objext
10695if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010696 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010698 grep -v '^ *+' conftest.er1 >conftest.err
10699 rm -f conftest.er1
10700 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10702 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010703 { ac_try='test -z "$ac_c_werror_flag"
10704 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010705 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10706 (eval $ac_try) 2>&5
10707 ac_status=$?
10708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10709 (exit $ac_status); }; } &&
10710 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10712 (eval $ac_try) 2>&5
10713 ac_status=$?
10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10715 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010716 have_pthread_t=yes
10717else
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010719sed 's/^/| /' conftest.$ac_ext >&5
10720
Trent Mick635f6fb2000-08-23 21:33:05 +000010721fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010722rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010723echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10724echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010725if test "$have_pthread_t" = yes ; then
10726 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10728echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10729 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10730 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010731else
10732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010733 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010734else
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010736/* confdefs.h. */
10737_ACEOF
10738cat confdefs.h >>conftest.$ac_ext
10739cat >>conftest.$ac_ext <<_ACEOF
10740/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010741#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010742#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010743 main()
10744 {
10745 FILE *f=fopen("conftestval", "w");
10746 if (!f) exit(1);
10747 fprintf(f, "%d\n", sizeof(pthread_t));
10748 exit(0);
10749 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010750_ACEOF
10751rm -f conftest$ac_exeext
10752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10753 (eval $ac_link) 2>&5
10754 ac_status=$?
10755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10758 (eval $ac_try) 2>&5
10759 ac_status=$?
10760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10761 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010762 ac_cv_sizeof_pthread_t=`cat conftestval`
10763else
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 echo "$as_me: program exited with status $ac_status" >&5
10765echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010766sed 's/^/| /' conftest.$ac_ext >&5
10767
Martin v. Löwis11437992002-04-12 09:54:03 +000010768( exit $ac_status )
10769ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010771rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010772fi
10773
Trent Mick635f6fb2000-08-23 21:33:05 +000010774fi
10775
Martin v. Löwis11437992002-04-12 09:54:03 +000010776 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10777echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10778
10779cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010780#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010781_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010782
10783fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010784CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010785
Martin v. Löwis11437992002-04-12 09:54:03 +000010786echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10787echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010788# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10789if test "${enable_toolbox_glue+set}" = set; then
10790 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010791
Martin v. Löwis11437992002-04-12 09:54:03 +000010792fi;
Jack Jansene578a632001-08-15 01:27:14 +000010793
10794if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010795then
Jack Jansene578a632001-08-15 01:27:14 +000010796 case $ac_sys_system/$ac_sys_release in
10797 Darwin/*)
10798 enable_toolbox_glue="yes";;
10799 *)
10800 enable_toolbox_glue="no";;
10801 esac
10802fi
10803case "$enable_toolbox_glue" in
10804yes)
Jack Jansene578a632001-08-15 01:27:14 +000010805 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010806 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
10808cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010809#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010810_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010811
10812 ;;
10813*)
Jack Jansene578a632001-08-15 01:27:14 +000010814 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010815 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010816 ;;
10817esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010818echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10819echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010820
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010821
10822case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000010823 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010824 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10825 ;;
10826 Darwin/*)
10827 OTHER_LIBTOOL_OPT=""
10828 ;;
10829esac
10830
10831
10832case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000010833 Darwin/[01567]\..*)
Jack Jansen39fd2312006-02-23 15:12:19 +000010834 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010835 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010836 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010837 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010838 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10839 if test ${gcc_version} '<' 4.0
10840 then
10841 LIBTOOL_CRUFT="-lcc_dynamic"
10842 else
10843 LIBTOOL_CRUFT=""
10844 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000010845 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010846 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010847 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010848esac
10849
Martin v. Löwis11437992002-04-12 09:54:03 +000010850echo "$as_me:$LINENO: checking for --enable-framework" >&5
10851echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010852if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010853then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010854 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010856 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010857
Martin v. Löwis11437992002-04-12 09:54:03 +000010858cat >>confdefs.h <<\_ACEOF
10859#define WITH_NEXT_FRAMEWORK 1
10860_ACEOF
10861
10862 echo "$as_me:$LINENO: result: yes" >&5
10863echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010864else
Martin v. Löwis11437992002-04-12 09:54:03 +000010865 echo "$as_me:$LINENO: result: no" >&5
10866echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010867fi
10868
Martin v. Löwis11437992002-04-12 09:54:03 +000010869echo "$as_me:$LINENO: checking for dyld" >&5
10870echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010871case $ac_sys_system/$ac_sys_release in
10872 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010873
Martin v. Löwis11437992002-04-12 09:54:03 +000010874cat >>confdefs.h <<\_ACEOF
10875#define WITH_DYLD 1
10876_ACEOF
10877
10878 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10879echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010880 ;;
10881 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 echo "$as_me:$LINENO: result: no" >&5
10883echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010884 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010885esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010886
Guido van Rossum0a516c91994-09-12 10:58:40 +000010887# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010888
Michael W. Hudson54241132001-12-07 15:38:26 +000010889
10890
10891
10892
Guido van Rossum0a516c91994-09-12 10:58:40 +000010893# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010894# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010895echo "$as_me:$LINENO: checking SO" >&5
10896echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010897if test -z "$SO"
10898then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010899 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010900 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010901 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010902 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010903 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010904else
10905 # this might also be a termcap variable, see #610332
10906 echo
10907 echo '====================================================================='
10908 echo '+ +'
10909 echo '+ WARNING: You have set SO in your environment. +'
10910 echo '+ Do you really mean to change the extension for shared libraries? +'
10911 echo '+ Continuing in 10 seconds to let you to ponder. +'
10912 echo '+ +'
10913 echo '====================================================================='
10914 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010915fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010916echo "$as_me:$LINENO: result: $SO" >&5
10917echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010918# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010919# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010920# (Shared libraries in this instance are shared modules to be loaded into
10921# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010922echo "$as_me:$LINENO: checking LDSHARED" >&5
10923echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010924if test -z "$LDSHARED"
10925then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010926 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010927 AIX*)
10928 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010929 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010930 ;;
10931 BeOS*)
10932 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010933 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010934 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010935 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010936 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010937 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010938 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010939 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010940 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010941 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010942 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010943 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010944 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010945 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10946 if test "$enable_framework" ; then
10947 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010948 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10949 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010950 else
10951 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010952 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010953 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010954 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010955 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10956 if test "$enable_framework" ; then
10957 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010958 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10959 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010960 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010961 # No framework, use the Python app as bundle-loader
10962 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010963 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010964 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010965 Darwin/*)
10966 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10967 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010968 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010969 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010970 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010971 then
10972 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10973 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010974 else
10975 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10976 if test "$enable_framework" ; then
10977 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010978 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10979 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010980 else
10981 # No framework, use the Python app as bundle-loader
10982 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10983 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10984 fi
10985 fi
10986 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010987 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010988 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010989 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010990 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010991 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010992 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010993 else
10994 LDSHARED="ld -Bshareable ${LDFLAGS}"
10995 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010996 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010997 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010998 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010999 then LDSHARED='$(CC) -shared'
11000 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000011001 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011002 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000011003 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011004 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011005 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011006 *) LDSHARED="ld";;
11007 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011009echo "$as_me:$LINENO: result: $LDSHARED" >&5
11010echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011011BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000011012# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011013# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011014echo "$as_me:$LINENO: checking CCSHARED" >&5
11015echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011016if test -z "$CCSHARED"
11017then
Guido van Rossum07397971997-04-29 21:49:50 +000011018 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011019 SunOS*) if test "$GCC" = yes;
11020 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000011021 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011022 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000011023 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000011024 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000011025 else CCSHARED="+z";
11026 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011027 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011028 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011029 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011030 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011031 if test "$GCC" = "yes"
11032 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011033 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000011034 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011035 SCO_SV*)
11036 if test "$GCC" = "yes"
11037 then CCSHARED="-fPIC"
11038 else CCSHARED="-Kpic -belf"
11039 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000011040 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011041 IRIX*/6*) case $CC in
11042 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000011043 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011044 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011045 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011046 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011047fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011048echo "$as_me:$LINENO: result: $CCSHARED" >&5
11049echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011050# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011051# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011052echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
11053echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011054if test -z "$LINKFORSHARED"
11055then
Guido van Rossum07397971997-04-29 21:49:50 +000011056 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011057 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000011058 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000011059 LINKFORSHARED="-Wl,-E -Wl,+s";;
11060# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011061 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011062 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011063 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011065 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
11066 # which is
Jack Jansene578a632001-08-15 01:27:14 +000011067 # not used by the core itself but which needs to be in the core so
11068 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000011069 # -prebind is no longer used, because it actually seems to give a
11070 # slowdown in stead of a speedup, maybe due to the large number of
11071 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011072
11073 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000011074 if test "$enable_framework"
11075 then
Jack Jansenda49e192005-01-07 13:08:22 +000011076 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011077 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011078 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011079 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011080 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000011081 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011082 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000011083 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11084 then
11085 LINKFORSHARED="-Wl,--export-dynamic"
11086 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011087 SunOS/5*) case $CC in
11088 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000011089 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000011090 then
11091 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011092 fi;;
11093 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000011094 CYGWIN*)
11095 if test $enable_shared = "no"
11096 then
11097 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
11098 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011099 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011100fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011101echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
11102echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011103
Michael W. Hudson54241132001-12-07 15:38:26 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
11106echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011107if test ! "$LIBRARY" = "$LDLIBRARY"
11108then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000011109 case $ac_sys_system in
11110 CYGWIN*)
11111 # Cygwin needs CCSHARED when building extension DLLs
11112 # but not when building the interpreter DLL.
11113 CFLAGSFORSHARED='';;
11114 *)
11115 CFLAGSFORSHARED='$(CCSHARED)'
11116 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011118echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
11119echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011120
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011121# SHLIBS are libraries (except -lc and -lm) to link to the python shared
11122# library (with --enable-shared).
11123# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011124# symbols, this must be set to $(LIBS) (expanded by make). We do this even
11125# if it is not required, since it creates a dependency of the shared library
11126# to LIBS. This, in turn, means that applications linking the shared libpython
11127# don't need to link LIBS explicitly. The default should be only changed
11128# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011129
11130echo "$as_me:$LINENO: checking SHLIBS" >&5
11131echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
11132case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011133 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011134 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011135esac
11136echo "$as_me:$LINENO: result: $SHLIBS" >&5
11137echo "${ECHO_T}$SHLIBS" >&6
11138
11139
Guido van Rossum627b2d71993-12-24 10:39:16 +000011140# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
11142echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11143echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11144if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146else
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011148LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* confdefs.h. */
11151_ACEOF
11152cat confdefs.h >>conftest.$ac_ext
11153cat >>conftest.$ac_ext <<_ACEOF
11154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011156/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011157#ifdef __cplusplus
11158extern "C"
11159#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011160/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 builtin and then its argument prototype would still apply. */
11162char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011163int
11164main ()
11165{
11166dlopen ();
11167 ;
11168 return 0;
11169}
11170_ACEOF
11171rm -f conftest.$ac_objext conftest$ac_exeext
11172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011173 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011175 grep -v '^ *+' conftest.er1 >conftest.err
11176 rm -f conftest.er1
11177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11179 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011180 { ac_try='test -z "$ac_c_werror_flag"
11181 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11183 (eval $ac_try) 2>&5
11184 ac_status=$?
11185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11186 (exit $ac_status); }; } &&
11187 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11189 (eval $ac_try) 2>&5
11190 ac_status=$?
11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); }; }; then
11193 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011194else
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011196sed 's/^/| /' conftest.$ac_ext >&5
11197
Martin v. Löwis11437992002-04-12 09:54:03 +000011198ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011200rm -f conftest.err conftest.$ac_objext \
11201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011202LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011204echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11205echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11206if test $ac_cv_lib_dl_dlopen = yes; then
11207 cat >>confdefs.h <<_ACEOF
11208#define HAVE_LIBDL 1
11209_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011210
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011211 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011212
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011213fi
11214 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011215
11216echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11217echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
11218if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220else
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011222LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011224/* confdefs.h. */
11225_ACEOF
11226cat confdefs.h >>conftest.$ac_ext
11227cat >>conftest.$ac_ext <<_ACEOF
11228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011230/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011231#ifdef __cplusplus
11232extern "C"
11233#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011234/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 builtin and then its argument prototype would still apply. */
11236char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
11240shl_load ();
11241 ;
11242 return 0;
11243}
11244_ACEOF
11245rm -f conftest.$ac_objext conftest$ac_exeext
11246if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011247 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011249 grep -v '^ *+' conftest.er1 >conftest.err
11250 rm -f conftest.er1
11251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11253 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011254 { ac_try='test -z "$ac_c_werror_flag"
11255 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11257 (eval $ac_try) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); }; } &&
11261 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); }; }; then
11267 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011270sed 's/^/| /' conftest.$ac_ext >&5
11271
Martin v. Löwis11437992002-04-12 09:54:03 +000011272ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011274rm -f conftest.err conftest.$ac_objext \
11275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011276LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011278echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11279echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
11280if test $ac_cv_lib_dld_shl_load = yes; then
11281 cat >>confdefs.h <<_ACEOF
11282#define HAVE_LIBDLD 1
11283_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011285 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011287fi
11288 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011289
11290# only check for sem_ini if thread support is requested
11291if test "$with_threads" = "yes" -o -z "$with_threads"; then
11292 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011293echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
11294if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011296else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011297 ac_func_search_save_LIBS=$LIBS
11298ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* confdefs.h. */
11301_ACEOF
11302cat confdefs.h >>conftest.$ac_ext
11303cat >>conftest.$ac_ext <<_ACEOF
11304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011306/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307#ifdef __cplusplus
11308extern "C"
11309#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011310/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 builtin and then its argument prototype would still apply. */
11312char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011313int
11314main ()
11315{
11316sem_init ();
11317 ;
11318 return 0;
11319}
11320_ACEOF
11321rm -f conftest.$ac_objext conftest$ac_exeext
11322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011323 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011325 grep -v '^ *+' conftest.er1 >conftest.err
11326 rm -f conftest.er1
11327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11329 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011330 { ac_try='test -z "$ac_c_werror_flag"
11331 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11333 (eval $ac_try) 2>&5
11334 ac_status=$?
11335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11336 (exit $ac_status); }; } &&
11337 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11339 (eval $ac_try) 2>&5
11340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011343 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011344else
Martin v. Löwis11437992002-04-12 09:54:03 +000011345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011346sed 's/^/| /' conftest.$ac_ext >&5
11347
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011349rm -f conftest.err conftest.$ac_objext \
11350 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011351if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011352 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011353 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011360
11361/* Override any gcc2 internal prototype to avoid an error. */
11362#ifdef __cplusplus
11363extern "C"
11364#endif
11365/* We use char because int might match the return type of a gcc2
11366 builtin and then its argument prototype would still apply. */
11367char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011368int
11369main ()
11370{
11371sem_init ();
11372 ;
11373 return 0;
11374}
Martin v. Löwis11437992002-04-12 09:54:03 +000011375_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011376rm -f conftest.$ac_objext conftest$ac_exeext
11377if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011378 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011380 grep -v '^ *+' conftest.er1 >conftest.err
11381 rm -f conftest.er1
11382 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11384 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011385 { ac_try='test -z "$ac_c_werror_flag"
11386 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11388 (eval $ac_try) 2>&5
11389 ac_status=$?
11390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); }; } &&
11392 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11394 (eval $ac_try) 2>&5
11395 ac_status=$?
11396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11397 (exit $ac_status); }; }; then
11398 ac_cv_search_sem_init="-l$ac_lib"
11399break
11400else
11401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011402sed 's/^/| /' conftest.$ac_ext >&5
11403
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011404fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405rm -f conftest.err conftest.$ac_objext \
11406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011407 done
11408fi
11409LIBS=$ac_func_search_save_LIBS
11410fi
11411echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
11412echo "${ECHO_T}$ac_cv_search_sem_init" >&6
11413if test "$ac_cv_search_sem_init" != no; then
11414 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011415
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011416fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011417 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000011418 # posix4 on Solaris 2.6
11419 # pthread (first!) on Linux
11420fi
11421
Martin v. Löwis19d17342003-06-14 21:03:05 +000011422# check if we need libintl for locale functions
11423echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
11424echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
11425if test "${ac_cv_lib_intl_textdomain+set}" = set; then
11426 echo $ECHO_N "(cached) $ECHO_C" >&6
11427else
11428 ac_check_lib_save_LIBS=$LIBS
11429LIBS="-lintl $LIBS"
11430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* confdefs.h. */
11432_ACEOF
11433cat confdefs.h >>conftest.$ac_ext
11434cat >>conftest.$ac_ext <<_ACEOF
11435/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011436
11437/* Override any gcc2 internal prototype to avoid an error. */
11438#ifdef __cplusplus
11439extern "C"
11440#endif
11441/* We use char because int might match the return type of a gcc2
11442 builtin and then its argument prototype would still apply. */
11443char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011444int
11445main ()
11446{
11447textdomain ();
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452rm -f conftest.$ac_objext conftest$ac_exeext
11453if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011454 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000011455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011456 grep -v '^ *+' conftest.er1 >conftest.err
11457 rm -f conftest.er1
11458 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000011459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11460 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011461 { ac_try='test -z "$ac_c_werror_flag"
11462 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11464 (eval $ac_try) 2>&5
11465 ac_status=$?
11466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11467 (exit $ac_status); }; } &&
11468 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000011469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11470 (eval $ac_try) 2>&5
11471 ac_status=$?
11472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11473 (exit $ac_status); }; }; then
11474 ac_cv_lib_intl_textdomain=yes
11475else
11476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011477sed 's/^/| /' conftest.$ac_ext >&5
11478
Martin v. Löwis19d17342003-06-14 21:03:05 +000011479ac_cv_lib_intl_textdomain=no
11480fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011481rm -f conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011483LIBS=$ac_check_lib_save_LIBS
11484fi
11485echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
11486echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
11487if test $ac_cv_lib_intl_textdomain = yes; then
11488
11489cat >>confdefs.h <<\_ACEOF
11490#define WITH_LIBINTL 1
11491_ACEOF
11492
11493fi
11494
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011495
11496# checks for system dependent C++ extensions support
11497case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
11499echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
11500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* confdefs.h. */
11502_ACEOF
11503cat confdefs.h >>conftest.$ac_ext
11504cat >>conftest.$ac_ext <<_ACEOF
11505/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011506#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011507int
11508main ()
11509{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011510loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ;
11512 return 0;
11513}
11514_ACEOF
11515rm -f conftest.$ac_objext conftest$ac_exeext
11516if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011517 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011519 grep -v '^ *+' conftest.er1 >conftest.err
11520 rm -f conftest.er1
11521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011524 { ac_try='test -z "$ac_c_werror_flag"
11525 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11527 (eval $ac_try) 2>&5
11528 ac_status=$?
11529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11530 (exit $ac_status); }; } &&
11531 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11533 (eval $ac_try) 2>&5
11534 ac_status=$?
11535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11536 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011537
Martin v. Löwis11437992002-04-12 09:54:03 +000011538cat >>confdefs.h <<\_ACEOF
11539#define AIX_GENUINE_CPLUSPLUS 1
11540_ACEOF
11541
11542 echo "$as_me:$LINENO: result: yes" >&5
11543echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011544else
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011546sed 's/^/| /' conftest.$ac_ext >&5
11547
Martin v. Löwis11437992002-04-12 09:54:03 +000011548echo "$as_me:$LINENO: result: no" >&5
11549echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011550fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011551rm -f conftest.err conftest.$ac_objext \
11552 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011553 *) ;;
11554esac
11555
Guido van Rossum70c7f481998-03-26 18:44:10 +000011556# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011557# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011558echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11559echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11560if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11561 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011562else
Martin v. Löwis11437992002-04-12 09:54:03 +000011563 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011564LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* confdefs.h. */
11567_ACEOF
11568cat confdefs.h >>conftest.$ac_ext
11569cat >>conftest.$ac_ext <<_ACEOF
11570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011572/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011573#ifdef __cplusplus
11574extern "C"
11575#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011576/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 builtin and then its argument prototype would still apply. */
11578char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
11582t_open ();
11583 ;
11584 return 0;
11585}
11586_ACEOF
11587rm -f conftest.$ac_objext conftest$ac_exeext
11588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011589 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011591 grep -v '^ *+' conftest.er1 >conftest.err
11592 rm -f conftest.er1
11593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011596 { ac_try='test -z "$ac_c_werror_flag"
11597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11599 (eval $ac_try) 2>&5
11600 ac_status=$?
11601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11602 (exit $ac_status); }; } &&
11603 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11605 (eval $ac_try) 2>&5
11606 ac_status=$?
11607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11608 (exit $ac_status); }; }; then
11609 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011610else
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011612sed 's/^/| /' conftest.$ac_ext >&5
11613
Martin v. Löwis11437992002-04-12 09:54:03 +000011614ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011616rm -f conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011618LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011619fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011620echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11621echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11622if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011623 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011624fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011625 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011626echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11627echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11628if test "${ac_cv_lib_socket_socket+set}" = set; then
11629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011630else
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011632LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011634/* confdefs.h. */
11635_ACEOF
11636cat confdefs.h >>conftest.$ac_ext
11637cat >>conftest.$ac_ext <<_ACEOF
11638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011639
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011640/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011641#ifdef __cplusplus
11642extern "C"
11643#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011644/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011645 builtin and then its argument prototype would still apply. */
11646char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011647int
11648main ()
11649{
11650socket ();
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655rm -f conftest.$ac_objext conftest$ac_exeext
11656if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011657 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011659 grep -v '^ *+' conftest.er1 >conftest.err
11660 rm -f conftest.er1
11661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011664 { ac_try='test -z "$ac_c_werror_flag"
11665 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11667 (eval $ac_try) 2>&5
11668 ac_status=$?
11669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11670 (exit $ac_status); }; } &&
11671 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11673 (eval $ac_try) 2>&5
11674 ac_status=$?
11675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11676 (exit $ac_status); }; }; then
11677 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011678else
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011680sed 's/^/| /' conftest.$ac_ext >&5
11681
Martin v. Löwis11437992002-04-12 09:54:03 +000011682ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011683fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011684rm -f conftest.err conftest.$ac_objext \
11685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011686LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011688echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11689echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11690if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011691 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011692fi
11693 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011694
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011695case "$ac_sys_system" in
11696BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011697echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11698echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11699if test "${ac_cv_lib_net_socket+set}" = set; then
11700 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011701else
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011703LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011704cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011705/* confdefs.h. */
11706_ACEOF
11707cat confdefs.h >>conftest.$ac_ext
11708cat >>conftest.$ac_ext <<_ACEOF
11709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011710
Guido van Rossumad678af1998-10-02 14:42:15 +000011711/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011712#ifdef __cplusplus
11713extern "C"
11714#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011715/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011716 builtin and then its argument prototype would still apply. */
11717char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011718int
11719main ()
11720{
11721socket ();
11722 ;
11723 return 0;
11724}
11725_ACEOF
11726rm -f conftest.$ac_objext conftest$ac_exeext
11727if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011728 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011730 grep -v '^ *+' conftest.er1 >conftest.err
11731 rm -f conftest.er1
11732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011735 { ac_try='test -z "$ac_c_werror_flag"
11736 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11738 (eval $ac_try) 2>&5
11739 ac_status=$?
11740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11741 (exit $ac_status); }; } &&
11742 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11744 (eval $ac_try) 2>&5
11745 ac_status=$?
11746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11747 (exit $ac_status); }; }; then
11748 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011749else
Martin v. Löwis11437992002-04-12 09:54:03 +000011750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011751sed 's/^/| /' conftest.$ac_ext >&5
11752
Martin v. Löwis11437992002-04-12 09:54:03 +000011753ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011754fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011755rm -f conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011757LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011759echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11760echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11761if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011762 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011763fi
11764 # BeOS
11765;;
11766esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011767
Martin v. Löwis11437992002-04-12 09:54:03 +000011768echo "$as_me:$LINENO: checking for --with-libs" >&5
11769echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11770
Guido van Rossuma68acba1996-07-31 17:36:39 +000011771# Check whether --with-libs or --without-libs was given.
11772if test "${with_libs+set}" = set; then
11773 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
11775echo "$as_me:$LINENO: result: $withval" >&5
11776echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011777LIBS="$withval $LIBS"
11778
11779else
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 echo "$as_me:$LINENO: result: no" >&5
11781echo "${ECHO_T}no" >&6
11782fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011783
Martin v. Löwis9176fc12006-04-11 11:12:43 +000011784# Check for use of the system libffi library
11785echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
11786echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6
11787
11788# Check whether --with-system_ffi or --without-system_ffi was given.
11789if test "${with_system_ffi+set}" = set; then
11790 withval="$with_system_ffi"
11791
11792fi;
11793
11794if test -z "$with_system_ffi"
11795then with_system_ffi="no"
11796fi
11797echo "$as_me:$LINENO: result: $with_system_ffi" >&5
11798echo "${ECHO_T}$with_system_ffi" >&6
11799
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011800# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011801
11802
Martin v. Löwis11437992002-04-12 09:54:03 +000011803echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11804echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11805
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011806# Check whether --with-signal-module or --without-signal-module was given.
11807if test "${with_signal_module+set}" = set; then
11808 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011809
Martin v. Löwis11437992002-04-12 09:54:03 +000011810fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011811
11812if test -z "$with_signal_module"
11813then with_signal_module="yes"
11814fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011815echo "$as_me:$LINENO: result: $with_signal_module" >&5
11816echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011817
11818if test "${with_signal_module}" = "yes"; then
11819 USE_SIGNAL_MODULE=""
11820 SIGNAL_OBJS=""
11821else
11822 USE_SIGNAL_MODULE="#"
11823 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11824fi
11825
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011826# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011827
Barry Warsawc0d24d82000-06-29 16:12:00 +000011828USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11831echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11832
Guido van Rossumec2f0731997-01-22 20:54:01 +000011833
11834# Check whether --with-dec-threads or --without-dec-threads was given.
11835if test "${with_dec_threads+set}" = set; then
11836 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011837
11838echo "$as_me:$LINENO: result: $withval" >&5
11839echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011840LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011841if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011842 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011843fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011844else
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 echo "$as_me:$LINENO: result: no" >&5
11846echo "${ECHO_T}no" >&6
11847fi;
11848
11849# Templates for things AC_DEFINEd more than once.
11850# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011851
11852
Martin v. Löwis11437992002-04-12 09:54:03 +000011853
11854
11855
11856
11857
11858echo "$as_me:$LINENO: checking for --with-threads" >&5
11859echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11860
Guido van Rossumec2f0731997-01-22 20:54:01 +000011861# Check whether --with-threads or --without-threads was given.
11862if test "${with_threads+set}" = set; then
11863 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011864
Martin v. Löwis11437992002-04-12 09:54:03 +000011865fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011866
Barry Warsawc0d24d82000-06-29 16:12:00 +000011867# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011869# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011870if test "${with_thread+set}" = set; then
11871 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011872 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011873fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000011874
11875if test -z "$with_threads"
11876then with_threads="yes"
11877fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011878echo "$as_me:$LINENO: result: $with_threads" >&5
11879echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000011880
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011881
Barry Warsawc0d24d82000-06-29 16:12:00 +000011882if test "$with_threads" = "no"
11883then
11884 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011885elif test "$ac_cv_pthread_is_default" = yes
11886then
Martin v. Löwis11437992002-04-12 09:54:03 +000011887 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011888#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011889_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011890
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011891 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011892 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011893#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011894_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011895
11896 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011897 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011898elif test "$ac_cv_kpthread" = "yes"
11899then
11900 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011901 if test "$ac_cv_cxx_thread" = "yes"; then
11902 CXX="$CXX -Kpthread"
11903 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011905#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011906_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011907
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011908 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011909 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011910elif test "$ac_cv_kthread" = "yes"
11911then
11912 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011913 if test "$ac_cv_cxx_thread" = "yes"; then
11914 CXX="$CXX -Kthread"
11915 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011916 cat >>confdefs.h <<\_ACEOF
11917#define WITH_THREAD 1
11918_ACEOF
11919
11920 posix_threads=yes
11921 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011922elif test "$ac_cv_pthread" = "yes"
11923then
11924 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011925 if test "$ac_cv_cxx_thread" = "yes"; then
11926 CXX="$CXX -pthread"
11927 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011928 cat >>confdefs.h <<\_ACEOF
11929#define WITH_THREAD 1
11930_ACEOF
11931
11932 posix_threads=yes
11933 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011934else
11935 if test ! -z "$with_threads" -a -d "$with_threads"
11936 then LDFLAGS="$LDFLAGS -L$with_threads"
11937 fi
11938 if test ! -z "$withval" -a -d "$withval"
11939 then LDFLAGS="$LDFLAGS -L$withval"
11940 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011941
11942 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011943 # define _POSIX_THREADS in unistd.h. Some apparently don't
11944 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011945 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11946echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011948/* confdefs.h. */
11949_ACEOF
11950cat confdefs.h >>conftest.$ac_ext
11951cat >>conftest.$ac_ext <<_ACEOF
11952/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011953
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011954#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011955#ifdef _POSIX_THREADS
11956yes
11957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011958
11959_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011961 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011962 unistd_defines_pthreads=yes
11963else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011964 unistd_defines_pthreads=no
11965fi
11966rm -f conftest*
11967
Martin v. Löwis11437992002-04-12 09:54:03 +000011968 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11969echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011972#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011973_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 if test "${ac_cv_header_cthreads_h+set}" = set; then
11976 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11977echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11978if test "${ac_cv_header_cthreads_h+set}" = set; then
11979 echo $ECHO_N "(cached) $ECHO_C" >&6
11980fi
11981echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11982echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011983else
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 # Is the header compilable?
11985echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11986echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011988/* confdefs.h. */
11989_ACEOF
11990cat confdefs.h >>conftest.$ac_ext
11991cat >>conftest.$ac_ext <<_ACEOF
11992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011993$ac_includes_default
11994#include <cthreads.h>
11995_ACEOF
11996rm -f conftest.$ac_objext
11997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011998 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012000 grep -v '^ *+' conftest.er1 >conftest.err
12001 rm -f conftest.er1
12002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12004 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012005 { ac_try='test -z "$ac_c_werror_flag"
12006 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12008 (eval $ac_try) 2>&5
12009 ac_status=$?
12010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011 (exit $ac_status); }; } &&
12012 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12014 (eval $ac_try) 2>&5
12015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); }; }; then
12018 ac_header_compiler=yes
12019else
12020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012021sed 's/^/| /' conftest.$ac_ext >&5
12022
Martin v. Löwis11437992002-04-12 09:54:03 +000012023ac_header_compiler=no
12024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012026echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12027echo "${ECHO_T}$ac_header_compiler" >&6
12028
12029# Is the header present?
12030echo "$as_me:$LINENO: checking cthreads.h presence" >&5
12031echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
12032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012033/* confdefs.h. */
12034_ACEOF
12035cat confdefs.h >>conftest.$ac_ext
12036cat >>conftest.$ac_ext <<_ACEOF
12037/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012038#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012039_ACEOF
12040if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12041 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12042 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012043 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 rm -f conftest.er1
12045 cat conftest.err >&5
12046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047 (exit $ac_status); } >/dev/null; then
12048 if test -s conftest.err; then
12049 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012050 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 else
12052 ac_cpp_err=
12053 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012054else
Martin v. Löwis11437992002-04-12 09:54:03 +000012055 ac_cpp_err=yes
12056fi
12057if test -z "$ac_cpp_err"; then
12058 ac_header_preproc=yes
12059else
12060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012065rm -f conftest.err conftest.$ac_ext
12066echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12067echo "${ECHO_T}$ac_header_preproc" >&6
12068
12069# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012070case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12071 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12073echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012074 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
12075echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
12076 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012077 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012078 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012079 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
12080echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012081 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
12082echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
12083 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
12084echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
12085 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12086echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012087 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
12088echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012089 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
12090echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012091 (
12092 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012093## ------------------------------------------------ ##
12094## Report this to http://www.python.org/python-bugs ##
12095## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012096_ASBOX
12097 ) |
12098 sed "s/^/$as_me: WARNING: /" >&2
12099 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012100esac
12101echo "$as_me:$LINENO: checking for cthreads.h" >&5
12102echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
12103if test "${ac_cv_header_cthreads_h+set}" = set; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
12105else
12106 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012108echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12109echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
12110
12111fi
12112if test $ac_cv_header_cthreads_h = yes; then
12113 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012114#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012115_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012116
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012118#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012119_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
12122cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012123#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012125
12126 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012127 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012128else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012129
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12131 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12132echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12133if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12134 echo $ECHO_N "(cached) $ECHO_C" >&6
12135fi
12136echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12137echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012138else
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 # Is the header compilable?
12140echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
12141echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
12142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012143/* confdefs.h. */
12144_ACEOF
12145cat confdefs.h >>conftest.$ac_ext
12146cat >>conftest.$ac_ext <<_ACEOF
12147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012148$ac_includes_default
12149#include <mach/cthreads.h>
12150_ACEOF
12151rm -f conftest.$ac_objext
12152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012155 grep -v '^ *+' conftest.er1 >conftest.err
12156 rm -f conftest.er1
12157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012160 { ac_try='test -z "$ac_c_werror_flag"
12161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163 (eval $ac_try) 2>&5
12164 ac_status=$?
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); }; } &&
12167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169 (eval $ac_try) 2>&5
12170 ac_status=$?
12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172 (exit $ac_status); }; }; then
12173 ac_header_compiler=yes
12174else
12175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012176sed 's/^/| /' conftest.$ac_ext >&5
12177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178ac_header_compiler=no
12179fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012181echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12182echo "${ECHO_T}$ac_header_compiler" >&6
12183
12184# Is the header present?
12185echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
12186echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
12187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012193#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012194_ACEOF
12195if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12196 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12197 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012198 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 rm -f conftest.er1
12200 cat conftest.err >&5
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); } >/dev/null; then
12203 if test -s conftest.err; then
12204 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012205 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 else
12207 ac_cpp_err=
12208 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012209else
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_cpp_err=yes
12211fi
12212if test -z "$ac_cpp_err"; then
12213 ac_header_preproc=yes
12214else
12215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012216sed 's/^/| /' conftest.$ac_ext >&5
12217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012219fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012220rm -f conftest.err conftest.$ac_ext
12221echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12222echo "${ECHO_T}$ac_header_preproc" >&6
12223
12224# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12226 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12228echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012229 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12230echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12231 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012233 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012234 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12235echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012236 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12237echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12238 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12239echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12240 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12241echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012242 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12243echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012244 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12245echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012246 (
12247 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012248## ------------------------------------------------ ##
12249## Report this to http://www.python.org/python-bugs ##
12250## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012251_ASBOX
12252 ) |
12253 sed "s/^/$as_me: WARNING: /" >&2
12254 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012255esac
12256echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12257echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12258if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12259 echo $ECHO_N "(cached) $ECHO_C" >&6
12260else
12261 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012263echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12264echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
12265
12266fi
12267if test $ac_cv_header_mach_cthreads_h = yes; then
12268 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012269#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012273#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012274_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012275
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
12277cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012278#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012279_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012280
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012281 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012282else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 echo "$as_me:$LINENO: checking for --with-pth" >&5
12285echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
12286
12287# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012288if test "${with_pth+set}" = set; then
12289 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012290 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012291echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012292 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012293#define WITH_THREAD 1
12294_ACEOF
12295
12296
12297cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012298#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012299_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012300
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012301 LIBS="-lpth $LIBS"
12302 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012303else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012304 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012305echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012306
12307 # Just looking for pthread_create in libpthread is not enough:
12308 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12309 # So we really have to include pthread.h, and then link.
12310 _libs=$LIBS
12311 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12313echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
12314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* confdefs.h. */
12316_ACEOF
12317cat confdefs.h >>conftest.$ac_ext
12318cat >>conftest.$ac_ext <<_ACEOF
12319/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012320#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012321
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012322void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012323int
12324main ()
12325{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012326
12327pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 ;
12329 return 0;
12330}
12331_ACEOF
12332rm -f conftest.$ac_objext conftest$ac_exeext
12333if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012334 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012336 grep -v '^ *+' conftest.er1 >conftest.err
12337 rm -f conftest.er1
12338 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12340 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012341 { ac_try='test -z "$ac_c_werror_flag"
12342 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12344 (eval $ac_try) 2>&5
12345 ac_status=$?
12346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12347 (exit $ac_status); }; } &&
12348 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12350 (eval $ac_try) 2>&5
12351 ac_status=$?
12352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12353 (exit $ac_status); }; }; then
12354
12355 echo "$as_me:$LINENO: result: yes" >&5
12356echo "${ECHO_T}yes" >&6
12357 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012358#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012359_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012360
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012361 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012362 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012363else
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012365sed 's/^/| /' conftest.$ac_ext >&5
12366
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012368 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12370echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
12371if test "${ac_cv_func_pthread_detach+set}" = set; then
12372 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012373else
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012375/* confdefs.h. */
12376_ACEOF
12377cat confdefs.h >>conftest.$ac_ext
12378cat >>conftest.$ac_ext <<_ACEOF
12379/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012380/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12381 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12382#define pthread_detach innocuous_pthread_detach
12383
Guido van Rossumad678af1998-10-02 14:42:15 +000012384/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012385 which can conflict with char pthread_detach (); below.
12386 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012387 <limits.h> exists even on freestanding compilers. */
12388
12389#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000012390# include <limits.h>
12391#else
12392# include <assert.h>
12393#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012394
12395#undef pthread_detach
12396
Guido van Rossumad678af1998-10-02 14:42:15 +000012397/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012398#ifdef __cplusplus
12399extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012400{
Martin v. Löwis11437992002-04-12 09:54:03 +000012401#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000012402/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 builtin and then its argument prototype would still apply. */
12404char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000012405/* The GNU C library defines this for functions which it implements
12406 to always fail with ENOSYS. Some functions are actually named
12407 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000012408#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000012409choke me
12410#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012411char (*f) () = pthread_detach;
12412#endif
12413#ifdef __cplusplus
12414}
Guido van Rossumad678af1998-10-02 14:42:15 +000012415#endif
12416
Skip Montanaro6dead952003-09-25 14:50:04 +000012417int
12418main ()
12419{
12420return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
12425rm -f conftest.$ac_objext conftest$ac_exeext
12426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012427 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012429 grep -v '^ *+' conftest.er1 >conftest.err
12430 rm -f conftest.er1
12431 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12433 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012434 { ac_try='test -z "$ac_c_werror_flag"
12435 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12437 (eval $ac_try) 2>&5
12438 ac_status=$?
12439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12440 (exit $ac_status); }; } &&
12441 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12443 (eval $ac_try) 2>&5
12444 ac_status=$?
12445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12446 (exit $ac_status); }; }; then
12447 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012448else
Martin v. Löwis11437992002-04-12 09:54:03 +000012449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012450sed 's/^/| /' conftest.$ac_ext >&5
12451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012453fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012454rm -f conftest.err conftest.$ac_objext \
12455 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000012456fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012457echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
12458echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
12459if test $ac_cv_func_pthread_detach = yes; then
12460 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012461#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012462_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012463
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012464 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012465 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000012466else
Guido van Rossumad678af1998-10-02 14:42:15 +000012467
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012468 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12469 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12470echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12471if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12472 echo $ECHO_N "(cached) $ECHO_C" >&6
12473fi
12474echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12475echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12476else
12477 # Is the header compilable?
12478echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
12479echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
12480cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* confdefs.h. */
12482_ACEOF
12483cat confdefs.h >>conftest.$ac_ext
12484cat >>conftest.$ac_ext <<_ACEOF
12485/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012486$ac_includes_default
12487#include <atheos/threads.h>
12488_ACEOF
12489rm -f conftest.$ac_objext
12490if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012491 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012493 grep -v '^ *+' conftest.er1 >conftest.err
12494 rm -f conftest.er1
12495 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12497 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012498 { ac_try='test -z "$ac_c_werror_flag"
12499 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12502 ac_status=$?
12503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12504 (exit $ac_status); }; } &&
12505 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12507 (eval $ac_try) 2>&5
12508 ac_status=$?
12509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12510 (exit $ac_status); }; }; then
12511 ac_header_compiler=yes
12512else
12513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012514sed 's/^/| /' conftest.$ac_ext >&5
12515
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012516ac_header_compiler=no
12517fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012519echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12520echo "${ECHO_T}$ac_header_compiler" >&6
12521
12522# Is the header present?
12523echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
12524echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
12525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012526/* confdefs.h. */
12527_ACEOF
12528cat confdefs.h >>conftest.$ac_ext
12529cat >>conftest.$ac_ext <<_ACEOF
12530/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012531#include <atheos/threads.h>
12532_ACEOF
12533if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12534 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12535 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012536 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012537 rm -f conftest.er1
12538 cat conftest.err >&5
12539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12540 (exit $ac_status); } >/dev/null; then
12541 if test -s conftest.err; then
12542 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012543 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012544 else
12545 ac_cpp_err=
12546 fi
12547else
12548 ac_cpp_err=yes
12549fi
12550if test -z "$ac_cpp_err"; then
12551 ac_header_preproc=yes
12552else
12553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012554sed 's/^/| /' conftest.$ac_ext >&5
12555
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012556 ac_header_preproc=no
12557fi
12558rm -f conftest.err conftest.$ac_ext
12559echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12560echo "${ECHO_T}$ac_header_preproc" >&6
12561
12562# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12564 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012565 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12566echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012567 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
12568echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
12569 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012570 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012571 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012572 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
12573echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012574 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
12575echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
12576 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
12577echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12578 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12579echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012580 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12581echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012582 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12583echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012584 (
12585 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012586## ------------------------------------------------ ##
12587## Report this to http://www.python.org/python-bugs ##
12588## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012589_ASBOX
12590 ) |
12591 sed "s/^/$as_me: WARNING: /" >&2
12592 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012593esac
12594echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12595echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12596if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12597 echo $ECHO_N "(cached) $ECHO_C" >&6
12598else
12599 ac_cv_header_atheos_threads_h=$ac_header_preproc
12600fi
12601echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12602echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12603
12604fi
12605if test $ac_cv_header_atheos_threads_h = yes; then
12606 cat >>confdefs.h <<\_ACEOF
12607#define WITH_THREAD 1
12608_ACEOF
12609
12610
12611cat >>confdefs.h <<\_ACEOF
12612#define ATHEOS_THREADS 1
12613_ACEOF
12614
12615 THREADOBJ="Python/thread.o"
12616else
12617
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12619 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12620echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12621if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12622 echo $ECHO_N "(cached) $ECHO_C" >&6
12623fi
12624echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12625echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012626else
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 # Is the header compilable?
12628echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12629echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12630cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012631/* confdefs.h. */
12632_ACEOF
12633cat confdefs.h >>conftest.$ac_ext
12634cat >>conftest.$ac_ext <<_ACEOF
12635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012636$ac_includes_default
12637#include <kernel/OS.h>
12638_ACEOF
12639rm -f conftest.$ac_objext
12640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012643 grep -v '^ *+' conftest.er1 >conftest.err
12644 rm -f conftest.er1
12645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012648 { ac_try='test -z "$ac_c_werror_flag"
12649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12651 (eval $ac_try) 2>&5
12652 ac_status=$?
12653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12654 (exit $ac_status); }; } &&
12655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12657 (eval $ac_try) 2>&5
12658 ac_status=$?
12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660 (exit $ac_status); }; }; then
12661 ac_header_compiler=yes
12662else
12663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012664sed 's/^/| /' conftest.$ac_ext >&5
12665
Martin v. Löwis11437992002-04-12 09:54:03 +000012666ac_header_compiler=no
12667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012669echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12670echo "${ECHO_T}$ac_header_compiler" >&6
12671
12672# Is the header present?
12673echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12674echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* confdefs.h. */
12677_ACEOF
12678cat confdefs.h >>conftest.$ac_ext
12679cat >>conftest.$ac_ext <<_ACEOF
12680/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012681#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012682_ACEOF
12683if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12684 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12685 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012686 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 rm -f conftest.er1
12688 cat conftest.err >&5
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12690 (exit $ac_status); } >/dev/null; then
12691 if test -s conftest.err; then
12692 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012693 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 else
12695 ac_cpp_err=
12696 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012697else
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 ac_cpp_err=yes
12699fi
12700if test -z "$ac_cpp_err"; then
12701 ac_header_preproc=yes
12702else
12703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012704sed 's/^/| /' conftest.$ac_ext >&5
12705
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012708rm -f conftest.err conftest.$ac_ext
12709echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12710echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012711
Martin v. Löwis11437992002-04-12 09:54:03 +000012712# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012713case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12714 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12716echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012717 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12718echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12719 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012720 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012721 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012722 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12723echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012724 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12725echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12726 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12727echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12728 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12729echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012730 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12731echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012732 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12733echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734 (
12735 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012736## ------------------------------------------------ ##
12737## Report this to http://www.python.org/python-bugs ##
12738## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012739_ASBOX
12740 ) |
12741 sed "s/^/$as_me: WARNING: /" >&2
12742 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012743esac
12744echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12745echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12746if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12747 echo $ECHO_N "(cached) $ECHO_C" >&6
12748else
12749 ac_cv_header_kernel_OS_h=$ac_header_preproc
12750fi
12751echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12752echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12753
12754fi
12755if test $ac_cv_header_kernel_OS_h = yes; then
12756 cat >>confdefs.h <<\_ACEOF
12757#define WITH_THREAD 1
12758_ACEOF
12759
12760
12761cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012762#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012763_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012764
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012765 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012766else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012767
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12769echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12770if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12771 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012772else
Martin v. Löwis11437992002-04-12 09:54:03 +000012773 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012774LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* confdefs.h. */
12777_ACEOF
12778cat confdefs.h >>conftest.$ac_ext
12779cat >>conftest.$ac_ext <<_ACEOF
12780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781
Greg Steinadf63d62000-07-05 10:38:09 +000012782/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012783#ifdef __cplusplus
12784extern "C"
12785#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012786/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 builtin and then its argument prototype would still apply. */
12788char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
12792pthread_create ();
12793 ;
12794 return 0;
12795}
12796_ACEOF
12797rm -f conftest.$ac_objext conftest$ac_exeext
12798if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012799 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012801 grep -v '^ *+' conftest.er1 >conftest.err
12802 rm -f conftest.er1
12803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12805 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012806 { ac_try='test -z "$ac_c_werror_flag"
12807 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12809 (eval $ac_try) 2>&5
12810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); }; } &&
12813 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
12819 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012820else
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012822sed 's/^/| /' conftest.$ac_ext >&5
12823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012826rm -f conftest.err conftest.$ac_objext \
12827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012828LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012829fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012830echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12831echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12832if test $ac_cv_lib_pthreads_pthread_create = yes; then
12833 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012834#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012835_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012836
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012837 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012838 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012839 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012840else
Greg Steinadf63d62000-07-05 10:38:09 +000012841
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12843echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12844if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12845 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012848LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* confdefs.h. */
12851_ACEOF
12852cat confdefs.h >>conftest.$ac_ext
12853cat >>conftest.$ac_ext <<_ACEOF
12854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Guido van Rossum49545951997-12-02 19:28:29 +000012856/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012857#ifdef __cplusplus
12858extern "C"
12859#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012860/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 builtin and then its argument prototype would still apply. */
12862char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012863int
12864main ()
12865{
12866pthread_create ();
12867 ;
12868 return 0;
12869}
12870_ACEOF
12871rm -f conftest.$ac_objext conftest$ac_exeext
12872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012873 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012875 grep -v '^ *+' conftest.er1 >conftest.err
12876 rm -f conftest.er1
12877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12879 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012880 { ac_try='test -z "$ac_c_werror_flag"
12881 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12883 (eval $ac_try) 2>&5
12884 ac_status=$?
12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12886 (exit $ac_status); }; } &&
12887 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12889 (eval $ac_try) 2>&5
12890 ac_status=$?
12891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12892 (exit $ac_status); }; }; then
12893 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012894else
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012896sed 's/^/| /' conftest.$ac_ext >&5
12897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012899fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012900rm -f conftest.err conftest.$ac_objext \
12901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012903fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012904echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12905echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12906if test $ac_cv_lib_c_r_pthread_create = yes; then
12907 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012908#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012909_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012911 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012912 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012913 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012914else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012915
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12917echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12918if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012920else
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012922LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012924/* confdefs.h. */
12925_ACEOF
12926cat confdefs.h >>conftest.$ac_ext
12927cat >>conftest.$ac_ext <<_ACEOF
12928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012929
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012930/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012931#ifdef __cplusplus
12932extern "C"
12933#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012934/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 builtin and then its argument prototype would still apply. */
12936char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
12939{
12940__pthread_create_system ();
12941 ;
12942 return 0;
12943}
12944_ACEOF
12945rm -f conftest.$ac_objext conftest$ac_exeext
12946if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012947 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012949 grep -v '^ *+' conftest.er1 >conftest.err
12950 rm -f conftest.er1
12951 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12953 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012954 { ac_try='test -z "$ac_c_werror_flag"
12955 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12957 (eval $ac_try) 2>&5
12958 ac_status=$?
12959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12960 (exit $ac_status); }; } &&
12961 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12963 (eval $ac_try) 2>&5
12964 ac_status=$?
12965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966 (exit $ac_status); }; }; then
12967 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012968else
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012970sed 's/^/| /' conftest.$ac_ext >&5
12971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012973fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012974rm -f conftest.err conftest.$ac_objext \
12975 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012976LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012977fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012978echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12979echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12980if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12981 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012982#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012983_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012984
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012985 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012986 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012987 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012988else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12991echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12992if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12993 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012994else
Martin v. Löwis11437992002-04-12 09:54:03 +000012995 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012996LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012998/* confdefs.h. */
12999_ACEOF
13000cat confdefs.h >>conftest.$ac_ext
13001cat >>conftest.$ac_ext <<_ACEOF
13002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Guido van Rossumb93a8621998-05-07 13:27:32 +000013004/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013005#ifdef __cplusplus
13006extern "C"
13007#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000013008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 builtin and then its argument prototype would still apply. */
13010char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013011int
13012main ()
13013{
13014pthread_create ();
13015 ;
13016 return 0;
13017}
13018_ACEOF
13019rm -f conftest.$ac_objext conftest$ac_exeext
13020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013021 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013023 grep -v '^ *+' conftest.er1 >conftest.err
13024 rm -f conftest.er1
13025 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013028 { ac_try='test -z "$ac_c_werror_flag"
13029 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13031 (eval $ac_try) 2>&5
13032 ac_status=$?
13033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034 (exit $ac_status); }; } &&
13035 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13037 (eval $ac_try) 2>&5
13038 ac_status=$?
13039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13040 (exit $ac_status); }; }; then
13041 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013042else
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013044sed 's/^/| /' conftest.$ac_ext >&5
13045
Martin v. Löwis11437992002-04-12 09:54:03 +000013046ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000013047fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013048rm -f conftest.err conftest.$ac_objext \
13049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013050LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013052echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
13053echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
13054if test $ac_cv_lib_cma_pthread_create = yes; then
13055 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013056#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013057_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013059 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013060 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013061 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000013062else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000013063
Martin v. Löwis130fb172001-07-19 11:00:41 +000013064 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000013065fi
13066
Guido van Rossum627b2d71993-12-24 10:39:16 +000013067
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013068fi
13069
Guido van Rossum0be3e491997-05-22 20:33:33 +000013070fi
13071
Guido van Rossum49545951997-12-02 19:28:29 +000013072fi
13073
Guido van Rossumb93a8621998-05-07 13:27:32 +000013074fi
13075
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013076
Michael W. Hudson54241132001-12-07 15:38:26 +000013077fi
13078
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013079
13080fi
13081
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013082fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013083rm -f conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013085fi;
13086fi
13087
13088
13089fi
13090
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013091
Michael W. Hudson54241132001-12-07 15:38:26 +000013092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
13094echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
13095if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
13096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013097else
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013099LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013101/* confdefs.h. */
13102_ACEOF
13103cat confdefs.h >>conftest.$ac_ext
13104cat >>conftest.$ac_ext <<_ACEOF
13105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013106
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013107/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013108#ifdef __cplusplus
13109extern "C"
13110#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013111/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013112 builtin and then its argument prototype would still apply. */
13113char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013114int
13115main ()
13116{
13117usconfig ();
13118 ;
13119 return 0;
13120}
13121_ACEOF
13122rm -f conftest.$ac_objext conftest$ac_exeext
13123if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013124 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013126 grep -v '^ *+' conftest.er1 >conftest.err
13127 rm -f conftest.er1
13128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13130 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013131 { ac_try='test -z "$ac_c_werror_flag"
13132 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134 (eval $ac_try) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); }; } &&
13138 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13141 ac_status=$?
13142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13143 (exit $ac_status); }; }; then
13144 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013145else
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013147sed 's/^/| /' conftest.$ac_ext >&5
13148
Martin v. Löwis11437992002-04-12 09:54:03 +000013149ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013150fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013151rm -f conftest.err conftest.$ac_objext \
13152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013155echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
13156echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
13157if test $ac_cv_lib_mpc_usconfig = yes; then
13158 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013159#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013160_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161
Martin v. Löwis130fb172001-07-19 11:00:41 +000013162 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013163 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013164 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013165fi
13166
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013167
Neal Norwitza978ab02002-11-02 16:58:05 +000013168 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
13170echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
13171if test "${ac_cv_lib_thread_thr_create+set}" = set; then
13172 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013173else
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013175LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013177/* confdefs.h. */
13178_ACEOF
13179cat confdefs.h >>conftest.$ac_ext
13180cat >>conftest.$ac_ext <<_ACEOF
13181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013183/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013184#ifdef __cplusplus
13185extern "C"
13186#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013187/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013188 builtin and then its argument prototype would still apply. */
13189char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013190int
13191main ()
13192{
13193thr_create ();
13194 ;
13195 return 0;
13196}
13197_ACEOF
13198rm -f conftest.$ac_objext conftest$ac_exeext
13199if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013200 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013202 grep -v '^ *+' conftest.er1 >conftest.err
13203 rm -f conftest.er1
13204 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13206 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013207 { ac_try='test -z "$ac_c_werror_flag"
13208 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13210 (eval $ac_try) 2>&5
13211 ac_status=$?
13212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13213 (exit $ac_status); }; } &&
13214 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13216 (eval $ac_try) 2>&5
13217 ac_status=$?
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); }; }; then
13220 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221else
Martin v. Löwis11437992002-04-12 09:54:03 +000013222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013223sed 's/^/| /' conftest.$ac_ext >&5
13224
Martin v. Löwis11437992002-04-12 09:54:03 +000013225ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013226fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013227rm -f conftest.err conftest.$ac_objext \
13228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013229LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13232echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
13233if test $ac_cv_lib_thread_thr_create = yes; then
13234 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013236_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013237
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013238 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013239 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013240 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013241fi
13242
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013243 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013244
Martin v. Löwis130fb172001-07-19 11:00:41 +000013245 if test "$USE_THREAD_MODULE" != "#"
13246 then
13247 # If the above checks didn't disable threads, (at least) OSF1
13248 # needs this '-threads' argument during linking.
13249 case $ac_sys_system in
13250 OSF1) LDLAST=-threads;;
13251 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013252 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013253fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013254
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013255if test "$posix_threads" = "yes"; then
13256 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013257
13258cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013259#define _POSIX_THREADS 1
13260_ACEOF
13261
13262 fi
13263
13264 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13265 case $ac_sys_system/$ac_sys_release in
13266 SunOS/5.6)
13267cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013268#define HAVE_PTHREAD_DESTRUCTOR 1
13269_ACEOF
13270
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013271 ;;
13272 SunOS/5.8)
13273cat >>confdefs.h <<\_ACEOF
13274#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13275_ACEOF
13276
13277 ;;
13278 esac
13279
13280 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13281echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
13282 if test "${ac_cv_pthread_system_supported+set}" = set; then
13283 echo $ECHO_N "(cached) $ECHO_C" >&6
13284else
13285 if test "$cross_compiling" = yes; then
13286 ac_cv_pthread_system_supported=no
13287else
13288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* confdefs.h. */
13290_ACEOF
13291cat confdefs.h >>conftest.$ac_ext
13292cat >>conftest.$ac_ext <<_ACEOF
13293/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013294#include <pthread.h>
13295 void *foo(void *parm) {
13296 return NULL;
13297 }
13298 main() {
13299 pthread_attr_t attr;
13300 pthread_t id;
13301 if (pthread_attr_init(&attr)) exit(-1);
13302 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13303 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13304 exit(0);
13305 }
13306_ACEOF
13307rm -f conftest$ac_exeext
13308if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13309 (eval $ac_link) 2>&5
13310 ac_status=$?
13311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13314 (eval $ac_try) 2>&5
13315 ac_status=$?
13316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13317 (exit $ac_status); }; }; then
13318 ac_cv_pthread_system_supported=yes
13319else
13320 echo "$as_me: program exited with status $ac_status" >&5
13321echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013322sed 's/^/| /' conftest.$ac_ext >&5
13323
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013324( exit $ac_status )
13325ac_cv_pthread_system_supported=no
13326fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013327rm -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 +000013328fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013329
Guido van Rossum627b2d71993-12-24 10:39:16 +000013330fi
13331
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013332 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13333echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
13334 if test "$ac_cv_pthread_system_supported" = "yes"; then
13335
13336cat >>confdefs.h <<\_ACEOF
13337#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13338_ACEOF
13339
13340 fi
13341
13342for ac_func in pthread_sigmask
13343do
13344as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13345echo "$as_me:$LINENO: checking for $ac_func" >&5
13346echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13347if eval "test \"\${$as_ac_var+set}\" = set"; then
13348 echo $ECHO_N "(cached) $ECHO_C" >&6
13349else
13350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013356/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13357 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13358#define $ac_func innocuous_$ac_func
13359
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013360/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013361 which can conflict with char $ac_func (); below.
13362 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013363 <limits.h> exists even on freestanding compilers. */
13364
13365#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013366# include <limits.h>
13367#else
13368# include <assert.h>
13369#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013370
13371#undef $ac_func
13372
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013373/* Override any gcc2 internal prototype to avoid an error. */
13374#ifdef __cplusplus
13375extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013376{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013377#endif
13378/* We use char because int might match the return type of a gcc2
13379 builtin and then its argument prototype would still apply. */
13380char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013381/* The GNU C library defines this for functions which it implements
13382 to always fail with ENOSYS. Some functions are actually named
13383 something starting with __ and the normal name is an alias. */
13384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13385choke me
13386#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013387char (*f) () = $ac_func;
13388#endif
13389#ifdef __cplusplus
13390}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013391#endif
13392
Skip Montanaro6dead952003-09-25 14:50:04 +000013393int
13394main ()
13395{
13396return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013397 ;
13398 return 0;
13399}
13400_ACEOF
13401rm -f conftest.$ac_objext conftest$ac_exeext
13402if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013403 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013405 grep -v '^ *+' conftest.er1 >conftest.err
13406 rm -f conftest.er1
13407 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13409 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013410 { ac_try='test -z "$ac_c_werror_flag"
13411 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013412 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13413 (eval $ac_try) 2>&5
13414 ac_status=$?
13415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13416 (exit $ac_status); }; } &&
13417 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13419 (eval $ac_try) 2>&5
13420 ac_status=$?
13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13422 (exit $ac_status); }; }; then
13423 eval "$as_ac_var=yes"
13424else
13425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013426sed 's/^/| /' conftest.$ac_ext >&5
13427
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013428eval "$as_ac_var=no"
13429fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013430rm -f conftest.err conftest.$ac_objext \
13431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013432fi
13433echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13434echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13435if test `eval echo '${'$as_ac_var'}'` = yes; then
13436 cat >>confdefs.h <<_ACEOF
13437#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13438_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000013439 case $ac_sys_system in
13440 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013441
Jason Tishlerfac083d2003-07-22 15:20:49 +000013442cat >>confdefs.h <<\_ACEOF
13443#define HAVE_BROKEN_PTHREAD_SIGMASK 1
13444_ACEOF
13445
13446 ;;
13447 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013448fi
13449done
13450
13451fi
13452
13453
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013454# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000013455
13456
13457echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
13458echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013459# Check whether --enable-ipv6 or --disable-ipv6 was given.
13460if test "${enable_ipv6+set}" = set; then
13461 enableval="$enable_ipv6"
13462 case "$enableval" in
13463 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 echo "$as_me:$LINENO: result: no" >&5
13465echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013466 ipv6=no
13467 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 *) echo "$as_me:$LINENO: result: yes" >&5
13469echo "${ECHO_T}yes" >&6
13470 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013471#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013472_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013473
13474 ipv6=yes
13475 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013477else
Martin v. Löwis11437992002-04-12 09:54:03 +000013478
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013479 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 echo "$as_me:$LINENO: result: no" >&5
13481echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013482 ipv6=no
13483
13484else
Martin v. Löwis11437992002-04-12 09:54:03 +000013485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013486/* confdefs.h. */
13487_ACEOF
13488cat confdefs.h >>conftest.$ac_ext
13489cat >>conftest.$ac_ext <<_ACEOF
13490/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013491 /* AF_INET6 available check */
13492#include <sys/types.h>
13493#include <sys/socket.h>
13494main()
13495{
13496 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
13497 exit(1);
13498 else
13499 exit(0);
13500}
13501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502_ACEOF
13503rm -f conftest$ac_exeext
13504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13505 (eval $ac_link) 2>&5
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13510 (eval $ac_try) 2>&5
13511 ac_status=$?
13512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513 (exit $ac_status); }; }; then
13514 echo "$as_me:$LINENO: result: yes" >&5
13515echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013516 ipv6=yes
13517else
Martin v. Löwis11437992002-04-12 09:54:03 +000013518 echo "$as_me: program exited with status $ac_status" >&5
13519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013520sed 's/^/| /' conftest.$ac_ext >&5
13521
Martin v. Löwis11437992002-04-12 09:54:03 +000013522( exit $ac_status )
13523echo "$as_me:$LINENO: result: no" >&5
13524echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013525 ipv6=no
13526fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013527rm -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 +000013528fi
13529
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013530if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13532echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
13533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013539#include <sys/types.h>
13540#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013541int
13542main ()
13543{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013544struct sockaddr_in6 x;
13545x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
13550rm -f conftest.$ac_objext
13551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013552 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554 grep -v '^ *+' conftest.er1 >conftest.err
13555 rm -f conftest.er1
13556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013559 { ac_try='test -z "$ac_c_werror_flag"
13560 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13562 (eval $ac_try) 2>&5
13563 ac_status=$?
13564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13565 (exit $ac_status); }; } &&
13566 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13568 (eval $ac_try) 2>&5
13569 ac_status=$?
13570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571 (exit $ac_status); }; }; then
13572 echo "$as_me:$LINENO: result: yes" >&5
13573echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013574 ipv6=yes
13575else
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013577sed 's/^/| /' conftest.$ac_ext >&5
13578
Martin v. Löwis11437992002-04-12 09:54:03 +000013579echo "$as_me:$LINENO: result: no" >&5
13580echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013581 ipv6=no
13582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013584fi
13585
13586if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013588#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013589_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013590
13591fi
13592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013594
13595ipv6type=unknown
13596ipv6lib=none
13597ipv6trylibc=no
13598
13599if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13601echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013602 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13603 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013604 case $i in
13605 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013607/* confdefs.h. */
13608_ACEOF
13609cat confdefs.h >>conftest.$ac_ext
13610cat >>conftest.$ac_ext <<_ACEOF
13611/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013612
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013613#include <netinet/in.h>
13614#ifdef IPV6_INRIA_VERSION
13615yes
13616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013617_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013619 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013620 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013621fi
13622rm -f conftest*
13623
13624 ;;
13625 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013627/* confdefs.h. */
13628_ACEOF
13629cat confdefs.h >>conftest.$ac_ext
13630cat >>conftest.$ac_ext <<_ACEOF
13631/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013632
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013633#include <netinet/in.h>
13634#ifdef __KAME__
13635yes
13636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013637_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013639 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013640 ipv6type=$i;
13641 ipv6lib=inet6
13642 ipv6libdir=/usr/local/v6/lib
13643 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013644fi
13645rm -f conftest*
13646
13647 ;;
13648 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013650/* confdefs.h. */
13651_ACEOF
13652cat confdefs.h >>conftest.$ac_ext
13653cat >>conftest.$ac_ext <<_ACEOF
13654/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013655
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013656#include <features.h>
13657#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13658yes
13659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013660_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013662 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013663 ipv6type=$i;
13664 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013665fi
13666rm -f conftest*
13667
13668 ;;
13669 linux-inet6)
13670 if test -d /usr/inet6; then
13671 ipv6type=$i
13672 ipv6lib=inet6
13673 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013674 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013675 fi
13676 ;;
13677 solaris)
13678 if test -f /etc/netconfig; then
13679 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13680 ipv6type=$i
13681 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013682 fi
13683 fi
13684 ;;
13685 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013687/* confdefs.h. */
13688_ACEOF
13689cat confdefs.h >>conftest.$ac_ext
13690cat >>conftest.$ac_ext <<_ACEOF
13691/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013692
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013693#include <sys/param.h>
13694#ifdef _TOSHIBA_INET6
13695yes
13696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013697_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013699 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013700 ipv6type=$i;
13701 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013702 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013703fi
13704rm -f conftest*
13705
13706 ;;
13707 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013709/* confdefs.h. */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013715#include </usr/local/v6/include/sys/v6config.h>
13716#ifdef __V6D__
13717yes
13718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013719_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013721 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013722 ipv6type=$i;
13723 ipv6lib=v6;
13724 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013725 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013726fi
13727rm -f conftest*
13728
13729 ;;
13730 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* confdefs.h. */
13733_ACEOF
13734cat confdefs.h >>conftest.$ac_ext
13735cat >>conftest.$ac_ext <<_ACEOF
13736/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013738#include <sys/param.h>
13739#ifdef _ZETA_MINAMI_INET6
13740yes
13741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013742_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013744 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013745 ipv6type=$i;
13746 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013747 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013748fi
13749rm -f conftest*
13750
13751 ;;
13752 esac
13753 if test "$ipv6type" != "unknown"; then
13754 break
13755 fi
13756 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 echo "$as_me:$LINENO: result: $ipv6type" >&5
13758echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013759fi
13760
13761if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13762 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13763 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13764 echo "using lib$ipv6lib"
13765 else
13766 if test $ipv6trylibc = "yes"; then
13767 echo "using libc"
13768 else
13769 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13770 echo "You need to fetch lib$ipv6lib.a from appropriate"
13771 echo 'ipv6 kit and compile beforehand.'
13772 exit 1
13773 fi
13774 fi
13775fi
13776
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013777# Check for --with-doc-strings
13778echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13779echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13780
13781# Check whether --with-doc-strings or --without-doc-strings was given.
13782if test "${with_doc_strings+set}" = set; then
13783 withval="$with_doc_strings"
13784
13785fi;
13786
13787if test -z "$with_doc_strings"
13788then with_doc_strings="yes"
13789fi
13790if test "$with_doc_strings" != "no"
13791then
13792
13793cat >>confdefs.h <<\_ACEOF
13794#define WITH_DOC_STRINGS 1
13795_ACEOF
13796
13797fi
13798echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13799echo "${ECHO_T}$with_doc_strings" >&6
13800
Neil Schemenauera35c6882001-02-27 04:45:05 +000013801# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013802echo "$as_me:$LINENO: checking for --with-tsc" >&5
13803echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13804
13805# Check whether --with-tsc or --without-tsc was given.
13806if test "${with_tsc+set}" = set; then
13807 withval="$with_tsc"
13808
13809if test "$withval" != no
13810then
13811
13812cat >>confdefs.h <<\_ACEOF
13813#define WITH_TSC 1
13814_ACEOF
13815
13816 echo "$as_me:$LINENO: result: yes" >&5
13817echo "${ECHO_T}yes" >&6
13818else echo "$as_me:$LINENO: result: no" >&5
13819echo "${ECHO_T}no" >&6
13820fi
13821else
13822 echo "$as_me:$LINENO: result: no" >&5
13823echo "${ECHO_T}no" >&6
13824fi;
13825
13826# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013827echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13828echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13829
Neil Schemenauera35c6882001-02-27 04:45:05 +000013830# Check whether --with-pymalloc or --without-pymalloc was given.
13831if test "${with_pymalloc+set}" = set; then
13832 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013833
Martin v. Löwis11437992002-04-12 09:54:03 +000013834fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013835
Neil Schemenauer16c22972002-03-22 15:34:49 +000013836if test -z "$with_pymalloc"
13837then with_pymalloc="yes"
13838fi
13839if test "$with_pymalloc" != "no"
13840then
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
13842cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013843#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013844_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013845
13846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013847echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13848echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013849
Barry Warsawef82cd72000-06-30 16:21:01 +000013850# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013851echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13852echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13853
Barry Warsawef82cd72000-06-30 16:21:01 +000013854# Check whether --with-wctype-functions or --without-wctype-functions was given.
13855if test "${with_wctype_functions+set}" = set; then
13856 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Barry Warsawef82cd72000-06-30 16:21:01 +000013858if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013859then
13860
13861cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013862#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013863_ACEOF
13864
13865 echo "$as_me:$LINENO: result: yes" >&5
13866echo "${ECHO_T}yes" >&6
13867else echo "$as_me:$LINENO: result: no" >&5
13868echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013869fi
13870else
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 echo "$as_me:$LINENO: result: no" >&5
13872echo "${ECHO_T}no" >&6
13873fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013874
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013875# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013876
Guido van Rossum98935bf2001-09-05 19:13:16 +000013877DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013878
Guido van Rossume97ee181999-12-20 21:27:22 +000013879# the dlopen() function means we might want to use dynload_shlib.o. some
13880# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Thomas Wouters3a584202000-08-05 23:28:51 +000013882for ac_func in dlopen
13883do
Martin v. Löwis11437992002-04-12 09:54:03 +000013884as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13885echo "$as_me:$LINENO: checking for $ac_func" >&5
13886echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13887if eval "test \"\${$as_ac_var+set}\" = set"; then
13888 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013889else
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013891/* confdefs.h. */
13892_ACEOF
13893cat confdefs.h >>conftest.$ac_ext
13894cat >>conftest.$ac_ext <<_ACEOF
13895/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013896/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13897 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13898#define $ac_func innocuous_$ac_func
13899
Guido van Rossume97ee181999-12-20 21:27:22 +000013900/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013901 which can conflict with char $ac_func (); below.
13902 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013903 <limits.h> exists even on freestanding compilers. */
13904
13905#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013906# include <limits.h>
13907#else
13908# include <assert.h>
13909#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013910
13911#undef $ac_func
13912
Guido van Rossume97ee181999-12-20 21:27:22 +000013913/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013914#ifdef __cplusplus
13915extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013916{
Martin v. Löwis11437992002-04-12 09:54:03 +000013917#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013918/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 builtin and then its argument prototype would still apply. */
13920char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013921/* The GNU C library defines this for functions which it implements
13922 to always fail with ENOSYS. Some functions are actually named
13923 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013924#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013925choke me
13926#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013927char (*f) () = $ac_func;
13928#endif
13929#ifdef __cplusplus
13930}
Guido van Rossume97ee181999-12-20 21:27:22 +000013931#endif
13932
Skip Montanaro6dead952003-09-25 14:50:04 +000013933int
13934main ()
13935{
13936return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 ;
13938 return 0;
13939}
13940_ACEOF
13941rm -f conftest.$ac_objext conftest$ac_exeext
13942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013943 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013945 grep -v '^ *+' conftest.er1 >conftest.err
13946 rm -f conftest.er1
13947 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13949 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013950 { ac_try='test -z "$ac_c_werror_flag"
13951 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13954 ac_status=$?
13955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13956 (exit $ac_status); }; } &&
13957 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13959 (eval $ac_try) 2>&5
13960 ac_status=$?
13961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13962 (exit $ac_status); }; }; then
13963 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013964else
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013966sed 's/^/| /' conftest.$ac_ext >&5
13967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013969fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013970rm -f conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013972fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013973echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13974echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13975if test `eval echo '${'$as_ac_var'}'` = yes; then
13976 cat >>confdefs.h <<_ACEOF
13977#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13978_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013979
Guido van Rossume97ee181999-12-20 21:27:22 +000013980fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013981done
Guido van Rossume97ee181999-12-20 21:27:22 +000013982
Michael W. Hudson54241132001-12-07 15:38:26 +000013983
Guido van Rossume97ee181999-12-20 21:27:22 +000013984# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13985# loading of modules.
13986
Martin v. Löwis11437992002-04-12 09:54:03 +000013987echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13988echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013989if test -z "$DYNLOADFILE"
13990then
13991 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013992 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13993 if test "$ac_cv_func_dlopen" = yes
13994 then DYNLOADFILE="dynload_shlib.o"
13995 else DYNLOADFILE="dynload_aix.o"
13996 fi
13997 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013998 BeOS*) DYNLOADFILE="dynload_beos.o";;
13999 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000014000 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
14001 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014002 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000014003 *)
14004 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
14005 # out any dynamic loading
14006 if test "$ac_cv_func_dlopen" = yes
14007 then DYNLOADFILE="dynload_shlib.o"
14008 else DYNLOADFILE="dynload_stub.o"
14009 fi
14010 ;;
14011 esac
14012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014013echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
14014echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014015if test "$DYNLOADFILE" != "dynload_stub.o"
14016then
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
14018cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014019#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014020_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014021
14022fi
14023
Neil Schemenauer4e425612001-06-19 15:44:15 +000014024# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14025
Michael W. Hudson54241132001-12-07 15:38:26 +000014026
Martin v. Löwis11437992002-04-12 09:54:03 +000014027echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14028echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014029if test -z "$MACHDEP_OBJS"
14030then
Jack Jansene578a632001-08-15 01:27:14 +000014031 MACHDEP_OBJS=$extra_machdep_objs
14032else
14033 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014035echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14036echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014037
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
14040
14041
14042
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000014110
Martin v. Löwisc3001752005-01-23 09:27:24 +000014111
14112
Neal Norwitz05a45592006-03-20 06:30:08 +000014113
14114
Martin v. Löwisd6320502004-08-12 13:45:08 +000014115for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
14116 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000014117 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000014118 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000014119 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000014120 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000014121 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000014122 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000014123 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000014124 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000014125 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000014126 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000014127do
Martin v. Löwis11437992002-04-12 09:54:03 +000014128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14129echo "$as_me:$LINENO: checking for $ac_func" >&5
14130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14131if eval "test \"\${$as_ac_var+set}\" = set"; then
14132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014135/* confdefs.h. */
14136_ACEOF
14137cat confdefs.h >>conftest.$ac_ext
14138cat >>conftest.$ac_ext <<_ACEOF
14139/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014140/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14141 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14142#define $ac_func innocuous_$ac_func
14143
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014144/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014145 which can conflict with char $ac_func (); below.
14146 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014147 <limits.h> exists even on freestanding compilers. */
14148
14149#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014150# include <limits.h>
14151#else
14152# include <assert.h>
14153#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014154
14155#undef $ac_func
14156
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014157/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014158#ifdef __cplusplus
14159extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014160{
Martin v. Löwis11437992002-04-12 09:54:03 +000014161#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014162/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 builtin and then its argument prototype would still apply. */
14164char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014165/* The GNU C library defines this for functions which it implements
14166 to always fail with ENOSYS. Some functions are actually named
14167 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014168#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014169choke me
14170#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014171char (*f) () = $ac_func;
14172#endif
14173#ifdef __cplusplus
14174}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014175#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014176
Skip Montanaro6dead952003-09-25 14:50:04 +000014177int
14178main ()
14179{
14180return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ;
14182 return 0;
14183}
14184_ACEOF
14185rm -f conftest.$ac_objext conftest$ac_exeext
14186if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014187 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014189 grep -v '^ *+' conftest.er1 >conftest.err
14190 rm -f conftest.er1
14191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14193 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014194 { ac_try='test -z "$ac_c_werror_flag"
14195 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14197 (eval $ac_try) 2>&5
14198 ac_status=$?
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); }; } &&
14201 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203 (eval $ac_try) 2>&5
14204 ac_status=$?
14205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206 (exit $ac_status); }; }; then
14207 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014208else
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014210sed 's/^/| /' conftest.$ac_ext >&5
14211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014214rm -f conftest.err conftest.$ac_objext \
14215 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014216fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014217echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14218echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14219if test `eval echo '${'$as_ac_var'}'` = yes; then
14220 cat >>confdefs.h <<_ACEOF
14221#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014223
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014224fi
14225done
14226
Michael W. Hudson54241132001-12-07 15:38:26 +000014227
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014228# For some functions, having a definition is not sufficient, since
14229# we want to take their address.
14230echo "$as_me:$LINENO: checking for chroot" >&5
14231echo $ECHO_N "checking for chroot... $ECHO_C" >&6
14232cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014233/* confdefs.h. */
14234_ACEOF
14235cat confdefs.h >>conftest.$ac_ext
14236cat >>conftest.$ac_ext <<_ACEOF
14237/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014238#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014239int
14240main ()
14241{
14242void *x=chroot
14243 ;
14244 return 0;
14245}
14246_ACEOF
14247rm -f conftest.$ac_objext
14248if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014249 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014251 grep -v '^ *+' conftest.er1 >conftest.err
14252 rm -f conftest.er1
14253 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014256 { ac_try='test -z "$ac_c_werror_flag"
14257 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14259 (eval $ac_try) 2>&5
14260 ac_status=$?
14261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); }; } &&
14263 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14265 (eval $ac_try) 2>&5
14266 ac_status=$?
14267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14268 (exit $ac_status); }; }; then
14269
14270cat >>confdefs.h <<\_ACEOF
14271#define HAVE_CHROOT 1
14272_ACEOF
14273
14274 echo "$as_me:$LINENO: result: yes" >&5
14275echo "${ECHO_T}yes" >&6
14276else
14277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014278sed 's/^/| /' conftest.$ac_ext >&5
14279
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014280echo "$as_me:$LINENO: result: no" >&5
14281echo "${ECHO_T}no" >&6
14282
14283fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014285echo "$as_me:$LINENO: checking for link" >&5
14286echo $ECHO_N "checking for link... $ECHO_C" >&6
14287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014288/* confdefs.h. */
14289_ACEOF
14290cat confdefs.h >>conftest.$ac_ext
14291cat >>conftest.$ac_ext <<_ACEOF
14292/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014293#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014294int
14295main ()
14296{
14297void *x=link
14298 ;
14299 return 0;
14300}
14301_ACEOF
14302rm -f conftest.$ac_objext
14303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014304 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014306 grep -v '^ *+' conftest.er1 >conftest.err
14307 rm -f conftest.er1
14308 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014311 { ac_try='test -z "$ac_c_werror_flag"
14312 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14314 (eval $ac_try) 2>&5
14315 ac_status=$?
14316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14317 (exit $ac_status); }; } &&
14318 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14320 (eval $ac_try) 2>&5
14321 ac_status=$?
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); }; }; then
14324
14325cat >>confdefs.h <<\_ACEOF
14326#define HAVE_LINK 1
14327_ACEOF
14328
14329 echo "$as_me:$LINENO: result: yes" >&5
14330echo "${ECHO_T}yes" >&6
14331else
14332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014333sed 's/^/| /' conftest.$ac_ext >&5
14334
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014335echo "$as_me:$LINENO: result: no" >&5
14336echo "${ECHO_T}no" >&6
14337
14338fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014339rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014340echo "$as_me:$LINENO: checking for symlink" >&5
14341echo $ECHO_N "checking for symlink... $ECHO_C" >&6
14342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014343/* confdefs.h. */
14344_ACEOF
14345cat confdefs.h >>conftest.$ac_ext
14346cat >>conftest.$ac_ext <<_ACEOF
14347/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014348#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014349int
14350main ()
14351{
14352void *x=symlink
14353 ;
14354 return 0;
14355}
14356_ACEOF
14357rm -f conftest.$ac_objext
14358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014359 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014361 grep -v '^ *+' conftest.er1 >conftest.err
14362 rm -f conftest.er1
14363 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14365 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014366 { ac_try='test -z "$ac_c_werror_flag"
14367 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14369 (eval $ac_try) 2>&5
14370 ac_status=$?
14371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14372 (exit $ac_status); }; } &&
14373 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14375 (eval $ac_try) 2>&5
14376 ac_status=$?
14377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14378 (exit $ac_status); }; }; then
14379
14380cat >>confdefs.h <<\_ACEOF
14381#define HAVE_SYMLINK 1
14382_ACEOF
14383
14384 echo "$as_me:$LINENO: result: yes" >&5
14385echo "${ECHO_T}yes" >&6
14386else
14387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014388sed 's/^/| /' conftest.$ac_ext >&5
14389
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014390echo "$as_me:$LINENO: result: no" >&5
14391echo "${ECHO_T}no" >&6
14392
14393fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014395echo "$as_me:$LINENO: checking for fchdir" >&5
14396echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
14397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014398/* confdefs.h. */
14399_ACEOF
14400cat confdefs.h >>conftest.$ac_ext
14401cat >>conftest.$ac_ext <<_ACEOF
14402/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014403#include <unistd.h>
14404int
14405main ()
14406{
14407void *x=fchdir
14408 ;
14409 return 0;
14410}
14411_ACEOF
14412rm -f conftest.$ac_objext
14413if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014414 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014416 grep -v '^ *+' conftest.er1 >conftest.err
14417 rm -f conftest.er1
14418 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14420 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014421 { ac_try='test -z "$ac_c_werror_flag"
14422 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14424 (eval $ac_try) 2>&5
14425 ac_status=$?
14426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14427 (exit $ac_status); }; } &&
14428 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); }; }; then
14434
14435cat >>confdefs.h <<\_ACEOF
14436#define HAVE_FCHDIR 1
14437_ACEOF
14438
14439 echo "$as_me:$LINENO: result: yes" >&5
14440echo "${ECHO_T}yes" >&6
14441else
14442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014443sed 's/^/| /' conftest.$ac_ext >&5
14444
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014445echo "$as_me:$LINENO: result: no" >&5
14446echo "${ECHO_T}no" >&6
14447
14448fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014449rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014450echo "$as_me:$LINENO: checking for fsync" >&5
14451echo $ECHO_N "checking for fsync... $ECHO_C" >&6
14452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014453/* confdefs.h. */
14454_ACEOF
14455cat confdefs.h >>conftest.$ac_ext
14456cat >>conftest.$ac_ext <<_ACEOF
14457/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014458#include <unistd.h>
14459int
14460main ()
14461{
14462void *x=fsync
14463 ;
14464 return 0;
14465}
14466_ACEOF
14467rm -f conftest.$ac_objext
14468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014469 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014471 grep -v '^ *+' conftest.er1 >conftest.err
14472 rm -f conftest.er1
14473 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14475 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014476 { ac_try='test -z "$ac_c_werror_flag"
14477 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14479 (eval $ac_try) 2>&5
14480 ac_status=$?
14481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14482 (exit $ac_status); }; } &&
14483 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14485 (eval $ac_try) 2>&5
14486 ac_status=$?
14487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14488 (exit $ac_status); }; }; then
14489
14490cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014491#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014492_ACEOF
14493
14494 echo "$as_me:$LINENO: result: yes" >&5
14495echo "${ECHO_T}yes" >&6
14496else
14497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014498sed 's/^/| /' conftest.$ac_ext >&5
14499
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014500echo "$as_me:$LINENO: result: no" >&5
14501echo "${ECHO_T}no" >&6
14502
14503fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014505echo "$as_me:$LINENO: checking for fdatasync" >&5
14506echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
14507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* confdefs.h. */
14509_ACEOF
14510cat confdefs.h >>conftest.$ac_ext
14511cat >>conftest.$ac_ext <<_ACEOF
14512/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014513#include <unistd.h>
14514int
14515main ()
14516{
14517void *x=fdatasync
14518 ;
14519 return 0;
14520}
14521_ACEOF
14522rm -f conftest.$ac_objext
14523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014524 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014526 grep -v '^ *+' conftest.er1 >conftest.err
14527 rm -f conftest.er1
14528 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014531 { ac_try='test -z "$ac_c_werror_flag"
14532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14534 (eval $ac_try) 2>&5
14535 ac_status=$?
14536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14537 (exit $ac_status); }; } &&
14538 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14540 (eval $ac_try) 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); }; }; then
14544
14545cat >>confdefs.h <<\_ACEOF
14546#define HAVE_FDATASYNC 1
14547_ACEOF
14548
14549 echo "$as_me:$LINENO: result: yes" >&5
14550echo "${ECHO_T}yes" >&6
14551else
14552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014553sed 's/^/| /' conftest.$ac_ext >&5
14554
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014555echo "$as_me:$LINENO: result: no" >&5
14556echo "${ECHO_T}no" >&6
14557
14558fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014560
Martin v. Löwisd5843682002-11-21 20:41:28 +000014561# On some systems (eg. FreeBSD 5), we would find a definition of the
14562# functions ctermid_r, setgroups in the library, but no prototype
14563# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14564# address to avoid compiler warnings and potential miscompilations
14565# because of the missing prototypes.
14566
14567echo "$as_me:$LINENO: checking for ctermid_r" >&5
14568echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
14569cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014570/* confdefs.h. */
14571_ACEOF
14572cat confdefs.h >>conftest.$ac_ext
14573cat >>conftest.$ac_ext <<_ACEOF
14574/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014575
14576#include "confdefs.h"
14577#include <stdio.h>
14578
Martin v. Löwisd5843682002-11-21 20:41:28 +000014579int
14580main ()
14581{
14582void* p = ctermid_r
14583 ;
14584 return 0;
14585}
14586_ACEOF
14587rm -f conftest.$ac_objext
14588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014591 grep -v '^ *+' conftest.er1 >conftest.err
14592 rm -f conftest.er1
14593 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014596 { ac_try='test -z "$ac_c_werror_flag"
14597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14599 (eval $ac_try) 2>&5
14600 ac_status=$?
14601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14602 (exit $ac_status); }; } &&
14603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14605 (eval $ac_try) 2>&5
14606 ac_status=$?
14607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14608 (exit $ac_status); }; }; then
14609
14610cat >>confdefs.h <<\_ACEOF
14611#define HAVE_CTERMID_R 1
14612_ACEOF
14613
14614 echo "$as_me:$LINENO: result: yes" >&5
14615echo "${ECHO_T}yes" >&6
14616else
14617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014618sed 's/^/| /' conftest.$ac_ext >&5
14619
Martin v. Löwisd5843682002-11-21 20:41:28 +000014620echo "$as_me:$LINENO: result: no" >&5
14621echo "${ECHO_T}no" >&6
14622
14623fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014625
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014626echo "$as_me:$LINENO: checking for flock" >&5
14627echo $ECHO_N "checking for flock... $ECHO_C" >&6
14628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014629/* confdefs.h. */
14630_ACEOF
14631cat confdefs.h >>conftest.$ac_ext
14632cat >>conftest.$ac_ext <<_ACEOF
14633/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014634
14635#include "confdefs.h"
14636#include <sys/file.h>
14637
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014638int
14639main ()
14640{
14641void* p = flock
14642 ;
14643 return 0;
14644}
14645_ACEOF
14646rm -f conftest.$ac_objext
14647if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014648 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014650 grep -v '^ *+' conftest.er1 >conftest.err
14651 rm -f conftest.er1
14652 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14654 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014655 { ac_try='test -z "$ac_c_werror_flag"
14656 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14658 (eval $ac_try) 2>&5
14659 ac_status=$?
14660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14661 (exit $ac_status); }; } &&
14662 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14664 (eval $ac_try) 2>&5
14665 ac_status=$?
14666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14667 (exit $ac_status); }; }; then
14668
14669cat >>confdefs.h <<\_ACEOF
14670#define HAVE_FLOCK 1
14671_ACEOF
14672
14673 echo "$as_me:$LINENO: result: yes" >&5
14674echo "${ECHO_T}yes" >&6
14675else
14676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014677sed 's/^/| /' conftest.$ac_ext >&5
14678
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014679echo "$as_me:$LINENO: result: no" >&5
14680echo "${ECHO_T}no" >&6
14681
14682fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014684
14685echo "$as_me:$LINENO: checking for getpagesize" >&5
14686echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14687cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014688/* confdefs.h. */
14689_ACEOF
14690cat confdefs.h >>conftest.$ac_ext
14691cat >>conftest.$ac_ext <<_ACEOF
14692/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014693
14694#include "confdefs.h"
14695#include <unistd.h>
14696
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014697int
14698main ()
14699{
14700void* p = getpagesize
14701 ;
14702 return 0;
14703}
14704_ACEOF
14705rm -f conftest.$ac_objext
14706if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014707 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014709 grep -v '^ *+' conftest.er1 >conftest.err
14710 rm -f conftest.er1
14711 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14713 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014714 { ac_try='test -z "$ac_c_werror_flag"
14715 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14717 (eval $ac_try) 2>&5
14718 ac_status=$?
14719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); }; } &&
14721 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14724 ac_status=$?
14725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
14727
14728cat >>confdefs.h <<\_ACEOF
14729#define HAVE_GETPAGESIZE 1
14730_ACEOF
14731
14732 echo "$as_me:$LINENO: result: yes" >&5
14733echo "${ECHO_T}yes" >&6
14734else
14735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014736sed 's/^/| /' conftest.$ac_ext >&5
14737
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014738echo "$as_me:$LINENO: result: no" >&5
14739echo "${ECHO_T}no" >&6
14740
14741fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014742rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014743
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014744for ac_prog in true
14745do
14746 # Extract the first word of "$ac_prog", so it can be a program name with args.
14747set dummy $ac_prog; ac_word=$2
14748echo "$as_me:$LINENO: checking for $ac_word" >&5
14749echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14750if test "${ac_cv_prog_TRUE+set}" = set; then
14751 echo $ECHO_N "(cached) $ECHO_C" >&6
14752else
14753 if test -n "$TRUE"; then
14754 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14755else
14756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14757for as_dir in $PATH
14758do
14759 IFS=$as_save_IFS
14760 test -z "$as_dir" && as_dir=.
14761 for ac_exec_ext in '' $ac_executable_extensions; do
14762 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14763 ac_cv_prog_TRUE="$ac_prog"
14764 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14765 break 2
14766 fi
14767done
14768done
14769
14770fi
14771fi
14772TRUE=$ac_cv_prog_TRUE
14773if test -n "$TRUE"; then
14774 echo "$as_me:$LINENO: result: $TRUE" >&5
14775echo "${ECHO_T}$TRUE" >&6
14776else
14777 echo "$as_me:$LINENO: result: no" >&5
14778echo "${ECHO_T}no" >&6
14779fi
14780
14781 test -n "$TRUE" && break
14782done
14783test -n "$TRUE" || TRUE="/bin/true"
14784
14785
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014786echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14787echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14788if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14789 echo $ECHO_N "(cached) $ECHO_C" >&6
14790else
14791 ac_check_lib_save_LIBS=$LIBS
14792LIBS="-lc $LIBS"
14793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014794/* confdefs.h. */
14795_ACEOF
14796cat confdefs.h >>conftest.$ac_ext
14797cat >>conftest.$ac_ext <<_ACEOF
14798/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014799
14800/* Override any gcc2 internal prototype to avoid an error. */
14801#ifdef __cplusplus
14802extern "C"
14803#endif
14804/* We use char because int might match the return type of a gcc2
14805 builtin and then its argument prototype would still apply. */
14806char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014807int
14808main ()
14809{
14810inet_aton ();
14811 ;
14812 return 0;
14813}
14814_ACEOF
14815rm -f conftest.$ac_objext conftest$ac_exeext
14816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014817 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014819 grep -v '^ *+' conftest.er1 >conftest.err
14820 rm -f conftest.er1
14821 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14823 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014824 { ac_try='test -z "$ac_c_werror_flag"
14825 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14830 (exit $ac_status); }; } &&
14831 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14833 (eval $ac_try) 2>&5
14834 ac_status=$?
14835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14836 (exit $ac_status); }; }; then
14837 ac_cv_lib_c_inet_aton=yes
14838else
14839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014840sed 's/^/| /' conftest.$ac_ext >&5
14841
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014842ac_cv_lib_c_inet_aton=no
14843fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014844rm -f conftest.err conftest.$ac_objext \
14845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014846LIBS=$ac_check_lib_save_LIBS
14847fi
14848echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14849echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14850if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014851 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014852else
14853
14854echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14855echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14856if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14857 echo $ECHO_N "(cached) $ECHO_C" >&6
14858else
14859 ac_check_lib_save_LIBS=$LIBS
14860LIBS="-lresolv $LIBS"
14861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014862/* confdefs.h. */
14863_ACEOF
14864cat confdefs.h >>conftest.$ac_ext
14865cat >>conftest.$ac_ext <<_ACEOF
14866/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014867
14868/* Override any gcc2 internal prototype to avoid an error. */
14869#ifdef __cplusplus
14870extern "C"
14871#endif
14872/* We use char because int might match the return type of a gcc2
14873 builtin and then its argument prototype would still apply. */
14874char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014875int
14876main ()
14877{
14878inet_aton ();
14879 ;
14880 return 0;
14881}
14882_ACEOF
14883rm -f conftest.$ac_objext conftest$ac_exeext
14884if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014885 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014887 grep -v '^ *+' conftest.er1 >conftest.err
14888 rm -f conftest.er1
14889 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14891 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014892 { ac_try='test -z "$ac_c_werror_flag"
14893 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895 (eval $ac_try) 2>&5
14896 ac_status=$?
14897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898 (exit $ac_status); }; } &&
14899 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14901 (eval $ac_try) 2>&5
14902 ac_status=$?
14903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904 (exit $ac_status); }; }; then
14905 ac_cv_lib_resolv_inet_aton=yes
14906else
14907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014908sed 's/^/| /' conftest.$ac_ext >&5
14909
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014910ac_cv_lib_resolv_inet_aton=no
14911fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014912rm -f conftest.err conftest.$ac_objext \
14913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014914LIBS=$ac_check_lib_save_LIBS
14915fi
14916echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14917echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14918if test $ac_cv_lib_resolv_inet_aton = yes; then
14919 cat >>confdefs.h <<_ACEOF
14920#define HAVE_LIBRESOLV 1
14921_ACEOF
14922
14923 LIBS="-lresolv $LIBS"
14924
14925fi
14926
14927
14928fi
14929
14930
Martin v. Löwise9416172003-05-03 10:12:45 +000014931echo "$as_me:$LINENO: checking for hstrerror" >&5
14932echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14933cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* confdefs.h. */
14935_ACEOF
14936cat confdefs.h >>conftest.$ac_ext
14937cat >>conftest.$ac_ext <<_ACEOF
14938/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014939
14940#include "confdefs.h"
14941#include <netdb.h>
14942
Martin v. Löwise9416172003-05-03 10:12:45 +000014943int
14944main ()
14945{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014946void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014947 ;
14948 return 0;
14949}
14950_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014951rm -f conftest.$ac_objext conftest$ac_exeext
14952if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014953 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014955 grep -v '^ *+' conftest.er1 >conftest.err
14956 rm -f conftest.er1
14957 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14959 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014960 { ac_try='test -z "$ac_c_werror_flag"
14961 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14963 (eval $ac_try) 2>&5
14964 ac_status=$?
14965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14966 (exit $ac_status); }; } &&
14967 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14969 (eval $ac_try) 2>&5
14970 ac_status=$?
14971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972 (exit $ac_status); }; }; then
14973
14974cat >>confdefs.h <<\_ACEOF
14975#define HAVE_HSTRERROR 1
14976_ACEOF
14977
14978 echo "$as_me:$LINENO: result: yes" >&5
14979echo "${ECHO_T}yes" >&6
14980else
14981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014982sed 's/^/| /' conftest.$ac_ext >&5
14983
Martin v. Löwise9416172003-05-03 10:12:45 +000014984echo "$as_me:$LINENO: result: no" >&5
14985echo "${ECHO_T}no" >&6
14986
14987fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988rm -f conftest.err conftest.$ac_objext \
14989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014990
14991echo "$as_me:$LINENO: checking for inet_aton" >&5
14992echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* confdefs.h. */
14995_ACEOF
14996cat confdefs.h >>conftest.$ac_ext
14997cat >>conftest.$ac_ext <<_ACEOF
14998/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014999
15000#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000015001#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015002#include <sys/socket.h>
15003#include <netinet/in.h>
15004#include <arpa/inet.h>
15005
Martin v. Löwise9416172003-05-03 10:12:45 +000015006int
15007main ()
15008{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015009void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015010 ;
15011 return 0;
15012}
15013_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015014rm -f conftest.$ac_objext conftest$ac_exeext
15015if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015016 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018 grep -v '^ *+' conftest.er1 >conftest.err
15019 rm -f conftest.er1
15020 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15022 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015023 { ac_try='test -z "$ac_c_werror_flag"
15024 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15026 (eval $ac_try) 2>&5
15027 ac_status=$?
15028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029 (exit $ac_status); }; } &&
15030 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032 (eval $ac_try) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); }; }; then
15036
15037cat >>confdefs.h <<\_ACEOF
15038#define HAVE_INET_ATON 1
15039_ACEOF
15040
15041 echo "$as_me:$LINENO: result: yes" >&5
15042echo "${ECHO_T}yes" >&6
15043else
15044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015045sed 's/^/| /' conftest.$ac_ext >&5
15046
Martin v. Löwise9416172003-05-03 10:12:45 +000015047echo "$as_me:$LINENO: result: no" >&5
15048echo "${ECHO_T}no" >&6
15049
15050fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015051rm -f conftest.err conftest.$ac_objext \
15052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015053
15054echo "$as_me:$LINENO: checking for inet_pton" >&5
15055echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
15056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015057/* confdefs.h. */
15058_ACEOF
15059cat confdefs.h >>conftest.$ac_ext
15060cat >>conftest.$ac_ext <<_ACEOF
15061/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015062
15063#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015064#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015065#include <sys/socket.h>
15066#include <netinet/in.h>
15067#include <arpa/inet.h>
15068
Martin v. Löwise9416172003-05-03 10:12:45 +000015069int
15070main ()
15071{
15072void* p = inet_pton
15073 ;
15074 return 0;
15075}
15076_ACEOF
15077rm -f conftest.$ac_objext
15078if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015079 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015081 grep -v '^ *+' conftest.er1 >conftest.err
15082 rm -f conftest.er1
15083 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015086 { ac_try='test -z "$ac_c_werror_flag"
15087 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15089 (eval $ac_try) 2>&5
15090 ac_status=$?
15091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15092 (exit $ac_status); }; } &&
15093 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15095 (eval $ac_try) 2>&5
15096 ac_status=$?
15097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15098 (exit $ac_status); }; }; then
15099
15100cat >>confdefs.h <<\_ACEOF
15101#define HAVE_INET_PTON 1
15102_ACEOF
15103
15104 echo "$as_me:$LINENO: result: yes" >&5
15105echo "${ECHO_T}yes" >&6
15106else
15107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015108sed 's/^/| /' conftest.$ac_ext >&5
15109
Martin v. Löwise9416172003-05-03 10:12:45 +000015110echo "$as_me:$LINENO: result: no" >&5
15111echo "${ECHO_T}no" >&6
15112
15113fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015115
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015116# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000015117echo "$as_me:$LINENO: checking for setgroups" >&5
15118echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
15119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015120/* confdefs.h. */
15121_ACEOF
15122cat confdefs.h >>conftest.$ac_ext
15123cat >>conftest.$ac_ext <<_ACEOF
15124/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015125
15126#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015127#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015128#ifdef HAVE_GRP_H
15129#include <grp.h>
15130#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000015131
Martin v. Löwisd5843682002-11-21 20:41:28 +000015132int
15133main ()
15134{
15135void* p = setgroups
15136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext
15141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015142 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 grep -v '^ *+' conftest.er1 >conftest.err
15145 rm -f conftest.er1
15146 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15148 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015149 { ac_try='test -z "$ac_c_werror_flag"
15150 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15152 (eval $ac_try) 2>&5
15153 ac_status=$?
15154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155 (exit $ac_status); }; } &&
15156 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000015157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15158 (eval $ac_try) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); }; }; then
15162
15163cat >>confdefs.h <<\_ACEOF
15164#define HAVE_SETGROUPS 1
15165_ACEOF
15166
15167 echo "$as_me:$LINENO: result: yes" >&5
15168echo "${ECHO_T}yes" >&6
15169else
15170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015171sed 's/^/| /' conftest.$ac_ext >&5
15172
Martin v. Löwisd5843682002-11-21 20:41:28 +000015173echo "$as_me:$LINENO: result: no" >&5
15174echo "${ECHO_T}no" >&6
15175
15176fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015177rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015178
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015179# check for openpty and forkpty
15180
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015182for ac_func in openpty
15183do
Martin v. Löwis11437992002-04-12 09:54:03 +000015184as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15185echo "$as_me:$LINENO: checking for $ac_func" >&5
15186echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15187if eval "test \"\${$as_ac_var+set}\" = set"; then
15188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015191/* confdefs.h. */
15192_ACEOF
15193cat confdefs.h >>conftest.$ac_ext
15194cat >>conftest.$ac_ext <<_ACEOF
15195/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015196/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15197 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15198#define $ac_func innocuous_$ac_func
15199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015200/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015201 which can conflict with char $ac_func (); below.
15202 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015203 <limits.h> exists even on freestanding compilers. */
15204
15205#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015206# include <limits.h>
15207#else
15208# include <assert.h>
15209#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015210
15211#undef $ac_func
15212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015213/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015214#ifdef __cplusplus
15215extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015216{
Martin v. Löwis11437992002-04-12 09:54:03 +000015217#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015218/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015219 builtin and then its argument prototype would still apply. */
15220char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015221/* The GNU C library defines this for functions which it implements
15222 to always fail with ENOSYS. Some functions are actually named
15223 something starting with __ and the normal name is an alias. */
15224#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15225choke me
15226#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015227char (*f) () = $ac_func;
15228#endif
15229#ifdef __cplusplus
15230}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015231#endif
15232
Skip Montanaro6dead952003-09-25 14:50:04 +000015233int
15234main ()
15235{
15236return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 ;
15238 return 0;
15239}
15240_ACEOF
15241rm -f conftest.$ac_objext conftest$ac_exeext
15242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015243 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245 grep -v '^ *+' conftest.er1 >conftest.err
15246 rm -f conftest.er1
15247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15249 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015250 { ac_try='test -z "$ac_c_werror_flag"
15251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15253 (eval $ac_try) 2>&5
15254 ac_status=$?
15255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15256 (exit $ac_status); }; } &&
15257 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15260 ac_status=$?
15261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262 (exit $ac_status); }; }; then
15263 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015264else
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015266sed 's/^/| /' conftest.$ac_ext >&5
15267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015269fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015270rm -f conftest.err conftest.$ac_objext \
15271 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015273echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15274echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15275if test `eval echo '${'$as_ac_var'}'` = yes; then
15276 cat >>confdefs.h <<_ACEOF
15277#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15278_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015280else
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15282echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15283if test "${ac_cv_lib_util_openpty+set}" = set; then
15284 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015285else
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015287LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015289/* confdefs.h. */
15290_ACEOF
15291cat confdefs.h >>conftest.$ac_ext
15292cat >>conftest.$ac_ext <<_ACEOF
15293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
Fred Drake8cef4cf2000-06-28 16:40:38 +000015295/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296#ifdef __cplusplus
15297extern "C"
15298#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015299/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 builtin and then its argument prototype would still apply. */
15301char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015302int
15303main ()
15304{
15305openpty ();
15306 ;
15307 return 0;
15308}
15309_ACEOF
15310rm -f conftest.$ac_objext conftest$ac_exeext
15311if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015312 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015314 grep -v '^ *+' conftest.er1 >conftest.err
15315 rm -f conftest.er1
15316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15318 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015319 { ac_try='test -z "$ac_c_werror_flag"
15320 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15322 (eval $ac_try) 2>&5
15323 ac_status=$?
15324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15325 (exit $ac_status); }; } &&
15326 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15328 (eval $ac_try) 2>&5
15329 ac_status=$?
15330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15331 (exit $ac_status); }; }; then
15332 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015333else
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015335sed 's/^/| /' conftest.$ac_ext >&5
15336
Martin v. Löwis11437992002-04-12 09:54:03 +000015337ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015338fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015339rm -f conftest.err conftest.$ac_objext \
15340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015341LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015343echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
15344echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15345if test $ac_cv_lib_util_openpty = yes; then
15346 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015347#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015348_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015349 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015350else
15351 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
15352echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
15353if test "${ac_cv_lib_bsd_openpty+set}" = set; then
15354 echo $ECHO_N "(cached) $ECHO_C" >&6
15355else
15356 ac_check_lib_save_LIBS=$LIBS
15357LIBS="-lbsd $LIBS"
15358cat >conftest.$ac_ext <<_ACEOF
15359/* confdefs.h. */
15360_ACEOF
15361cat confdefs.h >>conftest.$ac_ext
15362cat >>conftest.$ac_ext <<_ACEOF
15363/* end confdefs.h. */
15364
15365/* Override any gcc2 internal prototype to avoid an error. */
15366#ifdef __cplusplus
15367extern "C"
15368#endif
15369/* We use char because int might match the return type of a gcc2
15370 builtin and then its argument prototype would still apply. */
15371char openpty ();
15372int
15373main ()
15374{
15375openpty ();
15376 ;
15377 return 0;
15378}
15379_ACEOF
15380rm -f conftest.$ac_objext conftest$ac_exeext
15381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15382 (eval $ac_link) 2>conftest.er1
15383 ac_status=$?
15384 grep -v '^ *+' conftest.er1 >conftest.err
15385 rm -f conftest.er1
15386 cat conftest.err >&5
15387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15388 (exit $ac_status); } &&
15389 { ac_try='test -z "$ac_c_werror_flag"
15390 || test ! -s conftest.err'
15391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15392 (eval $ac_try) 2>&5
15393 ac_status=$?
15394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15395 (exit $ac_status); }; } &&
15396 { ac_try='test -s conftest$ac_exeext'
15397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
15400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); }; }; then
15402 ac_cv_lib_bsd_openpty=yes
15403else
15404 echo "$as_me: failed program was:" >&5
15405sed 's/^/| /' conftest.$ac_ext >&5
15406
15407ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015408fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015409rm -f conftest.err conftest.$ac_objext \
15410 conftest$ac_exeext conftest.$ac_ext
15411LIBS=$ac_check_lib_save_LIBS
15412fi
15413echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
15414echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
15415if test $ac_cv_lib_bsd_openpty = yes; then
15416 cat >>confdefs.h <<\_ACEOF
15417#define HAVE_OPENPTY 1
15418_ACEOF
15419 LIBS="$LIBS -lbsd"
15420fi
15421
15422
15423fi
15424
Fred Drake8cef4cf2000-06-28 16:40:38 +000015425
15426fi
15427done
15428
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
Fred Drake8cef4cf2000-06-28 16:40:38 +000015430for ac_func in forkpty
15431do
Martin v. Löwis11437992002-04-12 09:54:03 +000015432as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15433echo "$as_me:$LINENO: checking for $ac_func" >&5
15434echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15435if eval "test \"\${$as_ac_var+set}\" = set"; then
15436 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015437else
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015439/* confdefs.h. */
15440_ACEOF
15441cat confdefs.h >>conftest.$ac_ext
15442cat >>conftest.$ac_ext <<_ACEOF
15443/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015444/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15446#define $ac_func innocuous_$ac_func
15447
Fred Drake8cef4cf2000-06-28 16:40:38 +000015448/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015449 which can conflict with char $ac_func (); below.
15450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015451 <limits.h> exists even on freestanding compilers. */
15452
15453#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015454# include <limits.h>
15455#else
15456# include <assert.h>
15457#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015458
15459#undef $ac_func
15460
Fred Drake8cef4cf2000-06-28 16:40:38 +000015461/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015462#ifdef __cplusplus
15463extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015464{
Martin v. Löwis11437992002-04-12 09:54:03 +000015465#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015466/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015467 builtin and then its argument prototype would still apply. */
15468char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000015469/* The GNU C library defines this for functions which it implements
15470 to always fail with ENOSYS. Some functions are actually named
15471 something starting with __ and the normal name is an alias. */
15472#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15473choke me
15474#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015475char (*f) () = $ac_func;
15476#endif
15477#ifdef __cplusplus
15478}
Fred Drake8cef4cf2000-06-28 16:40:38 +000015479#endif
15480
Skip Montanaro6dead952003-09-25 14:50:04 +000015481int
15482main ()
15483{
15484return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 ;
15486 return 0;
15487}
15488_ACEOF
15489rm -f conftest.$ac_objext conftest$ac_exeext
15490if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015491 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015493 grep -v '^ *+' conftest.er1 >conftest.err
15494 rm -f conftest.er1
15495 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015498 { ac_try='test -z "$ac_c_werror_flag"
15499 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15501 (eval $ac_try) 2>&5
15502 ac_status=$?
15503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15504 (exit $ac_status); }; } &&
15505 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15507 (eval $ac_try) 2>&5
15508 ac_status=$?
15509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15510 (exit $ac_status); }; }; then
15511 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015514sed 's/^/| /' conftest.$ac_ext >&5
15515
Martin v. Löwis11437992002-04-12 09:54:03 +000015516eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015517fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015518rm -f conftest.err conftest.$ac_objext \
15519 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015520fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015521echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15522echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15523if test `eval echo '${'$as_ac_var'}'` = yes; then
15524 cat >>confdefs.h <<_ACEOF
15525#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15526_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015527
Fred Drake8cef4cf2000-06-28 16:40:38 +000015528else
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
15530echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
15531if test "${ac_cv_lib_util_forkpty+set}" = set; then
15532 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015535LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* confdefs.h. */
15538_ACEOF
15539cat confdefs.h >>conftest.$ac_ext
15540cat >>conftest.$ac_ext <<_ACEOF
15541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
Fred Drake8cef4cf2000-06-28 16:40:38 +000015543/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015544#ifdef __cplusplus
15545extern "C"
15546#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015547/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 builtin and then its argument prototype would still apply. */
15549char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015550int
15551main ()
15552{
15553forkpty ();
15554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext conftest$ac_exeext
15559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015560 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015562 grep -v '^ *+' conftest.er1 >conftest.err
15563 rm -f conftest.er1
15564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15566 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015567 { ac_try='test -z "$ac_c_werror_flag"
15568 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15570 (eval $ac_try) 2>&5
15571 ac_status=$?
15572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573 (exit $ac_status); }; } &&
15574 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15576 (eval $ac_try) 2>&5
15577 ac_status=$?
15578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15579 (exit $ac_status); }; }; then
15580 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015581else
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015583sed 's/^/| /' conftest.$ac_ext >&5
15584
Martin v. Löwis11437992002-04-12 09:54:03 +000015585ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015586fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015587rm -f conftest.err conftest.$ac_objext \
15588 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015589LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015590fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015591echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
15592echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
15593if test $ac_cv_lib_util_forkpty = yes; then
15594 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015595#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015596_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015597 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015598else
15599 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
15600echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
15601if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
15602 echo $ECHO_N "(cached) $ECHO_C" >&6
15603else
15604 ac_check_lib_save_LIBS=$LIBS
15605LIBS="-lbsd $LIBS"
15606cat >conftest.$ac_ext <<_ACEOF
15607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
15612
15613/* Override any gcc2 internal prototype to avoid an error. */
15614#ifdef __cplusplus
15615extern "C"
15616#endif
15617/* We use char because int might match the return type of a gcc2
15618 builtin and then its argument prototype would still apply. */
15619char forkpty ();
15620int
15621main ()
15622{
15623forkpty ();
15624 ;
15625 return 0;
15626}
15627_ACEOF
15628rm -f conftest.$ac_objext conftest$ac_exeext
15629if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15630 (eval $ac_link) 2>conftest.er1
15631 ac_status=$?
15632 grep -v '^ *+' conftest.er1 >conftest.err
15633 rm -f conftest.er1
15634 cat conftest.err >&5
15635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636 (exit $ac_status); } &&
15637 { ac_try='test -z "$ac_c_werror_flag"
15638 || test ! -s conftest.err'
15639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643 (exit $ac_status); }; } &&
15644 { ac_try='test -s conftest$ac_exeext'
15645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646 (eval $ac_try) 2>&5
15647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); }; }; then
15650 ac_cv_lib_bsd_forkpty=yes
15651else
15652 echo "$as_me: failed program was:" >&5
15653sed 's/^/| /' conftest.$ac_ext >&5
15654
15655ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015656fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015657rm -f conftest.err conftest.$ac_objext \
15658 conftest$ac_exeext conftest.$ac_ext
15659LIBS=$ac_check_lib_save_LIBS
15660fi
15661echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15662echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15663if test $ac_cv_lib_bsd_forkpty = yes; then
15664 cat >>confdefs.h <<\_ACEOF
15665#define HAVE_FORKPTY 1
15666_ACEOF
15667 LIBS="$LIBS -lbsd"
15668fi
15669
15670
15671fi
15672
Fred Drake8cef4cf2000-06-28 16:40:38 +000015673
15674fi
15675done
15676
Jack Jansendd19cf82001-12-06 22:36:17 +000015677
Michael W. Hudson54241132001-12-07 15:38:26 +000015678# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
15680
15681
15682
15683
15684
Fred Drake8cef4cf2000-06-28 16:40:38 +000015685for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15686do
Martin v. Löwis11437992002-04-12 09:54:03 +000015687as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15688echo "$as_me:$LINENO: checking for $ac_func" >&5
15689echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15690if eval "test \"\${$as_ac_var+set}\" = set"; then
15691 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015692else
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015694/* confdefs.h. */
15695_ACEOF
15696cat confdefs.h >>conftest.$ac_ext
15697cat >>conftest.$ac_ext <<_ACEOF
15698/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015699/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15700 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15701#define $ac_func innocuous_$ac_func
15702
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015703/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015704 which can conflict with char $ac_func (); below.
15705 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015706 <limits.h> exists even on freestanding compilers. */
15707
15708#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015709# include <limits.h>
15710#else
15711# include <assert.h>
15712#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015713
15714#undef $ac_func
15715
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015716/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015717#ifdef __cplusplus
15718extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015719{
Martin v. Löwis11437992002-04-12 09:54:03 +000015720#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015721/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015722 builtin and then its argument prototype would still apply. */
15723char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015724/* The GNU C library defines this for functions which it implements
15725 to always fail with ENOSYS. Some functions are actually named
15726 something starting with __ and the normal name is an alias. */
15727#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15728choke me
15729#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015730char (*f) () = $ac_func;
15731#endif
15732#ifdef __cplusplus
15733}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015734#endif
15735
Skip Montanaro6dead952003-09-25 14:50:04 +000015736int
15737main ()
15738{
15739return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 ;
15741 return 0;
15742}
15743_ACEOF
15744rm -f conftest.$ac_objext conftest$ac_exeext
15745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015746 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015748 grep -v '^ *+' conftest.er1 >conftest.err
15749 rm -f conftest.er1
15750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15752 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015753 { ac_try='test -z "$ac_c_werror_flag"
15754 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15756 (eval $ac_try) 2>&5
15757 ac_status=$?
15758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759 (exit $ac_status); }; } &&
15760 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15762 (eval $ac_try) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); }; }; then
15766 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015772fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015773rm -f conftest.err conftest.$ac_objext \
15774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015776echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15777echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15778if test `eval echo '${'$as_ac_var'}'` = yes; then
15779 cat >>confdefs.h <<_ACEOF
15780#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15781_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015784done
15785
Michael W. Hudson54241132001-12-07 15:38:26 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787
15788
15789
15790
15791
Martin v. Löwis1142de32002-03-29 16:28:31 +000015792for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015793do
Martin v. Löwis11437992002-04-12 09:54:03 +000015794as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15795echo "$as_me:$LINENO: checking for $ac_func" >&5
15796echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15797if eval "test \"\${$as_ac_var+set}\" = set"; then
15798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015799else
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015801/* confdefs.h. */
15802_ACEOF
15803cat confdefs.h >>conftest.$ac_ext
15804cat >>conftest.$ac_ext <<_ACEOF
15805/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015806/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15808#define $ac_func innocuous_$ac_func
15809
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015810/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015811 which can conflict with char $ac_func (); below.
15812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015813 <limits.h> exists even on freestanding compilers. */
15814
15815#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015816# include <limits.h>
15817#else
15818# include <assert.h>
15819#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015820
15821#undef $ac_func
15822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015823/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015824#ifdef __cplusplus
15825extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015826{
Martin v. Löwis11437992002-04-12 09:54:03 +000015827#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015828/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 builtin and then its argument prototype would still apply. */
15830char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015831/* The GNU C library defines this for functions which it implements
15832 to always fail with ENOSYS. Some functions are actually named
15833 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015834#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015835choke me
15836#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015837char (*f) () = $ac_func;
15838#endif
15839#ifdef __cplusplus
15840}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015841#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842
Skip Montanaro6dead952003-09-25 14:50:04 +000015843int
15844main ()
15845{
15846return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 ;
15848 return 0;
15849}
15850_ACEOF
15851rm -f conftest.$ac_objext conftest$ac_exeext
15852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015853 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015855 grep -v '^ *+' conftest.er1 >conftest.err
15856 rm -f conftest.er1
15857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15859 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015860 { ac_try='test -z "$ac_c_werror_flag"
15861 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15863 (eval $ac_try) 2>&5
15864 ac_status=$?
15865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15866 (exit $ac_status); }; } &&
15867 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15869 (eval $ac_try) 2>&5
15870 ac_status=$?
15871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15872 (exit $ac_status); }; }; then
15873 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015874else
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015876sed 's/^/| /' conftest.$ac_ext >&5
15877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015879fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015880rm -f conftest.err conftest.$ac_objext \
15881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015882fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015883echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15884echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15885if test `eval echo '${'$as_ac_var'}'` = yes; then
15886 cat >>confdefs.h <<_ACEOF
15887#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15888_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015889
Martin v. Löwis1142de32002-03-29 16:28:31 +000015890else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015891 case $LIBOBJS in
15892 "$ac_func.$ac_objext" | \
15893 *" $ac_func.$ac_objext" | \
15894 "$ac_func.$ac_objext "* | \
15895 *" $ac_func.$ac_objext "* ) ;;
15896 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15897esac
15898
Martin v. Löwis1142de32002-03-29 16:28:31 +000015899fi
15900done
15901
15902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903
Martin v. Löwis1142de32002-03-29 16:28:31 +000015904for ac_func in getpgrp
15905do
Martin v. Löwis11437992002-04-12 09:54:03 +000015906as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15907echo "$as_me:$LINENO: checking for $ac_func" >&5
15908echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15909if eval "test \"\${$as_ac_var+set}\" = set"; then
15910 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015911else
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015913/* confdefs.h. */
15914_ACEOF
15915cat confdefs.h >>conftest.$ac_ext
15916cat >>conftest.$ac_ext <<_ACEOF
15917/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015918/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15919 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15920#define $ac_func innocuous_$ac_func
15921
Martin v. Löwis1142de32002-03-29 16:28:31 +000015922/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015923 which can conflict with char $ac_func (); below.
15924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015925 <limits.h> exists even on freestanding compilers. */
15926
15927#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015928# include <limits.h>
15929#else
15930# include <assert.h>
15931#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015932
15933#undef $ac_func
15934
Martin v. Löwis1142de32002-03-29 16:28:31 +000015935/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015936#ifdef __cplusplus
15937extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015938{
Martin v. Löwis11437992002-04-12 09:54:03 +000015939#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015940/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015941 builtin and then its argument prototype would still apply. */
15942char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015943/* The GNU C library defines this for functions which it implements
15944 to always fail with ENOSYS. Some functions are actually named
15945 something starting with __ and the normal name is an alias. */
15946#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15947choke me
15948#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015949char (*f) () = $ac_func;
15950#endif
15951#ifdef __cplusplus
15952}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015953#endif
15954
Skip Montanaro6dead952003-09-25 14:50:04 +000015955int
15956main ()
15957{
15958return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ;
15960 return 0;
15961}
15962_ACEOF
15963rm -f conftest.$ac_objext conftest$ac_exeext
15964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015965 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015967 grep -v '^ *+' conftest.er1 >conftest.err
15968 rm -f conftest.er1
15969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15971 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015972 { ac_try='test -z "$ac_c_werror_flag"
15973 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15975 (eval $ac_try) 2>&5
15976 ac_status=$?
15977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15978 (exit $ac_status); }; } &&
15979 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15981 (eval $ac_try) 2>&5
15982 ac_status=$?
15983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15984 (exit $ac_status); }; }; then
15985 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015986else
Martin v. Löwis11437992002-04-12 09:54:03 +000015987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015988sed 's/^/| /' conftest.$ac_ext >&5
15989
Martin v. Löwis11437992002-04-12 09:54:03 +000015990eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015991fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015992rm -f conftest.err conftest.$ac_objext \
15993 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015994fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015995echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15996echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15997if test `eval echo '${'$as_ac_var'}'` = yes; then
15998 cat >>confdefs.h <<_ACEOF
15999#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16000_ACEOF
16001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016002/* confdefs.h. */
16003_ACEOF
16004cat confdefs.h >>conftest.$ac_ext
16005cat >>conftest.$ac_ext <<_ACEOF
16006/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016007#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016008int
16009main ()
16010{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016011getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 ;
16013 return 0;
16014}
16015_ACEOF
16016rm -f conftest.$ac_objext
16017if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016018 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016020 grep -v '^ *+' conftest.er1 >conftest.err
16021 rm -f conftest.er1
16022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16024 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016025 { ac_try='test -z "$ac_c_werror_flag"
16026 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16028 (eval $ac_try) 2>&5
16029 ac_status=$?
16030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16031 (exit $ac_status); }; } &&
16032 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16034 (eval $ac_try) 2>&5
16035 ac_status=$?
16036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16037 (exit $ac_status); }; }; then
16038
16039cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016040#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016041_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016042
Martin v. Löwis11437992002-04-12 09:54:03 +000016043
Guido van Rossumf78abae1997-01-21 22:02:36 +000016044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016046sed 's/^/| /' conftest.$ac_ext >&5
16047
Guido van Rossum627b2d71993-12-24 10:39:16 +000016048fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016050
Guido van Rossum627b2d71993-12-24 10:39:16 +000016051fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016052done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016053
Jack Jansen150753c2003-03-29 22:07:47 +000016054
16055for ac_func in setpgrp
16056do
16057as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16058echo "$as_me:$LINENO: checking for $ac_func" >&5
16059echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16060if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016061 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016062else
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016064/* confdefs.h. */
16065_ACEOF
16066cat confdefs.h >>conftest.$ac_ext
16067cat >>conftest.$ac_ext <<_ACEOF
16068/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016069/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16070 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16071#define $ac_func innocuous_$ac_func
16072
Jack Jansen150753c2003-03-29 22:07:47 +000016073/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016074 which can conflict with char $ac_func (); below.
16075 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016076 <limits.h> exists even on freestanding compilers. */
16077
16078#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016079# include <limits.h>
16080#else
16081# include <assert.h>
16082#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016083
16084#undef $ac_func
16085
Jack Jansen150753c2003-03-29 22:07:47 +000016086/* Override any gcc2 internal prototype to avoid an error. */
16087#ifdef __cplusplus
16088extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016089{
Martin v. Löwis11437992002-04-12 09:54:03 +000016090#endif
Jack Jansen150753c2003-03-29 22:07:47 +000016091/* We use char because int might match the return type of a gcc2
16092 builtin and then its argument prototype would still apply. */
16093char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000016094/* The GNU C library defines this for functions which it implements
16095 to always fail with ENOSYS. Some functions are actually named
16096 something starting with __ and the normal name is an alias. */
16097#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16098choke me
16099#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016100char (*f) () = $ac_func;
16101#endif
16102#ifdef __cplusplus
16103}
Jack Jansen150753c2003-03-29 22:07:47 +000016104#endif
16105
Skip Montanaro6dead952003-09-25 14:50:04 +000016106int
16107main ()
16108{
16109return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 ;
16111 return 0;
16112}
16113_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016114rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000016115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016116 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016118 grep -v '^ *+' conftest.er1 >conftest.err
16119 rm -f conftest.er1
16120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016122 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016123 { ac_try='test -z "$ac_c_werror_flag"
16124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16126 (eval $ac_try) 2>&5
16127 ac_status=$?
16128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16129 (exit $ac_status); }; } &&
16130 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16132 (eval $ac_try) 2>&5
16133 ac_status=$?
16134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000016136 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016137else
Jack Jansen150753c2003-03-29 22:07:47 +000016138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016139sed 's/^/| /' conftest.$ac_ext >&5
16140
Jack Jansen150753c2003-03-29 22:07:47 +000016141eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016143rm -f conftest.err conftest.$ac_objext \
16144 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016145fi
Jack Jansen150753c2003-03-29 22:07:47 +000016146echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16147echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16148if test `eval echo '${'$as_ac_var'}'` = yes; then
16149 cat >>confdefs.h <<_ACEOF
16150#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16151_ACEOF
16152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016153/* confdefs.h. */
16154_ACEOF
16155cat confdefs.h >>conftest.$ac_ext
16156cat >>conftest.$ac_ext <<_ACEOF
16157/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000016158#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000016159int
16160main ()
16161{
16162setpgrp(0,0);
16163 ;
16164 return 0;
16165}
16166_ACEOF
16167rm -f conftest.$ac_objext
16168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016169 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000016170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016171 grep -v '^ *+' conftest.er1 >conftest.err
16172 rm -f conftest.er1
16173 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16175 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016176 { ac_try='test -z "$ac_c_werror_flag"
16177 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16179 (eval $ac_try) 2>&5
16180 ac_status=$?
16181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16182 (exit $ac_status); }; } &&
16183 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000016184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16185 (eval $ac_try) 2>&5
16186 ac_status=$?
16187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
16190cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016191#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016192_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016193
Jack Jansen150753c2003-03-29 22:07:47 +000016194
16195else
16196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016197sed 's/^/| /' conftest.$ac_ext >&5
16198
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016199fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000016201
16202fi
16203done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016204
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
Thomas Wouters3a584202000-08-05 23:28:51 +000016206for ac_func in gettimeofday
16207do
Martin v. Löwis11437992002-04-12 09:54:03 +000016208as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16209echo "$as_me:$LINENO: checking for $ac_func" >&5
16210echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16211if eval "test \"\${$as_ac_var+set}\" = set"; then
16212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016213else
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016215/* confdefs.h. */
16216_ACEOF
16217cat confdefs.h >>conftest.$ac_ext
16218cat >>conftest.$ac_ext <<_ACEOF
16219/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016220/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16221 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16222#define $ac_func innocuous_$ac_func
16223
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016224/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016225 which can conflict with char $ac_func (); below.
16226 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016227 <limits.h> exists even on freestanding compilers. */
16228
16229#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016230# include <limits.h>
16231#else
16232# include <assert.h>
16233#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016234
16235#undef $ac_func
16236
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016237/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016238#ifdef __cplusplus
16239extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016240{
Martin v. Löwis11437992002-04-12 09:54:03 +000016241#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016242/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 builtin and then its argument prototype would still apply. */
16244char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016245/* The GNU C library defines this for functions which it implements
16246 to always fail with ENOSYS. Some functions are actually named
16247 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016248#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016249choke me
16250#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016251char (*f) () = $ac_func;
16252#endif
16253#ifdef __cplusplus
16254}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016255#endif
16256
Skip Montanaro6dead952003-09-25 14:50:04 +000016257int
16258main ()
16259{
16260return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ;
16262 return 0;
16263}
16264_ACEOF
16265rm -f conftest.$ac_objext conftest$ac_exeext
16266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016267 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016269 grep -v '^ *+' conftest.er1 >conftest.err
16270 rm -f conftest.er1
16271 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16273 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016274 { ac_try='test -z "$ac_c_werror_flag"
16275 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16277 (eval $ac_try) 2>&5
16278 ac_status=$?
16279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280 (exit $ac_status); }; } &&
16281 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16283 (eval $ac_try) 2>&5
16284 ac_status=$?
16285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286 (exit $ac_status); }; }; then
16287 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016288else
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016290sed 's/^/| /' conftest.$ac_ext >&5
16291
Martin v. Löwis11437992002-04-12 09:54:03 +000016292eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016293fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294rm -f conftest.err conftest.$ac_objext \
16295 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016297echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16298echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16299if test `eval echo '${'$as_ac_var'}'` = yes; then
16300 cat >>confdefs.h <<_ACEOF
16301#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16302_ACEOF
16303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016304/* confdefs.h. */
16305_ACEOF
16306cat confdefs.h >>conftest.$ac_ext
16307cat >>conftest.$ac_ext <<_ACEOF
16308/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016309#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016310int
16311main ()
16312{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016313gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 ;
16315 return 0;
16316}
16317_ACEOF
16318rm -f conftest.$ac_objext
16319if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016320 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016322 grep -v '^ *+' conftest.er1 >conftest.err
16323 rm -f conftest.er1
16324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16326 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016327 { ac_try='test -z "$ac_c_werror_flag"
16328 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16330 (eval $ac_try) 2>&5
16331 ac_status=$?
16332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16333 (exit $ac_status); }; } &&
16334 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16336 (eval $ac_try) 2>&5
16337 ac_status=$?
16338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016340 :
16341else
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016343sed 's/^/| /' conftest.$ac_ext >&5
16344
Martin v. Löwis11437992002-04-12 09:54:03 +000016345
16346cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016347#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016348_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350
Guido van Rossum627b2d71993-12-24 10:39:16 +000016351fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016352rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016353
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016354fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016355done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016356
Michael W. Hudson54241132001-12-07 15:38:26 +000016357
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016358echo "$as_me:$LINENO: checking for major" >&5
16359echo $ECHO_N "checking for major... $ECHO_C" >&6
16360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016361/* confdefs.h. */
16362_ACEOF
16363cat confdefs.h >>conftest.$ac_ext
16364cat >>conftest.$ac_ext <<_ACEOF
16365/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016366
Neal Norwitz6eb37f02003-02-23 23:28:15 +000016367#if defined(MAJOR_IN_MKDEV)
16368#include <sys/mkdev.h>
16369#elif defined(MAJOR_IN_SYSMACROS)
16370#include <sys/sysmacros.h>
16371#else
16372#include <sys/types.h>
16373#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016374
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016375int
16376main ()
16377{
16378
16379 makedev(major(0),minor(0));
16380
16381 ;
16382 return 0;
16383}
16384_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000016385rm -f conftest.$ac_objext conftest$ac_exeext
16386if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016387 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016389 grep -v '^ *+' conftest.er1 >conftest.err
16390 rm -f conftest.er1
16391 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016394 { ac_try='test -z "$ac_c_werror_flag"
16395 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16397 (eval $ac_try) 2>&5
16398 ac_status=$?
16399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16400 (exit $ac_status); }; } &&
16401 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16403 (eval $ac_try) 2>&5
16404 ac_status=$?
16405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16406 (exit $ac_status); }; }; then
16407
16408
16409cat >>confdefs.h <<\_ACEOF
16410#define HAVE_DEVICE_MACROS 1
16411_ACEOF
16412
16413 echo "$as_me:$LINENO: result: yes" >&5
16414echo "${ECHO_T}yes" >&6
16415
16416else
16417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016418sed 's/^/| /' conftest.$ac_ext >&5
16419
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016420
16421 echo "$as_me:$LINENO: result: no" >&5
16422echo "${ECHO_T}no" >&6
16423
16424fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016425rm -f conftest.err conftest.$ac_objext \
16426 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016427
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016428# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000016429# for [no]getaddrinfo in netdb.h.
16430echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16431echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
16432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016433/* confdefs.h. */
16434_ACEOF
16435cat confdefs.h >>conftest.$ac_ext
16436cat >>conftest.$ac_ext <<_ACEOF
16437/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016438
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016439#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016440#include <sys/socket.h>
16441#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016442#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016443
Martin v. Löwis11437992002-04-12 09:54:03 +000016444int
16445main ()
16446{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016447
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016448getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016449
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 ;
16451 return 0;
16452}
16453_ACEOF
16454rm -f conftest.$ac_objext conftest$ac_exeext
16455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016456 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016458 grep -v '^ *+' conftest.er1 >conftest.err
16459 rm -f conftest.er1
16460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016463 { ac_try='test -z "$ac_c_werror_flag"
16464 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16466 (eval $ac_try) 2>&5
16467 ac_status=$?
16468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16469 (exit $ac_status); }; } &&
16470 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16472 (eval $ac_try) 2>&5
16473 ac_status=$?
16474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16475 (exit $ac_status); }; }; then
16476
16477echo "$as_me:$LINENO: result: yes" >&5
16478echo "${ECHO_T}yes" >&6
16479echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
16480echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016481if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 echo "$as_me:$LINENO: result: buggy" >&5
16483echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016484buggygetaddrinfo=yes
16485else
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016492
16493#include <sys/types.h>
16494#include <netdb.h>
16495#include <string.h>
16496#include <sys/socket.h>
16497#include <netinet/in.h>
16498
16499main()
16500{
16501 int passive, gaierr, inet4 = 0, inet6 = 0;
16502 struct addrinfo hints, *ai, *aitop;
16503 char straddr[INET6_ADDRSTRLEN], strport[16];
16504
16505 for (passive = 0; passive <= 1; passive++) {
16506 memset(&hints, 0, sizeof(hints));
16507 hints.ai_family = AF_UNSPEC;
16508 hints.ai_flags = passive ? AI_PASSIVE : 0;
16509 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000016510 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016511 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
16512 (void)gai_strerror(gaierr);
16513 goto bad;
16514 }
16515 for (ai = aitop; ai; ai = ai->ai_next) {
16516 if (ai->ai_addr == NULL ||
16517 ai->ai_addrlen == 0 ||
16518 getnameinfo(ai->ai_addr, ai->ai_addrlen,
16519 straddr, sizeof(straddr), strport, sizeof(strport),
16520 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
16521 goto bad;
16522 }
16523 switch (ai->ai_family) {
16524 case AF_INET:
16525 if (strcmp(strport, "54321") != 0) {
16526 goto bad;
16527 }
16528 if (passive) {
16529 if (strcmp(straddr, "0.0.0.0") != 0) {
16530 goto bad;
16531 }
16532 } else {
16533 if (strcmp(straddr, "127.0.0.1") != 0) {
16534 goto bad;
16535 }
16536 }
16537 inet4++;
16538 break;
16539 case AF_INET6:
16540 if (strcmp(strport, "54321") != 0) {
16541 goto bad;
16542 }
16543 if (passive) {
16544 if (strcmp(straddr, "::") != 0) {
16545 goto bad;
16546 }
16547 } else {
16548 if (strcmp(straddr, "::1") != 0) {
16549 goto bad;
16550 }
16551 }
16552 inet6++;
16553 break;
16554 case AF_UNSPEC:
16555 goto bad;
16556 break;
16557 default:
16558 /* another family support? */
16559 break;
16560 }
16561 }
16562 }
16563
16564 if (!(inet4 == 0 || inet4 == 2))
16565 goto bad;
16566 if (!(inet6 == 0 || inet6 == 2))
16567 goto bad;
16568
16569 if (aitop)
16570 freeaddrinfo(aitop);
16571 exit(0);
16572
16573 bad:
16574 if (aitop)
16575 freeaddrinfo(aitop);
16576 exit(1);
16577}
16578
Martin v. Löwis11437992002-04-12 09:54:03 +000016579_ACEOF
16580rm -f conftest$ac_exeext
16581if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16582 (eval $ac_link) 2>&5
16583 ac_status=$?
16584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16585 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16587 (eval $ac_try) 2>&5
16588 ac_status=$?
16589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16590 (exit $ac_status); }; }; then
16591 echo "$as_me:$LINENO: result: good" >&5
16592echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016593buggygetaddrinfo=no
16594else
Martin v. Löwis11437992002-04-12 09:54:03 +000016595 echo "$as_me: program exited with status $ac_status" >&5
16596echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016597sed 's/^/| /' conftest.$ac_ext >&5
16598
Martin v. Löwis11437992002-04-12 09:54:03 +000016599( exit $ac_status )
16600echo "$as_me:$LINENO: result: buggy" >&5
16601echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016602buggygetaddrinfo=yes
16603fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604rm -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 +000016605fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016606else
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016608sed 's/^/| /' conftest.$ac_ext >&5
16609
Martin v. Löwis11437992002-04-12 09:54:03 +000016610
16611echo "$as_me:$LINENO: result: no" >&5
16612echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016613buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016614
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016616rm -f conftest.err conftest.$ac_objext \
16617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016618
16619if test "$buggygetaddrinfo" = "yes"; then
16620 if test "$ipv6" = "yes"; then
16621 echo 'Fatal: You must get working getaddrinfo() function.'
16622 echo ' or you can specify "--disable-ipv6"'.
16623 exit 1
16624 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016625else
Martin v. Löwis11437992002-04-12 09:54:03 +000016626
16627cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016628#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016629_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016630
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016632
Jack Jansen9a66b6d2001-08-08 13:56:14 +000016633for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016634do
Martin v. Löwis11437992002-04-12 09:54:03 +000016635as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16636echo "$as_me:$LINENO: checking for $ac_func" >&5
16637echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16638if eval "test \"\${$as_ac_var+set}\" = set"; then
16639 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016640else
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016642/* confdefs.h. */
16643_ACEOF
16644cat confdefs.h >>conftest.$ac_ext
16645cat >>conftest.$ac_ext <<_ACEOF
16646/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016647/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16648 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16649#define $ac_func innocuous_$ac_func
16650
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016651/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016652 which can conflict with char $ac_func (); below.
16653 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016654 <limits.h> exists even on freestanding compilers. */
16655
16656#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016657# include <limits.h>
16658#else
16659# include <assert.h>
16660#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016661
16662#undef $ac_func
16663
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016664/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016665#ifdef __cplusplus
16666extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016667{
Martin v. Löwis11437992002-04-12 09:54:03 +000016668#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016669/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 builtin and then its argument prototype would still apply. */
16671char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016672/* The GNU C library defines this for functions which it implements
16673 to always fail with ENOSYS. Some functions are actually named
16674 something starting with __ and the normal name is an alias. */
16675#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16676choke me
16677#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016678char (*f) () = $ac_func;
16679#endif
16680#ifdef __cplusplus
16681}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016682#endif
16683
Skip Montanaro6dead952003-09-25 14:50:04 +000016684int
16685main ()
16686{
16687return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 ;
16689 return 0;
16690}
16691_ACEOF
16692rm -f conftest.$ac_objext conftest$ac_exeext
16693if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016694 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016696 grep -v '^ *+' conftest.er1 >conftest.err
16697 rm -f conftest.er1
16698 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16700 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016701 { ac_try='test -z "$ac_c_werror_flag"
16702 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016703 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16704 (eval $ac_try) 2>&5
16705 ac_status=$?
16706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16707 (exit $ac_status); }; } &&
16708 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16710 (eval $ac_try) 2>&5
16711 ac_status=$?
16712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16713 (exit $ac_status); }; }; then
16714 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016715else
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016717sed 's/^/| /' conftest.$ac_ext >&5
16718
Martin v. Löwis11437992002-04-12 09:54:03 +000016719eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016720fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016721rm -f conftest.err conftest.$ac_objext \
16722 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016724echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16725echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16726if test `eval echo '${'$as_ac_var'}'` = yes; then
16727 cat >>confdefs.h <<_ACEOF
16728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16729_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016730
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016731fi
16732done
16733
Michael W. Hudson54241132001-12-07 15:38:26 +000016734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016736echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16737echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16738if test "${ac_cv_header_time+set}" = set; then
16739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016740else
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016742/* confdefs.h. */
16743_ACEOF
16744cat confdefs.h >>conftest.$ac_ext
16745cat >>conftest.$ac_ext <<_ACEOF
16746/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016747#include <sys/types.h>
16748#include <sys/time.h>
16749#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751int
16752main ()
16753{
16754if ((struct tm *) 0)
16755return 0;
16756 ;
16757 return 0;
16758}
16759_ACEOF
16760rm -f conftest.$ac_objext
16761if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016764 grep -v '^ *+' conftest.er1 >conftest.err
16765 rm -f conftest.er1
16766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016769 { ac_try='test -z "$ac_c_werror_flag"
16770 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772 (eval $ac_try) 2>&5
16773 ac_status=$?
16774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775 (exit $ac_status); }; } &&
16776 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16779 ac_status=$?
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016782 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016783else
Martin v. Löwis11437992002-04-12 09:54:03 +000016784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016785sed 's/^/| /' conftest.$ac_ext >&5
16786
Martin v. Löwis11437992002-04-12 09:54:03 +000016787ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016789rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016790fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016791echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16792echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016793if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016794
16795cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016797_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016798
16799fi
16800
Martin v. Löwis11437992002-04-12 09:54:03 +000016801echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16802echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16803if test "${ac_cv_struct_tm+set}" = set; then
16804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016805else
Martin v. Löwis11437992002-04-12 09:54:03 +000016806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016807/* confdefs.h. */
16808_ACEOF
16809cat confdefs.h >>conftest.$ac_ext
16810cat >>conftest.$ac_ext <<_ACEOF
16811/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016812#include <sys/types.h>
16813#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016814
Martin v. Löwis11437992002-04-12 09:54:03 +000016815int
16816main ()
16817{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016818struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ;
16820 return 0;
16821}
16822_ACEOF
16823rm -f conftest.$ac_objext
16824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016825 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016827 grep -v '^ *+' conftest.er1 >conftest.err
16828 rm -f conftest.er1
16829 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016832 { ac_try='test -z "$ac_c_werror_flag"
16833 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835 (eval $ac_try) 2>&5
16836 ac_status=$?
16837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838 (exit $ac_status); }; } &&
16839 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16841 (eval $ac_try) 2>&5
16842 ac_status=$?
16843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16844 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016845 ac_cv_struct_tm=time.h
16846else
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016848sed 's/^/| /' conftest.$ac_ext >&5
16849
Martin v. Löwis11437992002-04-12 09:54:03 +000016850ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016851fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016852rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016853fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016854echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16855echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016856if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016857
16858cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016859#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016860_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016861
16862fi
16863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16865echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16866if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16867 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016868else
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016870/* confdefs.h. */
16871_ACEOF
16872cat confdefs.h >>conftest.$ac_ext
16873cat >>conftest.$ac_ext <<_ACEOF
16874/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016875#include <sys/types.h>
16876#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016877
16878
Martin v. Löwis11437992002-04-12 09:54:03 +000016879int
16880main ()
16881{
16882static struct tm ac_aggr;
16883if (ac_aggr.tm_zone)
16884return 0;
16885 ;
16886 return 0;
16887}
16888_ACEOF
16889rm -f conftest.$ac_objext
16890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016891 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016893 grep -v '^ *+' conftest.er1 >conftest.err
16894 rm -f conftest.er1
16895 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016898 { ac_try='test -z "$ac_c_werror_flag"
16899 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16901 (eval $ac_try) 2>&5
16902 ac_status=$?
16903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16904 (exit $ac_status); }; } &&
16905 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16907 (eval $ac_try) 2>&5
16908 ac_status=$?
16909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16910 (exit $ac_status); }; }; then
16911 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016912else
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016914sed 's/^/| /' conftest.$ac_ext >&5
16915
16916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
16922#include <sys/types.h>
16923#include <$ac_cv_struct_tm>
16924
16925
16926int
16927main ()
16928{
16929static struct tm ac_aggr;
16930if (sizeof ac_aggr.tm_zone)
16931return 0;
16932 ;
16933 return 0;
16934}
16935_ACEOF
16936rm -f conftest.$ac_objext
16937if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016938 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016940 grep -v '^ *+' conftest.er1 >conftest.err
16941 rm -f conftest.er1
16942 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16944 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016945 { ac_try='test -z "$ac_c_werror_flag"
16946 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16948 (eval $ac_try) 2>&5
16949 ac_status=$?
16950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16951 (exit $ac_status); }; } &&
16952 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16954 (eval $ac_try) 2>&5
16955 ac_status=$?
16956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16957 (exit $ac_status); }; }; then
16958 ac_cv_member_struct_tm_tm_zone=yes
16959else
16960 echo "$as_me: failed program was:" >&5
16961sed 's/^/| /' conftest.$ac_ext >&5
16962
Martin v. Löwis11437992002-04-12 09:54:03 +000016963ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016964fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016966fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016968fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016969echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16970echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16971if test $ac_cv_member_struct_tm_tm_zone = yes; then
16972
16973cat >>confdefs.h <<_ACEOF
16974#define HAVE_STRUCT_TM_TM_ZONE 1
16975_ACEOF
16976
16977
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016978fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016979
Martin v. Löwis11437992002-04-12 09:54:03 +000016980if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16981
16982cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016983#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016984_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016985
16986else
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 echo "$as_me:$LINENO: checking for tzname" >&5
16988echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16989if test "${ac_cv_var_tzname+set}" = set; then
16990 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016991else
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016993/* confdefs.h. */
16994_ACEOF
16995cat confdefs.h >>conftest.$ac_ext
16996cat >>conftest.$ac_ext <<_ACEOF
16997/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016998#include <time.h>
16999#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017000extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
Martin v. Löwis11437992002-04-12 09:54:03 +000017003int
17004main ()
17005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017006atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 ;
17008 return 0;
17009}
17010_ACEOF
17011rm -f conftest.$ac_objext conftest$ac_exeext
17012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017013 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 grep -v '^ *+' conftest.er1 >conftest.err
17016 rm -f conftest.er1
17017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17019 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017020 { ac_try='test -z "$ac_c_werror_flag"
17021 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17023 (eval $ac_try) 2>&5
17024 ac_status=$?
17025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17026 (exit $ac_status); }; } &&
17027 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17029 (eval $ac_try) 2>&5
17030 ac_status=$?
17031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17032 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017033 ac_cv_var_tzname=yes
17034else
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017036sed 's/^/| /' conftest.$ac_ext >&5
17037
Martin v. Löwis11437992002-04-12 09:54:03 +000017038ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017039fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017040rm -f conftest.err conftest.$ac_objext \
17041 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017043echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17044echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017045 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
17047cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017048#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017049_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017051 fi
17052fi
17053
Martin v. Löwis11437992002-04-12 09:54:03 +000017054echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
17055echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
17056if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
17057 echo $ECHO_N "(cached) $ECHO_C" >&6
17058else
17059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017060/* confdefs.h. */
17061_ACEOF
17062cat confdefs.h >>conftest.$ac_ext
17063cat >>conftest.$ac_ext <<_ACEOF
17064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017066int
17067main ()
17068{
17069static struct stat ac_aggr;
17070if (ac_aggr.st_rdev)
17071return 0;
17072 ;
17073 return 0;
17074}
17075_ACEOF
17076rm -f conftest.$ac_objext
17077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017078 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017080 grep -v '^ *+' conftest.er1 >conftest.err
17081 rm -f conftest.er1
17082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017085 { ac_try='test -z "$ac_c_werror_flag"
17086 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17088 (eval $ac_try) 2>&5
17089 ac_status=$?
17090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17091 (exit $ac_status); }; } &&
17092 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17094 (eval $ac_try) 2>&5
17095 ac_status=$?
17096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17097 (exit $ac_status); }; }; then
17098 ac_cv_member_struct_stat_st_rdev=yes
17099else
17100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017101sed 's/^/| /' conftest.$ac_ext >&5
17102
17103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
17109$ac_includes_default
17110int
17111main ()
17112{
17113static struct stat ac_aggr;
17114if (sizeof ac_aggr.st_rdev)
17115return 0;
17116 ;
17117 return 0;
17118}
17119_ACEOF
17120rm -f conftest.$ac_objext
17121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017124 grep -v '^ *+' conftest.er1 >conftest.err
17125 rm -f conftest.er1
17126 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017129 { ac_try='test -z "$ac_c_werror_flag"
17130 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17132 (eval $ac_try) 2>&5
17133 ac_status=$?
17134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17135 (exit $ac_status); }; } &&
17136 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17138 (eval $ac_try) 2>&5
17139 ac_status=$?
17140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17141 (exit $ac_status); }; }; then
17142 ac_cv_member_struct_stat_st_rdev=yes
17143else
17144 echo "$as_me: failed program was:" >&5
17145sed 's/^/| /' conftest.$ac_ext >&5
17146
Martin v. Löwis11437992002-04-12 09:54:03 +000017147ac_cv_member_struct_stat_st_rdev=no
17148fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017150fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017153echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
17154echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
17155if test $ac_cv_member_struct_stat_st_rdev = yes; then
17156
17157cat >>confdefs.h <<_ACEOF
17158#define HAVE_STRUCT_STAT_ST_RDEV 1
17159_ACEOF
17160
17161
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017162fi
17163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
17165echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
17166if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
17167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017168else
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017170/* confdefs.h. */
17171_ACEOF
17172cat confdefs.h >>conftest.$ac_ext
17173cat >>conftest.$ac_ext <<_ACEOF
17174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017175$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017176int
17177main ()
17178{
17179static struct stat ac_aggr;
17180if (ac_aggr.st_blksize)
17181return 0;
17182 ;
17183 return 0;
17184}
17185_ACEOF
17186rm -f conftest.$ac_objext
17187if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017188 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017190 grep -v '^ *+' conftest.er1 >conftest.err
17191 rm -f conftest.er1
17192 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17194 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017195 { ac_try='test -z "$ac_c_werror_flag"
17196 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17198 (eval $ac_try) 2>&5
17199 ac_status=$?
17200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17201 (exit $ac_status); }; } &&
17202 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17204 (eval $ac_try) 2>&5
17205 ac_status=$?
17206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17207 (exit $ac_status); }; }; then
17208 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017209else
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017211sed 's/^/| /' conftest.$ac_ext >&5
17212
17213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017214/* confdefs.h. */
17215_ACEOF
17216cat confdefs.h >>conftest.$ac_ext
17217cat >>conftest.$ac_ext <<_ACEOF
17218/* end confdefs.h. */
17219$ac_includes_default
17220int
17221main ()
17222{
17223static struct stat ac_aggr;
17224if (sizeof ac_aggr.st_blksize)
17225return 0;
17226 ;
17227 return 0;
17228}
17229_ACEOF
17230rm -f conftest.$ac_objext
17231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017232 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017234 grep -v '^ *+' conftest.er1 >conftest.err
17235 rm -f conftest.er1
17236 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17238 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017239 { ac_try='test -z "$ac_c_werror_flag"
17240 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17242 (eval $ac_try) 2>&5
17243 ac_status=$?
17244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17245 (exit $ac_status); }; } &&
17246 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17248 (eval $ac_try) 2>&5
17249 ac_status=$?
17250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17251 (exit $ac_status); }; }; then
17252 ac_cv_member_struct_stat_st_blksize=yes
17253else
17254 echo "$as_me: failed program was:" >&5
17255sed 's/^/| /' conftest.$ac_ext >&5
17256
Martin v. Löwis11437992002-04-12 09:54:03 +000017257ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017258fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017260fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017262fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017263echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17264echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
17265if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017266
Martin v. Löwis11437992002-04-12 09:54:03 +000017267cat >>confdefs.h <<_ACEOF
17268#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17269_ACEOF
17270
17271
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017272fi
17273
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017274echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17275echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
17276if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17277 echo $ECHO_N "(cached) $ECHO_C" >&6
17278else
17279 cat >conftest.$ac_ext <<_ACEOF
17280/* confdefs.h. */
17281_ACEOF
17282cat confdefs.h >>conftest.$ac_ext
17283cat >>conftest.$ac_ext <<_ACEOF
17284/* end confdefs.h. */
17285$ac_includes_default
17286int
17287main ()
17288{
17289static struct stat ac_aggr;
17290if (ac_aggr.st_flags)
17291return 0;
17292 ;
17293 return 0;
17294}
17295_ACEOF
17296rm -f conftest.$ac_objext
17297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17298 (eval $ac_compile) 2>conftest.er1
17299 ac_status=$?
17300 grep -v '^ *+' conftest.er1 >conftest.err
17301 rm -f conftest.er1
17302 cat conftest.err >&5
17303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17304 (exit $ac_status); } &&
17305 { ac_try='test -z "$ac_c_werror_flag"
17306 || test ! -s conftest.err'
17307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17308 (eval $ac_try) 2>&5
17309 ac_status=$?
17310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311 (exit $ac_status); }; } &&
17312 { ac_try='test -s conftest.$ac_objext'
17313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17314 (eval $ac_try) 2>&5
17315 ac_status=$?
17316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17317 (exit $ac_status); }; }; then
17318 ac_cv_member_struct_stat_st_flags=yes
17319else
17320 echo "$as_me: failed program was:" >&5
17321sed 's/^/| /' conftest.$ac_ext >&5
17322
17323cat >conftest.$ac_ext <<_ACEOF
17324/* confdefs.h. */
17325_ACEOF
17326cat confdefs.h >>conftest.$ac_ext
17327cat >>conftest.$ac_ext <<_ACEOF
17328/* end confdefs.h. */
17329$ac_includes_default
17330int
17331main ()
17332{
17333static struct stat ac_aggr;
17334if (sizeof ac_aggr.st_flags)
17335return 0;
17336 ;
17337 return 0;
17338}
17339_ACEOF
17340rm -f conftest.$ac_objext
17341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17342 (eval $ac_compile) 2>conftest.er1
17343 ac_status=$?
17344 grep -v '^ *+' conftest.er1 >conftest.err
17345 rm -f conftest.er1
17346 cat conftest.err >&5
17347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17348 (exit $ac_status); } &&
17349 { ac_try='test -z "$ac_c_werror_flag"
17350 || test ! -s conftest.err'
17351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17352 (eval $ac_try) 2>&5
17353 ac_status=$?
17354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355 (exit $ac_status); }; } &&
17356 { ac_try='test -s conftest.$ac_objext'
17357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17358 (eval $ac_try) 2>&5
17359 ac_status=$?
17360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17361 (exit $ac_status); }; }; then
17362 ac_cv_member_struct_stat_st_flags=yes
17363else
17364 echo "$as_me: failed program was:" >&5
17365sed 's/^/| /' conftest.$ac_ext >&5
17366
17367ac_cv_member_struct_stat_st_flags=no
17368fi
17369rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17370fi
17371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17372fi
17373echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
17374echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
17375if test $ac_cv_member_struct_stat_st_flags = yes; then
17376
17377cat >>confdefs.h <<_ACEOF
17378#define HAVE_STRUCT_STAT_ST_FLAGS 1
17379_ACEOF
17380
17381
17382fi
17383
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017384echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
17385echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
17386if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
17387 echo $ECHO_N "(cached) $ECHO_C" >&6
17388else
17389 cat >conftest.$ac_ext <<_ACEOF
17390/* confdefs.h. */
17391_ACEOF
17392cat confdefs.h >>conftest.$ac_ext
17393cat >>conftest.$ac_ext <<_ACEOF
17394/* end confdefs.h. */
17395$ac_includes_default
17396int
17397main ()
17398{
17399static struct stat ac_aggr;
17400if (ac_aggr.st_gen)
17401return 0;
17402 ;
17403 return 0;
17404}
17405_ACEOF
17406rm -f conftest.$ac_objext
17407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17408 (eval $ac_compile) 2>conftest.er1
17409 ac_status=$?
17410 grep -v '^ *+' conftest.er1 >conftest.err
17411 rm -f conftest.er1
17412 cat conftest.err >&5
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); } &&
17415 { ac_try='test -z "$ac_c_werror_flag"
17416 || test ! -s conftest.err'
17417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17418 (eval $ac_try) 2>&5
17419 ac_status=$?
17420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17421 (exit $ac_status); }; } &&
17422 { ac_try='test -s conftest.$ac_objext'
17423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17424 (eval $ac_try) 2>&5
17425 ac_status=$?
17426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17427 (exit $ac_status); }; }; then
17428 ac_cv_member_struct_stat_st_gen=yes
17429else
17430 echo "$as_me: failed program was:" >&5
17431sed 's/^/| /' conftest.$ac_ext >&5
17432
17433cat >conftest.$ac_ext <<_ACEOF
17434/* confdefs.h. */
17435_ACEOF
17436cat confdefs.h >>conftest.$ac_ext
17437cat >>conftest.$ac_ext <<_ACEOF
17438/* end confdefs.h. */
17439$ac_includes_default
17440int
17441main ()
17442{
17443static struct stat ac_aggr;
17444if (sizeof ac_aggr.st_gen)
17445return 0;
17446 ;
17447 return 0;
17448}
17449_ACEOF
17450rm -f conftest.$ac_objext
17451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17452 (eval $ac_compile) 2>conftest.er1
17453 ac_status=$?
17454 grep -v '^ *+' conftest.er1 >conftest.err
17455 rm -f conftest.er1
17456 cat conftest.err >&5
17457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17458 (exit $ac_status); } &&
17459 { ac_try='test -z "$ac_c_werror_flag"
17460 || test ! -s conftest.err'
17461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17462 (eval $ac_try) 2>&5
17463 ac_status=$?
17464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17465 (exit $ac_status); }; } &&
17466 { ac_try='test -s conftest.$ac_objext'
17467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17468 (eval $ac_try) 2>&5
17469 ac_status=$?
17470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17471 (exit $ac_status); }; }; then
17472 ac_cv_member_struct_stat_st_gen=yes
17473else
17474 echo "$as_me: failed program was:" >&5
17475sed 's/^/| /' conftest.$ac_ext >&5
17476
17477ac_cv_member_struct_stat_st_gen=no
17478fi
17479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17480fi
17481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17482fi
17483echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
17484echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
17485if test $ac_cv_member_struct_stat_st_gen = yes; then
17486
17487cat >>confdefs.h <<_ACEOF
17488#define HAVE_STRUCT_STAT_ST_GEN 1
17489_ACEOF
17490
17491
17492fi
17493
17494echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
17495echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
17496if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
17497 echo $ECHO_N "(cached) $ECHO_C" >&6
17498else
17499 cat >conftest.$ac_ext <<_ACEOF
17500/* confdefs.h. */
17501_ACEOF
17502cat confdefs.h >>conftest.$ac_ext
17503cat >>conftest.$ac_ext <<_ACEOF
17504/* end confdefs.h. */
17505$ac_includes_default
17506int
17507main ()
17508{
17509static struct stat ac_aggr;
17510if (ac_aggr.st_birthtime)
17511return 0;
17512 ;
17513 return 0;
17514}
17515_ACEOF
17516rm -f conftest.$ac_objext
17517if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17518 (eval $ac_compile) 2>conftest.er1
17519 ac_status=$?
17520 grep -v '^ *+' conftest.er1 >conftest.err
17521 rm -f conftest.er1
17522 cat conftest.err >&5
17523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17524 (exit $ac_status); } &&
17525 { ac_try='test -z "$ac_c_werror_flag"
17526 || test ! -s conftest.err'
17527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17528 (eval $ac_try) 2>&5
17529 ac_status=$?
17530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17531 (exit $ac_status); }; } &&
17532 { ac_try='test -s conftest.$ac_objext'
17533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17534 (eval $ac_try) 2>&5
17535 ac_status=$?
17536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17537 (exit $ac_status); }; }; then
17538 ac_cv_member_struct_stat_st_birthtime=yes
17539else
17540 echo "$as_me: failed program was:" >&5
17541sed 's/^/| /' conftest.$ac_ext >&5
17542
17543cat >conftest.$ac_ext <<_ACEOF
17544/* confdefs.h. */
17545_ACEOF
17546cat confdefs.h >>conftest.$ac_ext
17547cat >>conftest.$ac_ext <<_ACEOF
17548/* end confdefs.h. */
17549$ac_includes_default
17550int
17551main ()
17552{
17553static struct stat ac_aggr;
17554if (sizeof ac_aggr.st_birthtime)
17555return 0;
17556 ;
17557 return 0;
17558}
17559_ACEOF
17560rm -f conftest.$ac_objext
17561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17562 (eval $ac_compile) 2>conftest.er1
17563 ac_status=$?
17564 grep -v '^ *+' conftest.er1 >conftest.err
17565 rm -f conftest.er1
17566 cat conftest.err >&5
17567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17568 (exit $ac_status); } &&
17569 { ac_try='test -z "$ac_c_werror_flag"
17570 || test ! -s conftest.err'
17571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17572 (eval $ac_try) 2>&5
17573 ac_status=$?
17574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17575 (exit $ac_status); }; } &&
17576 { ac_try='test -s conftest.$ac_objext'
17577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17578 (eval $ac_try) 2>&5
17579 ac_status=$?
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); }; }; then
17582 ac_cv_member_struct_stat_st_birthtime=yes
17583else
17584 echo "$as_me: failed program was:" >&5
17585sed 's/^/| /' conftest.$ac_ext >&5
17586
17587ac_cv_member_struct_stat_st_birthtime=no
17588fi
17589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17590fi
17591rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17592fi
17593echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
17594echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
17595if test $ac_cv_member_struct_stat_st_birthtime = yes; then
17596
17597cat >>confdefs.h <<_ACEOF
17598#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
17599_ACEOF
17600
17601
17602fi
17603
Martin v. Löwis11437992002-04-12 09:54:03 +000017604echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
17605echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
17606if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
17607 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017608else
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017615$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017616int
17617main ()
17618{
17619static struct stat ac_aggr;
17620if (ac_aggr.st_blocks)
17621return 0;
17622 ;
17623 return 0;
17624}
17625_ACEOF
17626rm -f conftest.$ac_objext
17627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017628 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630 grep -v '^ *+' conftest.er1 >conftest.err
17631 rm -f conftest.er1
17632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17634 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017635 { ac_try='test -z "$ac_c_werror_flag"
17636 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17638 (eval $ac_try) 2>&5
17639 ac_status=$?
17640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17641 (exit $ac_status); }; } &&
17642 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17644 (eval $ac_try) 2>&5
17645 ac_status=$?
17646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17647 (exit $ac_status); }; }; then
17648 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017649else
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017651sed 's/^/| /' conftest.$ac_ext >&5
17652
17653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017654/* confdefs.h. */
17655_ACEOF
17656cat confdefs.h >>conftest.$ac_ext
17657cat >>conftest.$ac_ext <<_ACEOF
17658/* end confdefs.h. */
17659$ac_includes_default
17660int
17661main ()
17662{
17663static struct stat ac_aggr;
17664if (sizeof ac_aggr.st_blocks)
17665return 0;
17666 ;
17667 return 0;
17668}
17669_ACEOF
17670rm -f conftest.$ac_objext
17671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017672 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017674 grep -v '^ *+' conftest.er1 >conftest.err
17675 rm -f conftest.er1
17676 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17678 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017679 { ac_try='test -z "$ac_c_werror_flag"
17680 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17682 (eval $ac_try) 2>&5
17683 ac_status=$?
17684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17685 (exit $ac_status); }; } &&
17686 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17688 (eval $ac_try) 2>&5
17689 ac_status=$?
17690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17691 (exit $ac_status); }; }; then
17692 ac_cv_member_struct_stat_st_blocks=yes
17693else
17694 echo "$as_me: failed program was:" >&5
17695sed 's/^/| /' conftest.$ac_ext >&5
17696
Martin v. Löwis11437992002-04-12 09:54:03 +000017697ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017698fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017699rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017700fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017701rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017703echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17704echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17705if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017706
Martin v. Löwis11437992002-04-12 09:54:03 +000017707cat >>confdefs.h <<_ACEOF
17708#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17709_ACEOF
17710
17711
17712cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017713#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017714_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017715
17716else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017717 case $LIBOBJS in
17718 "fileblocks.$ac_objext" | \
17719 *" fileblocks.$ac_objext" | \
17720 "fileblocks.$ac_objext "* | \
17721 *" fileblocks.$ac_objext "* ) ;;
17722 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17723esac
17724
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017725fi
17726
Michael W. Hudson54241132001-12-07 15:38:26 +000017727
Martin v. Löwis11437992002-04-12 09:54:03 +000017728
17729echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17730echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17731if test "${ac_cv_header_time_altzone+set}" = set; then
17732 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017733else
Martin v. Löwis11437992002-04-12 09:54:03 +000017734 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017735/* confdefs.h. */
17736_ACEOF
17737cat confdefs.h >>conftest.$ac_ext
17738cat >>conftest.$ac_ext <<_ACEOF
17739/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017740#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017741int
17742main ()
17743{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017744return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 ;
17746 return 0;
17747}
17748_ACEOF
17749rm -f conftest.$ac_objext
17750if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017751 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017753 grep -v '^ *+' conftest.er1 >conftest.err
17754 rm -f conftest.er1
17755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17757 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017758 { ac_try='test -z "$ac_c_werror_flag"
17759 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17761 (eval $ac_try) 2>&5
17762 ac_status=$?
17763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17764 (exit $ac_status); }; } &&
17765 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17767 (eval $ac_try) 2>&5
17768 ac_status=$?
17769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17770 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017771 ac_cv_header_time_altzone=yes
17772else
Martin v. Löwis11437992002-04-12 09:54:03 +000017773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017774sed 's/^/| /' conftest.$ac_ext >&5
17775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017777fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017778rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017779fi
17780
Martin v. Löwis11437992002-04-12 09:54:03 +000017781echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17782echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017783if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017784
17785cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017786#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017787_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017788
17789fi
17790
Guido van Rossumda88dad1995-01-26 00:46:29 +000017791was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017792echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17793echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017795/* confdefs.h. */
17796_ACEOF
17797cat confdefs.h >>conftest.$ac_ext
17798cat >>conftest.$ac_ext <<_ACEOF
17799/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017800
17801#include <sys/types.h>
17802#include <sys/select.h>
17803#include <sys/time.h>
17804
Martin v. Löwis11437992002-04-12 09:54:03 +000017805int
17806main ()
17807{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017808;
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 ;
17810 return 0;
17811}
17812_ACEOF
17813rm -f conftest.$ac_objext
17814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017817 grep -v '^ *+' conftest.er1 >conftest.err
17818 rm -f conftest.er1
17819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017822 { ac_try='test -z "$ac_c_werror_flag"
17823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17825 (eval $ac_try) 2>&5
17826 ac_status=$?
17827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17828 (exit $ac_status); }; } &&
17829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17831 (eval $ac_try) 2>&5
17832 ac_status=$?
17833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17834 (exit $ac_status); }; }; then
17835
17836
17837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017838#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017839_ACEOF
17840
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017841 was_it_defined=yes
17842
Guido van Rossumf78abae1997-01-21 22:02:36 +000017843else
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017845sed 's/^/| /' conftest.$ac_ext >&5
17846
Guido van Rossum7f43da71994-08-01 12:15:30 +000017847fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017848rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017849echo "$as_me:$LINENO: result: $was_it_defined" >&5
17850echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017851
Martin v. Löwis11437992002-04-12 09:54:03 +000017852echo "$as_me:$LINENO: checking for addrinfo" >&5
17853echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17854if test "${ac_cv_struct_addrinfo+set}" = set; then
17855 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017856else
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017858/* confdefs.h. */
17859_ACEOF
17860cat confdefs.h >>conftest.$ac_ext
17861cat >>conftest.$ac_ext <<_ACEOF
17862/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017863
17864# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017865int
17866main ()
17867{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017868struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 ;
17870 return 0;
17871}
17872_ACEOF
17873rm -f conftest.$ac_objext
17874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017875 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17881 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017882 { ac_try='test -z "$ac_c_werror_flag"
17883 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17885 (eval $ac_try) 2>&5
17886 ac_status=$?
17887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17888 (exit $ac_status); }; } &&
17889 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17891 (eval $ac_try) 2>&5
17892 ac_status=$?
17893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17894 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017895 ac_cv_struct_addrinfo=yes
17896else
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017898sed 's/^/| /' conftest.$ac_ext >&5
17899
Martin v. Löwis11437992002-04-12 09:54:03 +000017900ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017903fi
17904
Martin v. Löwis11437992002-04-12 09:54:03 +000017905echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17906echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017907if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017908
17909cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017910#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017911_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017912
17913fi
17914
Martin v. Löwis11437992002-04-12 09:54:03 +000017915echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17916echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17917if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17918 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017919else
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017921/* confdefs.h. */
17922_ACEOF
17923cat confdefs.h >>conftest.$ac_ext
17924cat >>conftest.$ac_ext <<_ACEOF
17925/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017926
17927# include <sys/types.h>
17928# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017929int
17930main ()
17931{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017932struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 ;
17934 return 0;
17935}
17936_ACEOF
17937rm -f conftest.$ac_objext
17938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017939 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017941 grep -v '^ *+' conftest.er1 >conftest.err
17942 rm -f conftest.er1
17943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017946 { ac_try='test -z "$ac_c_werror_flag"
17947 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17949 (eval $ac_try) 2>&5
17950 ac_status=$?
17951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952 (exit $ac_status); }; } &&
17953 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17955 (eval $ac_try) 2>&5
17956 ac_status=$?
17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017959 ac_cv_struct_sockaddr_storage=yes
17960else
Martin v. Löwis11437992002-04-12 09:54:03 +000017961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017962sed 's/^/| /' conftest.$ac_ext >&5
17963
Martin v. Löwis11437992002-04-12 09:54:03 +000017964ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017965fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017967fi
17968
Martin v. Löwis11437992002-04-12 09:54:03 +000017969echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17970echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017971if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017972
17973cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017974#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017975_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017976
17977fi
17978
Guido van Rossum627b2d71993-12-24 10:39:16 +000017979# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017980
Michael W. Hudson54241132001-12-07 15:38:26 +000017981
Martin v. Löwis11437992002-04-12 09:54:03 +000017982echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17983echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17984if test "${ac_cv_c_char_unsigned+set}" = set; then
17985 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017986else
Martin v. Löwis11437992002-04-12 09:54:03 +000017987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017988/* confdefs.h. */
17989_ACEOF
17990cat confdefs.h >>conftest.$ac_ext
17991cat >>conftest.$ac_ext <<_ACEOF
17992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017993$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017994int
17995main ()
17996{
17997static int test_array [1 - 2 * !(((char) -1) < 0)];
17998test_array [0] = 0
17999
18000 ;
18001 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000018002}
Martin v. Löwis11437992002-04-12 09:54:03 +000018003_ACEOF
18004rm -f conftest.$ac_objext
18005if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018006 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018008 grep -v '^ *+' conftest.er1 >conftest.err
18009 rm -f conftest.er1
18010 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18012 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018013 { ac_try='test -z "$ac_c_werror_flag"
18014 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18016 (eval $ac_try) 2>&5
18017 ac_status=$?
18018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019 (exit $ac_status); }; } &&
18020 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18022 (eval $ac_try) 2>&5
18023 ac_status=$?
18024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018026 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018027else
18028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018029sed 's/^/| /' conftest.$ac_ext >&5
18030
Martin v. Löwis11437992002-04-12 09:54:03 +000018031ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018032fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018033rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018034fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018035echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18036echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018037if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018039#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018040_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018041
18042fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018043
Martin v. Löwis11437992002-04-12 09:54:03 +000018044echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18045echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18046if test "${ac_cv_c_const+set}" = set; then
18047 echo $ECHO_N "(cached) $ECHO_C" >&6
18048else
18049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018055
Martin v. Löwis11437992002-04-12 09:54:03 +000018056int
18057main ()
18058{
18059/* FIXME: Include the comments suggested by Paul. */
18060#ifndef __cplusplus
18061 /* Ultrix mips cc rejects this. */
18062 typedef int charset[2];
18063 const charset x;
18064 /* SunOS 4.1.1 cc rejects this. */
18065 char const *const *ccp;
18066 char **p;
18067 /* NEC SVR4.0.2 mips cc rejects this. */
18068 struct point {int x, y;};
18069 static struct point const zero = {0,0};
18070 /* AIX XL C 1.02.0.0 rejects this.
18071 It does not let you subtract one const X* pointer from another in
18072 an arm of an if-expression whose if-part is not a constant
18073 expression */
18074 const char *g = "string";
18075 ccp = &g + (g ? g-g : 0);
18076 /* HPUX 7.0 cc rejects these. */
18077 ++ccp;
18078 p = (char**) ccp;
18079 ccp = (char const *const *) p;
18080 { /* SCO 3.2v4 cc rejects this. */
18081 char *t;
18082 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018083
Martin v. Löwis11437992002-04-12 09:54:03 +000018084 *t++ = 0;
18085 }
18086 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18087 int x[] = {25, 17};
18088 const int *foo = &x[0];
18089 ++foo;
18090 }
18091 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18092 typedef const int *iptr;
18093 iptr p = 0;
18094 ++p;
18095 }
18096 { /* AIX XL C 1.02.0.0 rejects this saying
18097 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18098 struct s { int j; const int *ap[3]; };
18099 struct s *b; b->j = 5;
18100 }
18101 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18102 const int foo = 10;
18103 }
18104#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018105
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 ;
18107 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018108}
Martin v. Löwis11437992002-04-12 09:54:03 +000018109_ACEOF
18110rm -f conftest.$ac_objext
18111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018112 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114 grep -v '^ *+' conftest.er1 >conftest.err
18115 rm -f conftest.er1
18116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18118 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018119 { ac_try='test -z "$ac_c_werror_flag"
18120 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18122 (eval $ac_try) 2>&5
18123 ac_status=$?
18124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18125 (exit $ac_status); }; } &&
18126 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18128 (eval $ac_try) 2>&5
18129 ac_status=$?
18130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018132 ac_cv_c_const=yes
18133else
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018135sed 's/^/| /' conftest.$ac_ext >&5
18136
Martin v. Löwis11437992002-04-12 09:54:03 +000018137ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018138fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018139rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018141echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
18142echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018143if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018144
18145cat >>confdefs.h <<\_ACEOF
18146#define const
18147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018148
18149fi
18150
Michael W. Hudson54241132001-12-07 15:38:26 +000018151
Guido van Rossumda88dad1995-01-26 00:46:29 +000018152works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018153echo "$as_me:$LINENO: checking for working volatile" >&5
18154echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
18155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018156/* confdefs.h. */
18157_ACEOF
18158cat confdefs.h >>conftest.$ac_ext
18159cat >>conftest.$ac_ext <<_ACEOF
18160/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018161
Martin v. Löwis11437992002-04-12 09:54:03 +000018162int
18163main ()
18164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018165volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 ;
18167 return 0;
18168}
18169_ACEOF
18170rm -f conftest.$ac_objext
18171if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018174 grep -v '^ *+' conftest.er1 >conftest.err
18175 rm -f conftest.er1
18176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018179 { ac_try='test -z "$ac_c_werror_flag"
18180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182 (eval $ac_try) 2>&5
18183 ac_status=$?
18184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185 (exit $ac_status); }; } &&
18186 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18188 (eval $ac_try) 2>&5
18189 ac_status=$?
18190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18191 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018192 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018193else
Martin v. Löwis11437992002-04-12 09:54:03 +000018194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018195sed 's/^/| /' conftest.$ac_ext >&5
18196
Martin v. Löwis11437992002-04-12 09:54:03 +000018197
18198cat >>confdefs.h <<\_ACEOF
18199#define volatile
18200_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018201
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018202
Guido van Rossum627b2d71993-12-24 10:39:16 +000018203fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018204rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018205echo "$as_me:$LINENO: result: $works" >&5
18206echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018207
Guido van Rossumda88dad1995-01-26 00:46:29 +000018208works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018209echo "$as_me:$LINENO: checking for working signed char" >&5
18210echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
18211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018212/* confdefs.h. */
18213_ACEOF
18214cat confdefs.h >>conftest.$ac_ext
18215cat >>conftest.$ac_ext <<_ACEOF
18216/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018217
Martin v. Löwis11437992002-04-12 09:54:03 +000018218int
18219main ()
18220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018221signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000018222 ;
18223 return 0;
18224}
18225_ACEOF
18226rm -f conftest.$ac_objext
18227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018228 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018230 grep -v '^ *+' conftest.er1 >conftest.err
18231 rm -f conftest.er1
18232 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18234 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018235 { ac_try='test -z "$ac_c_werror_flag"
18236 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18238 (eval $ac_try) 2>&5
18239 ac_status=$?
18240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18241 (exit $ac_status); }; } &&
18242 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18244 (eval $ac_try) 2>&5
18245 ac_status=$?
18246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18247 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018248 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018249else
Martin v. Löwis11437992002-04-12 09:54:03 +000018250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018251sed 's/^/| /' conftest.$ac_ext >&5
18252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253
18254cat >>confdefs.h <<\_ACEOF
18255#define signed
18256_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018258
Guido van Rossum7f43da71994-08-01 12:15:30 +000018259fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018260rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018261echo "$as_me:$LINENO: result: $works" >&5
18262echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018263
Guido van Rossumda88dad1995-01-26 00:46:29 +000018264have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018265echo "$as_me:$LINENO: checking for prototypes" >&5
18266echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
18267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018268/* confdefs.h. */
18269_ACEOF
18270cat confdefs.h >>conftest.$ac_ext
18271cat >>conftest.$ac_ext <<_ACEOF
18272/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018273int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018274int
18275main ()
18276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018277return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 ;
18279 return 0;
18280}
18281_ACEOF
18282rm -f conftest.$ac_objext
18283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018284 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018286 grep -v '^ *+' conftest.er1 >conftest.err
18287 rm -f conftest.er1
18288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18290 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018291 { ac_try='test -z "$ac_c_werror_flag"
18292 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18294 (eval $ac_try) 2>&5
18295 ac_status=$?
18296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18297 (exit $ac_status); }; } &&
18298 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18300 (eval $ac_try) 2>&5
18301 ac_status=$?
18302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303 (exit $ac_status); }; }; then
18304
18305
18306cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018307#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018308_ACEOF
18309
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018310 have_prototypes=yes
18311
Guido van Rossumf78abae1997-01-21 22:02:36 +000018312else
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018314sed 's/^/| /' conftest.$ac_ext >&5
18315
Guido van Rossum7f43da71994-08-01 12:15:30 +000018316fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018318echo "$as_me:$LINENO: result: $have_prototypes" >&5
18319echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018320
Guido van Rossumda88dad1995-01-26 00:46:29 +000018321works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018322echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
18323echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
18324cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018325/* confdefs.h. */
18326_ACEOF
18327cat confdefs.h >>conftest.$ac_ext
18328cat >>conftest.$ac_ext <<_ACEOF
18329/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018330
18331#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000018332int foo(int x, ...) {
18333 va_list va;
18334 va_start(va, x);
18335 va_arg(va, int);
18336 va_arg(va, char *);
18337 va_arg(va, double);
18338 return 0;
18339}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018340
Martin v. Löwis11437992002-04-12 09:54:03 +000018341int
18342main ()
18343{
Guido van Rossum90eea071996-08-30 20:58:57 +000018344return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 ;
18346 return 0;
18347}
18348_ACEOF
18349rm -f conftest.$ac_objext
18350if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018351 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018353 grep -v '^ *+' conftest.er1 >conftest.err
18354 rm -f conftest.er1
18355 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18357 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018358 { ac_try='test -z "$ac_c_werror_flag"
18359 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18361 (eval $ac_try) 2>&5
18362 ac_status=$?
18363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18364 (exit $ac_status); }; } &&
18365 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18367 (eval $ac_try) 2>&5
18368 ac_status=$?
18369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18370 (exit $ac_status); }; }; then
18371
18372
18373cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018374#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018375_ACEOF
18376
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018377 works=yes
18378
Guido van Rossumf78abae1997-01-21 22:02:36 +000018379else
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018381sed 's/^/| /' conftest.$ac_ext >&5
18382
Guido van Rossum627b2d71993-12-24 10:39:16 +000018383fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018384rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018385echo "$as_me:$LINENO: result: $works" >&5
18386echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018387
Martin v. Löwisd6320502004-08-12 13:45:08 +000018388# check for socketpair
18389echo "$as_me:$LINENO: checking for socketpair" >&5
18390echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
18391cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000018392/* confdefs.h. */
18393_ACEOF
18394cat confdefs.h >>conftest.$ac_ext
18395cat >>conftest.$ac_ext <<_ACEOF
18396/* end confdefs.h. */
18397
18398#include <sys/types.h>
18399#include <sys/socket.h>
18400
18401int
18402main ()
18403{
18404void *x=socketpair
18405 ;
18406 return 0;
18407}
18408_ACEOF
18409rm -f conftest.$ac_objext
18410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000018412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018413 grep -v '^ *+' conftest.er1 >conftest.err
18414 rm -f conftest.er1
18415 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000018416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18417 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018418 { ac_try='test -z "$ac_c_werror_flag"
18419 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18421 (eval $ac_try) 2>&5
18422 ac_status=$?
18423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18424 (exit $ac_status); }; } &&
18425 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000018426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18427 (eval $ac_try) 2>&5
18428 ac_status=$?
18429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18430 (exit $ac_status); }; }; then
18431
18432cat >>confdefs.h <<\_ACEOF
18433#define HAVE_SOCKETPAIR 1
18434_ACEOF
18435
18436 echo "$as_me:$LINENO: result: yes" >&5
18437echo "${ECHO_T}yes" >&6
18438else
18439 echo "$as_me: failed program was:" >&5
18440sed 's/^/| /' conftest.$ac_ext >&5
18441
18442echo "$as_me:$LINENO: result: no" >&5
18443echo "${ECHO_T}no" >&6
18444
18445fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018446rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000018447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018448# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000018449echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
18450echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
18451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018452/* confdefs.h. */
18453_ACEOF
18454cat confdefs.h >>conftest.$ac_ext
18455cat >>conftest.$ac_ext <<_ACEOF
18456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018457#include <sys/types.h>
18458#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018459int
18460main ()
18461{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018462struct sockaddr x;
18463x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018464 ;
18465 return 0;
18466}
18467_ACEOF
18468rm -f conftest.$ac_objext
18469if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018470 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018472 grep -v '^ *+' conftest.er1 >conftest.err
18473 rm -f conftest.er1
18474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18476 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018477 { ac_try='test -z "$ac_c_werror_flag"
18478 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18480 (eval $ac_try) 2>&5
18481 ac_status=$?
18482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18483 (exit $ac_status); }; } &&
18484 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18486 (eval $ac_try) 2>&5
18487 ac_status=$?
18488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18489 (exit $ac_status); }; }; then
18490 echo "$as_me:$LINENO: result: yes" >&5
18491echo "${ECHO_T}yes" >&6
18492
18493cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018494#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018495_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018496
18497else
Martin v. Löwis11437992002-04-12 09:54:03 +000018498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018499sed 's/^/| /' conftest.$ac_ext >&5
18500
Martin v. Löwis11437992002-04-12 09:54:03 +000018501echo "$as_me:$LINENO: result: no" >&5
18502echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018503fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018505
Guido van Rossumda88dad1995-01-26 00:46:29 +000018506va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018507echo "$as_me:$LINENO: checking whether va_list is an array" >&5
18508echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
18509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018510/* confdefs.h. */
18511_ACEOF
18512cat confdefs.h >>conftest.$ac_ext
18513cat >>conftest.$ac_ext <<_ACEOF
18514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018515
18516#ifdef HAVE_STDARG_PROTOTYPES
18517#include <stdarg.h>
18518#else
18519#include <varargs.h>
18520#endif
18521
Martin v. Löwis11437992002-04-12 09:54:03 +000018522int
18523main ()
18524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018525va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 ;
18527 return 0;
18528}
18529_ACEOF
18530rm -f conftest.$ac_objext
18531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018534 grep -v '^ *+' conftest.er1 >conftest.err
18535 rm -f conftest.er1
18536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18538 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018539 { ac_try='test -z "$ac_c_werror_flag"
18540 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18542 (eval $ac_try) 2>&5
18543 ac_status=$?
18544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18545 (exit $ac_status); }; } &&
18546 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18548 (eval $ac_try) 2>&5
18549 ac_status=$?
18550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18551 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018552 :
18553else
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018555sed 's/^/| /' conftest.$ac_ext >&5
18556
Martin v. Löwis11437992002-04-12 09:54:03 +000018557
18558
18559cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018560#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018561_ACEOF
18562
Guido van Rossumda88dad1995-01-26 00:46:29 +000018563 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018564
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018565fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018566rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018567echo "$as_me:$LINENO: result: $va_list_is_array" >&5
18568echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018570# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000018571
18572
18573
18574echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
18575echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
18576if test "${ac_cv_func_gethostbyname_r+set}" = set; then
18577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018578else
Martin v. Löwis11437992002-04-12 09:54:03 +000018579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018580/* confdefs.h. */
18581_ACEOF
18582cat confdefs.h >>conftest.$ac_ext
18583cat >>conftest.$ac_ext <<_ACEOF
18584/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018585/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
18586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18587#define gethostbyname_r innocuous_gethostbyname_r
18588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018589/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018590 which can conflict with char gethostbyname_r (); below.
18591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018592 <limits.h> exists even on freestanding compilers. */
18593
18594#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018595# include <limits.h>
18596#else
18597# include <assert.h>
18598#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018599
18600#undef gethostbyname_r
18601
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018602/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018603#ifdef __cplusplus
18604extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018605{
Martin v. Löwis11437992002-04-12 09:54:03 +000018606#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018607/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 builtin and then its argument prototype would still apply. */
18609char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018610/* The GNU C library defines this for functions which it implements
18611 to always fail with ENOSYS. Some functions are actually named
18612 something starting with __ and the normal name is an alias. */
18613#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
18614choke me
18615#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018616char (*f) () = gethostbyname_r;
18617#endif
18618#ifdef __cplusplus
18619}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018620#endif
18621
Skip Montanaro6dead952003-09-25 14:50:04 +000018622int
18623main ()
18624{
18625return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 ;
18627 return 0;
18628}
18629_ACEOF
18630rm -f conftest.$ac_objext conftest$ac_exeext
18631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018632 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018634 grep -v '^ *+' conftest.er1 >conftest.err
18635 rm -f conftest.er1
18636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18638 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018639 { ac_try='test -z "$ac_c_werror_flag"
18640 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18642 (eval $ac_try) 2>&5
18643 ac_status=$?
18644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645 (exit $ac_status); }; } &&
18646 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18648 (eval $ac_try) 2>&5
18649 ac_status=$?
18650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18651 (exit $ac_status); }; }; then
18652 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018653else
Martin v. Löwis11437992002-04-12 09:54:03 +000018654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018655sed 's/^/| /' conftest.$ac_ext >&5
18656
Martin v. Löwis11437992002-04-12 09:54:03 +000018657ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018659rm -f conftest.err conftest.$ac_objext \
18660 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018662echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18663echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18664if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018665
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018667#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018668_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018669
Martin v. Löwis11437992002-04-12 09:54:03 +000018670 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18671echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018672 OLD_CFLAGS=$CFLAGS
18673 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018675/* confdefs.h. */
18676_ACEOF
18677cat confdefs.h >>conftest.$ac_ext
18678cat >>conftest.$ac_ext <<_ACEOF
18679/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018680
18681# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018682
Martin v. Löwis11437992002-04-12 09:54:03 +000018683int
18684main ()
18685{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018686
18687 char *name;
18688 struct hostent *he, *res;
18689 char buffer[2048];
18690 int buflen = 2048;
18691 int h_errnop;
18692
18693 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018694
18695 ;
18696 return 0;
18697}
18698_ACEOF
18699rm -f conftest.$ac_objext
18700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018703 grep -v '^ *+' conftest.er1 >conftest.err
18704 rm -f conftest.er1
18705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018708 { ac_try='test -z "$ac_c_werror_flag"
18709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18711 (eval $ac_try) 2>&5
18712 ac_status=$?
18713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18714 (exit $ac_status); }; } &&
18715 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18717 (eval $ac_try) 2>&5
18718 ac_status=$?
18719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18720 (exit $ac_status); }; }; then
18721
18722 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018723#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018724_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018725
Martin v. Löwis11437992002-04-12 09:54:03 +000018726
18727cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018728#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018729_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018730
Martin v. Löwis11437992002-04-12 09:54:03 +000018731 echo "$as_me:$LINENO: result: yes" >&5
18732echo "${ECHO_T}yes" >&6
18733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018734else
Martin v. Löwis11437992002-04-12 09:54:03 +000018735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018736sed 's/^/| /' conftest.$ac_ext >&5
18737
Martin v. Löwis11437992002-04-12 09:54:03 +000018738
18739 echo "$as_me:$LINENO: result: no" >&5
18740echo "${ECHO_T}no" >&6
18741 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18742echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018744/* confdefs.h. */
18745_ACEOF
18746cat confdefs.h >>conftest.$ac_ext
18747cat >>conftest.$ac_ext <<_ACEOF
18748/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018749
18750# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018751
Martin v. Löwis11437992002-04-12 09:54:03 +000018752int
18753main ()
18754{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018755
18756 char *name;
18757 struct hostent *he;
18758 char buffer[2048];
18759 int buflen = 2048;
18760 int h_errnop;
18761
18762 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018763
18764 ;
18765 return 0;
18766}
18767_ACEOF
18768rm -f conftest.$ac_objext
18769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018770 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018772 grep -v '^ *+' conftest.er1 >conftest.err
18773 rm -f conftest.er1
18774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18776 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018777 { ac_try='test -z "$ac_c_werror_flag"
18778 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18780 (eval $ac_try) 2>&5
18781 ac_status=$?
18782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18783 (exit $ac_status); }; } &&
18784 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18786 (eval $ac_try) 2>&5
18787 ac_status=$?
18788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18789 (exit $ac_status); }; }; then
18790
18791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018792#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018793_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018794
Martin v. Löwis11437992002-04-12 09:54:03 +000018795
18796cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018797#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018798_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018799
Martin v. Löwis11437992002-04-12 09:54:03 +000018800 echo "$as_me:$LINENO: result: yes" >&5
18801echo "${ECHO_T}yes" >&6
18802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018803else
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018805sed 's/^/| /' conftest.$ac_ext >&5
18806
Martin v. Löwis11437992002-04-12 09:54:03 +000018807
18808 echo "$as_me:$LINENO: result: no" >&5
18809echo "${ECHO_T}no" >&6
18810 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18811echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018813/* confdefs.h. */
18814_ACEOF
18815cat confdefs.h >>conftest.$ac_ext
18816cat >>conftest.$ac_ext <<_ACEOF
18817/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018818
18819# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018820
Martin v. Löwis11437992002-04-12 09:54:03 +000018821int
18822main ()
18823{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018824
18825 char *name;
18826 struct hostent *he;
18827 struct hostent_data data;
18828
18829 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018830
18831 ;
18832 return 0;
18833}
18834_ACEOF
18835rm -f conftest.$ac_objext
18836if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018837 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018839 grep -v '^ *+' conftest.er1 >conftest.err
18840 rm -f conftest.er1
18841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18843 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018844 { ac_try='test -z "$ac_c_werror_flag"
18845 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18847 (eval $ac_try) 2>&5
18848 ac_status=$?
18849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18850 (exit $ac_status); }; } &&
18851 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18853 (eval $ac_try) 2>&5
18854 ac_status=$?
18855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18856 (exit $ac_status); }; }; then
18857
18858 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018859#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018860_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018861
Martin v. Löwis11437992002-04-12 09:54:03 +000018862
18863cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018864#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018865_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018866
Martin v. Löwis11437992002-04-12 09:54:03 +000018867 echo "$as_me:$LINENO: result: yes" >&5
18868echo "${ECHO_T}yes" >&6
18869
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018870else
Martin v. Löwis11437992002-04-12 09:54:03 +000018871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018872sed 's/^/| /' conftest.$ac_ext >&5
18873
Martin v. Löwis11437992002-04-12 09:54:03 +000018874
18875 echo "$as_me:$LINENO: result: no" >&5
18876echo "${ECHO_T}no" >&6
18877
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018878fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018880
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018886 CFLAGS=$OLD_CFLAGS
18887
18888else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018889
Martin v. Löwis11437992002-04-12 09:54:03 +000018890
18891for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018892do
Martin v. Löwis11437992002-04-12 09:54:03 +000018893as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18894echo "$as_me:$LINENO: checking for $ac_func" >&5
18895echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18896if eval "test \"\${$as_ac_var+set}\" = set"; then
18897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018898else
Martin v. Löwis11437992002-04-12 09:54:03 +000018899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018900/* confdefs.h. */
18901_ACEOF
18902cat confdefs.h >>conftest.$ac_ext
18903cat >>conftest.$ac_ext <<_ACEOF
18904/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018905/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18907#define $ac_func innocuous_$ac_func
18908
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018910 which can conflict with char $ac_func (); below.
18911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018912 <limits.h> exists even on freestanding compilers. */
18913
18914#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018915# include <limits.h>
18916#else
18917# include <assert.h>
18918#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018919
18920#undef $ac_func
18921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018923#ifdef __cplusplus
18924extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018925{
Martin v. Löwis11437992002-04-12 09:54:03 +000018926#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018927/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018928 builtin and then its argument prototype would still apply. */
18929char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018930/* The GNU C library defines this for functions which it implements
18931 to always fail with ENOSYS. Some functions are actually named
18932 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018933#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018934choke me
18935#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018936char (*f) () = $ac_func;
18937#endif
18938#ifdef __cplusplus
18939}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018940#endif
18941
Skip Montanaro6dead952003-09-25 14:50:04 +000018942int
18943main ()
18944{
18945return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 ;
18947 return 0;
18948}
18949_ACEOF
18950rm -f conftest.$ac_objext conftest$ac_exeext
18951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018952 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018954 grep -v '^ *+' conftest.er1 >conftest.err
18955 rm -f conftest.er1
18956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18958 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018959 { ac_try='test -z "$ac_c_werror_flag"
18960 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18962 (eval $ac_try) 2>&5
18963 ac_status=$?
18964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18965 (exit $ac_status); }; } &&
18966 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18968 (eval $ac_try) 2>&5
18969 ac_status=$?
18970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18971 (exit $ac_status); }; }; then
18972 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018973else
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018975sed 's/^/| /' conftest.$ac_ext >&5
18976
Martin v. Löwis11437992002-04-12 09:54:03 +000018977eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018978fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018979rm -f conftest.err conftest.$ac_objext \
18980 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018981fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018982echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18983echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18984if test `eval echo '${'$as_ac_var'}'` = yes; then
18985 cat >>confdefs.h <<_ACEOF
18986#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18987_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018988
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018989fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018990done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018991
Michael W. Hudson54241132001-12-07 15:38:26 +000018992
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018993fi
18994
Michael W. Hudson54241132001-12-07 15:38:26 +000018995
18996
18997
18998
18999
19000
Guido van Rossum627b2d71993-12-24 10:39:16 +000019001# checks for system services
19002# (none yet)
19003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019004# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000019005echo "$as_me:$LINENO: checking for __fpu_control" >&5
19006echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
19007if test "${ac_cv_func___fpu_control+set}" = set; then
19008 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019009else
Martin v. Löwis11437992002-04-12 09:54:03 +000019010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019011/* confdefs.h. */
19012_ACEOF
19013cat confdefs.h >>conftest.$ac_ext
19014cat >>conftest.$ac_ext <<_ACEOF
19015/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019016/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19017 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19018#define __fpu_control innocuous___fpu_control
19019
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019020/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019021 which can conflict with char __fpu_control (); below.
19022 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019023 <limits.h> exists even on freestanding compilers. */
19024
19025#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019026# include <limits.h>
19027#else
19028# include <assert.h>
19029#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019030
19031#undef __fpu_control
19032
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019033/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019034#ifdef __cplusplus
19035extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019036{
Martin v. Löwis11437992002-04-12 09:54:03 +000019037#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019038/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019039 builtin and then its argument prototype would still apply. */
19040char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019041/* The GNU C library defines this for functions which it implements
19042 to always fail with ENOSYS. Some functions are actually named
19043 something starting with __ and the normal name is an alias. */
19044#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
19045choke me
19046#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019047char (*f) () = __fpu_control;
19048#endif
19049#ifdef __cplusplus
19050}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019051#endif
19052
Skip Montanaro6dead952003-09-25 14:50:04 +000019053int
19054main ()
19055{
19056return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 ;
19058 return 0;
19059}
19060_ACEOF
19061rm -f conftest.$ac_objext conftest$ac_exeext
19062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019065 grep -v '^ *+' conftest.er1 >conftest.err
19066 rm -f conftest.er1
19067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19069 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019070 { ac_try='test -z "$ac_c_werror_flag"
19071 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19073 (eval $ac_try) 2>&5
19074 ac_status=$?
19075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19076 (exit $ac_status); }; } &&
19077 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19079 (eval $ac_try) 2>&5
19080 ac_status=$?
19081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19082 (exit $ac_status); }; }; then
19083 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019084else
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019086sed 's/^/| /' conftest.$ac_ext >&5
19087
Martin v. Löwis11437992002-04-12 09:54:03 +000019088ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019090rm -f conftest.err conftest.$ac_objext \
19091 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019092fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019093echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19094echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
19095if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019096 :
19097else
Martin v. Löwis11437992002-04-12 09:54:03 +000019098
19099echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19100echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
19101if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019103else
Martin v. Löwis11437992002-04-12 09:54:03 +000019104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019105LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019107/* confdefs.h. */
19108_ACEOF
19109cat confdefs.h >>conftest.$ac_ext
19110cat >>conftest.$ac_ext <<_ACEOF
19111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019113/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019114#ifdef __cplusplus
19115extern "C"
19116#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019117/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019118 builtin and then its argument prototype would still apply. */
19119char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019120int
19121main ()
19122{
19123__fpu_control ();
19124 ;
19125 return 0;
19126}
19127_ACEOF
19128rm -f conftest.$ac_objext conftest$ac_exeext
19129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019130 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019132 grep -v '^ *+' conftest.er1 >conftest.err
19133 rm -f conftest.er1
19134 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19136 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019137 { ac_try='test -z "$ac_c_werror_flag"
19138 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19140 (eval $ac_try) 2>&5
19141 ac_status=$?
19142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19143 (exit $ac_status); }; } &&
19144 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19146 (eval $ac_try) 2>&5
19147 ac_status=$?
19148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19149 (exit $ac_status); }; }; then
19150 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019151else
Martin v. Löwis11437992002-04-12 09:54:03 +000019152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019153sed 's/^/| /' conftest.$ac_ext >&5
19154
Martin v. Löwis11437992002-04-12 09:54:03 +000019155ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019157rm -f conftest.err conftest.$ac_objext \
19158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019159LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019160fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019161echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19162echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
19163if test $ac_cv_lib_ieee___fpu_control = yes; then
19164 cat >>confdefs.h <<_ACEOF
19165#define HAVE_LIBIEEE 1
19166_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019167
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019168 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019169
Guido van Rossum627b2d71993-12-24 10:39:16 +000019170fi
19171
Michael W. Hudson54241132001-12-07 15:38:26 +000019172
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019173fi
19174
Michael W. Hudson54241132001-12-07 15:38:26 +000019175
Guido van Rossum7f253911997-05-09 02:42:48 +000019176# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000019177echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19178echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
19179
Guido van Rossum7f253911997-05-09 02:42:48 +000019180# Check whether --with-fpectl or --without-fpectl was given.
19181if test "${with_fpectl+set}" = set; then
19182 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000019183
Guido van Rossum7f253911997-05-09 02:42:48 +000019184if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019185then
19186
19187cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000019188#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019189_ACEOF
19190
19191 echo "$as_me:$LINENO: result: yes" >&5
19192echo "${ECHO_T}yes" >&6
19193else echo "$as_me:$LINENO: result: no" >&5
19194echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019195fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019196else
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 echo "$as_me:$LINENO: result: no" >&5
19198echo "${ECHO_T}no" >&6
19199fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000019200
Guido van Rossum7f43da71994-08-01 12:15:30 +000019201# check for --with-libm=...
19202
Guido van Rossum563e7081996-09-10 18:20:48 +000019203case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019204Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000019205BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000019206*) LIBM=-lm
19207esac
Martin v. Löwis11437992002-04-12 09:54:03 +000019208echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
19209echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
19210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019211# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019212if test "${with_libm+set}" = set; then
19213 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000019214
Guido van Rossum7f253911997-05-09 02:42:48 +000019215if test "$withval" = no
19216then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000019217 echo "$as_me:$LINENO: result: force LIBM empty" >&5
19218echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019219elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019220then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019221 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
19222echo "${ECHO_T}set LIBM=\"$withval\"" >&6
19223else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
19224echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
19225 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019226fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019227else
Martin v. Löwis11437992002-04-12 09:54:03 +000019228 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
19229echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
19230fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019231
19232# check for --with-libc=...
19233
Martin v. Löwis11437992002-04-12 09:54:03 +000019234echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
19235echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
19236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019237# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019238if test "${with_libc+set}" = set; then
19239 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000019240
Guido van Rossum7f253911997-05-09 02:42:48 +000019241if test "$withval" = no
19242then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000019243 echo "$as_me:$LINENO: result: force LIBC empty" >&5
19244echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019245elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019246then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019247 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
19248echo "${ECHO_T}set LIBC=\"$withval\"" >&6
19249else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
19250echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
19251 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019252fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019253else
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
19255echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
19256fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019257
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019258# check for hypot() in math library
19259LIBS_SAVE=$LIBS
19260LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000019261
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019262for ac_func in hypot
19263do
Martin v. Löwis11437992002-04-12 09:54:03 +000019264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19265echo "$as_me:$LINENO: checking for $ac_func" >&5
19266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19267if eval "test \"\${$as_ac_var+set}\" = set"; then
19268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019269else
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019271/* confdefs.h. */
19272_ACEOF
19273cat confdefs.h >>conftest.$ac_ext
19274cat >>conftest.$ac_ext <<_ACEOF
19275/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19278#define $ac_func innocuous_$ac_func
19279
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019281 which can conflict with char $ac_func (); below.
19282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019283 <limits.h> exists even on freestanding compilers. */
19284
19285#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019286# include <limits.h>
19287#else
19288# include <assert.h>
19289#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019290
19291#undef $ac_func
19292
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019293/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019294#ifdef __cplusplus
19295extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019296{
Martin v. Löwis11437992002-04-12 09:54:03 +000019297#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019298/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019299 builtin and then its argument prototype would still apply. */
19300char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019301/* The GNU C library defines this for functions which it implements
19302 to always fail with ENOSYS. Some functions are actually named
19303 something starting with __ and the normal name is an alias. */
19304#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19305choke me
19306#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019307char (*f) () = $ac_func;
19308#endif
19309#ifdef __cplusplus
19310}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019311#endif
19312
Skip Montanaro6dead952003-09-25 14:50:04 +000019313int
19314main ()
19315{
19316return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 ;
19318 return 0;
19319}
19320_ACEOF
19321rm -f conftest.$ac_objext conftest$ac_exeext
19322if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019323 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019325 grep -v '^ *+' conftest.er1 >conftest.err
19326 rm -f conftest.er1
19327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19329 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019330 { ac_try='test -z "$ac_c_werror_flag"
19331 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19333 (eval $ac_try) 2>&5
19334 ac_status=$?
19335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19336 (exit $ac_status); }; } &&
19337 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19339 (eval $ac_try) 2>&5
19340 ac_status=$?
19341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19342 (exit $ac_status); }; }; then
19343 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019344else
Martin v. Löwis11437992002-04-12 09:54:03 +000019345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019346sed 's/^/| /' conftest.$ac_ext >&5
19347
Martin v. Löwis11437992002-04-12 09:54:03 +000019348eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019349fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019350rm -f conftest.err conftest.$ac_objext \
19351 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019353echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19354echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19355if test `eval echo '${'$as_ac_var'}'` = yes; then
19356 cat >>confdefs.h <<_ACEOF
19357#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19358_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019359
Michael W. Hudson54241132001-12-07 15:38:26 +000019360else
Skip Montanarof0d5f792004-08-15 14:08:23 +000019361 case $LIBOBJS in
19362 "$ac_func.$ac_objext" | \
19363 *" $ac_func.$ac_objext" | \
19364 "$ac_func.$ac_objext "* | \
19365 *" $ac_func.$ac_objext "* ) ;;
19366 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
19367esac
19368
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019369fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019370done
19371
Michael W. Hudson54241132001-12-07 15:38:26 +000019372
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019373LIBS=$LIBS_SAVE
19374
Guido van Rossumef2255b2000-03-10 22:30:29 +000019375# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000019376if test "${ac_cv_header_wchar_h+set}" = set; then
19377 echo "$as_me:$LINENO: checking for wchar.h" >&5
19378echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19379if test "${ac_cv_header_wchar_h+set}" = set; then
19380 echo $ECHO_N "(cached) $ECHO_C" >&6
19381fi
19382echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19383echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019384else
Martin v. Löwis11437992002-04-12 09:54:03 +000019385 # Is the header compilable?
19386echo "$as_me:$LINENO: checking wchar.h usability" >&5
19387echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
19388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019389/* confdefs.h. */
19390_ACEOF
19391cat confdefs.h >>conftest.$ac_ext
19392cat >>conftest.$ac_ext <<_ACEOF
19393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019394$ac_includes_default
19395#include <wchar.h>
19396_ACEOF
19397rm -f conftest.$ac_objext
19398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019399 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019401 grep -v '^ *+' conftest.er1 >conftest.err
19402 rm -f conftest.er1
19403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19405 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019406 { ac_try='test -z "$ac_c_werror_flag"
19407 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19409 (eval $ac_try) 2>&5
19410 ac_status=$?
19411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19412 (exit $ac_status); }; } &&
19413 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19415 (eval $ac_try) 2>&5
19416 ac_status=$?
19417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19418 (exit $ac_status); }; }; then
19419 ac_header_compiler=yes
19420else
19421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019422sed 's/^/| /' conftest.$ac_ext >&5
19423
Martin v. Löwis11437992002-04-12 09:54:03 +000019424ac_header_compiler=no
19425fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019427echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19428echo "${ECHO_T}$ac_header_compiler" >&6
19429
19430# Is the header present?
19431echo "$as_me:$LINENO: checking wchar.h presence" >&5
19432echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
19433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019434/* confdefs.h. */
19435_ACEOF
19436cat confdefs.h >>conftest.$ac_ext
19437cat >>conftest.$ac_ext <<_ACEOF
19438/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019439#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019440_ACEOF
19441if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19442 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19443 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019444 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000019445 rm -f conftest.er1
19446 cat conftest.err >&5
19447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19448 (exit $ac_status); } >/dev/null; then
19449 if test -s conftest.err; then
19450 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019451 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 else
19453 ac_cpp_err=
19454 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019455else
Martin v. Löwis11437992002-04-12 09:54:03 +000019456 ac_cpp_err=yes
19457fi
19458if test -z "$ac_cpp_err"; then
19459 ac_header_preproc=yes
19460else
19461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019462sed 's/^/| /' conftest.$ac_ext >&5
19463
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019465fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019466rm -f conftest.err conftest.$ac_ext
19467echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19468echo "${ECHO_T}$ac_header_preproc" >&6
19469
19470# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019471case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19472 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000019473 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
19474echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019475 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
19476echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
19477 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019478 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019479 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019480 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
19481echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019482 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
19483echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
19484 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
19485echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
19486 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
19487echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019488 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
19489echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019490 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
19491echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019492 (
19493 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000019494## ------------------------------------------------ ##
19495## Report this to http://www.python.org/python-bugs ##
19496## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000019497_ASBOX
19498 ) |
19499 sed "s/^/$as_me: WARNING: /" >&2
19500 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019501esac
19502echo "$as_me:$LINENO: checking for wchar.h" >&5
19503echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19504if test "${ac_cv_header_wchar_h+set}" = set; then
19505 echo $ECHO_N "(cached) $ECHO_C" >&6
19506else
19507 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000019508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019509echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19510echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
19511
19512fi
19513if test $ac_cv_header_wchar_h = yes; then
19514
19515
19516cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019517#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019518_ACEOF
19519
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019520 wchar_h="yes"
19521
Guido van Rossumef2255b2000-03-10 22:30:29 +000019522else
Martin v. Löwis11437992002-04-12 09:54:03 +000019523 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000019524
19525fi
19526
Michael W. Hudson54241132001-12-07 15:38:26 +000019527
Martin v. Löwis11437992002-04-12 09:54:03 +000019528
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019529# determine wchar_t size
19530if test "$wchar_h" = yes
19531then
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 echo "$as_me:$LINENO: checking for wchar_t" >&5
19533echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19534if test "${ac_cv_type_wchar_t+set}" = set; then
19535 echo $ECHO_N "(cached) $ECHO_C" >&6
19536else
19537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019538/* confdefs.h. */
19539_ACEOF
19540cat confdefs.h >>conftest.$ac_ext
19541cat >>conftest.$ac_ext <<_ACEOF
19542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019543#include <wchar.h>
19544
Martin v. Löwis11437992002-04-12 09:54:03 +000019545int
19546main ()
19547{
19548if ((wchar_t *) 0)
19549 return 0;
19550if (sizeof (wchar_t))
19551 return 0;
19552 ;
19553 return 0;
19554}
19555_ACEOF
19556rm -f conftest.$ac_objext
19557if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019558 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019560 grep -v '^ *+' conftest.er1 >conftest.err
19561 rm -f conftest.er1
19562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19564 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019565 { ac_try='test -z "$ac_c_werror_flag"
19566 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19568 (eval $ac_try) 2>&5
19569 ac_status=$?
19570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19571 (exit $ac_status); }; } &&
19572 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19574 (eval $ac_try) 2>&5
19575 ac_status=$?
19576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19577 (exit $ac_status); }; }; then
19578 ac_cv_type_wchar_t=yes
19579else
19580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019581sed 's/^/| /' conftest.$ac_ext >&5
19582
Martin v. Löwis11437992002-04-12 09:54:03 +000019583ac_cv_type_wchar_t=no
19584fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019586fi
19587echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
19588echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19589
19590echo "$as_me:$LINENO: checking size of wchar_t" >&5
19591echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19592if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19593 echo $ECHO_N "(cached) $ECHO_C" >&6
19594else
19595 if test "$ac_cv_type_wchar_t" = yes; then
19596 # The cast to unsigned long works around a bug in the HP C Compiler
19597 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19598 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19599 # This bug is HP SR number 8606223364.
19600 if test "$cross_compiling" = yes; then
19601 # Depending upon the size, compute the lo and hi bounds.
19602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019603/* confdefs.h. */
19604_ACEOF
19605cat confdefs.h >>conftest.$ac_ext
19606cat >>conftest.$ac_ext <<_ACEOF
19607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019608#include <wchar.h>
19609
Martin v. Löwis11437992002-04-12 09:54:03 +000019610int
19611main ()
19612{
19613static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
19614test_array [0] = 0
19615
19616 ;
19617 return 0;
19618}
19619_ACEOF
19620rm -f conftest.$ac_objext
19621if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019622 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019624 grep -v '^ *+' conftest.er1 >conftest.err
19625 rm -f conftest.er1
19626 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19628 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019629 { ac_try='test -z "$ac_c_werror_flag"
19630 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19632 (eval $ac_try) 2>&5
19633 ac_status=$?
19634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19635 (exit $ac_status); }; } &&
19636 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19638 (eval $ac_try) 2>&5
19639 ac_status=$?
19640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19641 (exit $ac_status); }; }; then
19642 ac_lo=0 ac_mid=0
19643 while :; do
19644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019645/* confdefs.h. */
19646_ACEOF
19647cat confdefs.h >>conftest.$ac_ext
19648cat >>conftest.$ac_ext <<_ACEOF
19649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019650#include <wchar.h>
19651
Martin v. Löwis11437992002-04-12 09:54:03 +000019652int
19653main ()
19654{
19655static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19656test_array [0] = 0
19657
19658 ;
19659 return 0;
19660}
19661_ACEOF
19662rm -f conftest.$ac_objext
19663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019664 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019666 grep -v '^ *+' conftest.er1 >conftest.err
19667 rm -f conftest.er1
19668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19670 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019671 { ac_try='test -z "$ac_c_werror_flag"
19672 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19674 (eval $ac_try) 2>&5
19675 ac_status=$?
19676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19677 (exit $ac_status); }; } &&
19678 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19680 (eval $ac_try) 2>&5
19681 ac_status=$?
19682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19683 (exit $ac_status); }; }; then
19684 ac_hi=$ac_mid; break
19685else
19686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019687sed 's/^/| /' conftest.$ac_ext >&5
19688
Martin v. Löwis11437992002-04-12 09:54:03 +000019689ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019690 if test $ac_lo -le $ac_mid; then
19691 ac_lo= ac_hi=
19692 break
19693 fi
19694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019695fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019696rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 done
19698else
19699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019700sed 's/^/| /' conftest.$ac_ext >&5
19701
Martin v. Löwis11437992002-04-12 09:54:03 +000019702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019708#include <wchar.h>
19709
Martin v. Löwis11437992002-04-12 09:54:03 +000019710int
19711main ()
19712{
19713static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19714test_array [0] = 0
19715
19716 ;
19717 return 0;
19718}
19719_ACEOF
19720rm -f conftest.$ac_objext
19721if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019722 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019724 grep -v '^ *+' conftest.er1 >conftest.err
19725 rm -f conftest.er1
19726 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19728 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019729 { ac_try='test -z "$ac_c_werror_flag"
19730 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19732 (eval $ac_try) 2>&5
19733 ac_status=$?
19734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19735 (exit $ac_status); }; } &&
19736 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19738 (eval $ac_try) 2>&5
19739 ac_status=$?
19740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19741 (exit $ac_status); }; }; then
19742 ac_hi=-1 ac_mid=-1
19743 while :; do
19744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019745/* confdefs.h. */
19746_ACEOF
19747cat confdefs.h >>conftest.$ac_ext
19748cat >>conftest.$ac_ext <<_ACEOF
19749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019750#include <wchar.h>
19751
Martin v. Löwis11437992002-04-12 09:54:03 +000019752int
19753main ()
19754{
19755static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19756test_array [0] = 0
19757
19758 ;
19759 return 0;
19760}
19761_ACEOF
19762rm -f conftest.$ac_objext
19763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019764 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019766 grep -v '^ *+' conftest.er1 >conftest.err
19767 rm -f conftest.er1
19768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19770 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019771 { ac_try='test -z "$ac_c_werror_flag"
19772 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19774 (eval $ac_try) 2>&5
19775 ac_status=$?
19776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19777 (exit $ac_status); }; } &&
19778 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19780 (eval $ac_try) 2>&5
19781 ac_status=$?
19782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19783 (exit $ac_status); }; }; then
19784 ac_lo=$ac_mid; break
19785else
19786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019787sed 's/^/| /' conftest.$ac_ext >&5
19788
Martin v. Löwis11437992002-04-12 09:54:03 +000019789ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019790 if test $ac_mid -le $ac_hi; then
19791 ac_lo= ac_hi=
19792 break
19793 fi
19794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019795fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019797 done
19798else
19799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019800sed 's/^/| /' conftest.$ac_ext >&5
19801
Martin v. Löwis11437992002-04-12 09:54:03 +000019802ac_lo= ac_hi=
19803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019807# Binary search between lo and hi bounds.
19808while test "x$ac_lo" != "x$ac_hi"; do
19809 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019811/* confdefs.h. */
19812_ACEOF
19813cat confdefs.h >>conftest.$ac_ext
19814cat >>conftest.$ac_ext <<_ACEOF
19815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019816#include <wchar.h>
19817
Martin v. Löwis11437992002-04-12 09:54:03 +000019818int
19819main ()
19820{
19821static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19822test_array [0] = 0
19823
19824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext
19829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019830 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19836 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019837 { ac_try='test -z "$ac_c_werror_flag"
19838 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19840 (eval $ac_try) 2>&5
19841 ac_status=$?
19842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19843 (exit $ac_status); }; } &&
19844 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19846 (eval $ac_try) 2>&5
19847 ac_status=$?
19848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19849 (exit $ac_status); }; }; then
19850 ac_hi=$ac_mid
19851else
19852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019853sed 's/^/| /' conftest.$ac_ext >&5
19854
Martin v. Löwis11437992002-04-12 09:54:03 +000019855ac_lo=`expr '(' $ac_mid ')' + 1`
19856fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019857rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019858done
19859case $ac_lo in
19860?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019861'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19862See \`config.log' for more details." >&5
19863echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19864See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 { (exit 1); exit 1; }; } ;;
19866esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019867else
19868 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019869 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19870See \`config.log' for more details." >&5
19871echo "$as_me: error: cannot run test program while cross compiling
19872See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019874else
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019876/* confdefs.h. */
19877_ACEOF
19878cat confdefs.h >>conftest.$ac_ext
19879cat >>conftest.$ac_ext <<_ACEOF
19880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019881#include <wchar.h>
19882
19883long longval () { return (long) (sizeof (wchar_t)); }
19884unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019886#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019887int
19888main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019889{
Martin v. Löwis11437992002-04-12 09:54:03 +000019890
19891 FILE *f = fopen ("conftest.val", "w");
19892 if (! f)
19893 exit (1);
19894 if (((long) (sizeof (wchar_t))) < 0)
19895 {
19896 long i = longval ();
19897 if (i != ((long) (sizeof (wchar_t))))
19898 exit (1);
19899 fprintf (f, "%ld\n", i);
19900 }
19901 else
19902 {
19903 unsigned long i = ulongval ();
19904 if (i != ((long) (sizeof (wchar_t))))
19905 exit (1);
19906 fprintf (f, "%lu\n", i);
19907 }
19908 exit (ferror (f) || fclose (f) != 0);
19909
19910 ;
19911 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019912}
Martin v. Löwis11437992002-04-12 09:54:03 +000019913_ACEOF
19914rm -f conftest$ac_exeext
19915if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19916 (eval $ac_link) 2>&5
19917 ac_status=$?
19918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19921 (eval $ac_try) 2>&5
19922 ac_status=$?
19923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924 (exit $ac_status); }; }; then
19925 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019926else
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 echo "$as_me: program exited with status $ac_status" >&5
19928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019929sed 's/^/| /' conftest.$ac_ext >&5
19930
Martin v. Löwis11437992002-04-12 09:54:03 +000019931( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019932{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19933See \`config.log' for more details." >&5
19934echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19935See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 { (exit 1); exit 1; }; }
19937fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938rm -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 +000019939fi
19940fi
19941rm -f conftest.val
19942else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019943 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019944fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019946echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19947echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19948cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019949#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019950_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019951
Michael W. Hudson54241132001-12-07 15:38:26 +000019952
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019953fi
19954
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019955echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19956echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19957have_ucs4_tcl=no
19958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019959/* confdefs.h. */
19960_ACEOF
19961cat confdefs.h >>conftest.$ac_ext
19962cat >>conftest.$ac_ext <<_ACEOF
19963/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019964
19965#include <tcl.h>
19966#if TCL_UTF_MAX != 6
19967# error "NOT UCS4_TCL"
19968#endif
19969int
19970main ()
19971{
19972
19973 ;
19974 return 0;
19975}
19976_ACEOF
19977rm -f conftest.$ac_objext
19978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019979 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019981 grep -v '^ *+' conftest.er1 >conftest.err
19982 rm -f conftest.er1
19983 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19985 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019986 { ac_try='test -z "$ac_c_werror_flag"
19987 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19989 (eval $ac_try) 2>&5
19990 ac_status=$?
19991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19992 (exit $ac_status); }; } &&
19993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19995 (eval $ac_try) 2>&5
19996 ac_status=$?
19997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19998 (exit $ac_status); }; }; then
19999
20000
20001cat >>confdefs.h <<\_ACEOF
20002#define HAVE_UCS4_TCL 1
20003_ACEOF
20004
20005 have_ucs4_tcl=yes
20006
20007else
20008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020009sed 's/^/| /' conftest.$ac_ext >&5
20010
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020011fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020013echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20014echo "${ECHO_T}$have_ucs4_tcl" >&6
20015
Skip Montanaro6dead952003-09-25 14:50:04 +000020016# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020017if test "$wchar_h" = yes
20018then
20019 # check whether wchar_t is signed or not
20020 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20021echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
20022 if test "${ac_cv_wchar_t_signed+set}" = set; then
20023 echo $ECHO_N "(cached) $ECHO_C" >&6
20024else
20025
20026 if test "$cross_compiling" = yes; then
20027 ac_cv_wchar_t_signed=yes
20028else
20029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020030/* confdefs.h. */
20031_ACEOF
20032cat confdefs.h >>conftest.$ac_ext
20033cat >>conftest.$ac_ext <<_ACEOF
20034/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020035
20036 #include <wchar.h>
20037 int main()
20038 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000020039 /* Success: exit code 0 */
20040 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020041 }
20042
20043_ACEOF
20044rm -f conftest$ac_exeext
20045if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20046 (eval $ac_link) 2>&5
20047 ac_status=$?
20048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20050 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20051 (eval $ac_try) 2>&5
20052 ac_status=$?
20053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20054 (exit $ac_status); }; }; then
20055 ac_cv_wchar_t_signed=yes
20056else
20057 echo "$as_me: program exited with status $ac_status" >&5
20058echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020059sed 's/^/| /' conftest.$ac_ext >&5
20060
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020061( exit $ac_status )
20062ac_cv_wchar_t_signed=no
20063fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020065fi
20066fi
20067
20068 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20069echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
20070fi
20071
Martin v. Löwis11437992002-04-12 09:54:03 +000020072echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20073echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020074# Check whether --enable-unicode or --disable-unicode was given.
20075if test "${enable_unicode+set}" = set; then
20076 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000020077
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020078else
20079 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000020080fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020081
20082if test $enable_unicode = yes
20083then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020084 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020085 case "$have_ucs4_tcl" in
20086 yes) enable_unicode="ucs4"
20087 ;;
20088 *) enable_unicode="ucs2"
20089 ;;
20090 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020091fi
20092
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020093
20094
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020095case "$enable_unicode" in
20096ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020098#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020099_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020100
20101 ;;
20102ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020103 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020104#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020105_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020106
20107 ;;
20108esac
20109
Michael W. Hudson54241132001-12-07 15:38:26 +000020110
Martin v. Löwis11437992002-04-12 09:54:03 +000020111
20112
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020113
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020114if test "$enable_unicode" = "no"
20115then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020116 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000020117 echo "$as_me:$LINENO: result: not used" >&5
20118echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020119else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020120 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020121
20122cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020123#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020125
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020126
20127 # wchar_t is only usable if it maps to an unsigned type
20128 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020129 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020130 then
20131 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020132
Martin v. Löwis11437992002-04-12 09:54:03 +000020133cat >>confdefs.h <<\_ACEOF
20134#define HAVE_USABLE_WCHAR_T 1
20135_ACEOF
20136
20137 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020138#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020139_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020140
20141 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20142 then
20143 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020145#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020146_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020147
20148 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20149 then
20150 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020151 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020152#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020153_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020154
20155 else
20156 PY_UNICODE_TYPE="no type found"
20157 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020158 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20159echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020160fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020161
20162# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020163echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20164echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
20165if test "${ac_cv_c_bigendian+set}" = set; then
20166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020167else
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 # See if sys/param.h defines the BYTE_ORDER macro.
20169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020170/* confdefs.h. */
20171_ACEOF
20172cat confdefs.h >>conftest.$ac_ext
20173cat >>conftest.$ac_ext <<_ACEOF
20174/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020175#include <sys/types.h>
20176#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020177
Martin v. Löwis11437992002-04-12 09:54:03 +000020178int
20179main ()
20180{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020181#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20182 bogus endian macros
20183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020184
20185 ;
20186 return 0;
20187}
20188_ACEOF
20189rm -f conftest.$ac_objext
20190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020191 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20197 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020198 { ac_try='test -z "$ac_c_werror_flag"
20199 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20201 (eval $ac_try) 2>&5
20202 ac_status=$?
20203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20204 (exit $ac_status); }; } &&
20205 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20207 (eval $ac_try) 2>&5
20208 ac_status=$?
20209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20210 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020211 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000020212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020213/* confdefs.h. */
20214_ACEOF
20215cat confdefs.h >>conftest.$ac_ext
20216cat >>conftest.$ac_ext <<_ACEOF
20217/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020218#include <sys/types.h>
20219#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020220
Martin v. Löwis11437992002-04-12 09:54:03 +000020221int
20222main ()
20223{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020224#if BYTE_ORDER != BIG_ENDIAN
20225 not big endian
20226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020227
20228 ;
20229 return 0;
20230}
20231_ACEOF
20232rm -f conftest.$ac_objext
20233if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020234 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020236 grep -v '^ *+' conftest.er1 >conftest.err
20237 rm -f conftest.er1
20238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20240 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020241 { ac_try='test -z "$ac_c_werror_flag"
20242 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20244 (eval $ac_try) 2>&5
20245 ac_status=$?
20246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20247 (exit $ac_status); }; } &&
20248 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20250 (eval $ac_try) 2>&5
20251 ac_status=$?
20252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20253 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020254 ac_cv_c_bigendian=yes
20255else
Martin v. Löwis11437992002-04-12 09:54:03 +000020256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020257sed 's/^/| /' conftest.$ac_ext >&5
20258
Martin v. Löwis11437992002-04-12 09:54:03 +000020259ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020260fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020261rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020262else
Martin v. Löwis11437992002-04-12 09:54:03 +000020263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020264sed 's/^/| /' conftest.$ac_ext >&5
20265
Martin v. Löwis11437992002-04-12 09:54:03 +000020266# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000020267if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020268 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000020269 ac_cv_c_bigendian=unknown
20270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020271/* confdefs.h. */
20272_ACEOF
20273cat confdefs.h >>conftest.$ac_ext
20274cat >>conftest.$ac_ext <<_ACEOF
20275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020276short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20277short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20278void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
20279short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20280short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20281void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020282int
20283main ()
20284{
20285 _ascii (); _ebcdic ();
20286 ;
20287 return 0;
20288}
20289_ACEOF
20290rm -f conftest.$ac_objext
20291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020292 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020294 grep -v '^ *+' conftest.er1 >conftest.err
20295 rm -f conftest.er1
20296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20298 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020299 { ac_try='test -z "$ac_c_werror_flag"
20300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20302 (eval $ac_try) 2>&5
20303 ac_status=$?
20304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20305 (exit $ac_status); }; } &&
20306 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20308 (eval $ac_try) 2>&5
20309 ac_status=$?
20310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20311 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020312 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020313 ac_cv_c_bigendian=yes
20314fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020315if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 if test "$ac_cv_c_bigendian" = unknown; then
20317 ac_cv_c_bigendian=no
20318 else
20319 # finding both strings is unlikely to happen, but who knows?
20320 ac_cv_c_bigendian=unknown
20321 fi
20322fi
20323else
20324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020325sed 's/^/| /' conftest.$ac_ext >&5
20326
Martin v. Löwis11437992002-04-12 09:54:03 +000020327fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020328rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020329else
20330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020331/* confdefs.h. */
20332_ACEOF
20333cat confdefs.h >>conftest.$ac_ext
20334cat >>conftest.$ac_ext <<_ACEOF
20335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020336int
20337main ()
20338{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020339 /* Are we little or big endian? From Harbison&Steele. */
20340 union
20341 {
20342 long l;
20343 char c[sizeof (long)];
20344 } u;
20345 u.l = 1;
20346 exit (u.c[sizeof (long) - 1] == 1);
20347}
Martin v. Löwis11437992002-04-12 09:54:03 +000020348_ACEOF
20349rm -f conftest$ac_exeext
20350if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20351 (eval $ac_link) 2>&5
20352 ac_status=$?
20353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20354 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20356 (eval $ac_try) 2>&5
20357 ac_status=$?
20358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20359 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020360 ac_cv_c_bigendian=no
20361else
Martin v. Löwis11437992002-04-12 09:54:03 +000020362 echo "$as_me: program exited with status $ac_status" >&5
20363echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020364sed 's/^/| /' conftest.$ac_ext >&5
20365
Martin v. Löwis11437992002-04-12 09:54:03 +000020366( exit $ac_status )
20367ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000020368fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020369rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020370fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020371fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020373fi
20374echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
20375echo "${ECHO_T}$ac_cv_c_bigendian" >&6
20376case $ac_cv_c_bigendian in
20377 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000020378
Martin v. Löwis11437992002-04-12 09:54:03 +000020379cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020380#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020381_ACEOF
20382 ;;
20383 no)
20384 ;;
20385 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020386 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020387presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020388echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020389presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
20390 { (exit 1); exit 1; }; } ;;
20391esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000020392
Michael W. Hudson54241132001-12-07 15:38:26 +000020393
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020394# Check whether right shifting a negative integer extends the sign bit
20395# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000020396echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
20397echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
20398if test "${ac_cv_rshift_extends_sign+set}" = set; then
20399 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020400else
Martin v. Löwis11437992002-04-12 09:54:03 +000020401
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020402if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020403 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020404else
Martin v. Löwis11437992002-04-12 09:54:03 +000020405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020406/* confdefs.h. */
20407_ACEOF
20408cat confdefs.h >>conftest.$ac_ext
20409cat >>conftest.$ac_ext <<_ACEOF
20410/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020411
20412int main()
20413{
Vladimir Marangozova6180282000-07-12 05:05:06 +000020414 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020415}
20416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417_ACEOF
20418rm -f conftest$ac_exeext
20419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20420 (eval $ac_link) 2>&5
20421 ac_status=$?
20422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20425 (eval $ac_try) 2>&5
20426 ac_status=$?
20427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20428 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000020429 ac_cv_rshift_extends_sign=yes
20430else
Martin v. Löwis11437992002-04-12 09:54:03 +000020431 echo "$as_me: program exited with status $ac_status" >&5
20432echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020433sed 's/^/| /' conftest.$ac_ext >&5
20434
Martin v. Löwis11437992002-04-12 09:54:03 +000020435( exit $ac_status )
20436ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000020437fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020438rm -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 +000020439fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000020440fi
20441
Martin v. Löwis11437992002-04-12 09:54:03 +000020442echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
20443echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020444if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020445then
Martin v. Löwis11437992002-04-12 09:54:03 +000020446
20447cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020448#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020449_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020450
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020451fi
20452
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020453# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020454echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
20455echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
20456if test "${ac_cv_have_getc_unlocked+set}" = set; then
20457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020458else
Martin v. Löwis11437992002-04-12 09:54:03 +000020459
20460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020461/* confdefs.h. */
20462_ACEOF
20463cat confdefs.h >>conftest.$ac_ext
20464cat >>conftest.$ac_ext <<_ACEOF
20465/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020467int
20468main ()
20469{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020470
20471 FILE *f = fopen("/dev/null", "r");
20472 flockfile(f);
20473 getc_unlocked(f);
20474 funlockfile(f);
20475
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 ;
20477 return 0;
20478}
20479_ACEOF
20480rm -f conftest.$ac_objext conftest$ac_exeext
20481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020482 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020484 grep -v '^ *+' conftest.er1 >conftest.err
20485 rm -f conftest.er1
20486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20488 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020489 { ac_try='test -z "$ac_c_werror_flag"
20490 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20492 (eval $ac_try) 2>&5
20493 ac_status=$?
20494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20495 (exit $ac_status); }; } &&
20496 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20498 (eval $ac_try) 2>&5
20499 ac_status=$?
20500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20501 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020502 ac_cv_have_getc_unlocked=yes
20503else
Martin v. Löwis11437992002-04-12 09:54:03 +000020504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020505sed 's/^/| /' conftest.$ac_ext >&5
20506
Martin v. Löwis11437992002-04-12 09:54:03 +000020507ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020508fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020509rm -f conftest.err conftest.$ac_objext \
20510 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020511fi
20512
Martin v. Löwis11437992002-04-12 09:54:03 +000020513echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
20514echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020515if test "$ac_cv_have_getc_unlocked" = yes
20516then
Martin v. Löwis11437992002-04-12 09:54:03 +000020517
20518cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020519#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020520_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020521
20522fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020523
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020524# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000020525# save the value of LIBS so we don't actually link Python with readline
20526LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020527
20528echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
20529echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
20530if test "${ac_cv_lib_readline_readline+set}" = set; then
20531 echo $ECHO_N "(cached) $ECHO_C" >&6
20532else
20533 ac_check_lib_save_LIBS=$LIBS
20534LIBS="-lreadline $LIBS"
20535cat >conftest.$ac_ext <<_ACEOF
20536/* confdefs.h. */
20537_ACEOF
20538cat confdefs.h >>conftest.$ac_ext
20539cat >>conftest.$ac_ext <<_ACEOF
20540/* end confdefs.h. */
20541
20542/* Override any gcc2 internal prototype to avoid an error. */
20543#ifdef __cplusplus
20544extern "C"
20545#endif
20546/* We use char because int might match the return type of a gcc2
20547 builtin and then its argument prototype would still apply. */
20548char readline ();
20549int
20550main ()
20551{
20552readline ();
20553 ;
20554 return 0;
20555}
20556_ACEOF
20557rm -f conftest.$ac_objext conftest$ac_exeext
20558if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20559 (eval $ac_link) 2>conftest.er1
20560 ac_status=$?
20561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
20564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20565 (exit $ac_status); } &&
20566 { ac_try='test -z "$ac_c_werror_flag"
20567 || test ! -s conftest.err'
20568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20569 (eval $ac_try) 2>&5
20570 ac_status=$?
20571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20572 (exit $ac_status); }; } &&
20573 { ac_try='test -s conftest$ac_exeext'
20574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20575 (eval $ac_try) 2>&5
20576 ac_status=$?
20577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20578 (exit $ac_status); }; }; then
20579 ac_cv_lib_readline_readline=yes
20580else
20581 echo "$as_me: failed program was:" >&5
20582sed 's/^/| /' conftest.$ac_ext >&5
20583
20584ac_cv_lib_readline_readline=no
20585fi
20586rm -f conftest.err conftest.$ac_objext \
20587 conftest$ac_exeext conftest.$ac_ext
20588LIBS=$ac_check_lib_save_LIBS
20589fi
20590echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
20591echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
20592if test $ac_cv_lib_readline_readline = yes; then
20593 cat >>confdefs.h <<_ACEOF
20594#define HAVE_LIBREADLINE 1
20595_ACEOF
20596
20597 LIBS="-lreadline $LIBS"
20598
20599fi
20600
20601if test "$ac_cv_have_readline_readline" = no
20602then
20603
20604echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
20605echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
20606if test "${ac_cv_lib_termcap_readline+set}" = set; then
20607 echo $ECHO_N "(cached) $ECHO_C" >&6
20608else
20609 ac_check_lib_save_LIBS=$LIBS
20610LIBS="-ltermcap $LIBS"
20611cat >conftest.$ac_ext <<_ACEOF
20612/* confdefs.h. */
20613_ACEOF
20614cat confdefs.h >>conftest.$ac_ext
20615cat >>conftest.$ac_ext <<_ACEOF
20616/* end confdefs.h. */
20617
20618/* Override any gcc2 internal prototype to avoid an error. */
20619#ifdef __cplusplus
20620extern "C"
20621#endif
20622/* We use char because int might match the return type of a gcc2
20623 builtin and then its argument prototype would still apply. */
20624char readline ();
20625int
20626main ()
20627{
20628readline ();
20629 ;
20630 return 0;
20631}
20632_ACEOF
20633rm -f conftest.$ac_objext conftest$ac_exeext
20634if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20635 (eval $ac_link) 2>conftest.er1
20636 ac_status=$?
20637 grep -v '^ *+' conftest.er1 >conftest.err
20638 rm -f conftest.er1
20639 cat conftest.err >&5
20640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20641 (exit $ac_status); } &&
20642 { ac_try='test -z "$ac_c_werror_flag"
20643 || test ! -s conftest.err'
20644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20645 (eval $ac_try) 2>&5
20646 ac_status=$?
20647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20648 (exit $ac_status); }; } &&
20649 { ac_try='test -s conftest$ac_exeext'
20650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20651 (eval $ac_try) 2>&5
20652 ac_status=$?
20653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20654 (exit $ac_status); }; }; then
20655 ac_cv_lib_termcap_readline=yes
20656else
20657 echo "$as_me: failed program was:" >&5
20658sed 's/^/| /' conftest.$ac_ext >&5
20659
20660ac_cv_lib_termcap_readline=no
20661fi
20662rm -f conftest.err conftest.$ac_objext \
20663 conftest$ac_exeext conftest.$ac_ext
20664LIBS=$ac_check_lib_save_LIBS
20665fi
20666echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
20667echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
20668if test $ac_cv_lib_termcap_readline = yes; then
20669 cat >>confdefs.h <<_ACEOF
20670#define HAVE_LIBTERMCAP 1
20671_ACEOF
20672
20673 LIBS="-ltermcap $LIBS"
20674
20675fi
20676
20677fi
20678
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020679# check for readline 2.1
20680echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20681echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20682if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20683 echo $ECHO_N "(cached) $ECHO_C" >&6
20684else
20685 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020686LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020687cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020688/* confdefs.h. */
20689_ACEOF
20690cat confdefs.h >>conftest.$ac_ext
20691cat >>conftest.$ac_ext <<_ACEOF
20692/* end confdefs.h. */
20693
20694/* Override any gcc2 internal prototype to avoid an error. */
20695#ifdef __cplusplus
20696extern "C"
20697#endif
20698/* We use char because int might match the return type of a gcc2
20699 builtin and then its argument prototype would still apply. */
20700char rl_callback_handler_install ();
20701int
20702main ()
20703{
20704rl_callback_handler_install ();
20705 ;
20706 return 0;
20707}
20708_ACEOF
20709rm -f conftest.$ac_objext conftest$ac_exeext
20710if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020711 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020713 grep -v '^ *+' conftest.er1 >conftest.err
20714 rm -f conftest.er1
20715 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20717 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020718 { ac_try='test -z "$ac_c_werror_flag"
20719 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20721 (eval $ac_try) 2>&5
20722 ac_status=$?
20723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20724 (exit $ac_status); }; } &&
20725 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20727 (eval $ac_try) 2>&5
20728 ac_status=$?
20729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20730 (exit $ac_status); }; }; then
20731 ac_cv_lib_readline_rl_callback_handler_install=yes
20732else
20733 echo "$as_me: failed program was:" >&5
20734sed 's/^/| /' conftest.$ac_ext >&5
20735
20736ac_cv_lib_readline_rl_callback_handler_install=no
20737fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020738rm -f conftest.err conftest.$ac_objext \
20739 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020740LIBS=$ac_check_lib_save_LIBS
20741fi
20742echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20743echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20744if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20745
20746cat >>confdefs.h <<\_ACEOF
20747#define HAVE_RL_CALLBACK 1
20748_ACEOF
20749
20750fi
20751
20752
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020753# check for readline 2.2
20754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020755/* confdefs.h. */
20756_ACEOF
20757cat confdefs.h >>conftest.$ac_ext
20758cat >>conftest.$ac_ext <<_ACEOF
20759/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020760#include <readline/readline.h>
20761_ACEOF
20762if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20763 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20764 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020765 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020766 rm -f conftest.er1
20767 cat conftest.err >&5
20768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20769 (exit $ac_status); } >/dev/null; then
20770 if test -s conftest.err; then
20771 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020772 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020773 else
20774 ac_cpp_err=
20775 fi
20776else
20777 ac_cpp_err=yes
20778fi
20779if test -z "$ac_cpp_err"; then
20780 have_readline=yes
20781else
20782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020783sed 's/^/| /' conftest.$ac_ext >&5
20784
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020785 have_readline=no
20786fi
20787rm -f conftest.err conftest.$ac_ext
20788if test $have_readline = yes
20789then
20790 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020791/* confdefs.h. */
20792_ACEOF
20793cat confdefs.h >>conftest.$ac_ext
20794cat >>conftest.$ac_ext <<_ACEOF
20795/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020796#include <readline/readline.h>
20797
20798_ACEOF
20799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020800 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020801
20802cat >>confdefs.h <<\_ACEOF
20803#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20804_ACEOF
20805
20806fi
20807rm -f conftest*
20808
20809fi
20810
Martin v. Löwis0daad592001-09-30 21:09:59 +000020811# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020812echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20813echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20814if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020816else
Martin v. Löwis11437992002-04-12 09:54:03 +000020817 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020818LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020820/* confdefs.h. */
20821_ACEOF
20822cat confdefs.h >>conftest.$ac_ext
20823cat >>conftest.$ac_ext <<_ACEOF
20824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
Guido van Rossum353ae582001-07-10 16:45:32 +000020826/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020827#ifdef __cplusplus
20828extern "C"
20829#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020830/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020831 builtin and then its argument prototype would still apply. */
20832char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020833int
20834main ()
20835{
20836rl_pre_input_hook ();
20837 ;
20838 return 0;
20839}
20840_ACEOF
20841rm -f conftest.$ac_objext conftest$ac_exeext
20842if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020843 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020845 grep -v '^ *+' conftest.er1 >conftest.err
20846 rm -f conftest.er1
20847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20849 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020850 { ac_try='test -z "$ac_c_werror_flag"
20851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20853 (eval $ac_try) 2>&5
20854 ac_status=$?
20855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20856 (exit $ac_status); }; } &&
20857 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20859 (eval $ac_try) 2>&5
20860 ac_status=$?
20861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20862 (exit $ac_status); }; }; then
20863 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020864else
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020866sed 's/^/| /' conftest.$ac_ext >&5
20867
Martin v. Löwis11437992002-04-12 09:54:03 +000020868ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020870rm -f conftest.err conftest.$ac_objext \
20871 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020872LIBS=$ac_check_lib_save_LIBS
20873fi
20874echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20875echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20876if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020877
Martin v. Löwis11437992002-04-12 09:54:03 +000020878cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020879#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020881
Martin v. Löwis0daad592001-09-30 21:09:59 +000020882fi
20883
Michael W. Hudson54241132001-12-07 15:38:26 +000020884
Martin v. Löwis0daad592001-09-30 21:09:59 +000020885# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020886echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20887echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20888if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020890else
Martin v. Löwis11437992002-04-12 09:54:03 +000020891 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020892LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020894/* confdefs.h. */
20895_ACEOF
20896cat confdefs.h >>conftest.$ac_ext
20897cat >>conftest.$ac_ext <<_ACEOF
20898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020899
Martin v. Löwis0daad592001-09-30 21:09:59 +000020900/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020901#ifdef __cplusplus
20902extern "C"
20903#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020904/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020905 builtin and then its argument prototype would still apply. */
20906char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020907int
20908main ()
20909{
20910rl_completion_matches ();
20911 ;
20912 return 0;
20913}
20914_ACEOF
20915rm -f conftest.$ac_objext conftest$ac_exeext
20916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020917 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020919 grep -v '^ *+' conftest.er1 >conftest.err
20920 rm -f conftest.er1
20921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20923 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020924 { ac_try='test -z "$ac_c_werror_flag"
20925 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20927 (eval $ac_try) 2>&5
20928 ac_status=$?
20929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20930 (exit $ac_status); }; } &&
20931 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20933 (eval $ac_try) 2>&5
20934 ac_status=$?
20935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20936 (exit $ac_status); }; }; then
20937 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020938else
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020940sed 's/^/| /' conftest.$ac_ext >&5
20941
Martin v. Löwis11437992002-04-12 09:54:03 +000020942ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020943fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020944rm -f conftest.err conftest.$ac_objext \
20945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020946LIBS=$ac_check_lib_save_LIBS
20947fi
20948echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20949echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20950if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020951
Martin v. Löwis11437992002-04-12 09:54:03 +000020952cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020953#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020954_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020955
Guido van Rossum353ae582001-07-10 16:45:32 +000020956fi
20957
Jack Jansendd19cf82001-12-06 22:36:17 +000020958
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020959# also in readline 4.2
20960cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020961/* confdefs.h. */
20962_ACEOF
20963cat confdefs.h >>conftest.$ac_ext
20964cat >>conftest.$ac_ext <<_ACEOF
20965/* end confdefs.h. */
20966#include <readline/readline.h>
20967_ACEOF
20968if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20969 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20970 ac_status=$?
20971 grep -v '^ *+' conftest.er1 >conftest.err
20972 rm -f conftest.er1
20973 cat conftest.err >&5
20974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20975 (exit $ac_status); } >/dev/null; then
20976 if test -s conftest.err; then
20977 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020978 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020979 else
20980 ac_cpp_err=
20981 fi
20982else
20983 ac_cpp_err=yes
20984fi
20985if test -z "$ac_cpp_err"; then
20986 have_readline=yes
20987else
20988 echo "$as_me: failed program was:" >&5
20989sed 's/^/| /' conftest.$ac_ext >&5
20990
20991 have_readline=no
20992fi
20993rm -f conftest.err conftest.$ac_ext
20994if test $have_readline = yes
20995then
20996 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020997/* confdefs.h. */
20998_ACEOF
20999cat confdefs.h >>conftest.$ac_ext
21000cat >>conftest.$ac_ext <<_ACEOF
21001/* end confdefs.h. */
21002#include <readline/readline.h>
21003
21004_ACEOF
21005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21006 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
21007
21008cat >>confdefs.h <<\_ACEOF
21009#define HAVE_RL_CATCH_SIGNAL 1
21010_ACEOF
21011
21012fi
21013rm -f conftest*
21014
21015fi
21016
Martin v. Löwis82bca632006-02-10 20:49:30 +000021017# End of readline checks: restore LIBS
21018LIBS=$LIBS_no_readline
21019
Martin v. Löwis11437992002-04-12 09:54:03 +000021020echo "$as_me:$LINENO: checking for broken nice()" >&5
21021echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
21022if test "${ac_cv_broken_nice+set}" = set; then
21023 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021024else
Martin v. Löwis11437992002-04-12 09:54:03 +000021025
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021026if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021027 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021028else
Martin v. Löwis11437992002-04-12 09:54:03 +000021029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021030/* confdefs.h. */
21031_ACEOF
21032cat confdefs.h >>conftest.$ac_ext
21033cat >>conftest.$ac_ext <<_ACEOF
21034/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021035
21036int main()
21037{
21038 int val1 = nice(1);
21039 if (val1 != -1 && val1 == nice(2))
21040 exit(0);
21041 exit(1);
21042}
21043
Martin v. Löwis11437992002-04-12 09:54:03 +000021044_ACEOF
21045rm -f conftest$ac_exeext
21046if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21047 (eval $ac_link) 2>&5
21048 ac_status=$?
21049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21050 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21052 (eval $ac_try) 2>&5
21053 ac_status=$?
21054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21055 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021056 ac_cv_broken_nice=yes
21057else
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 echo "$as_me: program exited with status $ac_status" >&5
21059echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021060sed 's/^/| /' conftest.$ac_ext >&5
21061
Martin v. Löwis11437992002-04-12 09:54:03 +000021062( exit $ac_status )
21063ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021064fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021065rm -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 +000021066fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021067fi
21068
Martin v. Löwis11437992002-04-12 09:54:03 +000021069echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21070echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021071if test "$ac_cv_broken_nice" = yes
21072then
Martin v. Löwis11437992002-04-12 09:54:03 +000021073
21074cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021075#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021076_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021077
21078fi
21079
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021080echo "$as_me:$LINENO: checking for broken poll()" >&5
21081echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
21082if test "$cross_compiling" = yes; then
21083 ac_cv_broken_poll=no
21084else
21085 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021086/* confdefs.h. */
21087_ACEOF
21088cat confdefs.h >>conftest.$ac_ext
21089cat >>conftest.$ac_ext <<_ACEOF
21090/* end confdefs.h. */
21091
21092#include <poll.h>
21093
21094int main (void)
21095 {
21096 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21097
21098 close (42);
21099
21100 int poll_test = poll (&poll_struct, 1, 0);
21101
21102 if (poll_test < 0)
21103 {
21104 exit(0);
21105 }
21106 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21107 {
21108 exit(0);
21109 }
21110 else
21111 {
21112 exit(1);
21113 }
21114 }
21115
21116_ACEOF
21117rm -f conftest$ac_exeext
21118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21119 (eval $ac_link) 2>&5
21120 ac_status=$?
21121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21124 (eval $ac_try) 2>&5
21125 ac_status=$?
21126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21127 (exit $ac_status); }; }; then
21128 ac_cv_broken_poll=yes
21129else
21130 echo "$as_me: program exited with status $ac_status" >&5
21131echo "$as_me: failed program was:" >&5
21132sed 's/^/| /' conftest.$ac_ext >&5
21133
21134( exit $ac_status )
21135ac_cv_broken_poll=no
21136fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021137rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021138fi
21139echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21140echo "${ECHO_T}$ac_cv_broken_poll" >&6
21141if test "$ac_cv_broken_poll" = yes
21142then
21143
21144cat >>confdefs.h <<\_ACEOF
21145#define HAVE_BROKEN_POLL 1
21146_ACEOF
21147
21148fi
21149
Brett Cannon43802422005-02-10 20:48:03 +000021150# 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 +000021151# (which is not required by ISO C or UNIX spec) and/or if we support
21152# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000021153echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21154echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
21155if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21156 echo $ECHO_N "(cached) $ECHO_C" >&6
21157else
21158 cat >conftest.$ac_ext <<_ACEOF
21159/* confdefs.h. */
21160_ACEOF
21161cat confdefs.h >>conftest.$ac_ext
21162cat >>conftest.$ac_ext <<_ACEOF
21163/* end confdefs.h. */
21164#include <sys/types.h>
21165#include <$ac_cv_struct_tm>
21166
21167
21168int
21169main ()
21170{
21171static struct tm ac_aggr;
21172if (ac_aggr.tm_zone)
21173return 0;
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
21179if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21180 (eval $ac_compile) 2>conftest.er1
21181 ac_status=$?
21182 grep -v '^ *+' conftest.er1 >conftest.err
21183 rm -f conftest.er1
21184 cat conftest.err >&5
21185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21186 (exit $ac_status); } &&
21187 { ac_try='test -z "$ac_c_werror_flag"
21188 || test ! -s conftest.err'
21189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21190 (eval $ac_try) 2>&5
21191 ac_status=$?
21192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21193 (exit $ac_status); }; } &&
21194 { ac_try='test -s conftest.$ac_objext'
21195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21196 (eval $ac_try) 2>&5
21197 ac_status=$?
21198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21199 (exit $ac_status); }; }; then
21200 ac_cv_member_struct_tm_tm_zone=yes
21201else
21202 echo "$as_me: failed program was:" >&5
21203sed 's/^/| /' conftest.$ac_ext >&5
21204
21205cat >conftest.$ac_ext <<_ACEOF
21206/* confdefs.h. */
21207_ACEOF
21208cat confdefs.h >>conftest.$ac_ext
21209cat >>conftest.$ac_ext <<_ACEOF
21210/* end confdefs.h. */
21211#include <sys/types.h>
21212#include <$ac_cv_struct_tm>
21213
21214
21215int
21216main ()
21217{
21218static struct tm ac_aggr;
21219if (sizeof ac_aggr.tm_zone)
21220return 0;
21221 ;
21222 return 0;
21223}
21224_ACEOF
21225rm -f conftest.$ac_objext
21226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21227 (eval $ac_compile) 2>conftest.er1
21228 ac_status=$?
21229 grep -v '^ *+' conftest.er1 >conftest.err
21230 rm -f conftest.er1
21231 cat conftest.err >&5
21232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21233 (exit $ac_status); } &&
21234 { ac_try='test -z "$ac_c_werror_flag"
21235 || test ! -s conftest.err'
21236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21237 (eval $ac_try) 2>&5
21238 ac_status=$?
21239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21240 (exit $ac_status); }; } &&
21241 { ac_try='test -s conftest.$ac_objext'
21242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21243 (eval $ac_try) 2>&5
21244 ac_status=$?
21245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21246 (exit $ac_status); }; }; then
21247 ac_cv_member_struct_tm_tm_zone=yes
21248else
21249 echo "$as_me: failed program was:" >&5
21250sed 's/^/| /' conftest.$ac_ext >&5
21251
21252ac_cv_member_struct_tm_tm_zone=no
21253fi
21254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21255fi
21256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21257fi
21258echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21259echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21260if test $ac_cv_member_struct_tm_tm_zone = yes; then
21261
21262cat >>confdefs.h <<_ACEOF
21263#define HAVE_STRUCT_TM_TM_ZONE 1
21264_ACEOF
21265
21266
21267fi
21268
21269if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21270
21271cat >>confdefs.h <<\_ACEOF
21272#define HAVE_TM_ZONE 1
21273_ACEOF
21274
21275else
21276 echo "$as_me:$LINENO: checking for tzname" >&5
21277echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21278if test "${ac_cv_var_tzname+set}" = set; then
21279 echo $ECHO_N "(cached) $ECHO_C" >&6
21280else
21281 cat >conftest.$ac_ext <<_ACEOF
21282/* confdefs.h. */
21283_ACEOF
21284cat confdefs.h >>conftest.$ac_ext
21285cat >>conftest.$ac_ext <<_ACEOF
21286/* end confdefs.h. */
21287#include <time.h>
21288#ifndef tzname /* For SGI. */
21289extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21290#endif
21291
21292int
21293main ()
21294{
21295atoi(*tzname);
21296 ;
21297 return 0;
21298}
21299_ACEOF
21300rm -f conftest.$ac_objext conftest$ac_exeext
21301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21302 (eval $ac_link) 2>conftest.er1
21303 ac_status=$?
21304 grep -v '^ *+' conftest.er1 >conftest.err
21305 rm -f conftest.er1
21306 cat conftest.err >&5
21307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21308 (exit $ac_status); } &&
21309 { ac_try='test -z "$ac_c_werror_flag"
21310 || test ! -s conftest.err'
21311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21312 (eval $ac_try) 2>&5
21313 ac_status=$?
21314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21315 (exit $ac_status); }; } &&
21316 { ac_try='test -s conftest$ac_exeext'
21317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21318 (eval $ac_try) 2>&5
21319 ac_status=$?
21320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21321 (exit $ac_status); }; }; then
21322 ac_cv_var_tzname=yes
21323else
21324 echo "$as_me: failed program was:" >&5
21325sed 's/^/| /' conftest.$ac_ext >&5
21326
21327ac_cv_var_tzname=no
21328fi
21329rm -f conftest.err conftest.$ac_objext \
21330 conftest$ac_exeext conftest.$ac_ext
21331fi
21332echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21333echo "${ECHO_T}$ac_cv_var_tzname" >&6
21334 if test $ac_cv_var_tzname = yes; then
21335
21336cat >>confdefs.h <<\_ACEOF
21337#define HAVE_TZNAME 1
21338_ACEOF
21339
21340 fi
21341fi
21342
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021343
Martin v. Löwis1d459062005-03-14 21:23:33 +000021344# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021345echo "$as_me:$LINENO: checking for working tzset()" >&5
21346echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
21347if test "${ac_cv_working_tzset+set}" = set; then
21348 echo $ECHO_N "(cached) $ECHO_C" >&6
21349else
21350
21351if test "$cross_compiling" = yes; then
21352 ac_cv_working_tzset=no
21353else
21354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021355/* confdefs.h. */
21356_ACEOF
21357cat confdefs.h >>conftest.$ac_ext
21358cat >>conftest.$ac_ext <<_ACEOF
21359/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021360
21361#include <stdlib.h>
21362#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000021363#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000021364
21365#if HAVE_TZNAME
21366extern char *tzname[];
21367#endif
21368
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021369int main()
21370{
Brett Cannon18367812003-09-19 00:59:16 +000021371 /* Note that we need to ensure that not only does tzset(3)
21372 do 'something' with localtime, but it works as documented
21373 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000021374 This includes making sure that tzname is set properly if
21375 tm->tm_zone does not exist since it is the alternative way
21376 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000021377
21378 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000021379 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000021380 */
21381
Martin v. Löwis1d459062005-03-14 21:23:33 +000021382 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000021383 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
21384
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021385 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021386 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021387 if (localtime(&groundhogday)->tm_hour != 0)
21388 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021389#if HAVE_TZNAME
21390 /* For UTC, tzname[1] is sometimes "", sometimes " " */
21391 if (strcmp(tzname[0], "UTC") ||
21392 (tzname[1][0] != 0 && tzname[1][0] != ' '))
21393 exit(1);
21394#endif
Brett Cannon18367812003-09-19 00:59:16 +000021395
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021396 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021397 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021398 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021399 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021400#if HAVE_TZNAME
21401 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
21402 exit(1);
21403#endif
Brett Cannon18367812003-09-19 00:59:16 +000021404
21405 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
21406 tzset();
21407 if (localtime(&groundhogday)->tm_hour != 11)
21408 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021409#if HAVE_TZNAME
21410 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
21411 exit(1);
21412#endif
21413
21414#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000021415 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
21416 exit(1);
21417 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
21418 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021419#endif
Brett Cannon18367812003-09-19 00:59:16 +000021420
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021421 exit(0);
21422}
21423
21424_ACEOF
21425rm -f conftest$ac_exeext
21426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21427 (eval $ac_link) 2>&5
21428 ac_status=$?
21429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21431 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21432 (eval $ac_try) 2>&5
21433 ac_status=$?
21434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21435 (exit $ac_status); }; }; then
21436 ac_cv_working_tzset=yes
21437else
21438 echo "$as_me: program exited with status $ac_status" >&5
21439echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021440sed 's/^/| /' conftest.$ac_ext >&5
21441
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021442( exit $ac_status )
21443ac_cv_working_tzset=no
21444fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021445rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021446fi
21447fi
21448
21449echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
21450echo "${ECHO_T}$ac_cv_working_tzset" >&6
21451if test "$ac_cv_working_tzset" = yes
21452then
21453
21454cat >>confdefs.h <<\_ACEOF
21455#define HAVE_WORKING_TZSET 1
21456_ACEOF
21457
21458fi
21459
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021460# Look for subsecond timestamps in struct stat
21461echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
21462echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
21463if test "${ac_cv_stat_tv_nsec+set}" = set; then
21464 echo $ECHO_N "(cached) $ECHO_C" >&6
21465else
21466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021472#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021473int
21474main ()
21475{
21476
21477struct stat st;
21478st.st_mtim.tv_nsec = 1;
21479
21480 ;
21481 return 0;
21482}
21483_ACEOF
21484rm -f conftest.$ac_objext
21485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021486 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021488 grep -v '^ *+' conftest.er1 >conftest.err
21489 rm -f conftest.er1
21490 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21492 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021493 { ac_try='test -z "$ac_c_werror_flag"
21494 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21496 (eval $ac_try) 2>&5
21497 ac_status=$?
21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21499 (exit $ac_status); }; } &&
21500 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021501 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21502 (eval $ac_try) 2>&5
21503 ac_status=$?
21504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21505 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000021506 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021507else
21508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021509sed 's/^/| /' conftest.$ac_ext >&5
21510
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021511ac_cv_stat_tv_nsec=no
21512fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021514fi
21515
21516echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
21517echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
21518if test "$ac_cv_stat_tv_nsec" = yes
21519then
21520
21521cat >>confdefs.h <<\_ACEOF
21522#define HAVE_STAT_TV_NSEC 1
21523_ACEOF
21524
21525fi
21526
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021527# Look for BSD style subsecond timestamps in struct stat
21528echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
21529echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
21530if test "${ac_cv_stat_tv_nsec2+set}" = set; then
21531 echo $ECHO_N "(cached) $ECHO_C" >&6
21532else
21533 cat >conftest.$ac_ext <<_ACEOF
21534/* confdefs.h. */
21535_ACEOF
21536cat confdefs.h >>conftest.$ac_ext
21537cat >>conftest.$ac_ext <<_ACEOF
21538/* end confdefs.h. */
21539#include <sys/stat.h>
21540int
21541main ()
21542{
21543
21544struct stat st;
21545st.st_mtimespec.tv_nsec = 1;
21546
21547 ;
21548 return 0;
21549}
21550_ACEOF
21551rm -f conftest.$ac_objext
21552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21553 (eval $ac_compile) 2>conftest.er1
21554 ac_status=$?
21555 grep -v '^ *+' conftest.er1 >conftest.err
21556 rm -f conftest.er1
21557 cat conftest.err >&5
21558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21559 (exit $ac_status); } &&
21560 { ac_try='test -z "$ac_c_werror_flag"
21561 || test ! -s conftest.err'
21562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21563 (eval $ac_try) 2>&5
21564 ac_status=$?
21565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21566 (exit $ac_status); }; } &&
21567 { ac_try='test -s conftest.$ac_objext'
21568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21569 (eval $ac_try) 2>&5
21570 ac_status=$?
21571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21572 (exit $ac_status); }; }; then
21573 ac_cv_stat_tv_nsec2=yes
21574else
21575 echo "$as_me: failed program was:" >&5
21576sed 's/^/| /' conftest.$ac_ext >&5
21577
21578ac_cv_stat_tv_nsec2=no
21579fi
21580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21581fi
21582
21583echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
21584echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
21585if test "$ac_cv_stat_tv_nsec2" = yes
21586then
21587
21588cat >>confdefs.h <<\_ACEOF
21589#define HAVE_STAT_TV_NSEC2 1
21590_ACEOF
21591
21592fi
21593
Jack Jansen666b1e72001-10-31 12:11:48 +000021594# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000021595echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
21596echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
21597if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
21598 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021599else
Martin v. Löwis11437992002-04-12 09:54:03 +000021600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021601/* confdefs.h. */
21602_ACEOF
21603cat confdefs.h >>conftest.$ac_ext
21604cat >>conftest.$ac_ext <<_ACEOF
21605/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021606#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021607int
21608main ()
21609{
Jack Jansen666b1e72001-10-31 12:11:48 +000021610
21611 int rtn;
21612 rtn = mvwdelch(0,0,0);
21613
Martin v. Löwis11437992002-04-12 09:54:03 +000021614 ;
21615 return 0;
21616}
21617_ACEOF
21618rm -f conftest.$ac_objext
21619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021620 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021622 grep -v '^ *+' conftest.er1 >conftest.err
21623 rm -f conftest.er1
21624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21626 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021627 { ac_try='test -z "$ac_c_werror_flag"
21628 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21630 (eval $ac_try) 2>&5
21631 ac_status=$?
21632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21633 (exit $ac_status); }; } &&
21634 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21636 (eval $ac_try) 2>&5
21637 ac_status=$?
21638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21639 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021640 ac_cv_mvwdelch_is_expression=yes
21641else
Martin v. Löwis11437992002-04-12 09:54:03 +000021642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021643sed 's/^/| /' conftest.$ac_ext >&5
21644
Martin v. Löwis11437992002-04-12 09:54:03 +000021645ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021646fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021647rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021648fi
21649
Martin v. Löwis11437992002-04-12 09:54:03 +000021650echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
21651echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021652
21653if test "$ac_cv_mvwdelch_is_expression" = yes
21654then
Martin v. Löwis11437992002-04-12 09:54:03 +000021655
21656cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021657#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021658_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021659
21660fi
21661
Martin v. Löwis11437992002-04-12 09:54:03 +000021662echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
21663echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
21664if test "${ac_cv_window_has_flags+set}" = set; then
21665 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021666else
Martin v. Löwis11437992002-04-12 09:54:03 +000021667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021668/* confdefs.h. */
21669_ACEOF
21670cat confdefs.h >>conftest.$ac_ext
21671cat >>conftest.$ac_ext <<_ACEOF
21672/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021673#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021674int
21675main ()
21676{
Jack Jansen666b1e72001-10-31 12:11:48 +000021677
21678 WINDOW *w;
21679 w->_flags = 0;
21680
Martin v. Löwis11437992002-04-12 09:54:03 +000021681 ;
21682 return 0;
21683}
21684_ACEOF
21685rm -f conftest.$ac_objext
21686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021687 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021689 grep -v '^ *+' conftest.er1 >conftest.err
21690 rm -f conftest.er1
21691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21693 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021694 { ac_try='test -z "$ac_c_werror_flag"
21695 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21697 (eval $ac_try) 2>&5
21698 ac_status=$?
21699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21700 (exit $ac_status); }; } &&
21701 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21703 (eval $ac_try) 2>&5
21704 ac_status=$?
21705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21706 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021707 ac_cv_window_has_flags=yes
21708else
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021710sed 's/^/| /' conftest.$ac_ext >&5
21711
Martin v. Löwis11437992002-04-12 09:54:03 +000021712ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021713fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021715fi
21716
Martin v. Löwis11437992002-04-12 09:54:03 +000021717echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21718echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021719
Jack Jansen666b1e72001-10-31 12:11:48 +000021720
21721if test "$ac_cv_window_has_flags" = yes
21722then
Martin v. Löwis11437992002-04-12 09:54:03 +000021723
21724cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021725#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021726_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021727
21728fi
21729
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021730echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21731echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21732
21733if test -e /dev/ptmx
21734then
21735 echo "$as_me:$LINENO: result: yes" >&5
21736echo "${ECHO_T}yes" >&6
21737
21738cat >>confdefs.h <<\_ACEOF
21739#define HAVE_DEV_PTMX 1
21740_ACEOF
21741
21742else
21743 echo "$as_me:$LINENO: result: no" >&5
21744echo "${ECHO_T}no" >&6
21745fi
21746
Neal Norwitz865400f2003-03-21 01:42:58 +000021747echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21748echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21749
21750if test -e /dev/ptc
21751then
21752 echo "$as_me:$LINENO: result: yes" >&5
21753echo "${ECHO_T}yes" >&6
21754
21755cat >>confdefs.h <<\_ACEOF
21756#define HAVE_DEV_PTC 1
21757_ACEOF
21758
21759else
21760 echo "$as_me:$LINENO: result: no" >&5
21761echo "${ECHO_T}no" >&6
21762fi
21763
Martin v. Löwis11437992002-04-12 09:54:03 +000021764echo "$as_me:$LINENO: checking for socklen_t" >&5
21765echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21766if test "${ac_cv_type_socklen_t+set}" = set; then
21767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021768else
Martin v. Löwis11437992002-04-12 09:54:03 +000021769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021770/* confdefs.h. */
21771_ACEOF
21772cat confdefs.h >>conftest.$ac_ext
21773cat >>conftest.$ac_ext <<_ACEOF
21774/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021775
21776#ifdef HAVE_SYS_TYPES_H
21777#include <sys/types.h>
21778#endif
21779#ifdef HAVE_SYS_SOCKET_H
21780#include <sys/socket.h>
21781#endif
21782
21783
Martin v. Löwis11437992002-04-12 09:54:03 +000021784int
21785main ()
21786{
21787if ((socklen_t *) 0)
21788 return 0;
21789if (sizeof (socklen_t))
21790 return 0;
21791 ;
21792 return 0;
21793}
21794_ACEOF
21795rm -f conftest.$ac_objext
21796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021797 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021799 grep -v '^ *+' conftest.er1 >conftest.err
21800 rm -f conftest.er1
21801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21803 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021804 { ac_try='test -z "$ac_c_werror_flag"
21805 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21807 (eval $ac_try) 2>&5
21808 ac_status=$?
21809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21810 (exit $ac_status); }; } &&
21811 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21813 (eval $ac_try) 2>&5
21814 ac_status=$?
21815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21816 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021817 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021818else
Martin v. Löwis11437992002-04-12 09:54:03 +000021819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021820sed 's/^/| /' conftest.$ac_ext >&5
21821
Martin v. Löwis11437992002-04-12 09:54:03 +000021822ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021823fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021824rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021825fi
21826echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21827echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21828if test $ac_cv_type_socklen_t = yes; then
21829 :
21830else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021831
Martin v. Löwis01c04012002-11-11 14:58:44 +000021832cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021833#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021834_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021835
21836fi
21837
Michael W. Hudson54241132001-12-07 15:38:26 +000021838
Michael W. Hudson54241132001-12-07 15:38:26 +000021839
21840
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021841for h in `(cd $srcdir;echo Python/thread_*.h)`
21842do
21843 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21844done
21845
Michael W. Hudson54241132001-12-07 15:38:26 +000021846
Neal Norwitzd24499d2005-12-18 21:36:39 +000021847SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021848echo "$as_me:$LINENO: checking for build directories" >&5
21849echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021850for dir in $SRCDIRS; do
21851 if test ! -d $dir; then
21852 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021853 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021854done
Martin v. Löwis11437992002-04-12 09:54:03 +000021855echo "$as_me:$LINENO: result: done" >&5
21856echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021857
Guido van Rossum627b2d71993-12-24 10:39:16 +000021858# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021859 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021860
Martin v. Löwis11437992002-04-12 09:54:03 +000021861cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021862# This file is a shell script that caches the results of configure
21863# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021864# scripts and configure runs, see configure's option --config-cache.
21865# It is not useful on other systems. If it contains results you don't
21866# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021867#
Martin v. Löwis11437992002-04-12 09:54:03 +000021868# config.status only pays attention to the cache file if you give it
21869# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021870#
Skip Montanaro6dead952003-09-25 14:50:04 +000021871# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021872# loading this file, other *unset* `ac_cv_foo' will be assigned the
21873# following values.
21874
21875_ACEOF
21876
Guido van Rossumf78abae1997-01-21 22:02:36 +000021877# The following way of writing the cache mishandles newlines in values,
21878# but we know of no workaround that is simple, portable, and efficient.
21879# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021880# Ultrix sh set writes to stderr and can't be redirected directly,
21881# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021882{
21883 (set) 2>&1 |
21884 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21885 *ac_space=\ *)
21886 # `set' does not quote correctly, so add quotes (double-quote
21887 # substitution turns \\\\ into \\, and sed turns \\ into \).
21888 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021889 "s/'/'\\\\''/g;
21890 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 ;;
21892 *)
21893 # `set' quotes correctly as required by POSIX, so do not add quotes.
21894 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021895 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021896 ;;
21897 esac;
21898} |
21899 sed '
21900 t clear
21901 : clear
21902 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21903 t end
21904 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21905 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021906if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021907 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021908 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21909 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021910 else
21911 echo "not updating unwritable cache $cache_file"
21912 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021913fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021914rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021915
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021916test "x$prefix" = xNONE && prefix=$ac_default_prefix
21917# Let make expand exec_prefix.
21918test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021919
Martin v. Löwis11437992002-04-12 09:54:03 +000021920# VPATH may cause trouble with some makes, so we remove $(srcdir),
21921# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21922# trailing colons and then remove the whole line if VPATH becomes empty
21923# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021924if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021925 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021926s/:*\$(srcdir):*/:/;
21927s/:*\${srcdir}:*/:/;
21928s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021929s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021930s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021931s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021932}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021933fi
21934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021935DEFS=-DHAVE_CONFIG_H
21936
Skip Montanaro6dead952003-09-25 14:50:04 +000021937ac_libobjs=
21938ac_ltlibobjs=
21939for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21940 # 1. Remove the extension, and $U if already installed.
21941 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021942 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021943 # 2. Add them.
21944 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21945 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21946done
21947LIBOBJS=$ac_libobjs
21948
21949LTLIBOBJS=$ac_ltlibobjs
21950
21951
Martin v. Löwis11437992002-04-12 09:54:03 +000021952
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021953: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021954ac_clean_files_save=$ac_clean_files
21955ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21956{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21957echo "$as_me: creating $CONFIG_STATUS" >&6;}
21958cat >$CONFIG_STATUS <<_ACEOF
21959#! $SHELL
21960# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021961# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021962# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021963# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021964
Martin v. Löwis11437992002-04-12 09:54:03 +000021965debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021966ac_cs_recheck=false
21967ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021968SHELL=\${CONFIG_SHELL-$SHELL}
21969_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021970
Martin v. Löwis11437992002-04-12 09:54:03 +000021971cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021972## --------------------- ##
21973## M4sh Initialization. ##
21974## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021975
Martin v. Löwis11437992002-04-12 09:54:03 +000021976# Be Bourne compatible
21977if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21978 emulate sh
21979 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021980 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21981 # is contrary to our usage. Disable this feature.
21982 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021983elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21984 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021985fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021986DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021987
Martin v. Löwis11437992002-04-12 09:54:03 +000021988# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021989if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 as_unset=unset
21991else
21992 as_unset=false
21993fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021994
Skip Montanaro6dead952003-09-25 14:50:04 +000021995
21996# Work around bugs in pre-3.0 UWIN ksh.
21997$as_unset ENV MAIL MAILPATH
21998PS1='$ '
21999PS2='> '
22000PS4='+ '
22001
22002# NLS nuisances.
22003for as_var in \
22004 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22005 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22006 LC_TELEPHONE LC_TIME
22007do
Skip Montanarof0d5f792004-08-15 14:08:23 +000022008 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000022009 eval $as_var=C; export $as_var
22010 else
22011 $as_unset $as_var
22012 fi
22013done
22014
22015# Required to use basename.
22016if expr a : '\(a\)' >/dev/null 2>&1; then
22017 as_expr=expr
22018else
22019 as_expr=false
22020fi
22021
22022if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22023 as_basename=basename
22024else
22025 as_basename=false
22026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022027
22028
22029# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000022030as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022031$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22032 X"$0" : 'X\(//\)$' \| \
22033 X"$0" : 'X\(/\)$' \| \
22034 . : '\(.\)' 2>/dev/null ||
22035echo X/"$0" |
22036 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22037 /^X\/\(\/\/\)$/{ s//\1/; q; }
22038 /^X\/\(\/\).*/{ s//\1/; q; }
22039 s/.*/./; q'`
22040
Skip Montanaro6dead952003-09-25 14:50:04 +000022041
Martin v. Löwis11437992002-04-12 09:54:03 +000022042# PATH needs CR, and LINENO needs CR and PATH.
22043# Avoid depending upon Character Ranges.
22044as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22045as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22046as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22047as_cr_digits='0123456789'
22048as_cr_alnum=$as_cr_Letters$as_cr_digits
22049
22050# The user is always right.
22051if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022052 echo "#! /bin/sh" >conf$$.sh
22053 echo "exit 0" >>conf$$.sh
22054 chmod +x conf$$.sh
22055 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 PATH_SEPARATOR=';'
22057 else
22058 PATH_SEPARATOR=:
22059 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022060 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000022061fi
22062
22063
22064 as_lineno_1=$LINENO
22065 as_lineno_2=$LINENO
22066 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22067 test "x$as_lineno_1" != "x$as_lineno_2" &&
22068 test "x$as_lineno_3" = "x$as_lineno_2" || {
22069 # Find who we are. Look in the path if we contain no path at all
22070 # relative or not.
22071 case $0 in
22072 *[\\/]* ) as_myself=$0 ;;
22073 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22074for as_dir in $PATH
22075do
22076 IFS=$as_save_IFS
22077 test -z "$as_dir" && as_dir=.
22078 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22079done
22080
22081 ;;
22082 esac
22083 # We did not find ourselves, most probably we were run as `sh COMMAND'
22084 # in which case we are not to be found in the path.
22085 if test "x$as_myself" = x; then
22086 as_myself=$0
22087 fi
22088 if test ! -f "$as_myself"; then
22089 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22090echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22091 { (exit 1); exit 1; }; }
22092 fi
22093 case $CONFIG_SHELL in
22094 '')
22095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22096for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22097do
22098 IFS=$as_save_IFS
22099 test -z "$as_dir" && as_dir=.
22100 for as_base in sh bash ksh sh5; do
22101 case $as_dir in
22102 /*)
22103 if ("$as_dir/$as_base" -c '
22104 as_lineno_1=$LINENO
22105 as_lineno_2=$LINENO
22106 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22107 test "x$as_lineno_1" != "x$as_lineno_2" &&
22108 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022109 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22110 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022111 CONFIG_SHELL=$as_dir/$as_base
22112 export CONFIG_SHELL
22113 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22114 fi;;
22115 esac
22116 done
22117done
22118;;
Jack Jansendd19cf82001-12-06 22:36:17 +000022119 esac
22120
Martin v. Löwis11437992002-04-12 09:54:03 +000022121 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22122 # uniformly replaced by the line number. The first 'sed' inserts a
22123 # line-number line before each line; the second 'sed' does the real
22124 # work. The second script uses 'N' to pair each line-number line
22125 # with the numbered line, and appends trailing '-' during
22126 # substitution so that $LINENO is not a special case at line end.
22127 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22128 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22129 sed '=' <$as_myself |
22130 sed '
22131 N
22132 s,$,-,
22133 : loop
22134 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22135 t loop
22136 s,-$,,
22137 s,^['$as_cr_digits']*\n,,
22138 ' >$as_me.lineno &&
22139 chmod +x $as_me.lineno ||
22140 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22141echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22142 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022143
Martin v. Löwis11437992002-04-12 09:54:03 +000022144 # Don't try to exec as it changes $[0], causing all sort of problems
22145 # (the dirname of $[0] is not the place where we might find the
22146 # original and so on. Autoconf is especially sensible to this).
22147 . ./$as_me.lineno
22148 # Exit status is that of the last command.
22149 exit
22150}
22151
22152
22153case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22154 *c*,-n*) ECHO_N= ECHO_C='
22155' ECHO_T=' ' ;;
22156 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22157 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22158esac
22159
22160if expr a : '\(a\)' >/dev/null 2>&1; then
22161 as_expr=expr
22162else
22163 as_expr=false
22164fi
22165
22166rm -f conf$$ conf$$.exe conf$$.file
22167echo >conf$$.file
22168if ln -s conf$$.file conf$$ 2>/dev/null; then
22169 # We could just check for DJGPP; but this test a) works b) is more generic
22170 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22171 if test -f conf$$.exe; then
22172 # Don't use ln at all; we don't have any links
22173 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022174 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 as_ln_s='ln -s'
22176 fi
22177elif ln conf$$.file conf$$ 2>/dev/null; then
22178 as_ln_s=ln
22179else
22180 as_ln_s='cp -p'
22181fi
22182rm -f conf$$ conf$$.exe conf$$.file
22183
Skip Montanaro6dead952003-09-25 14:50:04 +000022184if mkdir -p . 2>/dev/null; then
22185 as_mkdir_p=:
22186else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022187 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000022188 as_mkdir_p=false
22189fi
22190
Martin v. Löwis11437992002-04-12 09:54:03 +000022191as_executable_p="test -f"
22192
22193# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022194as_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 +000022195
22196# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022197as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000022198
22199
22200# IFS
22201# We need space, tab and new line, in precisely that order.
22202as_nl='
22203'
22204IFS=" $as_nl"
22205
22206# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000022207$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000022208
22209exec 6>&1
22210
22211# Open the log real soon, to keep \$[0] and so on meaningful, and to
22212# report actual input values of CONFIG_FILES etc. instead of their
22213# values after options handling. Logging --version etc. is OK.
22214exec 5>>config.log
22215{
22216 echo
22217 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22218## Running $as_me. ##
22219_ASBOX
22220} >&5
22221cat >&5 <<_CSEOF
22222
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022223This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000022224generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000022225
22226 CONFIG_FILES = $CONFIG_FILES
22227 CONFIG_HEADERS = $CONFIG_HEADERS
22228 CONFIG_LINKS = $CONFIG_LINKS
22229 CONFIG_COMMANDS = $CONFIG_COMMANDS
22230 $ $0 $@
22231
22232_CSEOF
22233echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22234echo >&5
22235_ACEOF
22236
22237# Files that config.status was made for.
22238if test -n "$ac_config_files"; then
22239 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22240fi
22241
22242if test -n "$ac_config_headers"; then
22243 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22244fi
22245
22246if test -n "$ac_config_links"; then
22247 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22248fi
22249
22250if test -n "$ac_config_commands"; then
22251 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22252fi
22253
22254cat >>$CONFIG_STATUS <<\_ACEOF
22255
22256ac_cs_usage="\
22257\`$as_me' instantiates files from templates according to the
22258current configuration.
22259
22260Usage: $0 [OPTIONS] [FILE]...
22261
22262 -h, --help print this help, then exit
22263 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000022264 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000022265 -d, --debug don't remove temporary files
22266 --recheck update $as_me by reconfiguring in the same conditions
22267 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022268 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022270 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022271
22272Configuration files:
22273$config_files
22274
22275Configuration headers:
22276$config_headers
22277
22278Report bugs to <bug-autoconf@gnu.org>."
22279_ACEOF
22280
22281cat >>$CONFIG_STATUS <<_ACEOF
22282ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022283python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022284configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000022285 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22286
Skip Montanarof0d5f792004-08-15 14:08:23 +000022287Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000022288This config.status script is free software; the Free Software Foundation
22289gives unlimited permission to copy, distribute and modify it."
22290srcdir=$srcdir
22291INSTALL="$INSTALL"
22292_ACEOF
22293
22294cat >>$CONFIG_STATUS <<\_ACEOF
22295# If no file are specified by the user, then we need to provide default
22296# value. By we need to know if files were specified by the user.
22297ac_need_defaults=:
22298while test $# != 0
22299do
22300 case $1 in
22301 --*=*)
22302 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22303 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022304 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000022305 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022306 -*)
22307 ac_option=$1
22308 ac_optarg=$2
22309 ac_shift=shift
22310 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022311 *) # This is not an option, so the user has probably given explicit
22312 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000022313 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000022314 ac_need_defaults=false;;
22315 esac
22316
Skip Montanaro6dead952003-09-25 14:50:04 +000022317 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000022318 # Handling of the options.
22319_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022320cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022321 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22322 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 --version | --vers* | -V )
22324 echo "$ac_cs_version"; exit 0 ;;
22325 --he | --h)
22326 # Conflict between --help and --header
22327 { { echo "$as_me:$LINENO: error: ambiguous option: $1
22328Try \`$0 --help' for more information." >&5
22329echo "$as_me: error: ambiguous option: $1
22330Try \`$0 --help' for more information." >&2;}
22331 { (exit 1); exit 1; }; };;
22332 --help | --hel | -h )
22333 echo "$ac_cs_usage"; exit 0 ;;
22334 --debug | --d* | -d )
22335 debug=: ;;
22336 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000022337 $ac_shift
22338 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 ac_need_defaults=false;;
22340 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000022341 $ac_shift
22342 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022343 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022344 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22345 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22346 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022347
22348 # This is an error.
22349 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22350Try \`$0 --help' for more information." >&5
22351echo "$as_me: error: unrecognized option: $1
22352Try \`$0 --help' for more information." >&2;}
22353 { (exit 1); exit 1; }; } ;;
22354
22355 *) ac_config_targets="$ac_config_targets $1" ;;
22356
22357 esac
22358 shift
22359done
22360
Skip Montanaro6dead952003-09-25 14:50:04 +000022361ac_configure_extra_args=
22362
22363if $ac_cs_silent; then
22364 exec 6>/dev/null
22365 ac_configure_extra_args="$ac_configure_extra_args --silent"
22366fi
22367
22368_ACEOF
22369cat >>$CONFIG_STATUS <<_ACEOF
22370if \$ac_cs_recheck; then
22371 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22372 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22373fi
22374
Martin v. Löwis11437992002-04-12 09:54:03 +000022375_ACEOF
22376
22377
22378
22379
22380
22381cat >>$CONFIG_STATUS <<\_ACEOF
22382for ac_config_target in $ac_config_targets
22383do
22384 case "$ac_config_target" in
22385 # Handling of arguments.
22386 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
22387 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
22388 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
22389 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22390echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22391 { (exit 1); exit 1; }; };;
22392 esac
22393done
22394
22395# If the user did not use the arguments to specify the items to instantiate,
22396# then the envvar interface is used. Set only those that are not.
22397# We use the long form for the default assignment because of an extremely
22398# bizarre bug on SunOS 4.1.3.
22399if $ac_need_defaults; then
22400 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22401 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22402fi
22403
Skip Montanaro6dead952003-09-25 14:50:04 +000022404# Have a temporary directory for convenience. Make it in the build tree
22405# simply because there is no reason to put it here, and in addition,
22406# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000022407# Create a temporary directory, and hook for its removal unless debugging.
22408$debug ||
22409{
22410 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22411 trap '{ (exit 1); exit 1; }' 1 2 13 15
22412}
22413
22414# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000022415
Martin v. Löwis11437992002-04-12 09:54:03 +000022416{
Skip Montanaro6dead952003-09-25 14:50:04 +000022417 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000022418 test -n "$tmp" && test -d "$tmp"
22419} ||
22420{
Skip Montanaro6dead952003-09-25 14:50:04 +000022421 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000022422 (umask 077 && mkdir $tmp)
22423} ||
22424{
Skip Montanaro6dead952003-09-25 14:50:04 +000022425 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000022426 { (exit 1); exit 1; }
22427}
22428
22429_ACEOF
22430
22431cat >>$CONFIG_STATUS <<_ACEOF
22432
22433#
22434# CONFIG_FILES section.
22435#
22436
22437# No need to generate the scripts if there are no CONFIG_FILES.
22438# This happens for instance when ./config.status config.h
22439if test -n "\$CONFIG_FILES"; then
22440 # Protect against being on the right side of a sed subst in config.status.
22441 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22442 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22443s,@SHELL@,$SHELL,;t t
22444s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22445s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22446s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22447s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22448s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22449s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22450s,@exec_prefix@,$exec_prefix,;t t
22451s,@prefix@,$prefix,;t t
22452s,@program_transform_name@,$program_transform_name,;t t
22453s,@bindir@,$bindir,;t t
22454s,@sbindir@,$sbindir,;t t
22455s,@libexecdir@,$libexecdir,;t t
22456s,@datadir@,$datadir,;t t
22457s,@sysconfdir@,$sysconfdir,;t t
22458s,@sharedstatedir@,$sharedstatedir,;t t
22459s,@localstatedir@,$localstatedir,;t t
22460s,@libdir@,$libdir,;t t
22461s,@includedir@,$includedir,;t t
22462s,@oldincludedir@,$oldincludedir,;t t
22463s,@infodir@,$infodir,;t t
22464s,@mandir@,$mandir,;t t
22465s,@build_alias@,$build_alias,;t t
22466s,@host_alias@,$host_alias,;t t
22467s,@target_alias@,$target_alias,;t t
22468s,@DEFS@,$DEFS,;t t
22469s,@ECHO_C@,$ECHO_C,;t t
22470s,@ECHO_N@,$ECHO_N,;t t
22471s,@ECHO_T@,$ECHO_T,;t t
22472s,@LIBS@,$LIBS,;t t
22473s,@VERSION@,$VERSION,;t t
22474s,@SOVERSION@,$SOVERSION,;t t
22475s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
22476s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
22477s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
22478s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
22479s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
22480s,@MACHDEP@,$MACHDEP,;t t
22481s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000022482s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000022483s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000022484s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022485s,@CXX@,$CXX,;t t
22486s,@MAINOBJ@,$MAINOBJ,;t t
22487s,@EXEEXT@,$EXEEXT,;t t
22488s,@CC@,$CC,;t t
22489s,@CFLAGS@,$CFLAGS,;t t
22490s,@LDFLAGS@,$LDFLAGS,;t t
22491s,@CPPFLAGS@,$CPPFLAGS,;t t
22492s,@ac_ct_CC@,$ac_ct_CC,;t t
22493s,@OBJEXT@,$OBJEXT,;t t
22494s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022495s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022496s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
22497s,@LIBRARY@,$LIBRARY,;t t
22498s,@LDLIBRARY@,$LDLIBRARY,;t t
22499s,@DLLLIBRARY@,$DLLLIBRARY,;t t
22500s,@BLDLIBRARY@,$BLDLIBRARY,;t t
22501s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
22502s,@INSTSONAME@,$INSTSONAME,;t t
22503s,@RUNSHARED@,$RUNSHARED,;t t
22504s,@LINKCC@,$LINKCC,;t t
22505s,@RANLIB@,$RANLIB,;t t
22506s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22507s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000022508s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022509s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22510s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22511s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22512s,@LN@,$LN,;t t
22513s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000022514s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000022515s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022516s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
22517s,@SO@,$SO,;t t
22518s,@LDSHARED@,$LDSHARED,;t t
22519s,@BLDSHARED@,$BLDSHARED,;t t
22520s,@CCSHARED@,$CCSHARED,;t t
22521s,@LINKFORSHARED@,$LINKFORSHARED,;t t
22522s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000022523s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022524s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
22525s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
22526s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
22527s,@LDLAST@,$LDLAST,;t t
22528s,@THREADOBJ@,$THREADOBJ,;t t
22529s,@DLINCLDIR@,$DLINCLDIR,;t t
22530s,@DYNLOADFILE@,$DYNLOADFILE,;t t
22531s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000022532s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022533s,@LIBOBJS@,$LIBOBJS,;t t
22534s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
22535s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
22536s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
22537s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
22538s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
22539s,@LIBM@,$LIBM,;t t
22540s,@LIBC@,$LIBC,;t t
22541s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
22542s,@THREADHEADERS@,$THREADHEADERS,;t t
22543s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022544s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022545CEOF
22546
22547_ACEOF
22548
22549 cat >>$CONFIG_STATUS <<\_ACEOF
22550 # Split the substitutions into bite-sized pieces for seds with
22551 # small command number limits, like on Digital OSF/1 and HP-UX.
22552 ac_max_sed_lines=48
22553 ac_sed_frag=1 # Number of current file.
22554 ac_beg=1 # First line for current file.
22555 ac_end=$ac_max_sed_lines # Line after last line for current file.
22556 ac_more_lines=:
22557 ac_sed_cmds=
22558 while $ac_more_lines; do
22559 if test $ac_beg -gt 1; then
22560 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22561 else
22562 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22563 fi
22564 if test ! -s $tmp/subs.frag; then
22565 ac_more_lines=false
22566 else
22567 # The purpose of the label and of the branching condition is to
22568 # speed up the sed processing (if there are no `@' at all, there
22569 # is no need to browse any of the substitutions).
22570 # These are the two extra sed commands mentioned above.
22571 (echo ':t
22572 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22573 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000022574 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022575 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022576 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022577 fi
22578 ac_sed_frag=`expr $ac_sed_frag + 1`
22579 ac_beg=$ac_end
22580 ac_end=`expr $ac_end + $ac_max_sed_lines`
22581 fi
22582 done
22583 if test -z "$ac_sed_cmds"; then
22584 ac_sed_cmds=cat
22585 fi
22586fi # test -n "$CONFIG_FILES"
22587
22588_ACEOF
22589cat >>$CONFIG_STATUS <<\_ACEOF
22590for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22591 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22592 case $ac_file in
22593 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022594 cat >$tmp/stdin
22595 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22596 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022597 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022598 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022599 * ) ac_file_in=$ac_file.in ;;
22600 esac
22601
22602 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22603 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22604$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022605 X"$ac_file" : 'X\(//\)[^/]' \| \
22606 X"$ac_file" : 'X\(//\)$' \| \
22607 X"$ac_file" : 'X\(/\)' \| \
22608 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022609echo X"$ac_file" |
22610 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22611 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22612 /^X\(\/\/\)$/{ s//\1/; q; }
22613 /^X\(\/\).*/{ s//\1/; q; }
22614 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022615 { if $as_mkdir_p; then
22616 mkdir -p "$ac_dir"
22617 else
22618 as_dir="$ac_dir"
22619 as_dirs=
22620 while test ! -d "$as_dir"; do
22621 as_dirs="$as_dir $as_dirs"
22622 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22623$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022624 X"$as_dir" : 'X\(//\)[^/]' \| \
22625 X"$as_dir" : 'X\(//\)$' \| \
22626 X"$as_dir" : 'X\(/\)' \| \
22627 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022628echo X"$as_dir" |
22629 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22630 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22631 /^X\(\/\/\)$/{ s//\1/; q; }
22632 /^X\(\/\).*/{ s//\1/; q; }
22633 s/.*/./; q'`
22634 done
22635 test ! -n "$as_dirs" || mkdir $as_dirs
22636 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22637echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22638 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022639
22640 ac_builddir=.
22641
22642if test "$ac_dir" != .; then
22643 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22644 # A "../" for each directory in $ac_dir_suffix.
22645 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22646else
22647 ac_dir_suffix= ac_top_builddir=
22648fi
22649
22650case $srcdir in
22651 .) # No --srcdir option. We are building in place.
22652 ac_srcdir=.
22653 if test -z "$ac_top_builddir"; then
22654 ac_top_srcdir=.
22655 else
22656 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22657 fi ;;
22658 [\\/]* | ?:[\\/]* ) # Absolute path.
22659 ac_srcdir=$srcdir$ac_dir_suffix;
22660 ac_top_srcdir=$srcdir ;;
22661 *) # Relative path.
22662 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22663 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22664esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000022665
22666# Do not use `cd foo && pwd` to compute absolute paths, because
22667# the directories may not exist.
22668case `pwd` in
22669.) ac_abs_builddir="$ac_dir";;
22670*)
22671 case "$ac_dir" in
22672 .) ac_abs_builddir=`pwd`;;
22673 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22674 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22675 esac;;
22676esac
22677case $ac_abs_builddir in
22678.) ac_abs_top_builddir=${ac_top_builddir}.;;
22679*)
22680 case ${ac_top_builddir}. in
22681 .) ac_abs_top_builddir=$ac_abs_builddir;;
22682 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22683 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22684 esac;;
22685esac
22686case $ac_abs_builddir in
22687.) ac_abs_srcdir=$ac_srcdir;;
22688*)
22689 case $ac_srcdir in
22690 .) ac_abs_srcdir=$ac_abs_builddir;;
22691 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22692 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22693 esac;;
22694esac
22695case $ac_abs_builddir in
22696.) ac_abs_top_srcdir=$ac_top_srcdir;;
22697*)
22698 case $ac_top_srcdir in
22699 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22700 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22701 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22702 esac;;
22703esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022704
22705
22706 case $INSTALL in
22707 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22708 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22709 esac
22710
Brett Cannon43802422005-02-10 20:48:03 +000022711 if test x"$ac_file" != x-; then
22712 { echo "$as_me:$LINENO: creating $ac_file" >&5
22713echo "$as_me: creating $ac_file" >&6;}
22714 rm -f "$ac_file"
22715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022716 # Let's still pretend it is `configure' which instantiates (i.e., don't
22717 # use $as_me), people would be surprised to read:
22718 # /* config.h. Generated by config.status. */
22719 if test x"$ac_file" = x-; then
22720 configure_input=
22721 else
22722 configure_input="$ac_file. "
22723 fi
22724 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022725 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022726
22727 # First look for the input files in the build tree, otherwise in the
22728 # src tree.
22729 ac_file_inputs=`IFS=:
22730 for f in $ac_file_in; do
22731 case $f in
22732 -) echo $tmp/stdin ;;
22733 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 # Absolute (can't be DOS-style, as IFS=:)
22735 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022736echo "$as_me: error: cannot find input file: $f" >&2;}
22737 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022738 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022739 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022740 if test -f "$f"; then
22741 # Build tree
22742 echo "$f"
22743 elif test -f "$srcdir/$f"; then
22744 # Source tree
22745 echo "$srcdir/$f"
22746 else
22747 # /dev/null tree
22748 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022749echo "$as_me: error: cannot find input file: $f" >&2;}
22750 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022751 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022752 esac
22753 done` || { (exit 1); exit 1; }
22754_ACEOF
22755cat >>$CONFIG_STATUS <<_ACEOF
22756 sed "$ac_vpsub
22757$extrasub
22758_ACEOF
22759cat >>$CONFIG_STATUS <<\_ACEOF
22760:t
22761/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22762s,@configure_input@,$configure_input,;t t
22763s,@srcdir@,$ac_srcdir,;t t
22764s,@abs_srcdir@,$ac_abs_srcdir,;t t
22765s,@top_srcdir@,$ac_top_srcdir,;t t
22766s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22767s,@builddir@,$ac_builddir,;t t
22768s,@abs_builddir@,$ac_abs_builddir,;t t
22769s,@top_builddir@,$ac_top_builddir,;t t
22770s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22771s,@INSTALL@,$ac_INSTALL,;t t
22772" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22773 rm -f $tmp/stdin
22774 if test x"$ac_file" != x-; then
22775 mv $tmp/out $ac_file
22776 else
22777 cat $tmp/out
22778 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022779 fi
22780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781done
22782_ACEOF
22783cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022784
Martin v. Löwis11437992002-04-12 09:54:03 +000022785#
22786# CONFIG_HEADER section.
22787#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022789# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22790# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022791#
22792# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022793ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22794ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022795ac_dC=' '
22796ac_dD=',;t'
22797# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022798ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022799ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022800ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022801ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022802
Martin v. Löwis11437992002-04-12 09:54:03 +000022803for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022804 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022805 case $ac_file in
22806 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022807 cat >$tmp/stdin
22808 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22809 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022810 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022811 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022812 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022813 esac
22814
Martin v. Löwis11437992002-04-12 09:54:03 +000022815 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22816echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022817
Martin v. Löwis11437992002-04-12 09:54:03 +000022818 # First look for the input files in the build tree, otherwise in the
22819 # src tree.
22820 ac_file_inputs=`IFS=:
22821 for f in $ac_file_in; do
22822 case $f in
22823 -) echo $tmp/stdin ;;
22824 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022825 # Absolute (can't be DOS-style, as IFS=:)
22826 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022827echo "$as_me: error: cannot find input file: $f" >&2;}
22828 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022829 # Do quote $f, to prevent DOS paths from being IFS'd.
22830 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022832 if test -f "$f"; then
22833 # Build tree
22834 echo "$f"
22835 elif test -f "$srcdir/$f"; then
22836 # Source tree
22837 echo "$srcdir/$f"
22838 else
22839 # /dev/null tree
22840 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022841echo "$as_me: error: cannot find input file: $f" >&2;}
22842 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022843 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022844 esac
22845 done` || { (exit 1); exit 1; }
22846 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022847 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022848
Martin v. Löwis11437992002-04-12 09:54:03 +000022849_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022850
Martin v. Löwis11437992002-04-12 09:54:03 +000022851# Transform confdefs.h into two sed scripts, `conftest.defines' and
22852# `conftest.undefs', that substitutes the proper values into
22853# config.h.in to produce config.h. The first handles `#define'
22854# templates, and the second `#undef' templates.
22855# And first: Protect against being on the right side of a sed subst in
22856# config.status. Protect against being in an unquoted here document
22857# in config.status.
22858rm -f conftest.defines conftest.undefs
22859# Using a here document instead of a string reduces the quoting nightmare.
22860# Putting comments in sed scripts is not portable.
22861#
22862# `end' is used to avoid that the second main sed command (meant for
22863# 0-ary CPP macros) applies to n-ary macro definitions.
22864# See the Autoconf documentation for `clear'.
22865cat >confdef2sed.sed <<\_ACEOF
22866s/[\\&,]/\\&/g
22867s,[\\$`],\\&,g
22868t clear
22869: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022870s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022871t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022872s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022873: end
22874_ACEOF
22875# If some macros were called several times there might be several times
22876# the same #defines, which is useless. Nevertheless, we may not want to
22877# sort them, since we want the *last* AC-DEFINE to be honored.
22878uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22879sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22880rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022881
22882# This sed command replaces #undef with comments. This is necessary, for
22883# example, in the case of _POSIX_SOURCE, which is predefined and required
22884# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022885cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022886s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022887_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022888
Martin v. Löwis11437992002-04-12 09:54:03 +000022889# Break up conftest.defines because some shells have a limit on the size
22890# of here documents, and old seds have small limits too (100 cmds).
22891echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022892echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022893echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22894echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022895rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022896while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022897do
Martin v. Löwis11437992002-04-12 09:54:03 +000022898 # Write a limited-size here document to $tmp/defines.sed.
22899 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22900 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022901 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022902 # Work around the forget-to-reset-the-flag bug.
22903 echo 't clr' >>$CONFIG_STATUS
22904 echo ': clr' >>$CONFIG_STATUS
22905 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022906 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022907 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22908 rm -f $tmp/in
22909 mv $tmp/out $tmp/in
22910' >>$CONFIG_STATUS
22911 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22912 rm -f conftest.defines
22913 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022914done
Martin v. Löwis11437992002-04-12 09:54:03 +000022915rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022916echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022917echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022918
Martin v. Löwis11437992002-04-12 09:54:03 +000022919# Break up conftest.undefs because some shells have a limit on the size
22920# of here documents, and old seds have small limits too (100 cmds).
22921echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22922rm -f conftest.tail
22923while grep . conftest.undefs >/dev/null
22924do
22925 # Write a limited-size here document to $tmp/undefs.sed.
22926 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22927 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022928 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 # Work around the forget-to-reset-the-flag bug.
22930 echo 't clr' >>$CONFIG_STATUS
22931 echo ': clr' >>$CONFIG_STATUS
22932 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22933 echo 'CEOF
22934 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22935 rm -f $tmp/in
22936 mv $tmp/out $tmp/in
22937' >>$CONFIG_STATUS
22938 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22939 rm -f conftest.undefs
22940 mv conftest.tail conftest.undefs
22941done
22942rm -f conftest.undefs
22943
22944cat >>$CONFIG_STATUS <<\_ACEOF
22945 # Let's still pretend it is `configure' which instantiates (i.e., don't
22946 # use $as_me), people would be surprised to read:
22947 # /* config.h. Generated by config.status. */
22948 if test x"$ac_file" = x-; then
22949 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022950 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022951 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022952 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022953 cat $tmp/in >>$tmp/config.h
22954 rm -f $tmp/in
22955 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022956 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022957 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22958echo "$as_me: $ac_file is unchanged" >&6;}
22959 else
22960 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22961$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022962 X"$ac_file" : 'X\(//\)[^/]' \| \
22963 X"$ac_file" : 'X\(//\)$' \| \
22964 X"$ac_file" : 'X\(/\)' \| \
22965 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022966echo X"$ac_file" |
22967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22968 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22969 /^X\(\/\/\)$/{ s//\1/; q; }
22970 /^X\(\/\).*/{ s//\1/; q; }
22971 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022972 { if $as_mkdir_p; then
22973 mkdir -p "$ac_dir"
22974 else
22975 as_dir="$ac_dir"
22976 as_dirs=
22977 while test ! -d "$as_dir"; do
22978 as_dirs="$as_dir $as_dirs"
22979 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22980$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022981 X"$as_dir" : 'X\(//\)[^/]' \| \
22982 X"$as_dir" : 'X\(//\)$' \| \
22983 X"$as_dir" : 'X\(/\)' \| \
22984 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022985echo X"$as_dir" |
22986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22987 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22988 /^X\(\/\/\)$/{ s//\1/; q; }
22989 /^X\(\/\).*/{ s//\1/; q; }
22990 s/.*/./; q'`
22991 done
22992 test ! -n "$as_dirs" || mkdir $as_dirs
22993 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22994echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22995 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022996
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 rm -f $ac_file
22998 mv $tmp/config.h $ac_file
22999 fi
23000 else
23001 cat $tmp/config.h
23002 rm -f $tmp/config.h
23003 fi
23004done
23005_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000023006
Martin v. Löwis11437992002-04-12 09:54:03 +000023007cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000023008
Martin v. Löwis11437992002-04-12 09:54:03 +000023009{ (exit 0); exit 0; }
23010_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023011chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000023012ac_clean_files=$ac_clean_files_save
23013
23014
23015# configure is writing to config.log, and then calls config.status.
23016# config.status does its own redirection, appending to config.log.
23017# Unfortunately, on DOS this fails, as config.log is still kept open
23018# by configure, so config.status won't be able to write to it; its
23019# output is simply discarded. So we exec the FD to /dev/null,
23020# effectively closing config.log, so it can be properly (re)opened and
23021# appended to by config.status. When coming back to configure, we
23022# need to make the FD available again.
23023if test "$no_create" != yes; then
23024 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023025 ac_config_status_args=
23026 test "$silent" = yes &&
23027 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000023029 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023030 exec 5>>config.log
23031 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23032 # would make configure fail if this is the last instruction.
23033 $ac_cs_success || { (exit 1); exit 1; }
23034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000023035
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023036
23037echo "creating Setup"
23038if test ! -f Modules/Setup
23039then
23040 cp $srcdir/Modules/Setup.dist Modules/Setup
23041fi
23042
23043echo "creating Setup.local"
23044if test ! -f Modules/Setup.local
23045then
23046 echo "# Edit this file for local setup changes" >Modules/Setup.local
23047fi
23048
23049echo "creating Makefile"
23050$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
23051 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000023052 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000023053mv config.c Modules