blob: c5b795f4914f8e2d9abf264601c76ddd19010744 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00002# From configure.in Revision: 43158 .
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
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz671b9e32006-01-09 07:07:12 +00001483 OpenBSD/2.* | OpenBSD/3.[012345678])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001484 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001485 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1486 # of union __?sigval. Reported by Stuart Bishop.
1487 SunOS/5.6)
1488 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001489 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1490 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001491 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001492 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 define_xopen_source=no;;
1494 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001495 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001497 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001498 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1499 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1500 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1501 # This should hopefully be fixed in FreeBSD 4.9
1502 FreeBSD/4.8* | Darwin/6* )
1503 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001504 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1505 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1506 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001507 AIX/4)
1508 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001509 AIX/5)
1510 if test `uname -r` -eq 1; then
1511 define_xopen_source=no
1512 fi
1513 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001514 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1515 # disables platform specific features beyond repair.
1516 Darwin/8.*)
1517 define_xopen_source=no
1518 ;;
1519
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001520esac
1521
1522if test $define_xopen_source = yes
1523then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1525 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00001526 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1527 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001528 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001529 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001530
1531cat >>confdefs.h <<\_ACEOF
1532#define _XOPEN_SOURCE 500
1533_ACEOF
1534
1535 ;;
1536 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001537
1538cat >>confdefs.h <<\_ACEOF
1539#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001540_ACEOF
1541
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542 ;;
1543 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001544
1545 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1546 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1547 # several APIs are not declared. Since this is also needed in some
1548 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001549 # except for Solaris 10, where it must not be defined,
1550 # as it implies XPG4.2
1551 case $ac_sys_system/$ac_sys_release in
1552 SunOS/5.10)
1553 ;;
1554 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001555
1556cat >>confdefs.h <<\_ACEOF
1557#define _XOPEN_SOURCE_EXTENDED 1
1558_ACEOF
1559
Martin v. Löwis7dece662005-11-26 11:38:24 +00001560 ;;
1561 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001562
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001563
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001564cat >>confdefs.h <<\_ACEOF
1565#define _POSIX_C_SOURCE 200112L
1566_ACEOF
1567
1568
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001569fi
1570
Guido van Rossum91922671997-10-09 20:24:13 +00001571#
1572# SGI compilers allow the specification of the both the ABI and the
1573# ISA on the command line. Depending on the values of these switches,
1574# different and often incompatable code will be generated.
1575#
1576# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1577# thus supply support for various ABI/ISA combinations. The MACHDEP
1578# variable is also adjusted.
1579#
1580
1581if test ! -z "$SGI_ABI"
1582then
1583 CC="cc $SGI_ABI"
1584 LDFLAGS="$SGI_ABI $LDFLAGS"
1585 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001587echo "$as_me:$LINENO: result: $MACHDEP" >&5
1588echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001589
Jack Jansen83f898c2002-12-30 22:23:40 +00001590# And add extra plat-mac for darwin
1591
Jack Jansen7b59b422003-03-17 15:44:10 +00001592
Jack Jansen83f898c2002-12-30 22:23:40 +00001593echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1594echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1595if test -z "$EXTRAPLATDIR"
1596then
1597 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001598 darwin)
1599 EXTRAPLATDIR="\$(PLATMACDIRS)"
1600 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1601 ;;
1602 *)
1603 EXTRAPLATDIR=""
1604 EXTRAMACHDEPPATH=""
1605 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001606 esac
1607fi
1608echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1609echo "${ECHO_T}$EXTRAPLATDIR" >&6
1610
Jack Jansen6b08a402004-06-03 12:41:45 +00001611# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1612# it may influence the way we can build extensions, so distutils
1613# needs to check it
1614
1615CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1616
Guido van Rossum627b2d71993-12-24 10:39:16 +00001617# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001618
1619# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1620# for debug/optimization stuff. BASECFLAGS is for flags that are required
1621# just to get things to compile and link. Users are free to override OPT
1622# when running configure or make. The build should not break if they do.
1623# BASECFLAGS should generally not be messed with, however.
1624
1625# XXX shouldn't some/most/all of this code be merged with the stuff later
1626# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001627echo "$as_me:$LINENO: checking for --without-gcc" >&5
1628echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001631if test "${with_gcc+set}" = set; then
1632 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Guido van Rossum7f43da71994-08-01 12:15:30 +00001634 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001635 no) CC=cc
1636 without_gcc=yes;;
1637 yes) CC=gcc
1638 without_gcc=no;;
1639 *) CC=$withval
1640 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001641 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001642else
Martin v. Löwis11437992002-04-12 09:54:03 +00001643
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001644 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001645 AIX*) CC=cc_r
1646 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001647 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001648 case $BE_HOST_CPU in
1649 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001650 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001652 BASECFLAGS="$BASECFLAGS -export pragma"
1653 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001654 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001655 ;;
1656 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001657 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001658 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001659 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
1661 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1663echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1664 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001665 ;;
1666 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001667 AR="\$(srcdir)/Modules/ar_beos"
1668 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001669 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001670 Monterey*)
1671 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001672 without_gcc=;;
1673 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001674 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001675fi;
1676echo "$as_me:$LINENO: result: $without_gcc" >&5
1677echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001678
1679
Guido van Rossum95012191999-12-16 17:50:52 +00001680
Fred Drakea1a84e72001-03-06 05:52:16 +00001681MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001682echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1683echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1684
Guido van Rossum95012191999-12-16 17:50:52 +00001685# Check whether --with-cxx or --without-cxx was given.
1686if test "${with_cxx+set}" = set; then
1687 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001688
Martin v. Löwis22352952000-12-13 17:37:02 +00001689 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001690 case $withval in
1691 no) CXX=
1692 with_cxx=no;;
1693 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001694 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001695 with_cxx=$withval;;
1696 esac
1697else
Martin v. Löwis11437992002-04-12 09:54:03 +00001698
Guido van Rossum95012191999-12-16 17:50:52 +00001699 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001700 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001701
Martin v. Löwis11437992002-04-12 09:54:03 +00001702fi;
1703echo "$as_me:$LINENO: result: $with_cxx" >&5
1704echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001705
1706if test "$with_cxx" = "yes"
1707then
Martin v. Löwis11437992002-04-12 09:54:03 +00001708 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1709echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1710 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001711fi
1712
1713
1714
1715
Martin v. Löwis11437992002-04-12 09:54:03 +00001716if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001717then
1718 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1719do
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 # 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 +00001721set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001722echo "$as_me:$LINENO: checking for $ac_word" >&5
1723echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1724if test "${ac_cv_prog_CXX+set}" = set; then
1725 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001726else
1727 if test -n "$CXX"; then
1728 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1729else
Martin v. Löwis11437992002-04-12 09:54:03 +00001730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1731for as_dir in $PATH
1732do
1733 IFS=$as_save_IFS
1734 test -z "$as_dir" && as_dir=.
1735 for ac_exec_ext in '' $ac_executable_extensions; do
1736 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1737 ac_cv_prog_CXX="$ac_prog"
1738 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1739 break 2
1740 fi
1741done
1742done
1743
Martin v. Löwis22352952000-12-13 17:37:02 +00001744fi
1745fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001746CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001747if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 echo "$as_me:$LINENO: result: $CXX" >&5
1749echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001750else
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 echo "$as_me:$LINENO: result: no" >&5
1752echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001753fi
1754
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001756done
1757test -n "$CXX" || CXX="notfound"
1758
1759 if test "$CXX" = "notfound"
1760 then
1761 CXX=
1762 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001764ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001765ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1766ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1767ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001769/* confdefs.h. */
1770_ACEOF
1771cat confdefs.h >>conftest.$ac_ext
1772cat >>conftest.$ac_ext <<_ACEOF
1773/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001774
Martin v. Löwis11437992002-04-12 09:54:03 +00001775int
1776main ()
1777{
Michael W. Hudson54241132001-12-07 15:38:26 +00001778
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 ;
1780 return 0;
1781}
1782_ACEOF
1783ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001784ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001785# Try to create an executable without -o first, disregard a.out.
1786# It will help us diagnose broken compilers, and finding out an intuition
1787# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001788echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1789echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001790ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1791if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1792 (eval $ac_link_default) 2>&5
1793 ac_status=$?
1794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1795 (exit $ac_status); }; then
1796 # Find the output, starting from the most likely. This scheme is
1797# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1798# resort.
1799
1800# Be careful to initialize this variable, since it used to be cached.
1801# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1802ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001803# b.out is created by i960 compilers.
1804for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1805do
1806 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001809 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001810 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001811 # This is the source file.
1812 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001813 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001814 # We found the default executable, but exeext='' is most
1815 # certainly right.
1816 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001817 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001818 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1819 # FIXME: I believe we export ac_cv_exeext for Libtool,
1820 # but it would be cool to find out if it's true. Does anybody
1821 # maintain Libtool? --akim.
1822 export ac_cv_exeext
1823 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001824 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001825 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001826 esac
1827done
1828else
1829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001830sed 's/^/| /' conftest.$ac_ext >&5
1831
1832{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1833See \`config.log' for more details." >&5
1834echo "$as_me: error: C++ compiler cannot create executables
1835See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001837fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001838
1839ac_exeext=$ac_cv_exeext
1840echo "$as_me:$LINENO: result: $ac_file" >&5
1841echo "${ECHO_T}$ac_file" >&6
1842
1843# Check the compiler produces executables we can run. If not, either
1844# the compiler is broken, or we cross compile.
1845echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1846echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1847# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1848# If not cross compiling, check that we can run a simple program.
1849if test "$cross_compiling" != yes; then
1850 if { ac_try='./$ac_file'
1851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1852 (eval $ac_try) 2>&5
1853 ac_status=$?
1854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1855 (exit $ac_status); }; }; then
1856 cross_compiling=no
1857 else
1858 if test "$cross_compiling" = maybe; then
1859 cross_compiling=yes
1860 else
1861 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001862If you meant to cross compile, use \`--host'.
1863See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001864echo "$as_me: 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." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001867 { (exit 1); exit 1; }; }
1868 fi
1869 fi
1870fi
1871echo "$as_me:$LINENO: result: yes" >&5
1872echo "${ECHO_T}yes" >&6
1873
Skip Montanaro6dead952003-09-25 14:50:04 +00001874rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001875ac_clean_files=$ac_clean_files_save
1876# Check the compiler produces executables we can run. If not, either
1877# the compiler is broken, or we cross compile.
1878echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1879echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1880echo "$as_me:$LINENO: result: $cross_compiling" >&5
1881echo "${ECHO_T}$cross_compiling" >&6
1882
1883echo "$as_me:$LINENO: checking for suffix of executables" >&5
1884echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1885if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1886 (eval $ac_link) 2>&5
1887 ac_status=$?
1888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1889 (exit $ac_status); }; then
1890 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1891# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1892# work properly (i.e., refer to `conftest.exe'), while it won't with
1893# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001894for ac_file in conftest.exe conftest conftest.*; do
1895 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001898 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001899 export ac_cv_exeext
1900 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001901 * ) break;;
1902 esac
1903done
1904else
Skip Montanaro6dead952003-09-25 14:50:04 +00001905 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1906See \`config.log' for more details." >&5
1907echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001909 { (exit 1); exit 1; }; }
1910fi
1911
1912rm -f conftest$ac_cv_exeext
1913echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1914echo "${ECHO_T}$ac_cv_exeext" >&6
1915
1916rm -f conftest.$ac_ext
1917EXEEXT=$ac_cv_exeext
1918ac_exeext=$EXEEXT
1919
1920 ac_ext=c
1921ac_cpp='$CPP $CPPFLAGS'
1922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1924ac_compiler_gnu=$ac_cv_c_compiler_gnu
1925
1926
Martin v. Löwis22352952000-12-13 17:37:02 +00001927
1928 fi
1929fi
1930
Guido van Rossum8b131c51995-03-09 14:10:13 +00001931# If the user switches compilers, we can't believe the cache
1932if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1933then
Martin v. Löwis11437992002-04-12 09:54:03 +00001934 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1935(it is also a good idea to do 'make clean' before compiling)" >&5
1936echo "$as_me: error: cached CC is different -- throw away $cache_file
1937(it is also a good idea to do 'make clean' before compiling)" >&2;}
1938 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001939fi
1940
Martin v. Löwis11437992002-04-12 09:54:03 +00001941ac_ext=c
1942ac_cpp='$CPP $CPPFLAGS'
1943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1945ac_compiler_gnu=$ac_cv_c_compiler_gnu
1946if test -n "$ac_tool_prefix"; then
1947 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1948set dummy ${ac_tool_prefix}gcc; ac_word=$2
1949echo "$as_me:$LINENO: checking for $ac_word" >&5
1950echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1951if test "${ac_cv_prog_CC+set}" = set; then
1952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001953else
1954 if test -n "$CC"; then
1955 ac_cv_prog_CC="$CC" # Let the user override the test.
1956else
Martin v. Löwis11437992002-04-12 09:54:03 +00001957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1958for as_dir in $PATH
1959do
1960 IFS=$as_save_IFS
1961 test -z "$as_dir" && as_dir=.
1962 for ac_exec_ext in '' $ac_executable_extensions; do
1963 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1964 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1965 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1966 break 2
1967 fi
1968done
1969done
1970
Jack Jansendd19cf82001-12-06 22:36:17 +00001971fi
1972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001973CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001974if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001975 echo "$as_me:$LINENO: result: $CC" >&5
1976echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001977else
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 echo "$as_me:$LINENO: result: no" >&5
1979echo "${ECHO_T}no" >&6
1980fi
1981
1982fi
1983if test -z "$ac_cv_prog_CC"; then
1984 ac_ct_CC=$CC
1985 # Extract the first word of "gcc", so it can be a program name with args.
1986set dummy gcc; ac_word=$2
1987echo "$as_me:$LINENO: checking for $ac_word" >&5
1988echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1989if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1990 echo $ECHO_N "(cached) $ECHO_C" >&6
1991else
1992 if test -n "$ac_ct_CC"; then
1993 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1994else
1995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1996for as_dir in $PATH
1997do
1998 IFS=$as_save_IFS
1999 test -z "$as_dir" && as_dir=.
2000 for ac_exec_ext in '' $ac_executable_extensions; do
2001 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2002 ac_cv_prog_ac_ct_CC="gcc"
2003 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004 break 2
2005 fi
2006done
2007done
2008
2009fi
2010fi
2011ac_ct_CC=$ac_cv_prog_ac_ct_CC
2012if test -n "$ac_ct_CC"; then
2013 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2014echo "${ECHO_T}$ac_ct_CC" >&6
2015else
2016 echo "$as_me:$LINENO: result: no" >&5
2017echo "${ECHO_T}no" >&6
2018fi
2019
2020 CC=$ac_ct_CC
2021else
2022 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002023fi
2024
Jack Jansendd19cf82001-12-06 22:36:17 +00002025if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002026 if test -n "$ac_tool_prefix"; then
2027 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2028set dummy ${ac_tool_prefix}cc; ac_word=$2
2029echo "$as_me:$LINENO: checking for $ac_word" >&5
2030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2031if test "${ac_cv_prog_CC+set}" = set; then
2032 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002033else
2034 if test -n "$CC"; then
2035 ac_cv_prog_CC="$CC" # Let the user override the test.
2036else
Martin v. Löwis11437992002-04-12 09:54:03 +00002037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2038for as_dir in $PATH
2039do
2040 IFS=$as_save_IFS
2041 test -z "$as_dir" && as_dir=.
2042 for ac_exec_ext in '' $ac_executable_extensions; do
2043 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2044 ac_cv_prog_CC="${ac_tool_prefix}cc"
2045 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2046 break 2
2047 fi
2048done
2049done
2050
2051fi
2052fi
2053CC=$ac_cv_prog_CC
2054if test -n "$CC"; then
2055 echo "$as_me:$LINENO: result: $CC" >&5
2056echo "${ECHO_T}$CC" >&6
2057else
2058 echo "$as_me:$LINENO: result: no" >&5
2059echo "${ECHO_T}no" >&6
2060fi
2061
2062fi
2063if test -z "$ac_cv_prog_CC"; then
2064 ac_ct_CC=$CC
2065 # Extract the first word of "cc", so it can be a program name with args.
2066set dummy cc; ac_word=$2
2067echo "$as_me:$LINENO: checking for $ac_word" >&5
2068echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2069if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2070 echo $ECHO_N "(cached) $ECHO_C" >&6
2071else
2072 if test -n "$ac_ct_CC"; then
2073 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2074else
2075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2076for as_dir in $PATH
2077do
2078 IFS=$as_save_IFS
2079 test -z "$as_dir" && as_dir=.
2080 for ac_exec_ext in '' $ac_executable_extensions; do
2081 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2082 ac_cv_prog_ac_ct_CC="cc"
2083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2084 break 2
2085 fi
2086done
2087done
2088
2089fi
2090fi
2091ac_ct_CC=$ac_cv_prog_ac_ct_CC
2092if test -n "$ac_ct_CC"; then
2093 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2094echo "${ECHO_T}$ac_ct_CC" >&6
2095else
2096 echo "$as_me:$LINENO: result: no" >&5
2097echo "${ECHO_T}no" >&6
2098fi
2099
2100 CC=$ac_ct_CC
2101else
2102 CC="$ac_cv_prog_CC"
2103fi
2104
2105fi
2106if test -z "$CC"; then
2107 # Extract the first word of "cc", so it can be a program name with args.
2108set dummy cc; ac_word=$2
2109echo "$as_me:$LINENO: checking for $ac_word" >&5
2110echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2111if test "${ac_cv_prog_CC+set}" = set; then
2112 echo $ECHO_N "(cached) $ECHO_C" >&6
2113else
2114 if test -n "$CC"; then
2115 ac_cv_prog_CC="$CC" # Let the user override the test.
2116else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2119for as_dir in $PATH
2120do
2121 IFS=$as_save_IFS
2122 test -z "$as_dir" && as_dir=.
2123 for ac_exec_ext in '' $ac_executable_extensions; do
2124 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2125 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2126 ac_prog_rejected=yes
2127 continue
2128 fi
2129 ac_cv_prog_CC="cc"
2130 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2131 break 2
2132 fi
2133done
2134done
2135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002136if test $ac_prog_rejected = yes; then
2137 # We found a bogon in the path, so make sure we never use it.
2138 set dummy $ac_cv_prog_CC
2139 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002140 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002141 # We chose a different compiler from the bogus one.
2142 # However, it has the same basename, so the bogon will be chosen
2143 # first if we set CC to just the basename; use the full file name.
2144 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002145 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002146 fi
2147fi
2148fi
2149fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002150CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002151if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002152 echo "$as_me:$LINENO: result: $CC" >&5
2153echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002154else
Martin v. Löwis11437992002-04-12 09:54:03 +00002155 echo "$as_me:$LINENO: result: no" >&5
2156echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002157fi
2158
Martin v. Löwis11437992002-04-12 09:54:03 +00002159fi
2160if test -z "$CC"; then
2161 if test -n "$ac_tool_prefix"; then
2162 for ac_prog in cl
2163 do
2164 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2165set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2166echo "$as_me:$LINENO: checking for $ac_word" >&5
2167echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2168if test "${ac_cv_prog_CC+set}" = set; then
2169 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002170else
2171 if test -n "$CC"; then
2172 ac_cv_prog_CC="$CC" # Let the user override the test.
2173else
Martin v. Löwis11437992002-04-12 09:54:03 +00002174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2175for as_dir in $PATH
2176do
2177 IFS=$as_save_IFS
2178 test -z "$as_dir" && as_dir=.
2179 for ac_exec_ext in '' $ac_executable_extensions; do
2180 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2181 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2182 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2183 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002184 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002185done
2186done
2187
2188fi
2189fi
2190CC=$ac_cv_prog_CC
2191if test -n "$CC"; then
2192 echo "$as_me:$LINENO: result: $CC" >&5
2193echo "${ECHO_T}$CC" >&6
2194else
2195 echo "$as_me:$LINENO: result: no" >&5
2196echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002197fi
2198
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 test -n "$CC" && break
2200 done
2201fi
2202if test -z "$CC"; then
2203 ac_ct_CC=$CC
2204 for ac_prog in cl
2205do
2206 # Extract the first word of "$ac_prog", so it can be a program name with args.
2207set dummy $ac_prog; ac_word=$2
2208echo "$as_me:$LINENO: checking for $ac_word" >&5
2209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2210if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2211 echo $ECHO_N "(cached) $ECHO_C" >&6
2212else
2213 if test -n "$ac_ct_CC"; then
2214 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2215else
2216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2217for as_dir in $PATH
2218do
2219 IFS=$as_save_IFS
2220 test -z "$as_dir" && as_dir=.
2221 for ac_exec_ext in '' $ac_executable_extensions; do
2222 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2223 ac_cv_prog_ac_ct_CC="$ac_prog"
2224 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2225 break 2
2226 fi
2227done
2228done
Jack Jansendd19cf82001-12-06 22:36:17 +00002229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230fi
2231fi
2232ac_ct_CC=$ac_cv_prog_ac_ct_CC
2233if test -n "$ac_ct_CC"; then
2234 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2235echo "${ECHO_T}$ac_ct_CC" >&6
2236else
2237 echo "$as_me:$LINENO: result: no" >&5
2238echo "${ECHO_T}no" >&6
2239fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002240
Martin v. Löwis11437992002-04-12 09:54:03 +00002241 test -n "$ac_ct_CC" && break
2242done
Michael W. Hudson54241132001-12-07 15:38:26 +00002243
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 CC=$ac_ct_CC
2245fi
2246
2247fi
2248
2249
Skip Montanaro6dead952003-09-25 14:50:04 +00002250test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2251See \`config.log' for more details." >&5
2252echo "$as_me: error: no acceptable C compiler found in \$PATH
2253See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002254 { (exit 1); exit 1; }; }
2255
2256# Provide some information about the compiler.
2257echo "$as_me:$LINENO:" \
2258 "checking for C compiler version" >&5
2259ac_compiler=`set X $ac_compile; echo $2`
2260{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2261 (eval $ac_compiler --version </dev/null >&5) 2>&5
2262 ac_status=$?
2263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2264 (exit $ac_status); }
2265{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2266 (eval $ac_compiler -v </dev/null >&5) 2>&5
2267 ac_status=$?
2268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2269 (exit $ac_status); }
2270{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2271 (eval $ac_compiler -V </dev/null >&5) 2>&5
2272 ac_status=$?
2273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2274 (exit $ac_status); }
2275
2276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002277/* confdefs.h. */
2278_ACEOF
2279cat confdefs.h >>conftest.$ac_ext
2280cat >>conftest.$ac_ext <<_ACEOF
2281/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002282
Martin v. Löwis11437992002-04-12 09:54:03 +00002283int
2284main ()
2285{
2286
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002292ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002293# Try to create an executable without -o first, disregard a.out.
2294# It will help us diagnose broken compilers, and finding out an intuition
2295# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002296echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2297echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002298ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2299if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2300 (eval $ac_link_default) 2>&5
2301 ac_status=$?
2302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2303 (exit $ac_status); }; then
2304 # Find the output, starting from the most likely. This scheme is
2305# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2306# resort.
2307
2308# Be careful to initialize this variable, since it used to be cached.
2309# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2310ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002311# b.out is created by i960 compilers.
2312for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2313do
2314 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002316 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002318 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002319 # This is the source file.
2320 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002321 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002322 # We found the default executable, but exeext='' is most
2323 # certainly right.
2324 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002325 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002326 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2327 # FIXME: I believe we export ac_cv_exeext for Libtool,
2328 # but it would be cool to find out if it's true. Does anybody
2329 # maintain Libtool? --akim.
2330 export ac_cv_exeext
2331 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002332 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002333 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002334 esac
2335done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002336else
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002338sed 's/^/| /' conftest.$ac_ext >&5
2339
2340{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2341See \`config.log' for more details." >&5
2342echo "$as_me: error: C compiler cannot create executables
2343See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002345fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002346
Martin v. Löwis11437992002-04-12 09:54:03 +00002347ac_exeext=$ac_cv_exeext
2348echo "$as_me:$LINENO: result: $ac_file" >&5
2349echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002350
Martin v. Löwis11437992002-04-12 09:54:03 +00002351# Check the compiler produces executables we can run. If not, either
2352# the compiler is broken, or we cross compile.
2353echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2354echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2355# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2356# If not cross compiling, check that we can run a simple program.
2357if test "$cross_compiling" != yes; then
2358 if { ac_try='./$ac_file'
2359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2360 (eval $ac_try) 2>&5
2361 ac_status=$?
2362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2363 (exit $ac_status); }; }; then
2364 cross_compiling=no
2365 else
2366 if test "$cross_compiling" = maybe; then
2367 cross_compiling=yes
2368 else
2369 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002370If you meant to cross compile, use \`--host'.
2371See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002372echo "$as_me: 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." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002375 { (exit 1); exit 1; }; }
2376 fi
2377 fi
2378fi
2379echo "$as_me:$LINENO: result: yes" >&5
2380echo "${ECHO_T}yes" >&6
2381
Skip Montanaro6dead952003-09-25 14:50:04 +00002382rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002383ac_clean_files=$ac_clean_files_save
2384# Check the compiler produces executables we can run. If not, either
2385# the compiler is broken, or we cross compile.
2386echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2387echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2388echo "$as_me:$LINENO: result: $cross_compiling" >&5
2389echo "${ECHO_T}$cross_compiling" >&6
2390
2391echo "$as_me:$LINENO: checking for suffix of executables" >&5
2392echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2393if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2394 (eval $ac_link) 2>&5
2395 ac_status=$?
2396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2397 (exit $ac_status); }; then
2398 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2399# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2400# work properly (i.e., refer to `conftest.exe'), while it won't with
2401# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402for ac_file in conftest.exe conftest conftest.*; do
2403 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002406 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002407 export ac_cv_exeext
2408 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002409 * ) break;;
2410 esac
2411done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412else
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2414See \`config.log' for more details." >&5
2415echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002417 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002418fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420rm -f conftest$ac_cv_exeext
2421echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2422echo "${ECHO_T}$ac_cv_exeext" >&6
2423
2424rm -f conftest.$ac_ext
2425EXEEXT=$ac_cv_exeext
2426ac_exeext=$EXEEXT
2427echo "$as_me:$LINENO: checking for suffix of object files" >&5
2428echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2429if test "${ac_cv_objext+set}" = set; then
2430 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002431else
Martin v. Löwis11437992002-04-12 09:54:03 +00002432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002433/* confdefs.h. */
2434_ACEOF
2435cat confdefs.h >>conftest.$ac_ext
2436cat >>conftest.$ac_ext <<_ACEOF
2437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
Martin v. Löwis11437992002-04-12 09:54:03 +00002439int
2440main ()
2441{
2442
2443 ;
2444 return 0;
2445}
2446_ACEOF
2447rm -f conftest.o conftest.obj
2448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2449 (eval $ac_compile) 2>&5
2450 ac_status=$?
2451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2452 (exit $ac_status); }; then
2453 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2454 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2457 break;;
2458 esac
2459done
2460else
2461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002462sed 's/^/| /' conftest.$ac_ext >&5
2463
2464{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2465See \`config.log' for more details." >&5
2466echo "$as_me: error: cannot compute suffix of object files: cannot compile
2467See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 { (exit 1); exit 1; }; }
2469fi
2470
2471rm -f conftest.$ac_cv_objext conftest.$ac_ext
2472fi
2473echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2474echo "${ECHO_T}$ac_cv_objext" >&6
2475OBJEXT=$ac_cv_objext
2476ac_objext=$OBJEXT
2477echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2478echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2479if test "${ac_cv_c_compiler_gnu+set}" = set; then
2480 echo $ECHO_N "(cached) $ECHO_C" >&6
2481else
2482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002483/* confdefs.h. */
2484_ACEOF
2485cat confdefs.h >>conftest.$ac_ext
2486cat >>conftest.$ac_ext <<_ACEOF
2487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
Martin v. Löwis11437992002-04-12 09:54:03 +00002489int
2490main ()
2491{
2492#ifndef __GNUC__
2493 choke me
2494#endif
2495
2496 ;
2497 return 0;
2498}
2499_ACEOF
2500rm -f conftest.$ac_objext
2501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 grep -v '^ *+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002509 { ac_try='test -z "$ac_c_werror_flag"
2510 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2512 (eval $ac_try) 2>&5
2513 ac_status=$?
2514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515 (exit $ac_status); }; } &&
2516 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2518 (eval $ac_try) 2>&5
2519 ac_status=$?
2520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2521 (exit $ac_status); }; }; then
2522 ac_compiler_gnu=yes
2523else
2524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002525sed 's/^/| /' conftest.$ac_ext >&5
2526
Martin v. Löwis11437992002-04-12 09:54:03 +00002527ac_compiler_gnu=no
2528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002530ac_cv_c_compiler_gnu=$ac_compiler_gnu
2531
2532fi
2533echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2534echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2535GCC=`test $ac_compiler_gnu = yes && echo yes`
2536ac_test_CFLAGS=${CFLAGS+set}
2537ac_save_CFLAGS=$CFLAGS
2538CFLAGS="-g"
2539echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2540echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2541if test "${ac_cv_prog_cc_g+set}" = set; then
2542 echo $ECHO_N "(cached) $ECHO_C" >&6
2543else
2544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002545/* confdefs.h. */
2546_ACEOF
2547cat confdefs.h >>conftest.$ac_ext
2548cat >>conftest.$ac_ext <<_ACEOF
2549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551int
2552main ()
2553{
2554
2555 ;
2556 return 0;
2557}
2558_ACEOF
2559rm -f conftest.$ac_objext
2560if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002561 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002563 grep -v '^ *+' conftest.er1 >conftest.err
2564 rm -f conftest.er1
2565 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002568 { ac_try='test -z "$ac_c_werror_flag"
2569 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2571 (eval $ac_try) 2>&5
2572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }; } &&
2575 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2577 (eval $ac_try) 2>&5
2578 ac_status=$?
2579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2580 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002581 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582else
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002584sed 's/^/| /' conftest.$ac_ext >&5
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002587fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002588rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002590echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2591echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002592if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002594elif test $ac_cv_prog_cc_g = yes; then
2595 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002596 CFLAGS="-g -O2"
2597 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002598 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002601 if test "$GCC" = yes; then
2602 CFLAGS="-O2"
2603 else
2604 CFLAGS=
2605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002606fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002607echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2608echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2609if test "${ac_cv_prog_cc_stdc+set}" = set; then
2610 echo $ECHO_N "(cached) $ECHO_C" >&6
2611else
2612 ac_cv_prog_cc_stdc=no
2613ac_save_CC=$CC
2614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
2620#include <stdarg.h>
2621#include <stdio.h>
2622#include <sys/types.h>
2623#include <sys/stat.h>
2624/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2625struct buf { int x; };
2626FILE * (*rcsopen) (struct buf *, struct stat *, int);
2627static char *e (p, i)
2628 char **p;
2629 int i;
2630{
2631 return p[i];
2632}
2633static char *f (char * (*g) (char **, int), char **p, ...)
2634{
2635 char *s;
2636 va_list v;
2637 va_start (v,p);
2638 s = g (p, va_arg (v,int));
2639 va_end (v);
2640 return s;
2641}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002642
2643/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2644 function prototypes and stuff, but not '\xHH' hex character constants.
2645 These don't provoke an error unfortunately, instead are silently treated
2646 as 'x'. The following induces an error, until -std1 is added to get
2647 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2648 array size at least. It's necessary to write '\x00'==0 to get something
2649 that's true only with -std1. */
2650int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2651
Skip Montanaro6dead952003-09-25 14:50:04 +00002652int test (int i, double x);
2653struct s1 {int (*f) (int a);};
2654struct s2 {int (*f) (double a);};
2655int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2656int argc;
2657char **argv;
2658int
2659main ()
2660{
2661return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2662 ;
2663 return 0;
2664}
2665_ACEOF
2666# Don't try gcc -ansi; that turns off useful extensions and
2667# breaks some systems' header files.
2668# AIX -qlanglvl=ansi
2669# Ultrix and OSF/1 -std1
2670# HP-UX 10.20 and later -Ae
2671# HP-UX older versions -Aa -D_HPUX_SOURCE
2672# SVR4 -Xc -D__EXTENSIONS__
2673for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2674do
2675 CC="$ac_save_CC $ac_arg"
2676 rm -f conftest.$ac_objext
2677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002680 grep -v '^ *+' conftest.er1 >conftest.err
2681 rm -f conftest.er1
2682 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2684 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002685 { ac_try='test -z "$ac_c_werror_flag"
2686 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2688 (eval $ac_try) 2>&5
2689 ac_status=$?
2690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691 (exit $ac_status); }; } &&
2692 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2694 (eval $ac_try) 2>&5
2695 ac_status=$?
2696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2697 (exit $ac_status); }; }; then
2698 ac_cv_prog_cc_stdc=$ac_arg
2699break
2700else
2701 echo "$as_me: failed program was:" >&5
2702sed 's/^/| /' conftest.$ac_ext >&5
2703
2704fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002705rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002706done
2707rm -f conftest.$ac_ext conftest.$ac_objext
2708CC=$ac_save_CC
2709
2710fi
2711
2712case "x$ac_cv_prog_cc_stdc" in
2713 x|xno)
2714 echo "$as_me:$LINENO: result: none needed" >&5
2715echo "${ECHO_T}none needed" >&6 ;;
2716 *)
2717 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2718echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2719 CC="$CC $ac_cv_prog_cc_stdc" ;;
2720esac
2721
Martin v. Löwis11437992002-04-12 09:54:03 +00002722# Some people use a C++ compiler to compile C. Since we use `exit',
2723# in C++ we need to declare it. In case someone uses the same compiler
2724# for both compiling C and C++ we need to have the C++ compiler decide
2725# the declaration of exit, since it's the most demanding environment.
2726cat >conftest.$ac_ext <<_ACEOF
2727#ifndef __cplusplus
2728 choke me
2729#endif
2730_ACEOF
2731rm -f conftest.$ac_objext
2732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 grep -v '^ *+' conftest.er1 >conftest.err
2736 rm -f conftest.er1
2737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2739 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002740 { ac_try='test -z "$ac_c_werror_flag"
2741 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2743 (eval $ac_try) 2>&5
2744 ac_status=$?
2745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2746 (exit $ac_status); }; } &&
2747 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2749 (eval $ac_try) 2>&5
2750 ac_status=$?
2751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2752 (exit $ac_status); }; }; then
2753 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 'extern "C" void std::exit (int) throw (); using std::exit;' \
2756 'extern "C" void std::exit (int); using std::exit;' \
2757 'extern "C" void exit (int) throw ();' \
2758 'extern "C" void exit (int);' \
2759 'void exit (int);'
2760do
2761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002762/* confdefs.h. */
2763_ACEOF
2764cat confdefs.h >>conftest.$ac_ext
2765cat >>conftest.$ac_ext <<_ACEOF
2766/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002767$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002768#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002769int
2770main ()
2771{
2772exit (42);
2773 ;
2774 return 0;
2775}
2776_ACEOF
2777rm -f conftest.$ac_objext
2778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002781 grep -v '^ *+' conftest.er1 >conftest.err
2782 rm -f conftest.er1
2783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002786 { ac_try='test -z "$ac_c_werror_flag"
2787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2789 (eval $ac_try) 2>&5
2790 ac_status=$?
2791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792 (exit $ac_status); }; } &&
2793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2795 (eval $ac_try) 2>&5
2796 ac_status=$?
2797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2798 (exit $ac_status); }; }; then
2799 :
2800else
2801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002802sed 's/^/| /' conftest.$ac_ext >&5
2803
Martin v. Löwis11437992002-04-12 09:54:03 +00002804continue
2805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002808/* confdefs.h. */
2809_ACEOF
2810cat confdefs.h >>conftest.$ac_ext
2811cat >>conftest.$ac_ext <<_ACEOF
2812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002813$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002814int
2815main ()
2816{
2817exit (42);
2818 ;
2819 return 0;
2820}
2821_ACEOF
2822rm -f conftest.$ac_objext
2823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002826 grep -v '^ *+' conftest.er1 >conftest.err
2827 rm -f conftest.er1
2828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2830 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002831 { ac_try='test -z "$ac_c_werror_flag"
2832 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2834 (eval $ac_try) 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); }; } &&
2838 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2840 (eval $ac_try) 2>&5
2841 ac_status=$?
2842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2843 (exit $ac_status); }; }; then
2844 break
2845else
2846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002847sed 's/^/| /' conftest.$ac_ext >&5
2848
Martin v. Löwis11437992002-04-12 09:54:03 +00002849fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002850rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002851done
2852rm -f conftest*
2853if test -n "$ac_declaration"; then
2854 echo '#ifdef __cplusplus' >>confdefs.h
2855 echo $ac_declaration >>confdefs.h
2856 echo '#endif' >>confdefs.h
2857fi
2858
2859else
2860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002861sed 's/^/| /' conftest.$ac_ext >&5
2862
Martin v. Löwis11437992002-04-12 09:54:03 +00002863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002865ac_ext=c
2866ac_cpp='$CPP $CPPFLAGS'
2867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002870
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871
2872# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
2874ac_ext=c
2875ac_cpp='$CPP $CPPFLAGS'
2876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2878ac_compiler_gnu=$ac_cv_c_compiler_gnu
2879echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2880echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002881# On Suns, sometimes $CPP names a directory.
2882if test -n "$CPP" && test -d "$CPP"; then
2883 CPP=
2884fi
2885if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 if test "${ac_cv_prog_CPP+set}" = set; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002888else
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 # Double quotes because CPP needs to be expanded
2890 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2891 do
2892 ac_preproc_ok=false
2893for ac_c_preproc_warn_flag in '' yes
2894do
2895 # Use a header file that comes with gcc, so configuring glibc
2896 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002897 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2898 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002899 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 # not just through cpp. "Syntax error" is here to catch this case.
2901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002902/* confdefs.h. */
2903_ACEOF
2904cat confdefs.h >>conftest.$ac_ext
2905cat >>conftest.$ac_ext <<_ACEOF
2906/* end confdefs.h. */
2907#ifdef __STDC__
2908# include <limits.h>
2909#else
2910# include <assert.h>
2911#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002912 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002913_ACEOF
2914if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2915 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2916 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002917 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 rm -f conftest.er1
2919 cat conftest.err >&5
2920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2921 (exit $ac_status); } >/dev/null; then
2922 if test -s conftest.err; then
2923 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002924 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 else
2926 ac_cpp_err=
2927 fi
2928else
2929 ac_cpp_err=yes
2930fi
2931if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002932 :
2933else
Martin v. Löwis11437992002-04-12 09:54:03 +00002934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002935sed 's/^/| /' conftest.$ac_ext >&5
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 # Broken: fails on valid input.
2938continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002940rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 # OK, works on sane cases. Now check whether non-existent headers
2943 # can be detected and how.
2944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002945/* confdefs.h. */
2946_ACEOF
2947cat confdefs.h >>conftest.$ac_ext
2948cat >>conftest.$ac_ext <<_ACEOF
2949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002950#include <ac_nonexistent.h>
2951_ACEOF
2952if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2953 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2954 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002955 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 rm -f conftest.er1
2957 cat conftest.err >&5
2958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2959 (exit $ac_status); } >/dev/null; then
2960 if test -s conftest.err; then
2961 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002962 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002963 else
2964 ac_cpp_err=
2965 fi
2966else
2967 ac_cpp_err=yes
2968fi
2969if test -z "$ac_cpp_err"; then
2970 # Broken: success on invalid input.
2971continue
2972else
2973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002974sed 's/^/| /' conftest.$ac_ext >&5
2975
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 # Passes both tests.
2977ac_preproc_ok=:
2978break
2979fi
2980rm -f conftest.err conftest.$ac_ext
2981
2982done
2983# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2984rm -f conftest.err conftest.$ac_ext
2985if $ac_preproc_ok; then
2986 break
2987fi
2988
2989 done
2990 ac_cv_prog_CPP=$CPP
2991
2992fi
2993 CPP=$ac_cv_prog_CPP
2994else
2995 ac_cv_prog_CPP=$CPP
2996fi
2997echo "$as_me:$LINENO: result: $CPP" >&5
2998echo "${ECHO_T}$CPP" >&6
2999ac_preproc_ok=false
3000for ac_c_preproc_warn_flag in '' yes
3001do
3002 # Use a header file that comes with gcc, so configuring glibc
3003 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003004 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3005 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 # On the NeXT, cc -E runs the code through the compiler's parser,
3007 # not just through cpp. "Syntax error" is here to catch this case.
3008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014#ifdef __STDC__
3015# include <limits.h>
3016#else
3017# include <assert.h>
3018#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003019 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003020_ACEOF
3021if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3022 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3023 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003024 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003025 rm -f conftest.er1
3026 cat conftest.err >&5
3027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3028 (exit $ac_status); } >/dev/null; then
3029 if test -s conftest.err; then
3030 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003031 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003032 else
3033 ac_cpp_err=
3034 fi
3035else
3036 ac_cpp_err=yes
3037fi
3038if test -z "$ac_cpp_err"; then
3039 :
3040else
3041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003042sed 's/^/| /' conftest.$ac_ext >&5
3043
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 # Broken: fails on valid input.
3045continue
3046fi
3047rm -f conftest.err conftest.$ac_ext
3048
3049 # OK, works on sane cases. Now check whether non-existent headers
3050 # can be detected and how.
3051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003052/* confdefs.h. */
3053_ACEOF
3054cat confdefs.h >>conftest.$ac_ext
3055cat >>conftest.$ac_ext <<_ACEOF
3056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003057#include <ac_nonexistent.h>
3058_ACEOF
3059if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3060 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3061 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003062 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003063 rm -f conftest.er1
3064 cat conftest.err >&5
3065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3066 (exit $ac_status); } >/dev/null; then
3067 if test -s conftest.err; then
3068 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003069 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003070 else
3071 ac_cpp_err=
3072 fi
3073else
3074 ac_cpp_err=yes
3075fi
3076if test -z "$ac_cpp_err"; then
3077 # Broken: success on invalid input.
3078continue
3079else
3080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003081sed 's/^/| /' conftest.$ac_ext >&5
3082
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 # Passes both tests.
3084ac_preproc_ok=:
3085break
3086fi
3087rm -f conftest.err conftest.$ac_ext
3088
3089done
3090# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3091rm -f conftest.err conftest.$ac_ext
3092if $ac_preproc_ok; then
3093 :
3094else
Skip Montanaro6dead952003-09-25 14:50:04 +00003095 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3096See \`config.log' for more details." >&5
3097echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3098See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 { (exit 1); exit 1; }; }
3100fi
3101
3102ac_ext=c
3103ac_cpp='$CPP $CPPFLAGS'
3104ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3105ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3106ac_compiler_gnu=$ac_cv_c_compiler_gnu
3107
3108
Skip Montanaro6dead952003-09-25 14:50:04 +00003109echo "$as_me:$LINENO: checking for egrep" >&5
3110echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3111if test "${ac_cv_prog_egrep+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3113else
3114 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3115 then ac_cv_prog_egrep='grep -E'
3116 else ac_cv_prog_egrep='egrep'
3117 fi
3118fi
3119echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3120echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3121 EGREP=$ac_cv_prog_egrep
3122
3123
Martin v. Löwis11437992002-04-12 09:54:03 +00003124
3125echo "$as_me:$LINENO: checking for AIX" >&5
3126echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003128/* confdefs.h. */
3129_ACEOF
3130cat confdefs.h >>conftest.$ac_ext
3131cat >>conftest.$ac_ext <<_ACEOF
3132/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003133#ifdef _AIX
3134 yes
3135#endif
3136
Martin v. Löwis11437992002-04-12 09:54:03 +00003137_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003139 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003140 echo "$as_me:$LINENO: result: yes" >&5
3141echo "${ECHO_T}yes" >&6
3142cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003143#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003144_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003145
3146else
Martin v. Löwis11437992002-04-12 09:54:03 +00003147 echo "$as_me:$LINENO: result: no" >&5
3148echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149fi
3150rm -f conftest*
3151
Michael W. Hudson54241132001-12-07 15:38:26 +00003152
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003153
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003154# Check for unsupported systems
3155case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003156Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003157 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3158 echo See README for details.
3159 exit 1;;
3160esac
3161
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for --with-suffix" >&5
3164echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003166# Check whether --with-suffix or --without-suffix was given.
3167if test "${with_suffix+set}" = set; then
3168 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003170 case $withval in
3171 no) EXEEXT=;;
3172 yes) EXEEXT=.exe;;
3173 *) EXEEXT=$withval;;
3174 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003175fi;
3176echo "$as_me:$LINENO: result: $EXEEXT" >&5
3177echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003178
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003179# Test whether we're running on a non-case-sensitive system, in which
3180# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003181
Martin v. Löwis11437992002-04-12 09:54:03 +00003182echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3183echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003184if test ! -d CaseSensitiveTestDir; then
3185mkdir CaseSensitiveTestDir
3186fi
3187
3188if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003189then
Martin v. Löwis11437992002-04-12 09:54:03 +00003190 echo "$as_me:$LINENO: result: yes" >&5
3191echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003192 BUILDEXEEXT=.exe
3193else
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 echo "$as_me:$LINENO: result: no" >&5
3195echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003196 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003197fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003198rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003199
Guido van Rossumdd997f71998-10-07 19:58:26 +00003200case $MACHDEP in
3201bsdos*)
3202 case $CC in
3203 gcc) CC="$CC -D_HAVE_BSDI";;
3204 esac;;
3205esac
3206
Guido van Rossum24b1e751997-08-21 02:29:16 +00003207case $ac_sys_system in
3208hp*|HP*)
3209 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003210 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003211 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003212Monterey*)
3213 case $CC in
3214 cc) CC="$CC -Wl,-Bexport";;
3215 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003216SunOS*)
3217 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003218
3219cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003220#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003221_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003222
3223 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003224esac
3225
Michael W. Hudson54241132001-12-07 15:38:26 +00003226
3227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228echo "$as_me:$LINENO: checking LIBRARY" >&5
3229echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003230if test -z "$LIBRARY"
3231then
3232 LIBRARY='libpython$(VERSION).a'
3233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003234echo "$as_me:$LINENO: result: $LIBRARY" >&5
3235echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003236
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003237# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003238# name of the library into which to insert object files). BLDLIBRARY is also
3239# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3240# is blank as the main program is not linked directly against LDLIBRARY.
3241# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3242# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3243# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3244# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003245#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003246# RUNSHARED is used to run shared python without installed libraries
3247#
3248# INSTSONAME is the name of the shared library that will be use to install
3249# on the system - some systems like version suffix, others don't
3250
3251
Michael W. Hudson54241132001-12-07 15:38:26 +00003252
3253
3254
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003255
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003256LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003257BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003258INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003259DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003260LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003261RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003262
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003263# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003264# If CXX is set, and if it is needed to link a main function that was
3265# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3266# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003267# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003268# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003269
Martin v. Löwis11437992002-04-12 09:54:03 +00003270echo "$as_me:$LINENO: checking LINKCC" >&5
3271echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003272if test -z "$LINKCC"
3273then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003274 if test -z "$CXX"; then
3275 LINKCC="\$(PURIFY) \$(CC)"
3276 else
Martin v. Löwis147fbe52005-08-07 21:09:30 +00003277 echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
3278 $CXX -c conftest_a.cc # 2>&5
3279 echo 'void foo(){}' > conftest_b.$ac_ext
3280 $CC -c conftest_b.$ac_ext # 2>&5
3281 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 +00003282 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3283 then
3284 LINKCC="\$(PURIFY) \$(CC)"
3285 else
3286 LINKCC="\$(PURIFY) \$(CXX)"
3287 fi
3288 rm -fr conftest*
3289 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003290 case $ac_sys_system in
3291 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003292 exp_extra="\"\""
3293 if test $ac_sys_release -ge 5 -o \
3294 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3295 exp_extra="."
3296 fi
3297 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003298 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003299 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003300 esac
3301fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003302echo "$as_me:$LINENO: result: $LINKCC" >&5
3303echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305echo "$as_me:$LINENO: checking for --enable-shared" >&5
3306echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003307# Check whether --enable-shared or --disable-shared was given.
3308if test "${enable_shared+set}" = set; then
3309 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312
3313if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003314then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003315 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003316 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003317 enable_shared="yes";;
3318 *)
3319 enable_shared="no";;
3320 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003322echo "$as_me:$LINENO: result: $enable_shared" >&5
3323echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003324
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003325echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3326echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3327# Check whether --enable-profiling or --disable-profiling was given.
3328if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 ac_save_cc="$CC"
3331 CC="$CC -pg"
3332 if test "$cross_compiling" = yes; then
3333 ac_enable_profiling="no"
3334else
3335 cat >conftest.$ac_ext <<_ACEOF
3336/* confdefs.h. */
3337_ACEOF
3338cat confdefs.h >>conftest.$ac_ext
3339cat >>conftest.$ac_ext <<_ACEOF
3340/* end confdefs.h. */
3341int main() { return 0; }
3342_ACEOF
3343rm -f conftest$ac_exeext
3344if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3345 (eval $ac_link) 2>&5
3346 ac_status=$?
3347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3350 (eval $ac_try) 2>&5
3351 ac_status=$?
3352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3353 (exit $ac_status); }; }; then
3354 ac_enable_profiling="yes"
3355else
3356 echo "$as_me: program exited with status $ac_status" >&5
3357echo "$as_me: failed program was:" >&5
3358sed 's/^/| /' conftest.$ac_ext >&5
3359
3360( exit $ac_status )
3361ac_enable_profiling="no"
3362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003363rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003364fi
3365 CC="$ac_save_cc"
3366fi;
3367echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3368echo "${ECHO_T}$ac_enable_profiling" >&6
3369
3370case "$ac_enable_profiling" in
3371 "yes")
3372 BASECFLAGS="-pg $BASECFLAGS"
3373 LDFLAGS="-pg $LDFLAGS"
3374 ;;
3375esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003376
Martin v. Löwis11437992002-04-12 09:54:03 +00003377echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3378echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003379
Guido van Rossumb8552162001-09-05 14:58:11 +00003380# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3381# library that we build, but we do not want to link against it (we
3382# will find it with a -framework option). For this reason there is an
3383# extra variable BLDLIBRARY against which Python and the extension
3384# modules are linked, BLDLIBRARY. This is normally the same as
3385# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003386if test "$enable_framework"
3387then
3388 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003389 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003390 BLDLIBRARY=''
3391else
3392 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003393fi
Jack Jansene578a632001-08-15 01:27:14 +00003394
Martin v. Löwis1142de32002-03-29 16:28:31 +00003395# Other platforms follow
3396if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003397
3398cat >>confdefs.h <<\_ACEOF
3399#define Py_ENABLE_SHARED 1
3400_ACEOF
3401
Martin v. Löwis1142de32002-03-29 16:28:31 +00003402 case $ac_sys_system in
3403 BeOS*)
3404 LDLIBRARY='libpython$(VERSION).so'
3405 ;;
3406 CYGWIN*)
3407 LDLIBRARY='libpython$(VERSION).dll.a'
3408 DLLLIBRARY='libpython$(VERSION).dll'
3409 ;;
3410 SunOS*)
3411 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003412 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003413 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003414 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003415 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00003416 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003417 LDLIBRARY='libpython$(VERSION).so'
3418 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003419 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003420 case $ac_sys_system in
3421 FreeBSD*)
3422 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3423 ;;
3424 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003425 INSTSONAME="$LDLIBRARY".$SOVERSION
3426 ;;
3427 hp*|HP*)
3428 LDLIBRARY='libpython$(VERSION).sl'
3429 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003430 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003431 ;;
3432 OSF*)
3433 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003434 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003435 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003436 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003437 atheos*)
3438 LDLIBRARY='libpython$(VERSION).so'
3439 BLDLIBRARY='-L. -lpython$(VERSION)'
3440 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3441 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003442 esac
Jason Tishler30765592003-09-04 11:04:06 +00003443else # shared is disabled
3444 case $ac_sys_system in
3445 CYGWIN*)
3446 BLDLIBRARY='$(LIBRARY)'
3447 LDLIBRARY='libpython$(VERSION).dll.a'
3448 ;;
3449 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003450fi
3451
Martin v. Löwis11437992002-04-12 09:54:03 +00003452echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3453echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455if test -n "$ac_tool_prefix"; then
3456 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3457set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3458echo "$as_me:$LINENO: checking for $ac_word" >&5
3459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3460if test "${ac_cv_prog_RANLIB+set}" = set; then
3461 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462else
3463 if test -n "$RANLIB"; then
3464 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469 IFS=$as_save_IFS
3470 test -z "$as_dir" && as_dir=.
3471 for ac_exec_ext in '' $ac_executable_extensions; do
3472 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3473 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3474 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3475 break 2
3476 fi
3477done
3478done
3479
Guido van Rossum627b2d71993-12-24 10:39:16 +00003480fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003482RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003483if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 echo "$as_me:$LINENO: result: $RANLIB" >&5
3485echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003486else
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 echo "$as_me:$LINENO: result: no" >&5
3488echo "${ECHO_T}no" >&6
3489fi
3490
3491fi
3492if test -z "$ac_cv_prog_RANLIB"; then
3493 ac_ct_RANLIB=$RANLIB
3494 # Extract the first word of "ranlib", so it can be a program name with args.
3495set dummy ranlib; ac_word=$2
3496echo "$as_me:$LINENO: checking for $ac_word" >&5
3497echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3500else
3501 if test -n "$ac_ct_RANLIB"; then
3502 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3503else
3504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3505for as_dir in $PATH
3506do
3507 IFS=$as_save_IFS
3508 test -z "$as_dir" && as_dir=.
3509 for ac_exec_ext in '' $ac_executable_extensions; do
3510 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3511 ac_cv_prog_ac_ct_RANLIB="ranlib"
3512 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3513 break 2
3514 fi
3515done
3516done
3517
3518 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3519fi
3520fi
3521ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3522if test -n "$ac_ct_RANLIB"; then
3523 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3524echo "${ECHO_T}$ac_ct_RANLIB" >&6
3525else
3526 echo "$as_me:$LINENO: result: no" >&5
3527echo "${ECHO_T}no" >&6
3528fi
3529
3530 RANLIB=$ac_ct_RANLIB
3531else
3532 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003533fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003534
3535
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536for ac_prog in ar aal
3537do
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003540echo "$as_me:$LINENO: checking for $ac_word" >&5
3541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3542if test "${ac_cv_prog_AR+set}" = set; then
3543 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544else
3545 if test -n "$AR"; then
3546 ac_cv_prog_AR="$AR" # Let the user override the test.
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549for as_dir in $PATH
3550do
3551 IFS=$as_save_IFS
3552 test -z "$as_dir" && as_dir=.
3553 for ac_exec_ext in '' $ac_executable_extensions; do
3554 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3555 ac_cv_prog_AR="$ac_prog"
3556 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3557 break 2
3558 fi
3559done
3560done
3561
Guido van Rossum7f43da71994-08-01 12:15:30 +00003562fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 echo "$as_me:$LINENO: result: $AR" >&5
3567echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568else
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 echo "$as_me:$LINENO: result: no" >&5
3570echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003574done
3575test -n "$AR" || AR="ar"
3576
Michael W. Hudson54241132001-12-07 15:38:26 +00003577
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003578
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003579# Extract the first word of "svnversion", so it can be a program name with args.
3580set dummy svnversion; ac_word=$2
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003581echo "$as_me:$LINENO: checking for $ac_word" >&5
3582echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3584 echo $ECHO_N "(cached) $ECHO_C" >&6
3585else
3586 if test -n "$SVNVERSION"; then
3587 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
3594 for ac_exec_ext in '' $ac_executable_extensions; do
3595 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003596 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003597 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3598 break 2
3599 fi
3600done
3601done
3602
3603fi
3604fi
3605SVNVERSION=$ac_cv_prog_SVNVERSION
3606if test -n "$SVNVERSION"; then
3607 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3608echo "${ECHO_T}$SVNVERSION" >&6
3609else
3610 echo "$as_me:$LINENO: result: no" >&5
3611echo "${ECHO_T}no" >&6
3612fi
3613
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003614if test $SVNVERSION = found
3615then
3616 SVNVERSION="svnversion \$(srcdir)"
3617else
3618 SVNVERSION="echo exported"
3619fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003620
Neil Schemenauera42c8272001-03-31 00:01:55 +00003621case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003622bsdos*|hp*|HP*)
3623 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003624 if test -z "$INSTALL"
3625 then
3626 INSTALL="${srcdir}/install-sh -c"
3627 fi
3628esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003629ac_aux_dir=
3630for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3631 if test -f $ac_dir/install-sh; then
3632 ac_aux_dir=$ac_dir
3633 ac_install_sh="$ac_aux_dir/install-sh -c"
3634 break
3635 elif 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
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 elif test -f $ac_dir/shtool; then
3640 ac_aux_dir=$ac_dir
3641 ac_install_sh="$ac_aux_dir/shtool install -c"
3642 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003643 fi
3644done
3645if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3647echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3648 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3651ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3652ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003653
3654# Find a good install program. We prefer a C program (faster),
3655# so one script is as good as another. But avoid the broken or
3656# incompatible versions:
3657# SysV /etc/install, /usr/sbin/install
3658# SunOS /usr/etc/install
3659# IRIX /sbin/install
3660# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003661# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003662# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3663# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3664# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003665# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003667echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3668echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003669if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670if test "${ac_cv_path_install+set}" = set; then
3671 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003672else
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
3678 # Account for people who put trailing slashes in PATH elements.
3679case $as_dir/ in
3680 ./ | .// | /cC/* | \
3681 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003682 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 /usr/ucb/* ) ;;
3684 *)
3685 # OSF1 and SCO ODT 3.0 have their own names for install.
3686 # Don't use installbsd from OSF since it installs stuff as root
3687 # by default.
3688 for ac_prog in ginstall scoinst install; do
3689 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003690 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3691 if test $ac_prog = install &&
3692 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3693 # AIX install. It has an incompatible calling convention.
3694 :
3695 elif test $ac_prog = install &&
3696 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3697 # program-specific install script used by HP pwplus--don't use.
3698 :
3699 else
3700 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3701 break 3
3702 fi
3703 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003704 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 done
3706 ;;
3707esac
3708done
3709
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003710
3711fi
3712 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003714 else
3715 # As a last resort, use the slow shell script. We don't cache a
3716 # path for INSTALL within a source directory, because that will
3717 # break other packages using the cache if that directory is
3718 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003720 fi
3721fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003722echo "$as_me:$LINENO: result: $INSTALL" >&5
3723echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003724
3725# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3726# It thinks the first close brace ends the variable substitution.
3727test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3728
Martin v. Löwis11437992002-04-12 09:54:03 +00003729test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003730
3731test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3732
Michael W. Hudson54241132001-12-07 15:38:26 +00003733
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734# Not every filesystem supports hard links
3735
3736if test -z "$LN" ; then
3737 case $ac_sys_system in
3738 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003739 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003740 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003741 *) LN=ln;;
3742 esac
3743fi
3744
Fred Drake109d9862001-07-11 06:27:56 +00003745# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003746echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3747echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3748
Fred Drake109d9862001-07-11 06:27:56 +00003749# Check whether --with-pydebug or --without-pydebug was given.
3750if test "${with_pydebug+set}" = set; then
3751 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003752
Fred Drake109d9862001-07-11 06:27:56 +00003753if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754then
3755
3756cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003757#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003758_ACEOF
3759
3760 echo "$as_me:$LINENO: result: yes" >&5
3761echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003762 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else echo "$as_me:$LINENO: result: no" >&5
3764echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003765fi
3766else
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 echo "$as_me:$LINENO: result: no" >&5
3768echo "${ECHO_T}no" >&6
3769fi;
Fred Drake109d9862001-07-11 06:27:56 +00003770
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3772# merged with this chunk of code?
3773
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003774# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003775# ------------------------
3776# (The following bit of code is complicated enough - please keep things
3777# indented properly. Just pretend you're editing Python code. ;-)
3778
3779# There are two parallel sets of case statements below, one that checks to
3780# see if OPT was set and one that does BASECFLAGS setting based upon
3781# compiler and platform. BASECFLAGS tweaks need to be made even if the
3782# user set OPT.
3783
3784# tweak OPT based on compiler and platform, only if the user didn't set
3785# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003786
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003787if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003788then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003789 case $GCC in
3790 yes)
3791 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003792 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003793 if test "$Py_DEBUG" = 'true' ; then
3794 # Optimization messes up debuggers, so turn it off for
3795 # debug builds.
3796 OPT="-g -Wall -Wstrict-prototypes"
3797 else
3798 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003799 fi
3800 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003801 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003802 OPT="-O3 -Wall -Wstrict-prototypes"
3803 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003804 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003805 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3807 ;;
3808 esac
Fred Drake109d9862001-07-11 06:27:56 +00003809 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003811 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003812 OPT="-O"
3813 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003814 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003815
3816 # The current (beta) Monterey compiler dies with optimizations
3817 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003818 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003819 Monterey*)
3820 OPT=""
3821 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003822 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003823
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003824fi
3825
Skip Montanarodecc6a42003-01-01 20:07:49 +00003826
3827# tweak BASECFLAGS based on compiler and platform
3828case $GCC in
3829yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003830 # Python violates C99 rules, by casting between incompatible
3831 # pointer types. GCC may generate bad code as a result of that,
3832 # so use -fno-strict-aliasing if supported.
3833 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3834echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3835 ac_save_cc="$CC"
3836 CC="$CC -fno-strict-aliasing"
3837 if test "$cross_compiling" = yes; then
3838 ac_cv_no_strict_aliasing_ok=no
3839else
3840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003841/* confdefs.h. */
3842_ACEOF
3843cat confdefs.h >>conftest.$ac_ext
3844cat >>conftest.$ac_ext <<_ACEOF
3845/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003846int main() { return 0; }
3847_ACEOF
3848rm -f conftest$ac_exeext
3849if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3850 (eval $ac_link) 2>&5
3851 ac_status=$?
3852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3853 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3855 (eval $ac_try) 2>&5
3856 ac_status=$?
3857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858 (exit $ac_status); }; }; then
3859 ac_cv_no_strict_aliasing_ok=yes
3860else
3861 echo "$as_me: program exited with status $ac_status" >&5
3862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003863sed 's/^/| /' conftest.$ac_ext >&5
3864
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003865( exit $ac_status )
3866ac_cv_no_strict_aliasing_ok=no
3867fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003868rm -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 +00003869fi
3870 CC="$ac_save_cc"
3871 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3872echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3873 if test $ac_cv_no_strict_aliasing_ok = yes
3874 then
3875 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3876 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003877 case $ac_sys_system in
3878 SCO_SV*)
3879 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3880 ;;
3881 # is there any other compiler on Darwin besides gcc?
3882 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003883 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003884 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00003885 OSF*)
3886 BASECFLAGS="$BASECFLAGS -mieee"
3887 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003888 esac
3889 ;;
3890
3891*)
3892 case $ac_sys_system in
3893 OpenUNIX*|UnixWare*)
3894 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3895 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003896 OSF*)
3897 BASECFLAGS="$BASECFLAGS -ieee -std"
3898 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003899 SCO_SV*)
3900 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3901 ;;
3902 esac
3903 ;;
3904esac
3905
Fred Drakee1ceaa02001-12-04 20:55:47 +00003906if test "$Py_DEBUG" = 'true'; then
3907 :
3908else
3909 OPT="-DNDEBUG $OPT"
3910fi
3911
Guido van Rossum563e7081996-09-10 18:20:48 +00003912if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003913then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003914 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003915fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003916
Neal Norwitz020c46a2006-01-07 21:39:28 +00003917# disable check for icc since it seems to pass, but generates a warning
3918if test "$CC" = icc
3919then
3920 ac_cv_opt_olimit_ok=no
3921fi
3922
Martin v. Löwis11437992002-04-12 09:54:03 +00003923echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3924echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3925if test "${ac_cv_opt_olimit_ok+set}" = set; then
3926 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003927else
3928 ac_save_cc="$CC"
3929CC="$CC -OPT:Olimit=0"
3930if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003931 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003932else
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003934/* confdefs.h. */
3935_ACEOF
3936cat confdefs.h >>conftest.$ac_ext
3937cat >>conftest.$ac_ext <<_ACEOF
3938/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003939int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003940_ACEOF
3941rm -f conftest$ac_exeext
3942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3943 (eval $ac_link) 2>&5
3944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3948 (eval $ac_try) 2>&5
3949 ac_status=$?
3950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3951 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003952 ac_cv_opt_olimit_ok=yes
3953else
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 echo "$as_me: program exited with status $ac_status" >&5
3955echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003956sed 's/^/| /' conftest.$ac_ext >&5
3957
Martin v. Löwis11437992002-04-12 09:54:03 +00003958( exit $ac_status )
3959ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003960fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003961rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003962fi
Guido van Rossum91922671997-10-09 20:24:13 +00003963CC="$ac_save_cc"
3964fi
3965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3967echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003968if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003969 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003970 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3971 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3972 # environment?
3973 Darwin*)
3974 ;;
3975 *)
3976 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3977 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003978 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003979else
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3981echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3982 if test "${ac_cv_olimit_ok+set}" = set; then
3983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003984else
3985 ac_save_cc="$CC"
3986 CC="$CC -Olimit 1500"
3987 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003988 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003989else
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003991/* confdefs.h. */
3992_ACEOF
3993cat confdefs.h >>conftest.$ac_ext
3994cat >>conftest.$ac_ext <<_ACEOF
3995/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003996int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003997_ACEOF
3998rm -f conftest$ac_exeext
3999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4000 (eval $ac_link) 2>&5
4001 ac_status=$?
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4005 (eval $ac_try) 2>&5
4006 ac_status=$?
4007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4008 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004009 ac_cv_olimit_ok=yes
4010else
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 echo "$as_me: program exited with status $ac_status" >&5
4012echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004013sed 's/^/| /' conftest.$ac_ext >&5
4014
Martin v. Löwis11437992002-04-12 09:54:03 +00004015( exit $ac_status )
4016ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004017fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004018rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004019fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004020 CC="$ac_save_cc"
4021fi
4022
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4024echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004025 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004026 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004027 fi
4028fi
4029
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004030# On some compilers, pthreads are available without further options
4031# (e.g. MacOS X). On some of these systems, the compiler will not
4032# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4033# So we have to see first whether pthreads are available without
4034# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00004035echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4036echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
4037if test "${ac_cv_pthread_is_default+set}" = set; then
4038 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004039else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004040 if test "$cross_compiling" = yes; then
4041 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004042else
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004044/* confdefs.h. */
4045_ACEOF
4046cat confdefs.h >>conftest.$ac_ext
4047cat >>conftest.$ac_ext <<_ACEOF
4048/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004049
Martin v. Löwis130fb172001-07-19 11:00:41 +00004050#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004051
4052void* routine(void* p){return NULL;}
4053
4054int main(){
4055 pthread_t p;
4056 if(pthread_create(&p,NULL,routine,NULL)!=0)
4057 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004058 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004059 return 0;
4060}
4061
Martin v. Löwis11437992002-04-12 09:54:03 +00004062_ACEOF
4063rm -f conftest$ac_exeext
4064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4065 (eval $ac_link) 2>&5
4066 ac_status=$?
4067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4068 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4070 (eval $ac_try) 2>&5
4071 ac_status=$?
4072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4073 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004074
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004075 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004076 ac_cv_kthread=no
4077 ac_cv_pthread=no
4078
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004079else
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 echo "$as_me: program exited with status $ac_status" >&5
4081echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004082sed 's/^/| /' conftest.$ac_ext >&5
4083
Martin v. Löwis11437992002-04-12 09:54:03 +00004084( exit $ac_status )
4085ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004086fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004087rm -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 +00004088fi
4089
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004090fi
4091
Martin v. Löwis11437992002-04-12 09:54:03 +00004092echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4093echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004094
Michael W. Hudson54241132001-12-07 15:38:26 +00004095
Martin v. Löwis11437992002-04-12 09:54:03 +00004096if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004097then
4098 ac_cv_kpthread=no
4099else
4100# -Kpthread, if available, provides the right #defines
4101# and linker options to make pthread_create available
4102# Some compilers won't report that they do not support -Kpthread,
4103# so we need to run a program to see whether it really made the
4104# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004105echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4106echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4107if test "${ac_cv_kpthread+set}" = set; then
4108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004109else
4110 ac_save_cc="$CC"
4111CC="$CC -Kpthread"
4112if test "$cross_compiling" = yes; then
4113 ac_cv_kpthread=no
4114else
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004116/* confdefs.h. */
4117_ACEOF
4118cat confdefs.h >>conftest.$ac_ext
4119cat >>conftest.$ac_ext <<_ACEOF
4120/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004121
4122#include <pthread.h>
4123
4124void* routine(void* p){return NULL;}
4125
4126int main(){
4127 pthread_t p;
4128 if(pthread_create(&p,NULL,routine,NULL)!=0)
4129 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004130 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004131 return 0;
4132}
4133
Martin v. Löwis11437992002-04-12 09:54:03 +00004134_ACEOF
4135rm -f conftest$ac_exeext
4136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4137 (eval $ac_link) 2>&5
4138 ac_status=$?
4139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4142 (eval $ac_try) 2>&5
4143 ac_status=$?
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004146 ac_cv_kpthread=yes
4147else
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 echo "$as_me: program exited with status $ac_status" >&5
4149echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004150sed 's/^/| /' conftest.$ac_ext >&5
4151
Martin v. Löwis11437992002-04-12 09:54:03 +00004152( exit $ac_status )
4153ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004155rm -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 +00004156fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004157CC="$ac_save_cc"
4158fi
4159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4161echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004162fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004163
Skip Montanarod8d39a02003-07-10 20:44:10 +00004164if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004165then
4166# -Kthread, if available, provides the right #defines
4167# and linker options to make pthread_create available
4168# Some compilers won't report that they do not support -Kthread,
4169# so we need to run a program to see whether it really made the
4170# function available.
4171echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4172echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4173if test "${ac_cv_kthread+set}" = set; then
4174 echo $ECHO_N "(cached) $ECHO_C" >&6
4175else
4176 ac_save_cc="$CC"
4177CC="$CC -Kthread"
4178if test "$cross_compiling" = yes; then
4179 ac_cv_kthread=no
4180else
4181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004182/* confdefs.h. */
4183_ACEOF
4184cat confdefs.h >>conftest.$ac_ext
4185cat >>conftest.$ac_ext <<_ACEOF
4186/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004187
4188#include <pthread.h>
4189
4190void* routine(void* p){return NULL;}
4191
4192int main(){
4193 pthread_t p;
4194 if(pthread_create(&p,NULL,routine,NULL)!=0)
4195 return 1;
4196 (void)pthread_detach(p);
4197 return 0;
4198}
4199
4200_ACEOF
4201rm -f conftest$ac_exeext
4202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4203 (eval $ac_link) 2>&5
4204 ac_status=$?
4205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4208 (eval $ac_try) 2>&5
4209 ac_status=$?
4210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211 (exit $ac_status); }; }; then
4212 ac_cv_kthread=yes
4213else
4214 echo "$as_me: program exited with status $ac_status" >&5
4215echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004216sed 's/^/| /' conftest.$ac_ext >&5
4217
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004218( exit $ac_status )
4219ac_cv_kthread=no
4220fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004221rm -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 +00004222fi
4223CC="$ac_save_cc"
4224fi
4225
4226echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4227echo "${ECHO_T}$ac_cv_kthread" >&6
4228fi
4229
Skip Montanarod8d39a02003-07-10 20:44:10 +00004230if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004231then
4232# -pthread, if available, provides the right #defines
4233# and linker options to make pthread_create available
4234# Some compilers won't report that they do not support -pthread,
4235# so we need to run a program to see whether it really made the
4236# function available.
4237echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4238echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4239if test "${ac_cv_thread+set}" = set; then
4240 echo $ECHO_N "(cached) $ECHO_C" >&6
4241else
4242 ac_save_cc="$CC"
4243CC="$CC -pthread"
4244if test "$cross_compiling" = yes; then
4245 ac_cv_pthread=no
4246else
4247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004248/* confdefs.h. */
4249_ACEOF
4250cat confdefs.h >>conftest.$ac_ext
4251cat >>conftest.$ac_ext <<_ACEOF
4252/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004253
4254#include <pthread.h>
4255
4256void* routine(void* p){return NULL;}
4257
4258int main(){
4259 pthread_t p;
4260 if(pthread_create(&p,NULL,routine,NULL)!=0)
4261 return 1;
4262 (void)pthread_detach(p);
4263 return 0;
4264}
4265
4266_ACEOF
4267rm -f conftest$ac_exeext
4268if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4269 (eval $ac_link) 2>&5
4270 ac_status=$?
4271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4274 (eval $ac_try) 2>&5
4275 ac_status=$?
4276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4277 (exit $ac_status); }; }; then
4278 ac_cv_pthread=yes
4279else
4280 echo "$as_me: program exited with status $ac_status" >&5
4281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004282sed 's/^/| /' conftest.$ac_ext >&5
4283
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004284( exit $ac_status )
4285ac_cv_pthread=no
4286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287rm -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 +00004288fi
4289CC="$ac_save_cc"
4290fi
4291
4292echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4293echo "${ECHO_T}$ac_cv_pthread" >&6
4294fi
4295
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004296# If we have set a CC compiler flag for thread support then
4297# check if it works for CXX, too.
4298ac_cv_cxx_thread=no
4299if test ! -z "$CXX"
4300then
4301echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4302echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4303ac_save_cxx="$CXX"
4304
4305if test "$ac_cv_kpthread" = "yes"
4306then
4307 CXX="$CXX -Kpthread"
4308 ac_cv_cxx_thread=yes
4309elif test "$ac_cv_kthread" = "yes"
4310then
4311 CXX="$CXX -Kthread"
4312 ac_cv_cxx_thread=yes
4313elif test "$ac_cv_pthread" = "yes"
4314then
4315 CXX="$CXX -pthread"
4316 ac_cv_cxx_thread=yes
4317fi
4318
4319if test $ac_cv_cxx_thread = yes
4320then
4321 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4322 $CXX -c conftest.$ac_ext 2>&5
4323 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4324 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4325 then
4326 ac_cv_cxx_thread=yes
4327 else
4328 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004329 fi
4330 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004331fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004332echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4333echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004334fi
4335CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004336
Michael W. Hudson54241132001-12-07 15:38:26 +00004337
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004338# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004339echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4340echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4341if test "${ac_cv_header_stdc+set}" = set; then
4342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343else
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* confdefs.h. */
4346_ACEOF
4347cat confdefs.h >>conftest.$ac_ext
4348cat >>conftest.$ac_ext <<_ACEOF
4349/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004350#include <stdlib.h>
4351#include <stdarg.h>
4352#include <string.h>
4353#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004354
Skip Montanaro6dead952003-09-25 14:50:04 +00004355int
4356main ()
4357{
4358
4359 ;
4360 return 0;
4361}
Martin v. Löwis11437992002-04-12 09:54:03 +00004362_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004363rm -f conftest.$ac_objext
4364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004365 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004367 grep -v '^ *+' conftest.er1 >conftest.err
4368 rm -f conftest.er1
4369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004371 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004372 { ac_try='test -z "$ac_c_werror_flag"
4373 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4375 (eval $ac_try) 2>&5
4376 ac_status=$?
4377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4378 (exit $ac_status); }; } &&
4379 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4381 (eval $ac_try) 2>&5
4382 ac_status=$?
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385 ac_cv_header_stdc=yes
4386else
Martin v. Löwis11437992002-04-12 09:54:03 +00004387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004388sed 's/^/| /' conftest.$ac_ext >&5
4389
4390ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393
4394if test $ac_cv_header_stdc = yes; then
4395 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004397/* confdefs.h. */
4398_ACEOF
4399cat confdefs.h >>conftest.$ac_ext
4400cat >>conftest.$ac_ext <<_ACEOF
4401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004403
4404_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004406 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407 :
4408else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409 ac_cv_header_stdc=no
4410fi
4411rm -f conftest*
4412
4413fi
4414
4415if test $ac_cv_header_stdc = yes; then
4416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004418/* confdefs.h. */
4419_ACEOF
4420cat confdefs.h >>conftest.$ac_ext
4421cat >>conftest.$ac_ext <<_ACEOF
4422/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004424
4425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004427 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004428 :
4429else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430 ac_cv_header_stdc=no
4431fi
4432rm -f conftest*
4433
4434fi
4435
4436if test $ac_cv_header_stdc = yes; then
4437 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004438 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004439 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440else
Martin v. Löwis11437992002-04-12 09:54:03 +00004441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004442/* confdefs.h. */
4443_ACEOF
4444cat confdefs.h >>conftest.$ac_ext
4445cat >>conftest.$ac_ext <<_ACEOF
4446/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004447#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004448#if ((' ' & 0x0FF) == 0x020)
4449# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4450# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4451#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004452# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004453 (('a' <= (c) && (c) <= 'i') \
4454 || ('j' <= (c) && (c) <= 'r') \
4455 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004456# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4457#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004458
Martin v. Löwis11437992002-04-12 09:54:03 +00004459#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4460int
4461main ()
4462{
4463 int i;
4464 for (i = 0; i < 256; i++)
4465 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004466 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004467 exit(2);
4468 exit (0);
4469}
4470_ACEOF
4471rm -f conftest$ac_exeext
4472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4473 (eval $ac_link) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4478 (eval $ac_try) 2>&5
4479 ac_status=$?
4480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482 :
4483else
Martin v. Löwis11437992002-04-12 09:54:03 +00004484 echo "$as_me: program exited with status $ac_status" >&5
4485echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004486sed 's/^/| /' conftest.$ac_ext >&5
4487
Martin v. Löwis11437992002-04-12 09:54:03 +00004488( exit $ac_status )
4489ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004491rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004492fi
4493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004494fi
4495echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4496echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004497if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004498
4499cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004501_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004502
4503fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004504
Skip Montanarob9820a32004-01-17 00:16:12 +00004505# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004516 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004517do
4518as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4519echo "$as_me:$LINENO: checking for $ac_header" >&5
4520echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4521if eval "test \"\${$as_ac_Header+set}\" = set"; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
4523else
4524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004525/* confdefs.h. */
4526_ACEOF
4527cat confdefs.h >>conftest.$ac_ext
4528cat >>conftest.$ac_ext <<_ACEOF
4529/* end confdefs.h. */
4530$ac_includes_default
4531
4532#include <$ac_header>
4533_ACEOF
4534rm -f conftest.$ac_objext
4535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004536 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004538 grep -v '^ *+' conftest.er1 >conftest.err
4539 rm -f conftest.er1
4540 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004543 { ac_try='test -z "$ac_c_werror_flag"
4544 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4546 (eval $ac_try) 2>&5
4547 ac_status=$?
4548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4549 (exit $ac_status); }; } &&
4550 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4552 (eval $ac_try) 2>&5
4553 ac_status=$?
4554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4555 (exit $ac_status); }; }; then
4556 eval "$as_ac_Header=yes"
4557else
4558 echo "$as_me: failed program was:" >&5
4559sed 's/^/| /' conftest.$ac_ext >&5
4560
4561eval "$as_ac_Header=no"
4562fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004564fi
4565echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4566echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4567if test `eval echo '${'$as_ac_Header'}'` = yes; then
4568 cat >>confdefs.h <<_ACEOF
4569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4570_ACEOF
4571
4572fi
4573
4574done
4575
4576
Martin v. Löwis11437992002-04-12 09:54:03 +00004577
4578
4579
4580
4581
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00004613
Martin v. Löwisc3001752005-01-23 09:27:24 +00004614
Martin v. Löwis11017b12006-01-14 18:12:57 +00004615
4616for ac_header in asm/types.h curses.h dlfcn.h fcntl.h grp.h \
4617shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004618stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004619unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004620sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4621sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004622sys/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 +00004623sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004624sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4625bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004626do
Martin v. Löwis11437992002-04-12 09:54:03 +00004627as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4628if eval "test \"\${$as_ac_Header+set}\" = set"; then
4629 echo "$as_me:$LINENO: checking for $ac_header" >&5
4630echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4631if eval "test \"\${$as_ac_Header+set}\" = set"; then
4632 echo $ECHO_N "(cached) $ECHO_C" >&6
4633fi
4634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4635echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636else
Martin v. Löwis11437992002-04-12 09:54:03 +00004637 # Is the header compilable?
4638echo "$as_me:$LINENO: checking $ac_header usability" >&5
4639echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004641/* confdefs.h. */
4642_ACEOF
4643cat confdefs.h >>conftest.$ac_ext
4644cat >>conftest.$ac_ext <<_ACEOF
4645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004646$ac_includes_default
4647#include <$ac_header>
4648_ACEOF
4649rm -f conftest.$ac_objext
4650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004651 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004653 grep -v '^ *+' conftest.er1 >conftest.err
4654 rm -f conftest.er1
4655 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004658 { ac_try='test -z "$ac_c_werror_flag"
4659 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4661 (eval $ac_try) 2>&5
4662 ac_status=$?
4663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4664 (exit $ac_status); }; } &&
4665 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4667 (eval $ac_try) 2>&5
4668 ac_status=$?
4669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4670 (exit $ac_status); }; }; then
4671 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004672else
Martin v. Löwis11437992002-04-12 09:54:03 +00004673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004674sed 's/^/| /' conftest.$ac_ext >&5
4675
Martin v. Löwis11437992002-04-12 09:54:03 +00004676ac_header_compiler=no
4677fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004679echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4680echo "${ECHO_T}$ac_header_compiler" >&6
4681
4682# Is the header present?
4683echo "$as_me:$LINENO: checking $ac_header presence" >&5
4684echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004686/* confdefs.h. */
4687_ACEOF
4688cat confdefs.h >>conftest.$ac_ext
4689cat >>conftest.$ac_ext <<_ACEOF
4690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004691#include <$ac_header>
4692_ACEOF
4693if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4694 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4695 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004696 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004697 rm -f conftest.er1
4698 cat conftest.err >&5
4699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700 (exit $ac_status); } >/dev/null; then
4701 if test -s conftest.err; then
4702 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004703 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 else
4705 ac_cpp_err=
4706 fi
4707else
4708 ac_cpp_err=yes
4709fi
4710if test -z "$ac_cpp_err"; then
4711 ac_header_preproc=yes
4712else
4713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004714sed 's/^/| /' conftest.$ac_ext >&5
4715
Martin v. Löwis11437992002-04-12 09:54:03 +00004716 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004717fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004718rm -f conftest.err conftest.$ac_ext
4719echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4720echo "${ECHO_T}$ac_header_preproc" >&6
4721
4722# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4724 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4726echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004727 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4728echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4729 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004730 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004731 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004732 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4733echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004734 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4735echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4736 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4737echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4738 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4739echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004740 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4741echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004742 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4743echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004744 (
4745 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004746## ------------------------------------------------ ##
4747## Report this to http://www.python.org/python-bugs ##
4748## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004749_ASBOX
4750 ) |
4751 sed "s/^/$as_me: WARNING: /" >&2
4752 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004753esac
4754echo "$as_me:$LINENO: checking for $ac_header" >&5
4755echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4756if eval "test \"\${$as_ac_Header+set}\" = set"; then
4757 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004758else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004759 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004761echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4762echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4763
4764fi
4765if test `eval echo '${'$as_ac_Header'}'` = yes; then
4766 cat >>confdefs.h <<_ACEOF
4767#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4768_ACEOF
4769
4770fi
4771
Guido van Rossum627b2d71993-12-24 10:39:16 +00004772done
4773
Martin v. Löwis11437992002-04-12 09:54:03 +00004774
4775
4776
4777
4778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004780for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4781 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4782echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4783echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4784if eval "test \"\${$as_ac_Header+set}\" = set"; then
4785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004786else
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* confdefs.h. */
4789_ACEOF
4790cat confdefs.h >>conftest.$ac_ext
4791cat >>conftest.$ac_ext <<_ACEOF
4792/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004793#include <sys/types.h>
4794#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004795
Martin v. Löwis11437992002-04-12 09:54:03 +00004796int
4797main ()
4798{
4799if ((DIR *) 0)
4800return 0;
4801 ;
4802 return 0;
4803}
4804_ACEOF
4805rm -f conftest.$ac_objext
4806if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004807 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004809 grep -v '^ *+' conftest.er1 >conftest.err
4810 rm -f conftest.er1
4811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4813 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004814 { ac_try='test -z "$ac_c_werror_flag"
4815 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4817 (eval $ac_try) 2>&5
4818 ac_status=$?
4819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4820 (exit $ac_status); }; } &&
4821 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4823 (eval $ac_try) 2>&5
4824 ac_status=$?
4825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4826 (exit $ac_status); }; }; then
4827 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004828else
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004830sed 's/^/| /' conftest.$ac_ext >&5
4831
Martin v. Löwis11437992002-04-12 09:54:03 +00004832eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004833fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004834rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004835fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004836echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4837echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4838if test `eval echo '${'$as_ac_Header'}'` = yes; then
4839 cat >>confdefs.h <<_ACEOF
4840#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4841_ACEOF
4842
4843ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004844fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846done
4847# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4848if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004849 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4850echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4851if test "${ac_cv_search_opendir+set}" = set; then
4852 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853else
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 ac_func_search_save_LIBS=$LIBS
4855ac_cv_search_opendir=no
4856cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004857/* confdefs.h. */
4858_ACEOF
4859cat confdefs.h >>conftest.$ac_ext
4860cat >>conftest.$ac_ext <<_ACEOF
4861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004863/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004864#ifdef __cplusplus
4865extern "C"
4866#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004867/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004868 builtin and then its argument prototype would still apply. */
4869char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004870int
4871main ()
4872{
4873opendir ();
4874 ;
4875 return 0;
4876}
4877_ACEOF
4878rm -f conftest.$ac_objext conftest$ac_exeext
4879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004880 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004882 grep -v '^ *+' conftest.er1 >conftest.err
4883 rm -f conftest.er1
4884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4886 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004887 { ac_try='test -z "$ac_c_werror_flag"
4888 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4890 (eval $ac_try) 2>&5
4891 ac_status=$?
4892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4893 (exit $ac_status); }; } &&
4894 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4896 (eval $ac_try) 2>&5
4897 ac_status=$?
4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4899 (exit $ac_status); }; }; then
4900 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901else
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004903sed 's/^/| /' conftest.$ac_ext >&5
4904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004906rm -f conftest.err conftest.$ac_objext \
4907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004908if test "$ac_cv_search_opendir" = no; then
4909 for ac_lib in dir; do
4910 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004917
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004918/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004919#ifdef __cplusplus
4920extern "C"
4921#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004922/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004923 builtin and then its argument prototype would still apply. */
4924char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004925int
4926main ()
4927{
4928opendir ();
4929 ;
4930 return 0;
4931}
4932_ACEOF
4933rm -f conftest.$ac_objext conftest$ac_exeext
4934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004935 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004937 grep -v '^ *+' conftest.er1 >conftest.err
4938 rm -f conftest.er1
4939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004942 { ac_try='test -z "$ac_c_werror_flag"
4943 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4945 (eval $ac_try) 2>&5
4946 ac_status=$?
4947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); }; } &&
4949 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4951 (eval $ac_try) 2>&5
4952 ac_status=$?
4953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4954 (exit $ac_status); }; }; then
4955 ac_cv_search_opendir="-l$ac_lib"
4956break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957else
Martin v. Löwis11437992002-04-12 09:54:03 +00004958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004959sed 's/^/| /' conftest.$ac_ext >&5
4960
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004962rm -f conftest.err conftest.$ac_objext \
4963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 done
4965fi
4966LIBS=$ac_func_search_save_LIBS
4967fi
4968echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4969echo "${ECHO_T}$ac_cv_search_opendir" >&6
4970if test "$ac_cv_search_opendir" != no; then
4971 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004973fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004974
Michael W. Hudson54241132001-12-07 15:38:26 +00004975else
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4977echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4978if test "${ac_cv_search_opendir+set}" = set; then
4979 echo $ECHO_N "(cached) $ECHO_C" >&6
4980else
4981 ac_func_search_save_LIBS=$LIBS
4982ac_cv_search_opendir=no
4983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004989
4990/* Override any gcc2 internal prototype to avoid an error. */
4991#ifdef __cplusplus
4992extern "C"
4993#endif
4994/* We use char because int might match the return type of a gcc2
4995 builtin and then its argument prototype would still apply. */
4996char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004997int
4998main ()
4999{
5000opendir ();
5001 ;
5002 return 0;
5003}
5004_ACEOF
5005rm -f conftest.$ac_objext conftest$ac_exeext
5006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005007 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005009 grep -v '^ *+' conftest.er1 >conftest.err
5010 rm -f conftest.er1
5011 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005014 { ac_try='test -z "$ac_c_werror_flag"
5015 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5017 (eval $ac_try) 2>&5
5018 ac_status=$?
5019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); }; } &&
5021 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5023 (eval $ac_try) 2>&5
5024 ac_status=$?
5025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5026 (exit $ac_status); }; }; then
5027 ac_cv_search_opendir="none required"
5028else
5029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005030sed 's/^/| /' conftest.$ac_ext >&5
5031
Martin v. Löwis11437992002-04-12 09:54:03 +00005032fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005033rm -f conftest.err conftest.$ac_objext \
5034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005035if test "$ac_cv_search_opendir" = no; then
5036 for ac_lib in x; do
5037 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005039/* confdefs.h. */
5040_ACEOF
5041cat confdefs.h >>conftest.$ac_ext
5042cat >>conftest.$ac_ext <<_ACEOF
5043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005044
5045/* Override any gcc2 internal prototype to avoid an error. */
5046#ifdef __cplusplus
5047extern "C"
5048#endif
5049/* We use char because int might match the return type of a gcc2
5050 builtin and then its argument prototype would still apply. */
5051char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005052int
5053main ()
5054{
5055opendir ();
5056 ;
5057 return 0;
5058}
5059_ACEOF
5060rm -f conftest.$ac_objext conftest$ac_exeext
5061if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005062 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005064 grep -v '^ *+' conftest.er1 >conftest.err
5065 rm -f conftest.er1
5066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005069 { ac_try='test -z "$ac_c_werror_flag"
5070 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5072 (eval $ac_try) 2>&5
5073 ac_status=$?
5074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5075 (exit $ac_status); }; } &&
5076 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5078 (eval $ac_try) 2>&5
5079 ac_status=$?
5080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081 (exit $ac_status); }; }; then
5082 ac_cv_search_opendir="-l$ac_lib"
5083break
5084else
5085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005086sed 's/^/| /' conftest.$ac_ext >&5
5087
Martin v. Löwis11437992002-04-12 09:54:03 +00005088fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005089rm -f conftest.err conftest.$ac_objext \
5090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005091 done
5092fi
5093LIBS=$ac_func_search_save_LIBS
5094fi
5095echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5096echo "${ECHO_T}$ac_cv_search_opendir" >&6
5097if test "$ac_cv_search_opendir" != no; then
5098 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005100fi
5101
5102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005103
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005104echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5105echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5106if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5107 echo $ECHO_N "(cached) $ECHO_C" >&6
5108else
5109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005110/* confdefs.h. */
5111_ACEOF
5112cat confdefs.h >>conftest.$ac_ext
5113cat >>conftest.$ac_ext <<_ACEOF
5114/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005115#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005116int
5117main ()
5118{
5119return makedev(0, 0);
5120 ;
5121 return 0;
5122}
5123_ACEOF
5124rm -f conftest.$ac_objext conftest$ac_exeext
5125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005126 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005128 grep -v '^ *+' conftest.er1 >conftest.err
5129 rm -f conftest.er1
5130 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005133 { ac_try='test -z "$ac_c_werror_flag"
5134 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136 (eval $ac_try) 2>&5
5137 ac_status=$?
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); }; } &&
5140 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5142 (eval $ac_try) 2>&5
5143 ac_status=$?
5144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5145 (exit $ac_status); }; }; then
5146 ac_cv_header_sys_types_h_makedev=yes
5147else
5148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005149sed 's/^/| /' conftest.$ac_ext >&5
5150
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005151ac_cv_header_sys_types_h_makedev=no
5152fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005153rm -f conftest.err conftest.$ac_objext \
5154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005155
5156fi
5157echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5158echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5159
5160if test $ac_cv_header_sys_types_h_makedev = no; then
5161if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5162 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5163echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5164if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5165 echo $ECHO_N "(cached) $ECHO_C" >&6
5166fi
5167echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5168echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5169else
5170 # Is the header compilable?
5171echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5172echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005174/* confdefs.h. */
5175_ACEOF
5176cat confdefs.h >>conftest.$ac_ext
5177cat >>conftest.$ac_ext <<_ACEOF
5178/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005179$ac_includes_default
5180#include <sys/mkdev.h>
5181_ACEOF
5182rm -f conftest.$ac_objext
5183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005184 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005186 grep -v '^ *+' conftest.er1 >conftest.err
5187 rm -f conftest.er1
5188 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5190 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005191 { ac_try='test -z "$ac_c_werror_flag"
5192 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5194 (eval $ac_try) 2>&5
5195 ac_status=$?
5196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197 (exit $ac_status); }; } &&
5198 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5200 (eval $ac_try) 2>&5
5201 ac_status=$?
5202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5203 (exit $ac_status); }; }; then
5204 ac_header_compiler=yes
5205else
5206 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005207sed 's/^/| /' conftest.$ac_ext >&5
5208
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005209ac_header_compiler=no
5210fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005211rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005212echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5213echo "${ECHO_T}$ac_header_compiler" >&6
5214
5215# Is the header present?
5216echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5217echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005219/* confdefs.h. */
5220_ACEOF
5221cat confdefs.h >>conftest.$ac_ext
5222cat >>conftest.$ac_ext <<_ACEOF
5223/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005224#include <sys/mkdev.h>
5225_ACEOF
5226if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5227 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5228 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005229 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005230 rm -f conftest.er1
5231 cat conftest.err >&5
5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5233 (exit $ac_status); } >/dev/null; then
5234 if test -s conftest.err; then
5235 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005236 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005237 else
5238 ac_cpp_err=
5239 fi
5240else
5241 ac_cpp_err=yes
5242fi
5243if test -z "$ac_cpp_err"; then
5244 ac_header_preproc=yes
5245else
5246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005247sed 's/^/| /' conftest.$ac_ext >&5
5248
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005249 ac_header_preproc=no
5250fi
5251rm -f conftest.err conftest.$ac_ext
5252echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5253echo "${ECHO_T}$ac_header_preproc" >&6
5254
5255# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005256case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5257 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005258 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5259echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005260 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5261echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5262 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005263 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005264 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005265 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5266echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005267 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5268echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5269 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5270echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5271 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5272echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005273 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5274echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005275 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5276echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005277 (
5278 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005279## ------------------------------------------------ ##
5280## Report this to http://www.python.org/python-bugs ##
5281## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005282_ASBOX
5283 ) |
5284 sed "s/^/$as_me: WARNING: /" >&2
5285 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005286esac
5287echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5288echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5289if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5290 echo $ECHO_N "(cached) $ECHO_C" >&6
5291else
5292 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5293fi
5294echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5295echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5296
5297fi
5298if test $ac_cv_header_sys_mkdev_h = yes; then
5299
5300cat >>confdefs.h <<\_ACEOF
5301#define MAJOR_IN_MKDEV 1
5302_ACEOF
5303
5304fi
5305
5306
5307
5308 if test $ac_cv_header_sys_mkdev_h = no; then
5309 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5310 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5311echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5312if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5313 echo $ECHO_N "(cached) $ECHO_C" >&6
5314fi
5315echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5316echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5317else
5318 # Is the header compilable?
5319echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5320echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005322/* confdefs.h. */
5323_ACEOF
5324cat confdefs.h >>conftest.$ac_ext
5325cat >>conftest.$ac_ext <<_ACEOF
5326/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005327$ac_includes_default
5328#include <sys/sysmacros.h>
5329_ACEOF
5330rm -f conftest.$ac_objext
5331if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005332 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005334 grep -v '^ *+' conftest.er1 >conftest.err
5335 rm -f conftest.er1
5336 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005339 { ac_try='test -z "$ac_c_werror_flag"
5340 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5342 (eval $ac_try) 2>&5
5343 ac_status=$?
5344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5345 (exit $ac_status); }; } &&
5346 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5348 (eval $ac_try) 2>&5
5349 ac_status=$?
5350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5351 (exit $ac_status); }; }; then
5352 ac_header_compiler=yes
5353else
5354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005355sed 's/^/| /' conftest.$ac_ext >&5
5356
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005357ac_header_compiler=no
5358fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005359rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005360echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5361echo "${ECHO_T}$ac_header_compiler" >&6
5362
5363# Is the header present?
5364echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5365echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5366cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005367/* confdefs.h. */
5368_ACEOF
5369cat confdefs.h >>conftest.$ac_ext
5370cat >>conftest.$ac_ext <<_ACEOF
5371/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005372#include <sys/sysmacros.h>
5373_ACEOF
5374if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5375 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5376 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005377 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005378 rm -f conftest.er1
5379 cat conftest.err >&5
5380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381 (exit $ac_status); } >/dev/null; then
5382 if test -s conftest.err; then
5383 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005384 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005385 else
5386 ac_cpp_err=
5387 fi
5388else
5389 ac_cpp_err=yes
5390fi
5391if test -z "$ac_cpp_err"; then
5392 ac_header_preproc=yes
5393else
5394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005395sed 's/^/| /' conftest.$ac_ext >&5
5396
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005397 ac_header_preproc=no
5398fi
5399rm -f conftest.err conftest.$ac_ext
5400echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5401echo "${ECHO_T}$ac_header_preproc" >&6
5402
5403# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005404case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5405 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005406 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5407echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005408 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5409echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5410 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005411 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005412 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005413 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5414echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005415 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5416echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5418echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5420echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005421 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5422echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005423 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5424echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005425 (
5426 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005427## ------------------------------------------------ ##
5428## Report this to http://www.python.org/python-bugs ##
5429## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005430_ASBOX
5431 ) |
5432 sed "s/^/$as_me: WARNING: /" >&2
5433 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005434esac
5435echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5436echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5437if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5438 echo $ECHO_N "(cached) $ECHO_C" >&6
5439else
5440 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5441fi
5442echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5443echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5444
5445fi
5446if test $ac_cv_header_sys_sysmacros_h = yes; then
5447
5448cat >>confdefs.h <<\_ACEOF
5449#define MAJOR_IN_SYSMACROS 1
5450_ACEOF
5451
5452fi
5453
5454
5455 fi
5456fi
5457
Michael W. Hudson54241132001-12-07 15:38:26 +00005458
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005459# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005460
5461for ac_header in term.h
5462do
5463as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5464echo "$as_me:$LINENO: checking for $ac_header" >&5
5465echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5466if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005467 echo $ECHO_N "(cached) $ECHO_C" >&6
5468else
5469 cat >conftest.$ac_ext <<_ACEOF
5470/* confdefs.h. */
5471_ACEOF
5472cat confdefs.h >>conftest.$ac_ext
5473cat >>conftest.$ac_ext <<_ACEOF
5474/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005475
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005476#ifdef HAVE_CURSES_H
5477#include <curses.h>
5478#endif
5479
5480
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005481#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005482_ACEOF
5483rm -f conftest.$ac_objext
5484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5485 (eval $ac_compile) 2>conftest.er1
5486 ac_status=$?
5487 grep -v '^ *+' conftest.er1 >conftest.err
5488 rm -f conftest.er1
5489 cat conftest.err >&5
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005492 { ac_try='test -z "$ac_c_werror_flag"
5493 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5495 (eval $ac_try) 2>&5
5496 ac_status=$?
5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498 (exit $ac_status); }; } &&
5499 { ac_try='test -s conftest.$ac_objext'
5500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5501 (eval $ac_try) 2>&5
5502 ac_status=$?
5503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5504 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005505 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005506else
5507 echo "$as_me: failed program was:" >&5
5508sed 's/^/| /' conftest.$ac_ext >&5
5509
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005510eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005511fi
5512rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5513fi
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005514echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5515echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5516if test `eval echo '${'$as_ac_Header'}'` = yes; then
5517 cat >>confdefs.h <<_ACEOF
5518#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5519_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005520
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005521fi
5522
5523done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005524
5525
Martin v. Löwis11017b12006-01-14 18:12:57 +00005526# On Linux, netlink.h requires asm/types.h
5527
5528for ac_header in linux/netlink.h
5529do
5530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531echo "$as_me:$LINENO: checking for $ac_header" >&5
5532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5533if eval "test \"\${$as_ac_Header+set}\" = set"; then
5534 echo $ECHO_N "(cached) $ECHO_C" >&6
5535else
5536 cat >conftest.$ac_ext <<_ACEOF
5537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
5542
5543#ifdef HAVE_ASM_TYPES_H
5544#include <asm/types.h>
5545#endif
5546#ifdef HAVE_SYS_SOCKET_H
5547#include <sys/socket.h>
5548#endif
5549
5550
5551#include <$ac_header>
5552_ACEOF
5553rm -f conftest.$ac_objext
5554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5555 (eval $ac_compile) 2>conftest.er1
5556 ac_status=$?
5557 grep -v '^ *+' conftest.er1 >conftest.err
5558 rm -f conftest.er1
5559 cat conftest.err >&5
5560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5561 (exit $ac_status); } &&
5562 { ac_try='test -z "$ac_c_werror_flag"
5563 || test ! -s conftest.err'
5564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565 (eval $ac_try) 2>&5
5566 ac_status=$?
5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568 (exit $ac_status); }; } &&
5569 { ac_try='test -s conftest.$ac_objext'
5570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); }; }; then
5575 eval "$as_ac_Header=yes"
5576else
5577 echo "$as_me: failed program was:" >&5
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
5580eval "$as_ac_Header=no"
5581fi
5582rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5583fi
5584echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5585echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5586if test `eval echo '${'$as_ac_Header'}'` = yes; then
5587 cat >>confdefs.h <<_ACEOF
5588#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5589_ACEOF
5590
5591fi
5592
5593done
5594
5595
Guido van Rossum627b2d71993-12-24 10:39:16 +00005596# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005597was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005598echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5599echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005601/* confdefs.h. */
5602_ACEOF
5603cat confdefs.h >>conftest.$ac_ext
5604cat >>conftest.$ac_ext <<_ACEOF
5605/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005606#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005607
5608_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005610 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005611 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005612else
Martin v. Löwis11437992002-04-12 09:54:03 +00005613
5614
5615cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005616#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005618
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005619
Guido van Rossum627b2d71993-12-24 10:39:16 +00005620fi
5621rm -f conftest*
5622
Martin v. Löwis11437992002-04-12 09:54:03 +00005623echo "$as_me:$LINENO: result: $was_it_defined" >&5
5624echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005625
Neal Norwitz11690112002-07-30 01:08:28 +00005626# Check whether using makedev requires defining _OSF_SOURCE
5627echo "$as_me:$LINENO: checking for makedev" >&5
5628echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005630/* confdefs.h. */
5631_ACEOF
5632cat confdefs.h >>conftest.$ac_ext
5633cat >>conftest.$ac_ext <<_ACEOF
5634/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005635#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005636int
5637main ()
5638{
5639 makedev(0, 0)
5640 ;
5641 return 0;
5642}
5643_ACEOF
5644rm -f conftest.$ac_objext conftest$ac_exeext
5645if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005646 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005648 grep -v '^ *+' conftest.er1 >conftest.err
5649 rm -f conftest.er1
5650 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5652 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005653 { ac_try='test -z "$ac_c_werror_flag"
5654 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5656 (eval $ac_try) 2>&5
5657 ac_status=$?
5658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5659 (exit $ac_status); }; } &&
5660 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5662 (eval $ac_try) 2>&5
5663 ac_status=$?
5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5665 (exit $ac_status); }; }; then
5666 ac_cv_has_makedev=yes
5667else
5668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005669sed 's/^/| /' conftest.$ac_ext >&5
5670
Neal Norwitz11690112002-07-30 01:08:28 +00005671ac_cv_has_makedev=no
5672fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005673rm -f conftest.err conftest.$ac_objext \
5674 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005675if test "$ac_cv_has_makedev" = "no"; then
5676 # we didn't link, try if _OSF_SOURCE will allow us to link
5677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005678/* confdefs.h. */
5679_ACEOF
5680cat confdefs.h >>conftest.$ac_ext
5681cat >>conftest.$ac_ext <<_ACEOF
5682/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005683
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005684#define _OSF_SOURCE 1
5685#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005686
Neal Norwitz11690112002-07-30 01:08:28 +00005687int
5688main ()
5689{
5690 makedev(0, 0)
5691 ;
5692 return 0;
5693}
5694_ACEOF
5695rm -f conftest.$ac_objext conftest$ac_exeext
5696if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005697 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005699 grep -v '^ *+' conftest.er1 >conftest.err
5700 rm -f conftest.er1
5701 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5703 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005704 { ac_try='test -z "$ac_c_werror_flag"
5705 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5707 (eval $ac_try) 2>&5
5708 ac_status=$?
5709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); }; } &&
5711 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5713 (eval $ac_try) 2>&5
5714 ac_status=$?
5715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5716 (exit $ac_status); }; }; then
5717 ac_cv_has_makedev=yes
5718else
5719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005720sed 's/^/| /' conftest.$ac_ext >&5
5721
Neal Norwitz11690112002-07-30 01:08:28 +00005722ac_cv_has_makedev=no
5723fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005724rm -f conftest.err conftest.$ac_objext \
5725 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005726 if test "$ac_cv_has_makedev" = "yes"; then
5727
5728cat >>confdefs.h <<\_ACEOF
5729#define _OSF_SOURCE 1
5730_ACEOF
5731
5732 fi
5733fi
5734echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5735echo "${ECHO_T}$ac_cv_has_makedev" >&6
5736if test "$ac_cv_has_makedev" = "yes"; then
5737
5738cat >>confdefs.h <<\_ACEOF
5739#define HAVE_MAKEDEV 1
5740_ACEOF
5741
5742fi
5743
Martin v. Löwis399a6892002-10-04 10:22:02 +00005744# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5745# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5746# defined, but the compiler does not support pragma redefine_extname,
5747# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5748# structures (such as rlimit64) without declaring them. As a
5749# work-around, disable LFS on such configurations
5750
5751use_lfs=yes
5752echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5753echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005755/* confdefs.h. */
5756_ACEOF
5757cat confdefs.h >>conftest.$ac_ext
5758cat >>conftest.$ac_ext <<_ACEOF
5759/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005760
5761#define _LARGEFILE_SOURCE 1
5762#define _FILE_OFFSET_BITS 64
5763#include <sys/resource.h>
5764
Martin v. Löwis399a6892002-10-04 10:22:02 +00005765int
5766main ()
5767{
5768struct rlimit foo;
5769 ;
5770 return 0;
5771}
5772_ACEOF
5773rm -f conftest.$ac_objext
5774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005775 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005777 grep -v '^ *+' conftest.er1 >conftest.err
5778 rm -f conftest.er1
5779 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5781 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005782 { ac_try='test -z "$ac_c_werror_flag"
5783 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785 (eval $ac_try) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); }; } &&
5789 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5791 (eval $ac_try) 2>&5
5792 ac_status=$?
5793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5794 (exit $ac_status); }; }; then
5795 sol_lfs_bug=no
5796else
5797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005798sed 's/^/| /' conftest.$ac_ext >&5
5799
Martin v. Löwis399a6892002-10-04 10:22:02 +00005800sol_lfs_bug=yes
5801fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005803echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5804echo "${ECHO_T}$sol_lfs_bug" >&6
5805if test "$sol_lfs_bug" = "yes"; then
5806 use_lfs=no
5807fi
5808
5809if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005810# Two defines needed to enable largefile support on various platforms
5811# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005812
Martin v. Löwis11437992002-04-12 09:54:03 +00005813cat >>confdefs.h <<\_ACEOF
5814#define _LARGEFILE_SOURCE 1
5815_ACEOF
5816
5817
5818cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005819#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005820_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005821
Martin v. Löwis399a6892002-10-04 10:22:02 +00005822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005823
Guido van Rossum84e7b241996-08-19 21:59:00 +00005824# Add some code to confdefs.h so that the test for off_t works on SCO
5825cat >> confdefs.h <<\EOF
5826#if defined(SCO_DS)
5827#undef _OFF_T
5828#endif
5829EOF
5830
Guido van Rossumef2255b2000-03-10 22:30:29 +00005831# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005832echo "$as_me:$LINENO: checking for mode_t" >&5
5833echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5834if test "${ac_cv_type_mode_t+set}" = set; then
5835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836else
Martin v. Löwis11437992002-04-12 09:54:03 +00005837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005838/* confdefs.h. */
5839_ACEOF
5840cat confdefs.h >>conftest.$ac_ext
5841cat >>conftest.$ac_ext <<_ACEOF
5842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005843$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005844int
5845main ()
5846{
5847if ((mode_t *) 0)
5848 return 0;
5849if (sizeof (mode_t))
5850 return 0;
5851 ;
5852 return 0;
5853}
5854_ACEOF
5855rm -f conftest.$ac_objext
5856if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005857 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005859 grep -v '^ *+' conftest.er1 >conftest.err
5860 rm -f conftest.er1
5861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005864 { ac_try='test -z "$ac_c_werror_flag"
5865 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5867 (eval $ac_try) 2>&5
5868 ac_status=$?
5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870 (exit $ac_status); }; } &&
5871 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873 (eval $ac_try) 2>&5
5874 ac_status=$?
5875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005877 ac_cv_type_mode_t=yes
5878else
Martin v. Löwis11437992002-04-12 09:54:03 +00005879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005880sed 's/^/| /' conftest.$ac_ext >&5
5881
Martin v. Löwis11437992002-04-12 09:54:03 +00005882ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005883fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005885fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005886echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5887echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5888if test $ac_cv_type_mode_t = yes; then
5889 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890else
Martin v. Löwis11437992002-04-12 09:54:03 +00005891
5892cat >>confdefs.h <<_ACEOF
5893#define mode_t int
5894_ACEOF
5895
5896fi
5897
5898echo "$as_me:$LINENO: checking for off_t" >&5
5899echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5900if test "${ac_cv_type_off_t+set}" = set; then
5901 echo $ECHO_N "(cached) $ECHO_C" >&6
5902else
5903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005904/* confdefs.h. */
5905_ACEOF
5906cat confdefs.h >>conftest.$ac_ext
5907cat >>conftest.$ac_ext <<_ACEOF
5908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005909$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005910int
5911main ()
5912{
5913if ((off_t *) 0)
5914 return 0;
5915if (sizeof (off_t))
5916 return 0;
5917 ;
5918 return 0;
5919}
5920_ACEOF
5921rm -f conftest.$ac_objext
5922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005923 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005925 grep -v '^ *+' conftest.er1 >conftest.err
5926 rm -f conftest.er1
5927 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5929 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005930 { ac_try='test -z "$ac_c_werror_flag"
5931 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5933 (eval $ac_try) 2>&5
5934 ac_status=$?
5935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); }; } &&
5937 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5939 (eval $ac_try) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005943 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005944else
Martin v. Löwis11437992002-04-12 09:54:03 +00005945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005946sed 's/^/| /' conftest.$ac_ext >&5
5947
Martin v. Löwis11437992002-04-12 09:54:03 +00005948ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005949fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005951fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005952echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5953echo "${ECHO_T}$ac_cv_type_off_t" >&6
5954if test $ac_cv_type_off_t = yes; then
5955 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956else
Martin v. Löwis11437992002-04-12 09:54:03 +00005957
5958cat >>confdefs.h <<_ACEOF
5959#define off_t long
5960_ACEOF
5961
5962fi
5963
5964echo "$as_me:$LINENO: checking for pid_t" >&5
5965echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5966if test "${ac_cv_type_pid_t+set}" = set; then
5967 echo $ECHO_N "(cached) $ECHO_C" >&6
5968else
5969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005970/* confdefs.h. */
5971_ACEOF
5972cat confdefs.h >>conftest.$ac_ext
5973cat >>conftest.$ac_ext <<_ACEOF
5974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005976int
5977main ()
5978{
5979if ((pid_t *) 0)
5980 return 0;
5981if (sizeof (pid_t))
5982 return 0;
5983 ;
5984 return 0;
5985}
5986_ACEOF
5987rm -f conftest.$ac_objext
5988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005989 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005991 grep -v '^ *+' conftest.er1 >conftest.err
5992 rm -f conftest.er1
5993 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005996 { ac_try='test -z "$ac_c_werror_flag"
5997 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5999 (eval $ac_try) 2>&5
6000 ac_status=$?
6001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002 (exit $ac_status); }; } &&
6003 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6005 (eval $ac_try) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006009 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006010else
Martin v. Löwis11437992002-04-12 09:54:03 +00006011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006012sed 's/^/| /' conftest.$ac_ext >&5
6013
Martin v. Löwis11437992002-04-12 09:54:03 +00006014ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006015fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006016rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006017fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006018echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6019echo "${ECHO_T}$ac_cv_type_pid_t" >&6
6020if test $ac_cv_type_pid_t = yes; then
6021 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022else
Martin v. Löwis11437992002-04-12 09:54:03 +00006023
6024cat >>confdefs.h <<_ACEOF
6025#define pid_t int
6026_ACEOF
6027
6028fi
6029
6030echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6031echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
6032if test "${ac_cv_type_signal+set}" = set; then
6033 echo $ECHO_N "(cached) $ECHO_C" >&6
6034else
6035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006036/* confdefs.h. */
6037_ACEOF
6038cat confdefs.h >>conftest.$ac_ext
6039cat >>conftest.$ac_ext <<_ACEOF
6040/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006041#include <sys/types.h>
6042#include <signal.h>
6043#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006044# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00006045#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006046#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006047extern "C" void (*signal (int, void (*)(int)))(int);
6048#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006049void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006050#endif
6051
Martin v. Löwis11437992002-04-12 09:54:03 +00006052int
6053main ()
6054{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006056 ;
6057 return 0;
6058}
6059_ACEOF
6060rm -f conftest.$ac_objext
6061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006062 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006064 grep -v '^ *+' conftest.er1 >conftest.err
6065 rm -f conftest.er1
6066 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6068 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006069 { ac_try='test -z "$ac_c_werror_flag"
6070 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6072 (eval $ac_try) 2>&5
6073 ac_status=$?
6074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075 (exit $ac_status); }; } &&
6076 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6078 (eval $ac_try) 2>&5
6079 ac_status=$?
6080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006083else
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006085sed 's/^/| /' conftest.$ac_ext >&5
6086
Martin v. Löwis11437992002-04-12 09:54:03 +00006087ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006088fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006089rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006091echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6092echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006093
Martin v. Löwis11437992002-04-12 09:54:03 +00006094cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006095#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006096_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006097
Michael W. Hudson54241132001-12-07 15:38:26 +00006098
Martin v. Löwis11437992002-04-12 09:54:03 +00006099echo "$as_me:$LINENO: checking for size_t" >&5
6100echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6101if test "${ac_cv_type_size_t+set}" = set; then
6102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006103else
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006110$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006111int
6112main ()
6113{
6114if ((size_t *) 0)
6115 return 0;
6116if (sizeof (size_t))
6117 return 0;
6118 ;
6119 return 0;
6120}
6121_ACEOF
6122rm -f conftest.$ac_objext
6123if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 grep -v '^ *+' conftest.er1 >conftest.err
6127 rm -f conftest.er1
6128 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6130 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006131 { ac_try='test -z "$ac_c_werror_flag"
6132 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6134 (eval $ac_try) 2>&5
6135 ac_status=$?
6136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6137 (exit $ac_status); }; } &&
6138 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6140 (eval $ac_try) 2>&5
6141 ac_status=$?
6142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6143 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006144 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006145else
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006147sed 's/^/| /' conftest.$ac_ext >&5
6148
Martin v. Löwis11437992002-04-12 09:54:03 +00006149ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006150fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006151rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006153echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6154echo "${ECHO_T}$ac_cv_type_size_t" >&6
6155if test $ac_cv_type_size_t = yes; then
6156 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157else
Martin v. Löwis11437992002-04-12 09:54:03 +00006158
6159cat >>confdefs.h <<_ACEOF
6160#define size_t unsigned
6161_ACEOF
6162
6163fi
6164
6165echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6166echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6167if test "${ac_cv_type_uid_t+set}" = set; then
6168 echo $ECHO_N "(cached) $ECHO_C" >&6
6169else
6170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006171/* confdefs.h. */
6172_ACEOF
6173cat confdefs.h >>conftest.$ac_ext
6174cat >>conftest.$ac_ext <<_ACEOF
6175/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006177
6178_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006180 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006181 ac_cv_type_uid_t=yes
6182else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183 ac_cv_type_uid_t=no
6184fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006185rm -f conftest*
6186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006188echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6189echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006190if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191
Martin v. Löwis11437992002-04-12 09:54:03 +00006192cat >>confdefs.h <<\_ACEOF
6193#define uid_t int
6194_ACEOF
6195
6196
6197cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006199_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006200
6201fi
6202
Martin v. Löwis18e16552006-02-15 17:27:45 +00006203echo "$as_me:$LINENO: checking for ssize_t" >&5
6204echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
6205if test "${ac_cv_type_ssize_t+set}" = set; then
6206 echo $ECHO_N "(cached) $ECHO_C" >&6
6207else
6208 cat >conftest.$ac_ext <<_ACEOF
6209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
6214$ac_includes_default
6215int
6216main ()
6217{
6218if ((ssize_t *) 0)
6219 return 0;
6220if (sizeof (ssize_t))
6221 return 0;
6222 ;
6223 return 0;
6224}
6225_ACEOF
6226rm -f conftest.$ac_objext
6227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6228 (eval $ac_compile) 2>conftest.er1
6229 ac_status=$?
6230 grep -v '^ *+' conftest.er1 >conftest.err
6231 rm -f conftest.er1
6232 cat conftest.err >&5
6233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234 (exit $ac_status); } &&
6235 { ac_try='test -z "$ac_c_werror_flag"
6236 || test ! -s conftest.err'
6237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6238 (eval $ac_try) 2>&5
6239 ac_status=$?
6240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241 (exit $ac_status); }; } &&
6242 { ac_try='test -s conftest.$ac_objext'
6243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6244 (eval $ac_try) 2>&5
6245 ac_status=$?
6246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6247 (exit $ac_status); }; }; then
6248 ac_cv_type_ssize_t=yes
6249else
6250 echo "$as_me: failed program was:" >&5
6251sed 's/^/| /' conftest.$ac_ext >&5
6252
6253ac_cv_type_ssize_t=no
6254fi
6255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6256fi
6257echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6258echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
6259if test $ac_cv_type_ssize_t = yes; then
6260
6261cat >>confdefs.h <<\_ACEOF
6262#define HAVE_SSIZE_T 1
6263_ACEOF
6264
6265fi
6266
Jack Jansendd19cf82001-12-06 22:36:17 +00006267
Michael W. Hudson54241132001-12-07 15:38:26 +00006268# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006269# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006270echo "$as_me:$LINENO: checking for int" >&5
6271echo $ECHO_N "checking for int... $ECHO_C" >&6
6272if test "${ac_cv_type_int+set}" = set; then
6273 echo $ECHO_N "(cached) $ECHO_C" >&6
6274else
6275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006276/* confdefs.h. */
6277_ACEOF
6278cat confdefs.h >>conftest.$ac_ext
6279cat >>conftest.$ac_ext <<_ACEOF
6280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006281$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006282int
6283main ()
6284{
6285if ((int *) 0)
6286 return 0;
6287if (sizeof (int))
6288 return 0;
6289 ;
6290 return 0;
6291}
6292_ACEOF
6293rm -f conftest.$ac_objext
6294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006295 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006297 grep -v '^ *+' conftest.er1 >conftest.err
6298 rm -f conftest.er1
6299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006302 { ac_try='test -z "$ac_c_werror_flag"
6303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6305 (eval $ac_try) 2>&5
6306 ac_status=$?
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); }; } &&
6309 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311 (eval $ac_try) 2>&5
6312 ac_status=$?
6313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314 (exit $ac_status); }; }; then
6315 ac_cv_type_int=yes
6316else
6317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006318sed 's/^/| /' conftest.$ac_ext >&5
6319
Martin v. Löwis11437992002-04-12 09:54:03 +00006320ac_cv_type_int=no
6321fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006322rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006323fi
6324echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6325echo "${ECHO_T}$ac_cv_type_int" >&6
6326
6327echo "$as_me:$LINENO: checking size of int" >&5
6328echo $ECHO_N "checking size of int... $ECHO_C" >&6
6329if test "${ac_cv_sizeof_int+set}" = set; then
6330 echo $ECHO_N "(cached) $ECHO_C" >&6
6331else
6332 if test "$ac_cv_type_int" = yes; then
6333 # The cast to unsigned long works around a bug in the HP C Compiler
6334 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6335 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6336 # This bug is HP SR number 8606223364.
6337 if test "$cross_compiling" = yes; then
6338 # Depending upon the size, compute the lo and hi bounds.
6339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006340/* confdefs.h. */
6341_ACEOF
6342cat confdefs.h >>conftest.$ac_ext
6343cat >>conftest.$ac_ext <<_ACEOF
6344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006346int
6347main ()
6348{
6349static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6350test_array [0] = 0
6351
6352 ;
6353 return 0;
6354}
6355_ACEOF
6356rm -f conftest.$ac_objext
6357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006358 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006360 grep -v '^ *+' conftest.er1 >conftest.err
6361 rm -f conftest.er1
6362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006365 { ac_try='test -z "$ac_c_werror_flag"
6366 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6368 (eval $ac_try) 2>&5
6369 ac_status=$?
6370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6371 (exit $ac_status); }; } &&
6372 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6374 (eval $ac_try) 2>&5
6375 ac_status=$?
6376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6377 (exit $ac_status); }; }; then
6378 ac_lo=0 ac_mid=0
6379 while :; do
6380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006381/* confdefs.h. */
6382_ACEOF
6383cat confdefs.h >>conftest.$ac_ext
6384cat >>conftest.$ac_ext <<_ACEOF
6385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006386$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006387int
6388main ()
6389{
6390static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6391test_array [0] = 0
6392
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397rm -f conftest.$ac_objext
6398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006399 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006401 grep -v '^ *+' conftest.er1 >conftest.err
6402 rm -f conftest.er1
6403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006406 { ac_try='test -z "$ac_c_werror_flag"
6407 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6409 (eval $ac_try) 2>&5
6410 ac_status=$?
6411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6412 (exit $ac_status); }; } &&
6413 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6415 (eval $ac_try) 2>&5
6416 ac_status=$?
6417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6418 (exit $ac_status); }; }; then
6419 ac_hi=$ac_mid; break
6420else
6421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006422sed 's/^/| /' conftest.$ac_ext >&5
6423
Martin v. Löwis11437992002-04-12 09:54:03 +00006424ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006425 if test $ac_lo -le $ac_mid; then
6426 ac_lo= ac_hi=
6427 break
6428 fi
6429 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006430fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006432 done
6433else
6434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006435sed 's/^/| /' conftest.$ac_ext >&5
6436
Martin v. Löwis11437992002-04-12 09:54:03 +00006437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006438/* confdefs.h. */
6439_ACEOF
6440cat confdefs.h >>conftest.$ac_ext
6441cat >>conftest.$ac_ext <<_ACEOF
6442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006444int
6445main ()
6446{
6447static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6448test_array [0] = 0
6449
6450 ;
6451 return 0;
6452}
6453_ACEOF
6454rm -f conftest.$ac_objext
6455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006456 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006458 grep -v '^ *+' conftest.er1 >conftest.err
6459 rm -f conftest.er1
6460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6462 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006463 { ac_try='test -z "$ac_c_werror_flag"
6464 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6466 (eval $ac_try) 2>&5
6467 ac_status=$?
6468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6469 (exit $ac_status); }; } &&
6470 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6472 (eval $ac_try) 2>&5
6473 ac_status=$?
6474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6475 (exit $ac_status); }; }; then
6476 ac_hi=-1 ac_mid=-1
6477 while :; do
6478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006479/* confdefs.h. */
6480_ACEOF
6481cat confdefs.h >>conftest.$ac_ext
6482cat >>conftest.$ac_ext <<_ACEOF
6483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006484$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006485int
6486main ()
6487{
6488static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6489test_array [0] = 0
6490
6491 ;
6492 return 0;
6493}
6494_ACEOF
6495rm -f conftest.$ac_objext
6496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006497 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006499 grep -v '^ *+' conftest.er1 >conftest.err
6500 rm -f conftest.er1
6501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006504 { ac_try='test -z "$ac_c_werror_flag"
6505 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6507 (eval $ac_try) 2>&5
6508 ac_status=$?
6509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6510 (exit $ac_status); }; } &&
6511 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6513 (eval $ac_try) 2>&5
6514 ac_status=$?
6515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6516 (exit $ac_status); }; }; then
6517 ac_lo=$ac_mid; break
6518else
6519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006520sed 's/^/| /' conftest.$ac_ext >&5
6521
Martin v. Löwis11437992002-04-12 09:54:03 +00006522ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006523 if test $ac_mid -le $ac_hi; then
6524 ac_lo= ac_hi=
6525 break
6526 fi
6527 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006529rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006530 done
6531else
6532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006533sed 's/^/| /' conftest.$ac_ext >&5
6534
Martin v. Löwis11437992002-04-12 09:54:03 +00006535ac_lo= ac_hi=
6536fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006537rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006538fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006540# Binary search between lo and hi bounds.
6541while test "x$ac_lo" != "x$ac_hi"; do
6542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006549$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006550int
6551main ()
6552{
6553static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6554test_array [0] = 0
6555
6556 ;
6557 return 0;
6558}
6559_ACEOF
6560rm -f conftest.$ac_objext
6561if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006564 grep -v '^ *+' conftest.er1 >conftest.err
6565 rm -f conftest.er1
6566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006569 { ac_try='test -z "$ac_c_werror_flag"
6570 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6572 (eval $ac_try) 2>&5
6573 ac_status=$?
6574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6575 (exit $ac_status); }; } &&
6576 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6578 (eval $ac_try) 2>&5
6579 ac_status=$?
6580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6581 (exit $ac_status); }; }; then
6582 ac_hi=$ac_mid
6583else
6584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006585sed 's/^/| /' conftest.$ac_ext >&5
6586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587ac_lo=`expr '(' $ac_mid ')' + 1`
6588fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006590done
6591case $ac_lo in
6592?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006593'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6594See \`config.log' for more details." >&5
6595echo "$as_me: error: cannot compute sizeof (int), 77
6596See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 { (exit 1); exit 1; }; } ;;
6598esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006599else
6600 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006601 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6602See \`config.log' for more details." >&5
6603echo "$as_me: error: cannot run test program while cross compiling
6604See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006605 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006606else
Martin v. Löwis11437992002-04-12 09:54:03 +00006607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006608/* confdefs.h. */
6609_ACEOF
6610cat confdefs.h >>conftest.$ac_ext
6611cat >>conftest.$ac_ext <<_ACEOF
6612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006613$ac_includes_default
6614long longval () { return (long) (sizeof (int)); }
6615unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006616#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006617#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006618int
6619main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006620{
Martin v. Löwis11437992002-04-12 09:54:03 +00006621
6622 FILE *f = fopen ("conftest.val", "w");
6623 if (! f)
6624 exit (1);
6625 if (((long) (sizeof (int))) < 0)
6626 {
6627 long i = longval ();
6628 if (i != ((long) (sizeof (int))))
6629 exit (1);
6630 fprintf (f, "%ld\n", i);
6631 }
6632 else
6633 {
6634 unsigned long i = ulongval ();
6635 if (i != ((long) (sizeof (int))))
6636 exit (1);
6637 fprintf (f, "%lu\n", i);
6638 }
6639 exit (ferror (f) || fclose (f) != 0);
6640
6641 ;
6642 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006643}
Martin v. Löwis11437992002-04-12 09:54:03 +00006644_ACEOF
6645rm -f conftest$ac_exeext
6646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6647 (eval $ac_link) 2>&5
6648 ac_status=$?
6649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6652 (eval $ac_try) 2>&5
6653 ac_status=$?
6654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655 (exit $ac_status); }; }; then
6656 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006657else
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 echo "$as_me: program exited with status $ac_status" >&5
6659echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006660sed 's/^/| /' conftest.$ac_ext >&5
6661
Martin v. Löwis11437992002-04-12 09:54:03 +00006662( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006663{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6664See \`config.log' for more details." >&5
6665echo "$as_me: error: cannot compute sizeof (int), 77
6666See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006667 { (exit 1); exit 1; }; }
6668fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006669rm -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 +00006670fi
6671fi
6672rm -f conftest.val
6673else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006674 ac_cv_sizeof_int=0
6675fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006676fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006677echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6678echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6679cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006680#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006681_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006682
6683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684echo "$as_me:$LINENO: checking for long" >&5
6685echo $ECHO_N "checking for long... $ECHO_C" >&6
6686if test "${ac_cv_type_long+set}" = set; then
6687 echo $ECHO_N "(cached) $ECHO_C" >&6
6688else
6689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006690/* confdefs.h. */
6691_ACEOF
6692cat confdefs.h >>conftest.$ac_ext
6693cat >>conftest.$ac_ext <<_ACEOF
6694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006696int
6697main ()
6698{
6699if ((long *) 0)
6700 return 0;
6701if (sizeof (long))
6702 return 0;
6703 ;
6704 return 0;
6705}
6706_ACEOF
6707rm -f conftest.$ac_objext
6708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006709 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006711 grep -v '^ *+' conftest.er1 >conftest.err
6712 rm -f conftest.er1
6713 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6715 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006716 { ac_try='test -z "$ac_c_werror_flag"
6717 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; } &&
6723 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6725 (eval $ac_try) 2>&5
6726 ac_status=$?
6727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6728 (exit $ac_status); }; }; then
6729 ac_cv_type_long=yes
6730else
6731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006732sed 's/^/| /' conftest.$ac_ext >&5
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734ac_cv_type_long=no
6735fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006737fi
6738echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6739echo "${ECHO_T}$ac_cv_type_long" >&6
6740
6741echo "$as_me:$LINENO: checking size of long" >&5
6742echo $ECHO_N "checking size of long... $ECHO_C" >&6
6743if test "${ac_cv_sizeof_long+set}" = set; then
6744 echo $ECHO_N "(cached) $ECHO_C" >&6
6745else
6746 if test "$ac_cv_type_long" = yes; then
6747 # The cast to unsigned long works around a bug in the HP C Compiler
6748 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6749 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6750 # This bug is HP SR number 8606223364.
6751 if test "$cross_compiling" = yes; then
6752 # Depending upon the size, compute the lo and hi bounds.
6753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006760int
6761main ()
6762{
6763static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6764test_array [0] = 0
6765
6766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
6771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006772 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006774 grep -v '^ *+' conftest.er1 >conftest.err
6775 rm -f conftest.er1
6776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6778 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006779 { ac_try='test -z "$ac_c_werror_flag"
6780 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6782 (eval $ac_try) 2>&5
6783 ac_status=$?
6784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6785 (exit $ac_status); }; } &&
6786 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6788 (eval $ac_try) 2>&5
6789 ac_status=$?
6790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6791 (exit $ac_status); }; }; then
6792 ac_lo=0 ac_mid=0
6793 while :; do
6794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006795/* confdefs.h. */
6796_ACEOF
6797cat confdefs.h >>conftest.$ac_ext
6798cat >>conftest.$ac_ext <<_ACEOF
6799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006800$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006801int
6802main ()
6803{
6804static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6805test_array [0] = 0
6806
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006813 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006815 grep -v '^ *+' conftest.er1 >conftest.err
6816 rm -f conftest.er1
6817 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6819 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006820 { ac_try='test -z "$ac_c_werror_flag"
6821 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6823 (eval $ac_try) 2>&5
6824 ac_status=$?
6825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6826 (exit $ac_status); }; } &&
6827 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6829 (eval $ac_try) 2>&5
6830 ac_status=$?
6831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6832 (exit $ac_status); }; }; then
6833 ac_hi=$ac_mid; break
6834else
6835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006836sed 's/^/| /' conftest.$ac_ext >&5
6837
Martin v. Löwis11437992002-04-12 09:54:03 +00006838ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006839 if test $ac_lo -le $ac_mid; then
6840 ac_lo= ac_hi=
6841 break
6842 fi
6843 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006846 done
6847else
6848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006849sed 's/^/| /' conftest.$ac_ext >&5
6850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006852/* confdefs.h. */
6853_ACEOF
6854cat confdefs.h >>conftest.$ac_ext
6855cat >>conftest.$ac_ext <<_ACEOF
6856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006857$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006858int
6859main ()
6860{
6861static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6862test_array [0] = 0
6863
6864 ;
6865 return 0;
6866}
6867_ACEOF
6868rm -f conftest.$ac_objext
6869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006872 grep -v '^ *+' conftest.er1 >conftest.err
6873 rm -f conftest.er1
6874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006877 { ac_try='test -z "$ac_c_werror_flag"
6878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6880 (eval $ac_try) 2>&5
6881 ac_status=$?
6882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6883 (exit $ac_status); }; } &&
6884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6886 (eval $ac_try) 2>&5
6887 ac_status=$?
6888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6889 (exit $ac_status); }; }; then
6890 ac_hi=-1 ac_mid=-1
6891 while :; do
6892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006893/* confdefs.h. */
6894_ACEOF
6895cat confdefs.h >>conftest.$ac_ext
6896cat >>conftest.$ac_ext <<_ACEOF
6897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006898$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006899int
6900main ()
6901{
6902static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6903test_array [0] = 0
6904
6905 ;
6906 return 0;
6907}
6908_ACEOF
6909rm -f conftest.$ac_objext
6910if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006911 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006913 grep -v '^ *+' conftest.er1 >conftest.err
6914 rm -f conftest.er1
6915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6917 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006918 { ac_try='test -z "$ac_c_werror_flag"
6919 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6921 (eval $ac_try) 2>&5
6922 ac_status=$?
6923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6924 (exit $ac_status); }; } &&
6925 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6927 (eval $ac_try) 2>&5
6928 ac_status=$?
6929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6930 (exit $ac_status); }; }; then
6931 ac_lo=$ac_mid; break
6932else
6933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006934sed 's/^/| /' conftest.$ac_ext >&5
6935
Martin v. Löwis11437992002-04-12 09:54:03 +00006936ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006937 if test $ac_mid -le $ac_hi; then
6938 ac_lo= ac_hi=
6939 break
6940 fi
6941 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006942fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006943rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 done
6945else
6946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006947sed 's/^/| /' conftest.$ac_ext >&5
6948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949ac_lo= ac_hi=
6950fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006951rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006952fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006953rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006954# Binary search between lo and hi bounds.
6955while test "x$ac_lo" != "x$ac_hi"; do
6956 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006958/* confdefs.h. */
6959_ACEOF
6960cat confdefs.h >>conftest.$ac_ext
6961cat >>conftest.$ac_ext <<_ACEOF
6962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006963$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006964int
6965main ()
6966{
6967static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6968test_array [0] = 0
6969
6970 ;
6971 return 0;
6972}
6973_ACEOF
6974rm -f conftest.$ac_objext
6975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006976 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006978 grep -v '^ *+' conftest.er1 >conftest.err
6979 rm -f conftest.er1
6980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006983 { ac_try='test -z "$ac_c_werror_flag"
6984 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6986 (eval $ac_try) 2>&5
6987 ac_status=$?
6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6989 (exit $ac_status); }; } &&
6990 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6992 (eval $ac_try) 2>&5
6993 ac_status=$?
6994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6995 (exit $ac_status); }; }; then
6996 ac_hi=$ac_mid
6997else
6998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006999sed 's/^/| /' conftest.$ac_ext >&5
7000
Martin v. Löwis11437992002-04-12 09:54:03 +00007001ac_lo=`expr '(' $ac_mid ')' + 1`
7002fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007004done
7005case $ac_lo in
7006?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007007'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7008See \`config.log' for more details." >&5
7009echo "$as_me: error: cannot compute sizeof (long), 77
7010See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 { (exit 1); exit 1; }; } ;;
7012esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007013else
7014 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007015 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7016See \`config.log' for more details." >&5
7017echo "$as_me: error: cannot run test program while cross compiling
7018See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007020else
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007022/* confdefs.h. */
7023_ACEOF
7024cat confdefs.h >>conftest.$ac_ext
7025cat >>conftest.$ac_ext <<_ACEOF
7026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007027$ac_includes_default
7028long longval () { return (long) (sizeof (long)); }
7029unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007030#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007031#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007034{
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
7036 FILE *f = fopen ("conftest.val", "w");
7037 if (! f)
7038 exit (1);
7039 if (((long) (sizeof (long))) < 0)
7040 {
7041 long i = longval ();
7042 if (i != ((long) (sizeof (long))))
7043 exit (1);
7044 fprintf (f, "%ld\n", i);
7045 }
7046 else
7047 {
7048 unsigned long i = ulongval ();
7049 if (i != ((long) (sizeof (long))))
7050 exit (1);
7051 fprintf (f, "%lu\n", i);
7052 }
7053 exit (ferror (f) || fclose (f) != 0);
7054
7055 ;
7056 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007057}
Martin v. Löwis11437992002-04-12 09:54:03 +00007058_ACEOF
7059rm -f conftest$ac_exeext
7060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7061 (eval $ac_link) 2>&5
7062 ac_status=$?
7063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7066 (eval $ac_try) 2>&5
7067 ac_status=$?
7068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); }; }; then
7070 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007071else
Martin v. Löwis11437992002-04-12 09:54:03 +00007072 echo "$as_me: program exited with status $ac_status" >&5
7073echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007074sed 's/^/| /' conftest.$ac_ext >&5
7075
Martin v. Löwis11437992002-04-12 09:54:03 +00007076( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007077{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
7078See \`config.log' for more details." >&5
7079echo "$as_me: error: cannot compute sizeof (long), 77
7080See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 { (exit 1); exit 1; }; }
7082fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007083rm -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 +00007084fi
7085fi
7086rm -f conftest.val
7087else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007088 ac_cv_sizeof_long=0
7089fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007090fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007091echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7092echo "${ECHO_T}$ac_cv_sizeof_long" >&6
7093cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007094#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007095_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007096
7097
Martin v. Löwis11437992002-04-12 09:54:03 +00007098echo "$as_me:$LINENO: checking for void *" >&5
7099echo $ECHO_N "checking for void *... $ECHO_C" >&6
7100if test "${ac_cv_type_void_p+set}" = set; then
7101 echo $ECHO_N "(cached) $ECHO_C" >&6
7102else
7103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007104/* confdefs.h. */
7105_ACEOF
7106cat confdefs.h >>conftest.$ac_ext
7107cat >>conftest.$ac_ext <<_ACEOF
7108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007109$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007110int
7111main ()
7112{
7113if ((void * *) 0)
7114 return 0;
7115if (sizeof (void *))
7116 return 0;
7117 ;
7118 return 0;
7119}
7120_ACEOF
7121rm -f conftest.$ac_objext
7122if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007123 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007125 grep -v '^ *+' conftest.er1 >conftest.err
7126 rm -f conftest.er1
7127 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7129 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007130 { ac_try='test -z "$ac_c_werror_flag"
7131 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7133 (eval $ac_try) 2>&5
7134 ac_status=$?
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); }; } &&
7137 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7139 (eval $ac_try) 2>&5
7140 ac_status=$?
7141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7142 (exit $ac_status); }; }; then
7143 ac_cv_type_void_p=yes
7144else
7145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007146sed 's/^/| /' conftest.$ac_ext >&5
7147
Martin v. Löwis11437992002-04-12 09:54:03 +00007148ac_cv_type_void_p=no
7149fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007150rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007151fi
7152echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7153echo "${ECHO_T}$ac_cv_type_void_p" >&6
7154
7155echo "$as_me:$LINENO: checking size of void *" >&5
7156echo $ECHO_N "checking size of void *... $ECHO_C" >&6
7157if test "${ac_cv_sizeof_void_p+set}" = set; then
7158 echo $ECHO_N "(cached) $ECHO_C" >&6
7159else
7160 if test "$ac_cv_type_void_p" = yes; then
7161 # The cast to unsigned long works around a bug in the HP C Compiler
7162 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7163 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7164 # This bug is HP SR number 8606223364.
7165 if test "$cross_compiling" = yes; then
7166 # Depending upon the size, compute the lo and hi bounds.
7167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007168/* confdefs.h. */
7169_ACEOF
7170cat confdefs.h >>conftest.$ac_ext
7171cat >>conftest.$ac_ext <<_ACEOF
7172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007173$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007174int
7175main ()
7176{
7177static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
7178test_array [0] = 0
7179
7180 ;
7181 return 0;
7182}
7183_ACEOF
7184rm -f conftest.$ac_objext
7185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007186 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007188 grep -v '^ *+' conftest.er1 >conftest.err
7189 rm -f conftest.er1
7190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7192 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007193 { ac_try='test -z "$ac_c_werror_flag"
7194 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7196 (eval $ac_try) 2>&5
7197 ac_status=$?
7198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199 (exit $ac_status); }; } &&
7200 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7202 (eval $ac_try) 2>&5
7203 ac_status=$?
7204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7205 (exit $ac_status); }; }; then
7206 ac_lo=0 ac_mid=0
7207 while :; do
7208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007209/* confdefs.h. */
7210_ACEOF
7211cat confdefs.h >>conftest.$ac_ext
7212cat >>conftest.$ac_ext <<_ACEOF
7213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007214$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007215int
7216main ()
7217{
7218static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7219test_array [0] = 0
7220
7221 ;
7222 return 0;
7223}
7224_ACEOF
7225rm -f conftest.$ac_objext
7226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007227 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7233 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007234 { ac_try='test -z "$ac_c_werror_flag"
7235 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7237 (eval $ac_try) 2>&5
7238 ac_status=$?
7239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240 (exit $ac_status); }; } &&
7241 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7243 (eval $ac_try) 2>&5
7244 ac_status=$?
7245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7246 (exit $ac_status); }; }; then
7247 ac_hi=$ac_mid; break
7248else
7249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007250sed 's/^/| /' conftest.$ac_ext >&5
7251
Martin v. Löwis11437992002-04-12 09:54:03 +00007252ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007253 if test $ac_lo -le $ac_mid; then
7254 ac_lo= ac_hi=
7255 break
7256 fi
7257 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007258fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007259rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007260 done
7261else
7262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007263sed 's/^/| /' conftest.$ac_ext >&5
7264
Martin v. Löwis11437992002-04-12 09:54:03 +00007265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007266/* confdefs.h. */
7267_ACEOF
7268cat confdefs.h >>conftest.$ac_ext
7269cat >>conftest.$ac_ext <<_ACEOF
7270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007272int
7273main ()
7274{
7275static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7276test_array [0] = 0
7277
7278 ;
7279 return 0;
7280}
7281_ACEOF
7282rm -f conftest.$ac_objext
7283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007284 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007286 grep -v '^ *+' conftest.er1 >conftest.err
7287 rm -f conftest.er1
7288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007291 { ac_try='test -z "$ac_c_werror_flag"
7292 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7294 (eval $ac_try) 2>&5
7295 ac_status=$?
7296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7297 (exit $ac_status); }; } &&
7298 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7300 (eval $ac_try) 2>&5
7301 ac_status=$?
7302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); }; }; then
7304 ac_hi=-1 ac_mid=-1
7305 while :; do
7306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* confdefs.h. */
7308_ACEOF
7309cat confdefs.h >>conftest.$ac_ext
7310cat >>conftest.$ac_ext <<_ACEOF
7311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007312$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007313int
7314main ()
7315{
7316static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7317test_array [0] = 0
7318
7319 ;
7320 return 0;
7321}
7322_ACEOF
7323rm -f conftest.$ac_objext
7324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007325 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007327 grep -v '^ *+' conftest.er1 >conftest.err
7328 rm -f conftest.er1
7329 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7331 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007332 { ac_try='test -z "$ac_c_werror_flag"
7333 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7335 (eval $ac_try) 2>&5
7336 ac_status=$?
7337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7338 (exit $ac_status); }; } &&
7339 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7341 (eval $ac_try) 2>&5
7342 ac_status=$?
7343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7344 (exit $ac_status); }; }; then
7345 ac_lo=$ac_mid; break
7346else
7347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007348sed 's/^/| /' conftest.$ac_ext >&5
7349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007351 if test $ac_mid -le $ac_hi; then
7352 ac_lo= ac_hi=
7353 break
7354 fi
7355 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007358 done
7359else
7360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007361sed 's/^/| /' conftest.$ac_ext >&5
7362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363ac_lo= ac_hi=
7364fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007365rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007366fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007368# Binary search between lo and hi bounds.
7369while test "x$ac_lo" != "x$ac_hi"; do
7370 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007372/* confdefs.h. */
7373_ACEOF
7374cat confdefs.h >>conftest.$ac_ext
7375cat >>conftest.$ac_ext <<_ACEOF
7376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007377$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007378int
7379main ()
7380{
7381static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7382test_array [0] = 0
7383
7384 ;
7385 return 0;
7386}
7387_ACEOF
7388rm -f conftest.$ac_objext
7389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007390 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007392 grep -v '^ *+' conftest.er1 >conftest.err
7393 rm -f conftest.er1
7394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007397 { ac_try='test -z "$ac_c_werror_flag"
7398 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7400 (eval $ac_try) 2>&5
7401 ac_status=$?
7402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7403 (exit $ac_status); }; } &&
7404 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7406 (eval $ac_try) 2>&5
7407 ac_status=$?
7408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7409 (exit $ac_status); }; }; then
7410 ac_hi=$ac_mid
7411else
7412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007413sed 's/^/| /' conftest.$ac_ext >&5
7414
Martin v. Löwis11437992002-04-12 09:54:03 +00007415ac_lo=`expr '(' $ac_mid ')' + 1`
7416fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007418done
7419case $ac_lo in
7420?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007421'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7422See \`config.log' for more details." >&5
7423echo "$as_me: error: cannot compute sizeof (void *), 77
7424See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 { (exit 1); exit 1; }; } ;;
7426esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007427else
7428 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007429 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7430See \`config.log' for more details." >&5
7431echo "$as_me: error: cannot run test program while cross compiling
7432See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007433 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007434else
Martin v. Löwis11437992002-04-12 09:54:03 +00007435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007436/* confdefs.h. */
7437_ACEOF
7438cat confdefs.h >>conftest.$ac_ext
7439cat >>conftest.$ac_ext <<_ACEOF
7440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007441$ac_includes_default
7442long longval () { return (long) (sizeof (void *)); }
7443unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007444#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007445#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007446int
7447main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007448{
Martin v. Löwis11437992002-04-12 09:54:03 +00007449
7450 FILE *f = fopen ("conftest.val", "w");
7451 if (! f)
7452 exit (1);
7453 if (((long) (sizeof (void *))) < 0)
7454 {
7455 long i = longval ();
7456 if (i != ((long) (sizeof (void *))))
7457 exit (1);
7458 fprintf (f, "%ld\n", i);
7459 }
7460 else
7461 {
7462 unsigned long i = ulongval ();
7463 if (i != ((long) (sizeof (void *))))
7464 exit (1);
7465 fprintf (f, "%lu\n", i);
7466 }
7467 exit (ferror (f) || fclose (f) != 0);
7468
7469 ;
7470 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007471}
Martin v. Löwis11437992002-04-12 09:54:03 +00007472_ACEOF
7473rm -f conftest$ac_exeext
7474if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7475 (eval $ac_link) 2>&5
7476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7480 (eval $ac_try) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); }; }; then
7484 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007485else
Martin v. Löwis11437992002-04-12 09:54:03 +00007486 echo "$as_me: program exited with status $ac_status" >&5
7487echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007488sed 's/^/| /' conftest.$ac_ext >&5
7489
Martin v. Löwis11437992002-04-12 09:54:03 +00007490( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007491{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7492See \`config.log' for more details." >&5
7493echo "$as_me: error: cannot compute sizeof (void *), 77
7494See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007495 { (exit 1); exit 1; }; }
7496fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007497rm -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 +00007498fi
7499fi
7500rm -f conftest.val
7501else
Guido van Rossumad678af1998-10-02 14:42:15 +00007502 ac_cv_sizeof_void_p=0
7503fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007505echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7506echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7507cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007508#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007509_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007510
7511
Martin v. Löwis11437992002-04-12 09:54:03 +00007512echo "$as_me:$LINENO: checking for short" >&5
7513echo $ECHO_N "checking for short... $ECHO_C" >&6
7514if test "${ac_cv_type_short+set}" = set; then
7515 echo $ECHO_N "(cached) $ECHO_C" >&6
7516else
7517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007518/* confdefs.h. */
7519_ACEOF
7520cat confdefs.h >>conftest.$ac_ext
7521cat >>conftest.$ac_ext <<_ACEOF
7522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
7527if ((short *) 0)
7528 return 0;
7529if (sizeof (short))
7530 return 0;
7531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
7536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007537 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007539 grep -v '^ *+' conftest.er1 >conftest.err
7540 rm -f conftest.er1
7541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007544 { ac_try='test -z "$ac_c_werror_flag"
7545 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547 (eval $ac_try) 2>&5
7548 ac_status=$?
7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); }; } &&
7551 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553 (eval $ac_try) 2>&5
7554 ac_status=$?
7555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556 (exit $ac_status); }; }; then
7557 ac_cv_type_short=yes
7558else
7559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007560sed 's/^/| /' conftest.$ac_ext >&5
7561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562ac_cv_type_short=no
7563fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
7566echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7567echo "${ECHO_T}$ac_cv_type_short" >&6
7568
7569echo "$as_me:$LINENO: checking size of short" >&5
7570echo $ECHO_N "checking size of short... $ECHO_C" >&6
7571if test "${ac_cv_sizeof_short+set}" = set; then
7572 echo $ECHO_N "(cached) $ECHO_C" >&6
7573else
7574 if test "$ac_cv_type_short" = yes; then
7575 # The cast to unsigned long works around a bug in the HP C Compiler
7576 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7577 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7578 # This bug is HP SR number 8606223364.
7579 if test "$cross_compiling" = yes; then
7580 # Depending upon the size, compute the lo and hi bounds.
7581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007582/* confdefs.h. */
7583_ACEOF
7584cat confdefs.h >>conftest.$ac_ext
7585cat >>conftest.$ac_ext <<_ACEOF
7586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007588int
7589main ()
7590{
7591static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7592test_array [0] = 0
7593
7594 ;
7595 return 0;
7596}
7597_ACEOF
7598rm -f conftest.$ac_objext
7599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007600 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007602 grep -v '^ *+' conftest.er1 >conftest.err
7603 rm -f conftest.er1
7604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007607 { ac_try='test -z "$ac_c_werror_flag"
7608 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7610 (eval $ac_try) 2>&5
7611 ac_status=$?
7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7613 (exit $ac_status); }; } &&
7614 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7616 (eval $ac_try) 2>&5
7617 ac_status=$?
7618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7619 (exit $ac_status); }; }; then
7620 ac_lo=0 ac_mid=0
7621 while :; do
7622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007623/* confdefs.h. */
7624_ACEOF
7625cat confdefs.h >>conftest.$ac_ext
7626cat >>conftest.$ac_ext <<_ACEOF
7627/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007628$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007629int
7630main ()
7631{
7632static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7633test_array [0] = 0
7634
7635 ;
7636 return 0;
7637}
7638_ACEOF
7639rm -f conftest.$ac_objext
7640if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007641 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007643 grep -v '^ *+' conftest.er1 >conftest.err
7644 rm -f conftest.er1
7645 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007648 { ac_try='test -z "$ac_c_werror_flag"
7649 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007650 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7651 (eval $ac_try) 2>&5
7652 ac_status=$?
7653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7654 (exit $ac_status); }; } &&
7655 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7657 (eval $ac_try) 2>&5
7658 ac_status=$?
7659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7660 (exit $ac_status); }; }; then
7661 ac_hi=$ac_mid; break
7662else
7663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007664sed 's/^/| /' conftest.$ac_ext >&5
7665
Martin v. Löwis11437992002-04-12 09:54:03 +00007666ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007667 if test $ac_lo -le $ac_mid; then
7668 ac_lo= ac_hi=
7669 break
7670 fi
7671 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007673rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 done
7675else
7676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007677sed 's/^/| /' conftest.$ac_ext >&5
7678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007680/* confdefs.h. */
7681_ACEOF
7682cat confdefs.h >>conftest.$ac_ext
7683cat >>conftest.$ac_ext <<_ACEOF
7684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007685$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
7689static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
7697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007698 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007700 grep -v '^ *+' conftest.er1 >conftest.err
7701 rm -f conftest.er1
7702 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007705 { ac_try='test -z "$ac_c_werror_flag"
7706 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708 (eval $ac_try) 2>&5
7709 ac_status=$?
7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711 (exit $ac_status); }; } &&
7712 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714 (eval $ac_try) 2>&5
7715 ac_status=$?
7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717 (exit $ac_status); }; }; then
7718 ac_hi=-1 ac_mid=-1
7719 while :; do
7720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007726$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007727int
7728main ()
7729{
7730static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7731test_array [0] = 0
7732
7733 ;
7734 return 0;
7735}
7736_ACEOF
7737rm -f conftest.$ac_objext
7738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007739 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007741 grep -v '^ *+' conftest.er1 >conftest.err
7742 rm -f conftest.er1
7743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007746 { ac_try='test -z "$ac_c_werror_flag"
7747 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7749 (eval $ac_try) 2>&5
7750 ac_status=$?
7751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7752 (exit $ac_status); }; } &&
7753 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7755 (eval $ac_try) 2>&5
7756 ac_status=$?
7757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7758 (exit $ac_status); }; }; then
7759 ac_lo=$ac_mid; break
7760else
7761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007762sed 's/^/| /' conftest.$ac_ext >&5
7763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007765 if test $ac_mid -le $ac_hi; then
7766 ac_lo= ac_hi=
7767 break
7768 fi
7769 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007771rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 done
7773else
7774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007775sed 's/^/| /' conftest.$ac_ext >&5
7776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777ac_lo= ac_hi=
7778fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007779rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007781rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007782# Binary search between lo and hi bounds.
7783while test "x$ac_lo" != "x$ac_hi"; do
7784 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* confdefs.h. */
7787_ACEOF
7788cat confdefs.h >>conftest.$ac_ext
7789cat >>conftest.$ac_ext <<_ACEOF
7790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007792int
7793main ()
7794{
7795static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
7803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007804 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7810 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007811 { ac_try='test -z "$ac_c_werror_flag"
7812 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7814 (eval $ac_try) 2>&5
7815 ac_status=$?
7816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7817 (exit $ac_status); }; } &&
7818 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7820 (eval $ac_try) 2>&5
7821 ac_status=$?
7822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7823 (exit $ac_status); }; }; then
7824 ac_hi=$ac_mid
7825else
7826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007827sed 's/^/| /' conftest.$ac_ext >&5
7828
Martin v. Löwis11437992002-04-12 09:54:03 +00007829ac_lo=`expr '(' $ac_mid ')' + 1`
7830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007832done
7833case $ac_lo in
7834?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007835'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7836See \`config.log' for more details." >&5
7837echo "$as_me: error: cannot compute sizeof (short), 77
7838See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 { (exit 1); exit 1; }; } ;;
7840esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007841else
7842 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007843 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7844See \`config.log' for more details." >&5
7845echo "$as_me: error: cannot run test program while cross compiling
7846See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007847 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007848else
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007850/* confdefs.h. */
7851_ACEOF
7852cat confdefs.h >>conftest.$ac_ext
7853cat >>conftest.$ac_ext <<_ACEOF
7854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007855$ac_includes_default
7856long longval () { return (long) (sizeof (short)); }
7857unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007858#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007859#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007862{
Martin v. Löwis11437992002-04-12 09:54:03 +00007863
7864 FILE *f = fopen ("conftest.val", "w");
7865 if (! f)
7866 exit (1);
7867 if (((long) (sizeof (short))) < 0)
7868 {
7869 long i = longval ();
7870 if (i != ((long) (sizeof (short))))
7871 exit (1);
7872 fprintf (f, "%ld\n", i);
7873 }
7874 else
7875 {
7876 unsigned long i = ulongval ();
7877 if (i != ((long) (sizeof (short))))
7878 exit (1);
7879 fprintf (f, "%lu\n", i);
7880 }
7881 exit (ferror (f) || fclose (f) != 0);
7882
7883 ;
7884 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007885}
Martin v. Löwis11437992002-04-12 09:54:03 +00007886_ACEOF
7887rm -f conftest$ac_exeext
7888if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7889 (eval $ac_link) 2>&5
7890 ac_status=$?
7891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7894 (eval $ac_try) 2>&5
7895 ac_status=$?
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); }; }; then
7898 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007899else
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 echo "$as_me: program exited with status $ac_status" >&5
7901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007902sed 's/^/| /' conftest.$ac_ext >&5
7903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007905{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7906See \`config.log' for more details." >&5
7907echo "$as_me: error: cannot compute sizeof (short), 77
7908See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 { (exit 1); exit 1; }; }
7910fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007911rm -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 +00007912fi
7913fi
7914rm -f conftest.val
7915else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007916 ac_cv_sizeof_short=0
7917fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007919echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7920echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7921cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007922#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007923_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007924
7925
Martin v. Löwis11437992002-04-12 09:54:03 +00007926echo "$as_me:$LINENO: checking for float" >&5
7927echo $ECHO_N "checking for float... $ECHO_C" >&6
7928if test "${ac_cv_type_float+set}" = set; then
7929 echo $ECHO_N "(cached) $ECHO_C" >&6
7930else
7931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* confdefs.h. */
7933_ACEOF
7934cat confdefs.h >>conftest.$ac_ext
7935cat >>conftest.$ac_ext <<_ACEOF
7936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
7941if ((float *) 0)
7942 return 0;
7943if (sizeof (float))
7944 return 0;
7945 ;
7946 return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext
7950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007951 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007953 grep -v '^ *+' conftest.er1 >conftest.err
7954 rm -f conftest.er1
7955 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7957 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007958 { ac_try='test -z "$ac_c_werror_flag"
7959 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7961 (eval $ac_try) 2>&5
7962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); }; } &&
7965 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7967 (eval $ac_try) 2>&5
7968 ac_status=$?
7969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7970 (exit $ac_status); }; }; then
7971 ac_cv_type_float=yes
7972else
7973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007974sed 's/^/| /' conftest.$ac_ext >&5
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976ac_cv_type_float=no
7977fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007978rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007979fi
7980echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7981echo "${ECHO_T}$ac_cv_type_float" >&6
7982
7983echo "$as_me:$LINENO: checking size of float" >&5
7984echo $ECHO_N "checking size of float... $ECHO_C" >&6
7985if test "${ac_cv_sizeof_float+set}" = set; then
7986 echo $ECHO_N "(cached) $ECHO_C" >&6
7987else
7988 if test "$ac_cv_type_float" = yes; then
7989 # The cast to unsigned long works around a bug in the HP C Compiler
7990 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7991 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7992 # This bug is HP SR number 8606223364.
7993 if test "$cross_compiling" = yes; then
7994 # Depending upon the size, compute the lo and hi bounds.
7995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007996/* confdefs.h. */
7997_ACEOF
7998cat confdefs.h >>conftest.$ac_ext
7999cat >>conftest.$ac_ext <<_ACEOF
8000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008001$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
8005static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
8006test_array [0] = 0
8007
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
8013if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008014 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008016 grep -v '^ *+' conftest.er1 >conftest.err
8017 rm -f conftest.er1
8018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8020 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008021 { ac_try='test -z "$ac_c_werror_flag"
8022 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8024 (eval $ac_try) 2>&5
8025 ac_status=$?
8026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8027 (exit $ac_status); }; } &&
8028 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8030 (eval $ac_try) 2>&5
8031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); }; }; then
8034 ac_lo=0 ac_mid=0
8035 while :; do
8036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008037/* confdefs.h. */
8038_ACEOF
8039cat confdefs.h >>conftest.$ac_ext
8040cat >>conftest.$ac_ext <<_ACEOF
8041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008042$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
8046static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8047test_array [0] = 0
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
8054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008055 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008057 grep -v '^ *+' conftest.er1 >conftest.err
8058 rm -f conftest.er1
8059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8061 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008062 { ac_try='test -z "$ac_c_werror_flag"
8063 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8065 (eval $ac_try) 2>&5
8066 ac_status=$?
8067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8068 (exit $ac_status); }; } &&
8069 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8071 (eval $ac_try) 2>&5
8072 ac_status=$?
8073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8074 (exit $ac_status); }; }; then
8075 ac_hi=$ac_mid; break
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwis11437992002-04-12 09:54:03 +00008080ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008081 if test $ac_lo -le $ac_mid; then
8082 ac_lo= ac_hi=
8083 break
8084 fi
8085 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008086fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008087rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 done
8089else
8090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008091sed 's/^/| /' conftest.$ac_ext >&5
8092
Martin v. Löwis11437992002-04-12 09:54:03 +00008093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008094/* confdefs.h. */
8095_ACEOF
8096cat confdefs.h >>conftest.$ac_ext
8097cat >>conftest.$ac_ext <<_ACEOF
8098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008099$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008100int
8101main ()
8102{
8103static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
8104test_array [0] = 0
8105
8106 ;
8107 return 0;
8108}
8109_ACEOF
8110rm -f conftest.$ac_objext
8111if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008112 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008114 grep -v '^ *+' conftest.er1 >conftest.err
8115 rm -f conftest.er1
8116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008119 { ac_try='test -z "$ac_c_werror_flag"
8120 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8122 (eval $ac_try) 2>&5
8123 ac_status=$?
8124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8125 (exit $ac_status); }; } &&
8126 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8128 (eval $ac_try) 2>&5
8129 ac_status=$?
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); }; }; then
8132 ac_hi=-1 ac_mid=-1
8133 while :; do
8134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* confdefs.h. */
8136_ACEOF
8137cat confdefs.h >>conftest.$ac_ext
8138cat >>conftest.$ac_ext <<_ACEOF
8139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008140$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008141int
8142main ()
8143{
8144static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
8145test_array [0] = 0
8146
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext
8152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008155 grep -v '^ *+' conftest.er1 >conftest.err
8156 rm -f conftest.er1
8157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008160 { ac_try='test -z "$ac_c_werror_flag"
8161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8163 (eval $ac_try) 2>&5
8164 ac_status=$?
8165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8166 (exit $ac_status); }; } &&
8167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8169 (eval $ac_try) 2>&5
8170 ac_status=$?
8171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8172 (exit $ac_status); }; }; then
8173 ac_lo=$ac_mid; break
8174else
8175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008176sed 's/^/| /' conftest.$ac_ext >&5
8177
Martin v. Löwis11437992002-04-12 09:54:03 +00008178ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008179 if test $ac_mid -le $ac_hi; then
8180 ac_lo= ac_hi=
8181 break
8182 fi
8183 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 done
8187else
8188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008189sed 's/^/| /' conftest.$ac_ext >&5
8190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191ac_lo= ac_hi=
8192fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008194fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008196# Binary search between lo and hi bounds.
8197while test "x$ac_lo" != "x$ac_hi"; do
8198 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* confdefs.h. */
8201_ACEOF
8202cat confdefs.h >>conftest.$ac_ext
8203cat >>conftest.$ac_ext <<_ACEOF
8204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
8209static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8210test_array [0] = 0
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
8217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008218 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008220 grep -v '^ *+' conftest.er1 >conftest.err
8221 rm -f conftest.er1
8222 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8224 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008225 { ac_try='test -z "$ac_c_werror_flag"
8226 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8228 (eval $ac_try) 2>&5
8229 ac_status=$?
8230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8231 (exit $ac_status); }; } &&
8232 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8234 (eval $ac_try) 2>&5
8235 ac_status=$?
8236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8237 (exit $ac_status); }; }; then
8238 ac_hi=$ac_mid
8239else
8240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008241sed 's/^/| /' conftest.$ac_ext >&5
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243ac_lo=`expr '(' $ac_mid ')' + 1`
8244fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008245rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008246done
8247case $ac_lo in
8248?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008249'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8250See \`config.log' for more details." >&5
8251echo "$as_me: error: cannot compute sizeof (float), 77
8252See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 { (exit 1); exit 1; }; } ;;
8254esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008255else
8256 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008257 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8258See \`config.log' for more details." >&5
8259echo "$as_me: error: cannot run test program while cross compiling
8260See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008262else
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008264/* confdefs.h. */
8265_ACEOF
8266cat confdefs.h >>conftest.$ac_ext
8267cat >>conftest.$ac_ext <<_ACEOF
8268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008269$ac_includes_default
8270long longval () { return (long) (sizeof (float)); }
8271unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008272#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008273#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008274int
8275main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008276{
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278 FILE *f = fopen ("conftest.val", "w");
8279 if (! f)
8280 exit (1);
8281 if (((long) (sizeof (float))) < 0)
8282 {
8283 long i = longval ();
8284 if (i != ((long) (sizeof (float))))
8285 exit (1);
8286 fprintf (f, "%ld\n", i);
8287 }
8288 else
8289 {
8290 unsigned long i = ulongval ();
8291 if (i != ((long) (sizeof (float))))
8292 exit (1);
8293 fprintf (f, "%lu\n", i);
8294 }
8295 exit (ferror (f) || fclose (f) != 0);
8296
8297 ;
8298 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008299}
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
8301rm -f conftest$ac_exeext
8302if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8303 (eval $ac_link) 2>&5
8304 ac_status=$?
8305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8306 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8308 (eval $ac_try) 2>&5
8309 ac_status=$?
8310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8311 (exit $ac_status); }; }; then
8312 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 echo "$as_me: program exited with status $ac_status" >&5
8315echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008316sed 's/^/| /' conftest.$ac_ext >&5
8317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008319{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8320See \`config.log' for more details." >&5
8321echo "$as_me: error: cannot compute sizeof (float), 77
8322See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 { (exit 1); exit 1; }; }
8324fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008325rm -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 +00008326fi
8327fi
8328rm -f conftest.val
8329else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008330 ac_cv_sizeof_float=0
8331fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008333echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8334echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8335cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008336#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008337_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008338
8339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340echo "$as_me:$LINENO: checking for double" >&5
8341echo $ECHO_N "checking for double... $ECHO_C" >&6
8342if test "${ac_cv_type_double+set}" = set; then
8343 echo $ECHO_N "(cached) $ECHO_C" >&6
8344else
8345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008346/* confdefs.h. */
8347_ACEOF
8348cat confdefs.h >>conftest.$ac_ext
8349cat >>conftest.$ac_ext <<_ACEOF
8350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008352int
8353main ()
8354{
8355if ((double *) 0)
8356 return 0;
8357if (sizeof (double))
8358 return 0;
8359 ;
8360 return 0;
8361}
8362_ACEOF
8363rm -f conftest.$ac_objext
8364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008365 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008367 grep -v '^ *+' conftest.er1 >conftest.err
8368 rm -f conftest.er1
8369 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008372 { ac_try='test -z "$ac_c_werror_flag"
8373 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; } &&
8379 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8381 (eval $ac_try) 2>&5
8382 ac_status=$?
8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8384 (exit $ac_status); }; }; then
8385 ac_cv_type_double=yes
8386else
8387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008388sed 's/^/| /' conftest.$ac_ext >&5
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390ac_cv_type_double=no
8391fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008392rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008393fi
8394echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8395echo "${ECHO_T}$ac_cv_type_double" >&6
8396
8397echo "$as_me:$LINENO: checking size of double" >&5
8398echo $ECHO_N "checking size of double... $ECHO_C" >&6
8399if test "${ac_cv_sizeof_double+set}" = set; then
8400 echo $ECHO_N "(cached) $ECHO_C" >&6
8401else
8402 if test "$ac_cv_type_double" = yes; then
8403 # The cast to unsigned long works around a bug in the HP C Compiler
8404 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8405 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8406 # This bug is HP SR number 8606223364.
8407 if test "$cross_compiling" = yes; then
8408 # Depending upon the size, compute the lo and hi bounds.
8409cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008410/* confdefs.h. */
8411_ACEOF
8412cat confdefs.h >>conftest.$ac_ext
8413cat >>conftest.$ac_ext <<_ACEOF
8414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008415$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008416int
8417main ()
8418{
8419static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8420test_array [0] = 0
8421
8422 ;
8423 return 0;
8424}
8425_ACEOF
8426rm -f conftest.$ac_objext
8427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008428 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008430 grep -v '^ *+' conftest.er1 >conftest.err
8431 rm -f conftest.er1
8432 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8434 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008435 { ac_try='test -z "$ac_c_werror_flag"
8436 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8438 (eval $ac_try) 2>&5
8439 ac_status=$?
8440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8441 (exit $ac_status); }; } &&
8442 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8444 (eval $ac_try) 2>&5
8445 ac_status=$?
8446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8447 (exit $ac_status); }; }; then
8448 ac_lo=0 ac_mid=0
8449 while :; do
8450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008451/* confdefs.h. */
8452_ACEOF
8453cat confdefs.h >>conftest.$ac_ext
8454cat >>conftest.$ac_ext <<_ACEOF
8455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008456$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008457int
8458main ()
8459{
8460static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8461test_array [0] = 0
8462
8463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
8468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008469 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008471 grep -v '^ *+' conftest.er1 >conftest.err
8472 rm -f conftest.er1
8473 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008476 { ac_try='test -z "$ac_c_werror_flag"
8477 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8479 (eval $ac_try) 2>&5
8480 ac_status=$?
8481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8482 (exit $ac_status); }; } &&
8483 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8485 (eval $ac_try) 2>&5
8486 ac_status=$?
8487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8488 (exit $ac_status); }; }; then
8489 ac_hi=$ac_mid; break
8490else
8491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008495 if test $ac_lo -le $ac_mid; then
8496 ac_lo= ac_hi=
8497 break
8498 fi
8499 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008501rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008502 done
8503else
8504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008505sed 's/^/| /' conftest.$ac_ext >&5
8506
Martin v. Löwis11437992002-04-12 09:54:03 +00008507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008508/* confdefs.h. */
8509_ACEOF
8510cat confdefs.h >>conftest.$ac_ext
8511cat >>conftest.$ac_ext <<_ACEOF
8512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008513$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
8516{
8517static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8518test_array [0] = 0
8519
8520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
8525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008526 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008528 grep -v '^ *+' conftest.er1 >conftest.err
8529 rm -f conftest.er1
8530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008533 { ac_try='test -z "$ac_c_werror_flag"
8534 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8536 (eval $ac_try) 2>&5
8537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); }; } &&
8540 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8542 (eval $ac_try) 2>&5
8543 ac_status=$?
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); }; }; then
8546 ac_hi=-1 ac_mid=-1
8547 while :; do
8548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* confdefs.h. */
8550_ACEOF
8551cat confdefs.h >>conftest.$ac_ext
8552cat >>conftest.$ac_ext <<_ACEOF
8553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
8558static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8559test_array [0] = 0
8560
8561 ;
8562 return 0;
8563}
8564_ACEOF
8565rm -f conftest.$ac_objext
8566if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008567 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008569 grep -v '^ *+' conftest.er1 >conftest.err
8570 rm -f conftest.er1
8571 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008574 { ac_try='test -z "$ac_c_werror_flag"
8575 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8577 (eval $ac_try) 2>&5
8578 ac_status=$?
8579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8580 (exit $ac_status); }; } &&
8581 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8583 (eval $ac_try) 2>&5
8584 ac_status=$?
8585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8586 (exit $ac_status); }; }; then
8587 ac_lo=$ac_mid; break
8588else
8589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008590sed 's/^/| /' conftest.$ac_ext >&5
8591
Martin v. Löwis11437992002-04-12 09:54:03 +00008592ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008593 if test $ac_mid -le $ac_hi; then
8594 ac_lo= ac_hi=
8595 break
8596 fi
8597 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 done
8601else
8602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008603sed 's/^/| /' conftest.$ac_ext >&5
8604
Martin v. Löwis11437992002-04-12 09:54:03 +00008605ac_lo= ac_hi=
8606fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008607rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008610# Binary search between lo and hi bounds.
8611while test "x$ac_lo" != "x$ac_hi"; do
8612 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008614/* confdefs.h. */
8615_ACEOF
8616cat confdefs.h >>conftest.$ac_ext
8617cat >>conftest.$ac_ext <<_ACEOF
8618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008619$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
8623static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8624test_array [0] = 0
8625
8626 ;
8627 return 0;
8628}
8629_ACEOF
8630rm -f conftest.$ac_objext
8631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008632 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008634 grep -v '^ *+' conftest.er1 >conftest.err
8635 rm -f conftest.er1
8636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008639 { ac_try='test -z "$ac_c_werror_flag"
8640 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8642 (eval $ac_try) 2>&5
8643 ac_status=$?
8644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8645 (exit $ac_status); }; } &&
8646 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8648 (eval $ac_try) 2>&5
8649 ac_status=$?
8650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651 (exit $ac_status); }; }; then
8652 ac_hi=$ac_mid
8653else
8654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008655sed 's/^/| /' conftest.$ac_ext >&5
8656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657ac_lo=`expr '(' $ac_mid ')' + 1`
8658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008659rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008660done
8661case $ac_lo in
8662?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008663'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8664See \`config.log' for more details." >&5
8665echo "$as_me: error: cannot compute sizeof (double), 77
8666See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 { (exit 1); exit 1; }; } ;;
8668esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669else
8670 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008671 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8672See \`config.log' for more details." >&5
8673echo "$as_me: error: cannot run test program while cross compiling
8674See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008676else
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008678/* confdefs.h. */
8679_ACEOF
8680cat confdefs.h >>conftest.$ac_ext
8681cat >>conftest.$ac_ext <<_ACEOF
8682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008683$ac_includes_default
8684long longval () { return (long) (sizeof (double)); }
8685unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008686#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008687#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008688int
8689main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008690{
Martin v. Löwis11437992002-04-12 09:54:03 +00008691
8692 FILE *f = fopen ("conftest.val", "w");
8693 if (! f)
8694 exit (1);
8695 if (((long) (sizeof (double))) < 0)
8696 {
8697 long i = longval ();
8698 if (i != ((long) (sizeof (double))))
8699 exit (1);
8700 fprintf (f, "%ld\n", i);
8701 }
8702 else
8703 {
8704 unsigned long i = ulongval ();
8705 if (i != ((long) (sizeof (double))))
8706 exit (1);
8707 fprintf (f, "%lu\n", i);
8708 }
8709 exit (ferror (f) || fclose (f) != 0);
8710
8711 ;
8712 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008713}
Martin v. Löwis11437992002-04-12 09:54:03 +00008714_ACEOF
8715rm -f conftest$ac_exeext
8716if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8717 (eval $ac_link) 2>&5
8718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8722 (eval $ac_try) 2>&5
8723 ac_status=$?
8724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8725 (exit $ac_status); }; }; then
8726 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008727else
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 echo "$as_me: program exited with status $ac_status" >&5
8729echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008730sed 's/^/| /' conftest.$ac_ext >&5
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008733{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8734See \`config.log' for more details." >&5
8735echo "$as_me: error: cannot compute sizeof (double), 77
8736See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 { (exit 1); exit 1; }; }
8738fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008739rm -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 +00008740fi
8741fi
8742rm -f conftest.val
8743else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008744 ac_cv_sizeof_double=0
8745fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008746fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008747echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8748echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8749cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008750#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008751_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008752
8753
Martin v. Löwis11437992002-04-12 09:54:03 +00008754echo "$as_me:$LINENO: checking for fpos_t" >&5
8755echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8756if test "${ac_cv_type_fpos_t+set}" = set; then
8757 echo $ECHO_N "(cached) $ECHO_C" >&6
8758else
8759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008760/* confdefs.h. */
8761_ACEOF
8762cat confdefs.h >>conftest.$ac_ext
8763cat >>conftest.$ac_ext <<_ACEOF
8764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008766int
8767main ()
8768{
8769if ((fpos_t *) 0)
8770 return 0;
8771if (sizeof (fpos_t))
8772 return 0;
8773 ;
8774 return 0;
8775}
8776_ACEOF
8777rm -f conftest.$ac_objext
8778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008786 { ac_try='test -z "$ac_c_werror_flag"
8787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8789 (eval $ac_try) 2>&5
8790 ac_status=$?
8791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792 (exit $ac_status); }; } &&
8793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8795 (eval $ac_try) 2>&5
8796 ac_status=$?
8797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8798 (exit $ac_status); }; }; then
8799 ac_cv_type_fpos_t=yes
8800else
8801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008802sed 's/^/| /' conftest.$ac_ext >&5
8803
Martin v. Löwis11437992002-04-12 09:54:03 +00008804ac_cv_type_fpos_t=no
8805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008807fi
8808echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8809echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8810
8811echo "$as_me:$LINENO: checking size of fpos_t" >&5
8812echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8813if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8814 echo $ECHO_N "(cached) $ECHO_C" >&6
8815else
8816 if test "$ac_cv_type_fpos_t" = yes; then
8817 # The cast to unsigned long works around a bug in the HP C Compiler
8818 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8819 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8820 # This bug is HP SR number 8606223364.
8821 if test "$cross_compiling" = yes; then
8822 # Depending upon the size, compute the lo and hi bounds.
8823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* confdefs.h. */
8825_ACEOF
8826cat confdefs.h >>conftest.$ac_ext
8827cat >>conftest.$ac_ext <<_ACEOF
8828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
8833static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
8841if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008842 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008844 grep -v '^ *+' conftest.er1 >conftest.err
8845 rm -f conftest.er1
8846 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8848 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008849 { ac_try='test -z "$ac_c_werror_flag"
8850 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8852 (eval $ac_try) 2>&5
8853 ac_status=$?
8854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8855 (exit $ac_status); }; } &&
8856 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8858 (eval $ac_try) 2>&5
8859 ac_status=$?
8860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8861 (exit $ac_status); }; }; then
8862 ac_lo=0 ac_mid=0
8863 while :; do
8864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
8874static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
8882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008883 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008885 grep -v '^ *+' conftest.er1 >conftest.err
8886 rm -f conftest.er1
8887 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8889 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008890 { ac_try='test -z "$ac_c_werror_flag"
8891 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8893 (eval $ac_try) 2>&5
8894 ac_status=$?
8895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8896 (exit $ac_status); }; } &&
8897 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8899 (eval $ac_try) 2>&5
8900 ac_status=$?
8901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8902 (exit $ac_status); }; }; then
8903 ac_hi=$ac_mid; break
8904else
8905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008906sed 's/^/| /' conftest.$ac_ext >&5
8907
Martin v. Löwis11437992002-04-12 09:54:03 +00008908ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008909 if test $ac_lo -le $ac_mid; then
8910 ac_lo= ac_hi=
8911 break
8912 fi
8913 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008915rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 done
8917else
8918 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008919sed 's/^/| /' conftest.$ac_ext >&5
8920
Martin v. Löwis11437992002-04-12 09:54:03 +00008921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008928int
8929main ()
8930{
8931static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8932test_array [0] = 0
8933
8934 ;
8935 return 0;
8936}
8937_ACEOF
8938rm -f conftest.$ac_objext
8939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008940 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008942 grep -v '^ *+' conftest.er1 >conftest.err
8943 rm -f conftest.er1
8944 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008947 { ac_try='test -z "$ac_c_werror_flag"
8948 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8950 (eval $ac_try) 2>&5
8951 ac_status=$?
8952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8953 (exit $ac_status); }; } &&
8954 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8956 (eval $ac_try) 2>&5
8957 ac_status=$?
8958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959 (exit $ac_status); }; }; then
8960 ac_hi=-1 ac_mid=-1
8961 while :; do
8962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008963/* confdefs.h. */
8964_ACEOF
8965cat confdefs.h >>conftest.$ac_ext
8966cat >>conftest.$ac_ext <<_ACEOF
8967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008968$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008969int
8970main ()
8971{
8972static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8973test_array [0] = 0
8974
8975 ;
8976 return 0;
8977}
8978_ACEOF
8979rm -f conftest.$ac_objext
8980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008983 grep -v '^ *+' conftest.er1 >conftest.err
8984 rm -f conftest.er1
8985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008988 { ac_try='test -z "$ac_c_werror_flag"
8989 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); }; } &&
8995 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8997 (eval $ac_try) 2>&5
8998 ac_status=$?
8999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9000 (exit $ac_status); }; }; then
9001 ac_lo=$ac_mid; break
9002else
9003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009004sed 's/^/| /' conftest.$ac_ext >&5
9005
Martin v. Löwis11437992002-04-12 09:54:03 +00009006ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009007 if test $ac_mid -le $ac_hi; then
9008 ac_lo= ac_hi=
9009 break
9010 fi
9011 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009012fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009013rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 done
9015else
9016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009017sed 's/^/| /' conftest.$ac_ext >&5
9018
Martin v. Löwis11437992002-04-12 09:54:03 +00009019ac_lo= ac_hi=
9020fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009022fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009024# Binary search between lo and hi bounds.
9025while test "x$ac_lo" != "x$ac_hi"; do
9026 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009028/* confdefs.h. */
9029_ACEOF
9030cat confdefs.h >>conftest.$ac_ext
9031cat >>conftest.$ac_ext <<_ACEOF
9032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009033$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009034int
9035main ()
9036{
9037static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
9038test_array [0] = 0
9039
9040 ;
9041 return 0;
9042}
9043_ACEOF
9044rm -f conftest.$ac_objext
9045if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009046 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009048 grep -v '^ *+' conftest.er1 >conftest.err
9049 rm -f conftest.er1
9050 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009053 { ac_try='test -z "$ac_c_werror_flag"
9054 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009055 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9056 (eval $ac_try) 2>&5
9057 ac_status=$?
9058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9059 (exit $ac_status); }; } &&
9060 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9062 (eval $ac_try) 2>&5
9063 ac_status=$?
9064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9065 (exit $ac_status); }; }; then
9066 ac_hi=$ac_mid
9067else
9068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009069sed 's/^/| /' conftest.$ac_ext >&5
9070
Martin v. Löwis11437992002-04-12 09:54:03 +00009071ac_lo=`expr '(' $ac_mid ')' + 1`
9072fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009073rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009074done
9075case $ac_lo in
9076?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009077'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9078See \`config.log' for more details." >&5
9079echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9080See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 { (exit 1); exit 1; }; } ;;
9082esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009083else
9084 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009085 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9086See \`config.log' for more details." >&5
9087echo "$as_me: error: cannot run test program while cross compiling
9088See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009090else
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009092/* confdefs.h. */
9093_ACEOF
9094cat confdefs.h >>conftest.$ac_ext
9095cat >>conftest.$ac_ext <<_ACEOF
9096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009097$ac_includes_default
9098long longval () { return (long) (sizeof (fpos_t)); }
9099unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009100#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009101#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009102int
9103main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009104{
Martin v. Löwis11437992002-04-12 09:54:03 +00009105
9106 FILE *f = fopen ("conftest.val", "w");
9107 if (! f)
9108 exit (1);
9109 if (((long) (sizeof (fpos_t))) < 0)
9110 {
9111 long i = longval ();
9112 if (i != ((long) (sizeof (fpos_t))))
9113 exit (1);
9114 fprintf (f, "%ld\n", i);
9115 }
9116 else
9117 {
9118 unsigned long i = ulongval ();
9119 if (i != ((long) (sizeof (fpos_t))))
9120 exit (1);
9121 fprintf (f, "%lu\n", i);
9122 }
9123 exit (ferror (f) || fclose (f) != 0);
9124
9125 ;
9126 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009127}
Martin v. Löwis11437992002-04-12 09:54:03 +00009128_ACEOF
9129rm -f conftest$ac_exeext
9130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9131 (eval $ac_link) 2>&5
9132 ac_status=$?
9133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9136 (eval $ac_try) 2>&5
9137 ac_status=$?
9138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9139 (exit $ac_status); }; }; then
9140 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009141else
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 echo "$as_me: program exited with status $ac_status" >&5
9143echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009144sed 's/^/| /' conftest.$ac_ext >&5
9145
Martin v. Löwis11437992002-04-12 09:54:03 +00009146( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009147{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
9148See \`config.log' for more details." >&5
9149echo "$as_me: error: cannot compute sizeof (fpos_t), 77
9150See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009151 { (exit 1); exit 1; }; }
9152fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009153rm -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 +00009154fi
9155fi
9156rm -f conftest.val
9157else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009158 ac_cv_sizeof_fpos_t=0
9159fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009160fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009161echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9162echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
9163cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009164#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009165_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009166
Michael W. Hudson54241132001-12-07 15:38:26 +00009167
Martin v. Löwis18e16552006-02-15 17:27:45 +00009168echo "$as_me:$LINENO: checking for size_t" >&5
9169echo $ECHO_N "checking for size_t... $ECHO_C" >&6
9170if test "${ac_cv_type_size_t+set}" = set; then
9171 echo $ECHO_N "(cached) $ECHO_C" >&6
9172else
9173 cat >conftest.$ac_ext <<_ACEOF
9174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
9179$ac_includes_default
9180int
9181main ()
9182{
9183if ((size_t *) 0)
9184 return 0;
9185if (sizeof (size_t))
9186 return 0;
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
9192if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9193 (eval $ac_compile) 2>conftest.er1
9194 ac_status=$?
9195 grep -v '^ *+' conftest.er1 >conftest.err
9196 rm -f conftest.er1
9197 cat conftest.err >&5
9198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9199 (exit $ac_status); } &&
9200 { ac_try='test -z "$ac_c_werror_flag"
9201 || test ! -s conftest.err'
9202 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9203 (eval $ac_try) 2>&5
9204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); }; } &&
9207 { ac_try='test -s conftest.$ac_objext'
9208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9209 (eval $ac_try) 2>&5
9210 ac_status=$?
9211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9212 (exit $ac_status); }; }; then
9213 ac_cv_type_size_t=yes
9214else
9215 echo "$as_me: failed program was:" >&5
9216sed 's/^/| /' conftest.$ac_ext >&5
9217
9218ac_cv_type_size_t=no
9219fi
9220rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9221fi
9222echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9223echo "${ECHO_T}$ac_cv_type_size_t" >&6
9224
9225echo "$as_me:$LINENO: checking size of size_t" >&5
9226echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
9227if test "${ac_cv_sizeof_size_t+set}" = set; then
9228 echo $ECHO_N "(cached) $ECHO_C" >&6
9229else
9230 if test "$ac_cv_type_size_t" = yes; then
9231 # The cast to unsigned long works around a bug in the HP C Compiler
9232 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9233 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9234 # This bug is HP SR number 8606223364.
9235 if test "$cross_compiling" = yes; then
9236 # Depending upon the size, compute the lo and hi bounds.
9237cat >conftest.$ac_ext <<_ACEOF
9238/* confdefs.h. */
9239_ACEOF
9240cat confdefs.h >>conftest.$ac_ext
9241cat >>conftest.$ac_ext <<_ACEOF
9242/* end confdefs.h. */
9243$ac_includes_default
9244int
9245main ()
9246{
9247static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
9248test_array [0] = 0
9249
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext
9255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9256 (eval $ac_compile) 2>conftest.er1
9257 ac_status=$?
9258 grep -v '^ *+' conftest.er1 >conftest.err
9259 rm -f conftest.er1
9260 cat conftest.err >&5
9261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9262 (exit $ac_status); } &&
9263 { ac_try='test -z "$ac_c_werror_flag"
9264 || test ! -s conftest.err'
9265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9266 (eval $ac_try) 2>&5
9267 ac_status=$?
9268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9269 (exit $ac_status); }; } &&
9270 { ac_try='test -s conftest.$ac_objext'
9271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9272 (eval $ac_try) 2>&5
9273 ac_status=$?
9274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9275 (exit $ac_status); }; }; then
9276 ac_lo=0 ac_mid=0
9277 while :; do
9278 cat >conftest.$ac_ext <<_ACEOF
9279/* confdefs.h. */
9280_ACEOF
9281cat confdefs.h >>conftest.$ac_ext
9282cat >>conftest.$ac_ext <<_ACEOF
9283/* end confdefs.h. */
9284$ac_includes_default
9285int
9286main ()
9287{
9288static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9289test_array [0] = 0
9290
9291 ;
9292 return 0;
9293}
9294_ACEOF
9295rm -f conftest.$ac_objext
9296if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9297 (eval $ac_compile) 2>conftest.er1
9298 ac_status=$?
9299 grep -v '^ *+' conftest.er1 >conftest.err
9300 rm -f conftest.er1
9301 cat conftest.err >&5
9302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303 (exit $ac_status); } &&
9304 { ac_try='test -z "$ac_c_werror_flag"
9305 || test ! -s conftest.err'
9306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9307 (eval $ac_try) 2>&5
9308 ac_status=$?
9309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9310 (exit $ac_status); }; } &&
9311 { ac_try='test -s conftest.$ac_objext'
9312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9313 (eval $ac_try) 2>&5
9314 ac_status=$?
9315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316 (exit $ac_status); }; }; then
9317 ac_hi=$ac_mid; break
9318else
9319 echo "$as_me: failed program was:" >&5
9320sed 's/^/| /' conftest.$ac_ext >&5
9321
9322ac_lo=`expr $ac_mid + 1`
9323 if test $ac_lo -le $ac_mid; then
9324 ac_lo= ac_hi=
9325 break
9326 fi
9327 ac_mid=`expr 2 '*' $ac_mid + 1`
9328fi
9329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9330 done
9331else
9332 echo "$as_me: failed program was:" >&5
9333sed 's/^/| /' conftest.$ac_ext >&5
9334
9335cat >conftest.$ac_ext <<_ACEOF
9336/* confdefs.h. */
9337_ACEOF
9338cat confdefs.h >>conftest.$ac_ext
9339cat >>conftest.$ac_ext <<_ACEOF
9340/* end confdefs.h. */
9341$ac_includes_default
9342int
9343main ()
9344{
9345static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
9346test_array [0] = 0
9347
9348 ;
9349 return 0;
9350}
9351_ACEOF
9352rm -f conftest.$ac_objext
9353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9354 (eval $ac_compile) 2>conftest.er1
9355 ac_status=$?
9356 grep -v '^ *+' conftest.er1 >conftest.err
9357 rm -f conftest.er1
9358 cat conftest.err >&5
9359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9360 (exit $ac_status); } &&
9361 { ac_try='test -z "$ac_c_werror_flag"
9362 || test ! -s conftest.err'
9363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9364 (eval $ac_try) 2>&5
9365 ac_status=$?
9366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9367 (exit $ac_status); }; } &&
9368 { ac_try='test -s conftest.$ac_objext'
9369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9370 (eval $ac_try) 2>&5
9371 ac_status=$?
9372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9373 (exit $ac_status); }; }; then
9374 ac_hi=-1 ac_mid=-1
9375 while :; do
9376 cat >conftest.$ac_ext <<_ACEOF
9377/* confdefs.h. */
9378_ACEOF
9379cat confdefs.h >>conftest.$ac_ext
9380cat >>conftest.$ac_ext <<_ACEOF
9381/* end confdefs.h. */
9382$ac_includes_default
9383int
9384main ()
9385{
9386static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
9387test_array [0] = 0
9388
9389 ;
9390 return 0;
9391}
9392_ACEOF
9393rm -f conftest.$ac_objext
9394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9395 (eval $ac_compile) 2>conftest.er1
9396 ac_status=$?
9397 grep -v '^ *+' conftest.er1 >conftest.err
9398 rm -f conftest.er1
9399 cat conftest.err >&5
9400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9401 (exit $ac_status); } &&
9402 { ac_try='test -z "$ac_c_werror_flag"
9403 || test ! -s conftest.err'
9404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9405 (eval $ac_try) 2>&5
9406 ac_status=$?
9407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9408 (exit $ac_status); }; } &&
9409 { ac_try='test -s conftest.$ac_objext'
9410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9411 (eval $ac_try) 2>&5
9412 ac_status=$?
9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414 (exit $ac_status); }; }; then
9415 ac_lo=$ac_mid; break
9416else
9417 echo "$as_me: failed program was:" >&5
9418sed 's/^/| /' conftest.$ac_ext >&5
9419
9420ac_hi=`expr '(' $ac_mid ')' - 1`
9421 if test $ac_mid -le $ac_hi; then
9422 ac_lo= ac_hi=
9423 break
9424 fi
9425 ac_mid=`expr 2 '*' $ac_mid`
9426fi
9427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9428 done
9429else
9430 echo "$as_me: failed program was:" >&5
9431sed 's/^/| /' conftest.$ac_ext >&5
9432
9433ac_lo= ac_hi=
9434fi
9435rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9436fi
9437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9438# Binary search between lo and hi bounds.
9439while test "x$ac_lo" != "x$ac_hi"; do
9440 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9441 cat >conftest.$ac_ext <<_ACEOF
9442/* confdefs.h. */
9443_ACEOF
9444cat confdefs.h >>conftest.$ac_ext
9445cat >>conftest.$ac_ext <<_ACEOF
9446/* end confdefs.h. */
9447$ac_includes_default
9448int
9449main ()
9450{
9451static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
9452test_array [0] = 0
9453
9454 ;
9455 return 0;
9456}
9457_ACEOF
9458rm -f conftest.$ac_objext
9459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9460 (eval $ac_compile) 2>conftest.er1
9461 ac_status=$?
9462 grep -v '^ *+' conftest.er1 >conftest.err
9463 rm -f conftest.er1
9464 cat conftest.err >&5
9465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466 (exit $ac_status); } &&
9467 { ac_try='test -z "$ac_c_werror_flag"
9468 || test ! -s conftest.err'
9469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470 (eval $ac_try) 2>&5
9471 ac_status=$?
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); }; } &&
9474 { ac_try='test -s conftest.$ac_objext'
9475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9476 (eval $ac_try) 2>&5
9477 ac_status=$?
9478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9479 (exit $ac_status); }; }; then
9480 ac_hi=$ac_mid
9481else
9482 echo "$as_me: failed program was:" >&5
9483sed 's/^/| /' conftest.$ac_ext >&5
9484
9485ac_lo=`expr '(' $ac_mid ')' + 1`
9486fi
9487rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9488done
9489case $ac_lo in
9490?*) ac_cv_sizeof_size_t=$ac_lo;;
9491'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9492See \`config.log' for more details." >&5
9493echo "$as_me: error: cannot compute sizeof (size_t), 77
9494See \`config.log' for more details." >&2;}
9495 { (exit 1); exit 1; }; } ;;
9496esac
9497else
9498 if test "$cross_compiling" = yes; then
9499 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9500See \`config.log' for more details." >&5
9501echo "$as_me: error: cannot run test program while cross compiling
9502See \`config.log' for more details." >&2;}
9503 { (exit 1); exit 1; }; }
9504else
9505 cat >conftest.$ac_ext <<_ACEOF
9506/* confdefs.h. */
9507_ACEOF
9508cat confdefs.h >>conftest.$ac_ext
9509cat >>conftest.$ac_ext <<_ACEOF
9510/* end confdefs.h. */
9511$ac_includes_default
9512long longval () { return (long) (sizeof (size_t)); }
9513unsigned long ulongval () { return (long) (sizeof (size_t)); }
9514#include <stdio.h>
9515#include <stdlib.h>
9516int
9517main ()
9518{
9519
9520 FILE *f = fopen ("conftest.val", "w");
9521 if (! f)
9522 exit (1);
9523 if (((long) (sizeof (size_t))) < 0)
9524 {
9525 long i = longval ();
9526 if (i != ((long) (sizeof (size_t))))
9527 exit (1);
9528 fprintf (f, "%ld\n", i);
9529 }
9530 else
9531 {
9532 unsigned long i = ulongval ();
9533 if (i != ((long) (sizeof (size_t))))
9534 exit (1);
9535 fprintf (f, "%lu\n", i);
9536 }
9537 exit (ferror (f) || fclose (f) != 0);
9538
9539 ;
9540 return 0;
9541}
9542_ACEOF
9543rm -f conftest$ac_exeext
9544if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9545 (eval $ac_link) 2>&5
9546 ac_status=$?
9547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9548 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9549 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9550 (eval $ac_try) 2>&5
9551 ac_status=$?
9552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9553 (exit $ac_status); }; }; then
9554 ac_cv_sizeof_size_t=`cat conftest.val`
9555else
9556 echo "$as_me: program exited with status $ac_status" >&5
9557echo "$as_me: failed program was:" >&5
9558sed 's/^/| /' conftest.$ac_ext >&5
9559
9560( exit $ac_status )
9561{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
9562See \`config.log' for more details." >&5
9563echo "$as_me: error: cannot compute sizeof (size_t), 77
9564See \`config.log' for more details." >&2;}
9565 { (exit 1); exit 1; }; }
9566fi
9567rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9568fi
9569fi
9570rm -f conftest.val
9571else
9572 ac_cv_sizeof_size_t=0
9573fi
9574fi
9575echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9576echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
9577cat >>confdefs.h <<_ACEOF
9578#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9579_ACEOF
9580
9581
Michael W. Hudson54241132001-12-07 15:38:26 +00009582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583echo "$as_me:$LINENO: checking for long long support" >&5
9584echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009585have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* confdefs.h. */
9588_ACEOF
9589cat confdefs.h >>conftest.$ac_ext
9590cat >>conftest.$ac_ext <<_ACEOF
9591/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009592
Martin v. Löwis11437992002-04-12 09:54:03 +00009593int
9594main ()
9595{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009596long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009597 ;
9598 return 0;
9599}
9600_ACEOF
9601rm -f conftest.$ac_objext
9602if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009603 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9609 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009610 { ac_try='test -z "$ac_c_werror_flag"
9611 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9613 (eval $ac_try) 2>&5
9614 ac_status=$?
9615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9616 (exit $ac_status); }; } &&
9617 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9619 (eval $ac_try) 2>&5
9620 ac_status=$?
9621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9622 (exit $ac_status); }; }; then
9623
9624
9625cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009626#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009627_ACEOF
9628
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009629 have_long_long=yes
9630
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009631else
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009633sed 's/^/| /' conftest.$ac_ext >&5
9634
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009635fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009637echo "$as_me:$LINENO: result: $have_long_long" >&5
9638echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009639if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009640echo "$as_me:$LINENO: checking for long long" >&5
9641echo $ECHO_N "checking for long long... $ECHO_C" >&6
9642if test "${ac_cv_type_long_long+set}" = set; then
9643 echo $ECHO_N "(cached) $ECHO_C" >&6
9644else
9645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* confdefs.h. */
9647_ACEOF
9648cat confdefs.h >>conftest.$ac_ext
9649cat >>conftest.$ac_ext <<_ACEOF
9650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009652int
9653main ()
9654{
9655if ((long long *) 0)
9656 return 0;
9657if (sizeof (long long))
9658 return 0;
9659 ;
9660 return 0;
9661}
9662_ACEOF
9663rm -f conftest.$ac_objext
9664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009665 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009667 grep -v '^ *+' conftest.er1 >conftest.err
9668 rm -f conftest.er1
9669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9671 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009672 { ac_try='test -z "$ac_c_werror_flag"
9673 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9675 (eval $ac_try) 2>&5
9676 ac_status=$?
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); }; } &&
9679 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9681 (eval $ac_try) 2>&5
9682 ac_status=$?
9683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9684 (exit $ac_status); }; }; then
9685 ac_cv_type_long_long=yes
9686else
9687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009688sed 's/^/| /' conftest.$ac_ext >&5
9689
Martin v. Löwis11437992002-04-12 09:54:03 +00009690ac_cv_type_long_long=no
9691fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009693fi
9694echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9695echo "${ECHO_T}$ac_cv_type_long_long" >&6
9696
9697echo "$as_me:$LINENO: checking size of long long" >&5
9698echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9699if test "${ac_cv_sizeof_long_long+set}" = set; then
9700 echo $ECHO_N "(cached) $ECHO_C" >&6
9701else
9702 if test "$ac_cv_type_long_long" = yes; then
9703 # The cast to unsigned long works around a bug in the HP C Compiler
9704 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9705 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9706 # This bug is HP SR number 8606223364.
9707 if test "$cross_compiling" = yes; then
9708 # Depending upon the size, compute the lo and hi bounds.
9709cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009710/* confdefs.h. */
9711_ACEOF
9712cat confdefs.h >>conftest.$ac_ext
9713cat >>conftest.$ac_ext <<_ACEOF
9714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
9719static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
9727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009728 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9734 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009735 { ac_try='test -z "$ac_c_werror_flag"
9736 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9738 (eval $ac_try) 2>&5
9739 ac_status=$?
9740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9741 (exit $ac_status); }; } &&
9742 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9744 (eval $ac_try) 2>&5
9745 ac_status=$?
9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747 (exit $ac_status); }; }; then
9748 ac_lo=0 ac_mid=0
9749 while :; do
9750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009751/* confdefs.h. */
9752_ACEOF
9753cat confdefs.h >>conftest.$ac_ext
9754cat >>conftest.$ac_ext <<_ACEOF
9755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009757int
9758main ()
9759{
9760static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9761test_array [0] = 0
9762
9763 ;
9764 return 0;
9765}
9766_ACEOF
9767rm -f conftest.$ac_objext
9768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009769 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009771 grep -v '^ *+' conftest.er1 >conftest.err
9772 rm -f conftest.er1
9773 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9775 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009776 { ac_try='test -z "$ac_c_werror_flag"
9777 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9779 (eval $ac_try) 2>&5
9780 ac_status=$?
9781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9782 (exit $ac_status); }; } &&
9783 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9785 (eval $ac_try) 2>&5
9786 ac_status=$?
9787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9788 (exit $ac_status); }; }; then
9789 ac_hi=$ac_mid; break
9790else
9791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Martin v. Löwis11437992002-04-12 09:54:03 +00009794ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 if test $ac_lo -le $ac_mid; then
9796 ac_lo= ac_hi=
9797 break
9798 fi
9799 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 done
9803else
9804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009805sed 's/^/| /' conftest.$ac_ext >&5
9806
Martin v. Löwis11437992002-04-12 09:54:03 +00009807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* confdefs.h. */
9809_ACEOF
9810cat confdefs.h >>conftest.$ac_ext
9811cat >>conftest.$ac_ext <<_ACEOF
9812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009813$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009814int
9815main ()
9816{
9817static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9818test_array [0] = 0
9819
9820 ;
9821 return 0;
9822}
9823_ACEOF
9824rm -f conftest.$ac_objext
9825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009826 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828 grep -v '^ *+' conftest.er1 >conftest.err
9829 rm -f conftest.er1
9830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9832 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009833 { ac_try='test -z "$ac_c_werror_flag"
9834 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9836 (eval $ac_try) 2>&5
9837 ac_status=$?
9838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9839 (exit $ac_status); }; } &&
9840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9842 (eval $ac_try) 2>&5
9843 ac_status=$?
9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9845 (exit $ac_status); }; }; then
9846 ac_hi=-1 ac_mid=-1
9847 while :; do
9848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009849/* confdefs.h. */
9850_ACEOF
9851cat confdefs.h >>conftest.$ac_ext
9852cat >>conftest.$ac_ext <<_ACEOF
9853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009854$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009855int
9856main ()
9857{
9858static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9859test_array [0] = 0
9860
9861 ;
9862 return 0;
9863}
9864_ACEOF
9865rm -f conftest.$ac_objext
9866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009867 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009869 grep -v '^ *+' conftest.er1 >conftest.err
9870 rm -f conftest.er1
9871 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9873 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009874 { ac_try='test -z "$ac_c_werror_flag"
9875 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9877 (eval $ac_try) 2>&5
9878 ac_status=$?
9879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9880 (exit $ac_status); }; } &&
9881 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9883 (eval $ac_try) 2>&5
9884 ac_status=$?
9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9886 (exit $ac_status); }; }; then
9887 ac_lo=$ac_mid; break
9888else
9889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009890sed 's/^/| /' conftest.$ac_ext >&5
9891
Martin v. Löwis11437992002-04-12 09:54:03 +00009892ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009893 if test $ac_mid -le $ac_hi; then
9894 ac_lo= ac_hi=
9895 break
9896 fi
9897 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009898fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009899rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 done
9901else
9902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009903sed 's/^/| /' conftest.$ac_ext >&5
9904
Martin v. Löwis11437992002-04-12 09:54:03 +00009905ac_lo= ac_hi=
9906fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009908fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009909rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009910# Binary search between lo and hi bounds.
9911while test "x$ac_lo" != "x$ac_hi"; do
9912 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009914/* confdefs.h. */
9915_ACEOF
9916cat confdefs.h >>conftest.$ac_ext
9917cat >>conftest.$ac_ext <<_ACEOF
9918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009920int
9921main ()
9922{
9923static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9924test_array [0] = 0
9925
9926 ;
9927 return 0;
9928}
9929_ACEOF
9930rm -f conftest.$ac_objext
9931if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009932 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009934 grep -v '^ *+' conftest.er1 >conftest.err
9935 rm -f conftest.er1
9936 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009939 { ac_try='test -z "$ac_c_werror_flag"
9940 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9942 (eval $ac_try) 2>&5
9943 ac_status=$?
9944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9945 (exit $ac_status); }; } &&
9946 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9948 (eval $ac_try) 2>&5
9949 ac_status=$?
9950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951 (exit $ac_status); }; }; then
9952 ac_hi=$ac_mid
9953else
9954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009955sed 's/^/| /' conftest.$ac_ext >&5
9956
Martin v. Löwis11437992002-04-12 09:54:03 +00009957ac_lo=`expr '(' $ac_mid ')' + 1`
9958fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009959rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009960done
9961case $ac_lo in
9962?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009963'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9964See \`config.log' for more details." >&5
9965echo "$as_me: error: cannot compute sizeof (long long), 77
9966See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 { (exit 1); exit 1; }; } ;;
9968esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009969else
9970 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009971 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9972See \`config.log' for more details." >&5
9973echo "$as_me: error: cannot run test program while cross compiling
9974See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009976else
Martin v. Löwis11437992002-04-12 09:54:03 +00009977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009978/* confdefs.h. */
9979_ACEOF
9980cat confdefs.h >>conftest.$ac_ext
9981cat >>conftest.$ac_ext <<_ACEOF
9982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009983$ac_includes_default
9984long longval () { return (long) (sizeof (long long)); }
9985unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009986#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009987#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009988int
9989main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009990{
Martin v. Löwis11437992002-04-12 09:54:03 +00009991
9992 FILE *f = fopen ("conftest.val", "w");
9993 if (! f)
9994 exit (1);
9995 if (((long) (sizeof (long long))) < 0)
9996 {
9997 long i = longval ();
9998 if (i != ((long) (sizeof (long long))))
9999 exit (1);
10000 fprintf (f, "%ld\n", i);
10001 }
10002 else
10003 {
10004 unsigned long i = ulongval ();
10005 if (i != ((long) (sizeof (long long))))
10006 exit (1);
10007 fprintf (f, "%lu\n", i);
10008 }
10009 exit (ferror (f) || fclose (f) != 0);
10010
10011 ;
10012 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010013}
Martin v. Löwis11437992002-04-12 09:54:03 +000010014_ACEOF
10015rm -f conftest$ac_exeext
10016if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10017 (eval $ac_link) 2>&5
10018 ac_status=$?
10019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10022 (eval $ac_try) 2>&5
10023 ac_status=$?
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025 (exit $ac_status); }; }; then
10026 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010027else
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 echo "$as_me: program exited with status $ac_status" >&5
10029echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010030sed 's/^/| /' conftest.$ac_ext >&5
10031
Martin v. Löwis11437992002-04-12 09:54:03 +000010032( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010033{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
10034See \`config.log' for more details." >&5
10035echo "$as_me: error: cannot compute sizeof (long long), 77
10036See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 { (exit 1); exit 1; }; }
10038fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010039rm -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 +000010040fi
10041fi
10042rm -f conftest.val
10043else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010044 ac_cv_sizeof_long_long=0
10045fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010046fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010047echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10048echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
10049cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010050#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010051_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010052
Michael W. Hudson54241132001-12-07 15:38:26 +000010053
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010054fi
10055
Martin v. Löwis11437992002-04-12 09:54:03 +000010056echo "$as_me:$LINENO: checking for uintptr_t support" >&5
10057echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010058have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010065
Martin v. Löwis11437992002-04-12 09:54:03 +000010066int
10067main ()
10068{
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010069uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
10075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010076 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010078 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010083 { ac_try='test -z "$ac_c_werror_flag"
10084 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10086 (eval $ac_try) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); }; } &&
10090 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10092 (eval $ac_try) 2>&5
10093 ac_status=$?
10094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10095 (exit $ac_status); }; }; then
10096
10097
10098cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010099#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010100_ACEOF
10101
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010102 have_uintptr_t=yes
10103
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010104else
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010108fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010109rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010110echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
10111echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010112if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010113echo "$as_me:$LINENO: checking for uintptr_t" >&5
10114echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
10115if test "${ac_cv_type_uintptr_t+set}" = set; then
10116 echo $ECHO_N "(cached) $ECHO_C" >&6
10117else
10118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* confdefs.h. */
10120_ACEOF
10121cat confdefs.h >>conftest.$ac_ext
10122cat >>conftest.$ac_ext <<_ACEOF
10123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010125int
10126main ()
10127{
10128if ((uintptr_t *) 0)
10129 return 0;
10130if (sizeof (uintptr_t))
10131 return 0;
10132 ;
10133 return 0;
10134}
10135_ACEOF
10136rm -f conftest.$ac_objext
10137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010138 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 grep -v '^ *+' conftest.er1 >conftest.err
10141 rm -f conftest.er1
10142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10144 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010145 { ac_try='test -z "$ac_c_werror_flag"
10146 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10148 (eval $ac_try) 2>&5
10149 ac_status=$?
10150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10151 (exit $ac_status); }; } &&
10152 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10154 (eval $ac_try) 2>&5
10155 ac_status=$?
10156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10157 (exit $ac_status); }; }; then
10158 ac_cv_type_uintptr_t=yes
10159else
10160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010161sed 's/^/| /' conftest.$ac_ext >&5
10162
Martin v. Löwis11437992002-04-12 09:54:03 +000010163ac_cv_type_uintptr_t=no
10164fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010165rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166fi
10167echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10168echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
10169
10170echo "$as_me:$LINENO: checking size of uintptr_t" >&5
10171echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
10172if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
10173 echo $ECHO_N "(cached) $ECHO_C" >&6
10174else
10175 if test "$ac_cv_type_uintptr_t" = yes; then
10176 # The cast to unsigned long works around a bug in the HP C Compiler
10177 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10178 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10179 # This bug is HP SR number 8606223364.
10180 if test "$cross_compiling" = yes; then
10181 # Depending upon the size, compute the lo and hi bounds.
10182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* confdefs.h. */
10184_ACEOF
10185cat confdefs.h >>conftest.$ac_ext
10186cat >>conftest.$ac_ext <<_ACEOF
10187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010189int
10190main ()
10191{
10192static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
10193test_array [0] = 0
10194
10195 ;
10196 return 0;
10197}
10198_ACEOF
10199rm -f conftest.$ac_objext
10200if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010201 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010203 grep -v '^ *+' conftest.er1 >conftest.err
10204 rm -f conftest.er1
10205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010208 { ac_try='test -z "$ac_c_werror_flag"
10209 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10211 (eval $ac_try) 2>&5
10212 ac_status=$?
10213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10214 (exit $ac_status); }; } &&
10215 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10217 (eval $ac_try) 2>&5
10218 ac_status=$?
10219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }; then
10221 ac_lo=0 ac_mid=0
10222 while :; do
10223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010230int
10231main ()
10232{
10233static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10234test_array [0] = 0
10235
10236 ;
10237 return 0;
10238}
10239_ACEOF
10240rm -f conftest.$ac_objext
10241if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010242 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010244 grep -v '^ *+' conftest.er1 >conftest.err
10245 rm -f conftest.er1
10246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10248 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010249 { ac_try='test -z "$ac_c_werror_flag"
10250 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10252 (eval $ac_try) 2>&5
10253 ac_status=$?
10254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10255 (exit $ac_status); }; } &&
10256 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10258 (eval $ac_try) 2>&5
10259 ac_status=$?
10260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10261 (exit $ac_status); }; }; then
10262 ac_hi=$ac_mid; break
10263else
10264 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010265sed 's/^/| /' conftest.$ac_ext >&5
10266
Martin v. Löwis11437992002-04-12 09:54:03 +000010267ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010268 if test $ac_lo -le $ac_mid; then
10269 ac_lo= ac_hi=
10270 break
10271 fi
10272 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010273fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010274rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275 done
10276else
10277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010278sed 's/^/| /' conftest.$ac_ext >&5
10279
Martin v. Löwis11437992002-04-12 09:54:03 +000010280cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010281/* confdefs.h. */
10282_ACEOF
10283cat confdefs.h >>conftest.$ac_ext
10284cat >>conftest.$ac_ext <<_ACEOF
10285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010287int
10288main ()
10289{
10290static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
10291test_array [0] = 0
10292
10293 ;
10294 return 0;
10295}
10296_ACEOF
10297rm -f conftest.$ac_objext
10298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010299 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010301 grep -v '^ *+' conftest.er1 >conftest.err
10302 rm -f conftest.er1
10303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10305 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010306 { ac_try='test -z "$ac_c_werror_flag"
10307 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10309 (eval $ac_try) 2>&5
10310 ac_status=$?
10311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10312 (exit $ac_status); }; } &&
10313 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10315 (eval $ac_try) 2>&5
10316 ac_status=$?
10317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10318 (exit $ac_status); }; }; then
10319 ac_hi=-1 ac_mid=-1
10320 while :; do
10321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* confdefs.h. */
10323_ACEOF
10324cat confdefs.h >>conftest.$ac_ext
10325cat >>conftest.$ac_ext <<_ACEOF
10326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010328int
10329main ()
10330{
10331static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
10332test_array [0] = 0
10333
10334 ;
10335 return 0;
10336}
10337_ACEOF
10338rm -f conftest.$ac_objext
10339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010340 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010342 grep -v '^ *+' conftest.er1 >conftest.err
10343 rm -f conftest.er1
10344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010347 { ac_try='test -z "$ac_c_werror_flag"
10348 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10350 (eval $ac_try) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); }; } &&
10354 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10356 (eval $ac_try) 2>&5
10357 ac_status=$?
10358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10359 (exit $ac_status); }; }; then
10360 ac_lo=$ac_mid; break
10361else
10362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010363sed 's/^/| /' conftest.$ac_ext >&5
10364
Martin v. Löwis11437992002-04-12 09:54:03 +000010365ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000010366 if test $ac_mid -le $ac_hi; then
10367 ac_lo= ac_hi=
10368 break
10369 fi
10370 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010371fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010372rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 done
10374else
10375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010376sed 's/^/| /' conftest.$ac_ext >&5
10377
Martin v. Löwis11437992002-04-12 09:54:03 +000010378ac_lo= ac_hi=
10379fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010380rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010381fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010382rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010383# Binary search between lo and hi bounds.
10384while test "x$ac_lo" != "x$ac_hi"; do
10385 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* confdefs.h. */
10388_ACEOF
10389cat confdefs.h >>conftest.$ac_ext
10390cat >>conftest.$ac_ext <<_ACEOF
10391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
10396static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
10397test_array [0] = 0
10398
10399 ;
10400 return 0;
10401}
10402_ACEOF
10403rm -f conftest.$ac_objext
10404if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010405 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010407 grep -v '^ *+' conftest.er1 >conftest.err
10408 rm -f conftest.er1
10409 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010412 { ac_try='test -z "$ac_c_werror_flag"
10413 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10415 (eval $ac_try) 2>&5
10416 ac_status=$?
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10418 (exit $ac_status); }; } &&
10419 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10421 (eval $ac_try) 2>&5
10422 ac_status=$?
10423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10424 (exit $ac_status); }; }; then
10425 ac_hi=$ac_mid
10426else
10427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010428sed 's/^/| /' conftest.$ac_ext >&5
10429
Martin v. Löwis11437992002-04-12 09:54:03 +000010430ac_lo=`expr '(' $ac_mid ')' + 1`
10431fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010432rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010433done
10434case $ac_lo in
10435?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000010436'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10437See \`config.log' for more details." >&5
10438echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10439See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 { (exit 1); exit 1; }; } ;;
10441esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010442else
10443 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000010444 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10445See \`config.log' for more details." >&5
10446echo "$as_me: error: cannot run test program while cross compiling
10447See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010449else
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010451/* confdefs.h. */
10452_ACEOF
10453cat confdefs.h >>conftest.$ac_ext
10454cat >>conftest.$ac_ext <<_ACEOF
10455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010456$ac_includes_default
10457long longval () { return (long) (sizeof (uintptr_t)); }
10458unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010459#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010460#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010463{
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
10465 FILE *f = fopen ("conftest.val", "w");
10466 if (! f)
10467 exit (1);
10468 if (((long) (sizeof (uintptr_t))) < 0)
10469 {
10470 long i = longval ();
10471 if (i != ((long) (sizeof (uintptr_t))))
10472 exit (1);
10473 fprintf (f, "%ld\n", i);
10474 }
10475 else
10476 {
10477 unsigned long i = ulongval ();
10478 if (i != ((long) (sizeof (uintptr_t))))
10479 exit (1);
10480 fprintf (f, "%lu\n", i);
10481 }
10482 exit (ferror (f) || fclose (f) != 0);
10483
10484 ;
10485 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010486}
Martin v. Löwis11437992002-04-12 09:54:03 +000010487_ACEOF
10488rm -f conftest$ac_exeext
10489if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10490 (eval $ac_link) 2>&5
10491 ac_status=$?
10492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10493 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10495 (eval $ac_try) 2>&5
10496 ac_status=$?
10497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10498 (exit $ac_status); }; }; then
10499 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010500else
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 echo "$as_me: program exited with status $ac_status" >&5
10502echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010503sed 's/^/| /' conftest.$ac_ext >&5
10504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000010506{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
10507See \`config.log' for more details." >&5
10508echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
10509See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 { (exit 1); exit 1; }; }
10511fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010512rm -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 +000010513fi
10514fi
10515rm -f conftest.val
10516else
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010517 ac_cv_sizeof_uintptr_t=0
10518fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010519fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010520echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
10521echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
10522cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010523#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010524_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010525
Michael W. Hudson54241132001-12-07 15:38:26 +000010526
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010527fi
10528
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010529# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010530echo "$as_me:$LINENO: checking size of off_t" >&5
10531echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
10532if test "${ac_cv_sizeof_off_t+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010534else
10535 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010536 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010537else
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010539/* confdefs.h. */
10540_ACEOF
10541cat confdefs.h >>conftest.$ac_ext
10542cat >>conftest.$ac_ext <<_ACEOF
10543/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010544#include <stdio.h>
10545#include <sys/types.h>
10546main()
10547{
10548 FILE *f=fopen("conftestval", "w");
10549 if (!f) exit(1);
10550 fprintf(f, "%d\n", sizeof(off_t));
10551 exit(0);
10552}
Martin v. Löwis11437992002-04-12 09:54:03 +000010553_ACEOF
10554rm -f conftest$ac_exeext
10555if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10556 (eval $ac_link) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10561 (eval $ac_try) 2>&5
10562 ac_status=$?
10563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10564 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010565 ac_cv_sizeof_off_t=`cat conftestval`
10566else
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 echo "$as_me: program exited with status $ac_status" >&5
10568echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010569sed 's/^/| /' conftest.$ac_ext >&5
10570
Martin v. Löwis11437992002-04-12 09:54:03 +000010571( exit $ac_status )
10572ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010573fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010574rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010575fi
10576
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010577fi
10578
Martin v. Löwis11437992002-04-12 09:54:03 +000010579echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
10580echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
10581
10582cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010583#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010584_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010585
Michael W. Hudson54241132001-12-07 15:38:26 +000010586
Martin v. Löwis11437992002-04-12 09:54:03 +000010587echo "$as_me:$LINENO: checking whether to enable large file support" >&5
10588echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010589if test "$have_long_long" = yes -a \
10590 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
10591 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010592
Martin v. Löwis11437992002-04-12 09:54:03 +000010593cat >>confdefs.h <<\_ACEOF
10594#define HAVE_LARGEFILE_SUPPORT 1
10595_ACEOF
10596
10597 echo "$as_me:$LINENO: result: yes" >&5
10598echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010599else
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 echo "$as_me:$LINENO: result: no" >&5
10601echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000010602fi
10603
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010604# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010605echo "$as_me:$LINENO: checking size of time_t" >&5
10606echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
10607if test "${ac_cv_sizeof_time_t+set}" = set; then
10608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010609else
10610 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010611 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010612else
Martin v. Löwis11437992002-04-12 09:54:03 +000010613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* confdefs.h. */
10615_ACEOF
10616cat confdefs.h >>conftest.$ac_ext
10617cat >>conftest.$ac_ext <<_ACEOF
10618/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010619#include <stdio.h>
10620#include <time.h>
10621main()
10622{
10623 FILE *f=fopen("conftestval", "w");
10624 if (!f) exit(1);
10625 fprintf(f, "%d\n", sizeof(time_t));
10626 exit(0);
10627}
Martin v. Löwis11437992002-04-12 09:54:03 +000010628_ACEOF
10629rm -f conftest$ac_exeext
10630if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10631 (eval $ac_link) 2>&5
10632 ac_status=$?
10633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10636 (eval $ac_try) 2>&5
10637 ac_status=$?
10638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10639 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010640 ac_cv_sizeof_time_t=`cat conftestval`
10641else
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 echo "$as_me: program exited with status $ac_status" >&5
10643echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010644sed 's/^/| /' conftest.$ac_ext >&5
10645
Martin v. Löwis11437992002-04-12 09:54:03 +000010646( exit $ac_status )
10647ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010648fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010649rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010650fi
10651
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010652fi
10653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10655echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10656
10657cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010658#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010659_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010660
Michael W. Hudson54241132001-12-07 15:38:26 +000010661
10662
Trent Mick635f6fb2000-08-23 21:33:05 +000010663# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010664ac_save_cc="$CC"
10665if test "$ac_cv_kpthread" = "yes"
10666then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010667elif test "$ac_cv_kthread" = "yes"
10668then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669elif test "$ac_cv_pthread" = "yes"
10670then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010671fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010672echo "$as_me:$LINENO: checking for pthread_t" >&5
10673echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010674have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* confdefs.h. */
10677_ACEOF
10678cat confdefs.h >>conftest.$ac_ext
10679cat >>conftest.$ac_ext <<_ACEOF
10680/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010681#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010682int
10683main ()
10684{
Guido van Rossum12580492000-09-24 16:47:19 +000010685pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 ;
10687 return 0;
10688}
10689_ACEOF
10690rm -f conftest.$ac_objext
10691if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010692 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010694 grep -v '^ *+' conftest.er1 >conftest.err
10695 rm -f conftest.er1
10696 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010699 { ac_try='test -z "$ac_c_werror_flag"
10700 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10702 (eval $ac_try) 2>&5
10703 ac_status=$?
10704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10705 (exit $ac_status); }; } &&
10706 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10708 (eval $ac_try) 2>&5
10709 ac_status=$?
10710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10711 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010712 have_pthread_t=yes
10713else
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010715sed 's/^/| /' conftest.$ac_ext >&5
10716
Trent Mick635f6fb2000-08-23 21:33:05 +000010717fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010719echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10720echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010721if test "$have_pthread_t" = yes ; then
10722 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10724echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10725 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010727else
10728 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010729 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010730else
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* confdefs.h. */
10733_ACEOF
10734cat confdefs.h >>conftest.$ac_ext
10735cat >>conftest.$ac_ext <<_ACEOF
10736/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010737#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010738#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010739 main()
10740 {
10741 FILE *f=fopen("conftestval", "w");
10742 if (!f) exit(1);
10743 fprintf(f, "%d\n", sizeof(pthread_t));
10744 exit(0);
10745 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010746_ACEOF
10747rm -f conftest$ac_exeext
10748if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10749 (eval $ac_link) 2>&5
10750 ac_status=$?
10751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10754 (eval $ac_try) 2>&5
10755 ac_status=$?
10756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10757 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010758 ac_cv_sizeof_pthread_t=`cat conftestval`
10759else
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 echo "$as_me: program exited with status $ac_status" >&5
10761echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010762sed 's/^/| /' conftest.$ac_ext >&5
10763
Martin v. Löwis11437992002-04-12 09:54:03 +000010764( exit $ac_status )
10765ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010767rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010768fi
10769
Trent Mick635f6fb2000-08-23 21:33:05 +000010770fi
10771
Martin v. Löwis11437992002-04-12 09:54:03 +000010772 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10773echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10774
10775cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010776#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010778
10779fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010780CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010781
Martin v. Löwis11437992002-04-12 09:54:03 +000010782echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10783echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010784# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10785if test "${enable_toolbox_glue+set}" = set; then
10786 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010787
Martin v. Löwis11437992002-04-12 09:54:03 +000010788fi;
Jack Jansene578a632001-08-15 01:27:14 +000010789
10790if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010791then
Jack Jansene578a632001-08-15 01:27:14 +000010792 case $ac_sys_system/$ac_sys_release in
10793 Darwin/*)
10794 enable_toolbox_glue="yes";;
10795 *)
10796 enable_toolbox_glue="no";;
10797 esac
10798fi
10799case "$enable_toolbox_glue" in
10800yes)
Jack Jansene578a632001-08-15 01:27:14 +000010801 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010802 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
10804cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010805#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010807
10808 ;;
10809*)
Jack Jansene578a632001-08-15 01:27:14 +000010810 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010811 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010812 ;;
10813esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010814echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10815echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010816
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010817
10818case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010819 Darwin/[01234567].*)
10820 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10821 ;;
10822 Darwin/*)
10823 OTHER_LIBTOOL_OPT=""
10824 ;;
10825esac
10826
10827
10828case $ac_sys_system/$ac_sys_release in
10829 Darwin/[01234567].*)
Jack Jansen39fd2312006-02-23 15:12:19 +000010830 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010831 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010832 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010833 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010834 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10835 if test ${gcc_version} '<' 4.0
10836 then
10837 LIBTOOL_CRUFT="-lcc_dynamic"
10838 else
10839 LIBTOOL_CRUFT=""
10840 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000010841 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000010842 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010843 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010844esac
10845
Martin v. Löwis11437992002-04-12 09:54:03 +000010846echo "$as_me:$LINENO: checking for --enable-framework" >&5
10847echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010848if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010849then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010850 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010851 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010852 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010853
Martin v. Löwis11437992002-04-12 09:54:03 +000010854cat >>confdefs.h <<\_ACEOF
10855#define WITH_NEXT_FRAMEWORK 1
10856_ACEOF
10857
10858 echo "$as_me:$LINENO: result: yes" >&5
10859echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010860else
Martin v. Löwis11437992002-04-12 09:54:03 +000010861 echo "$as_me:$LINENO: result: no" >&5
10862echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010863fi
10864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865echo "$as_me:$LINENO: checking for dyld" >&5
10866echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010867case $ac_sys_system/$ac_sys_release in
10868 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010869
Martin v. Löwis11437992002-04-12 09:54:03 +000010870cat >>confdefs.h <<\_ACEOF
10871#define WITH_DYLD 1
10872_ACEOF
10873
10874 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10875echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010876 ;;
10877 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010878 echo "$as_me:$LINENO: result: no" >&5
10879echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010880 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010881esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010882
Guido van Rossum0a516c91994-09-12 10:58:40 +000010883# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010884
Michael W. Hudson54241132001-12-07 15:38:26 +000010885
10886
10887
10888
Guido van Rossum0a516c91994-09-12 10:58:40 +000010889# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010890# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010891echo "$as_me:$LINENO: checking SO" >&5
10892echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010893if test -z "$SO"
10894then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010896 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010897 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010898 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010899 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010900else
10901 # this might also be a termcap variable, see #610332
10902 echo
10903 echo '====================================================================='
10904 echo '+ +'
10905 echo '+ WARNING: You have set SO in your environment. +'
10906 echo '+ Do you really mean to change the extension for shared libraries? +'
10907 echo '+ Continuing in 10 seconds to let you to ponder. +'
10908 echo '+ +'
10909 echo '====================================================================='
10910 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010911fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010912echo "$as_me:$LINENO: result: $SO" >&5
10913echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010914# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010915# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010916# (Shared libraries in this instance are shared modules to be loaded into
10917# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010918echo "$as_me:$LINENO: checking LDSHARED" >&5
10919echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010920if test -z "$LDSHARED"
10921then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010923 AIX*)
10924 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010925 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010926 ;;
10927 BeOS*)
10928 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010929 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010930 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010931 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010932 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010934 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010935 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010936 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010937 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010938 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010939 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010940 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010941 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10942 if test "$enable_framework" ; then
10943 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010944 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10945 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010946 else
10947 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010948 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010949 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010950 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010951 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10952 if test "$enable_framework" ; then
10953 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010954 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10955 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010956 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010957 # No framework, use the Python app as bundle-loader
10958 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010959 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010960 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010961 Darwin/*)
10962 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10963 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010964 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010965 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010966 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010967 then
10968 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10969 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010970 else
10971 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10972 if test "$enable_framework" ; then
10973 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010974 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10975 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010976 else
10977 # No framework, use the Python app as bundle-loader
10978 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10979 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10980 fi
10981 fi
10982 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010983 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010984 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010985 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010986 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010987 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010988 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010989 else
10990 LDSHARED="ld -Bshareable ${LDFLAGS}"
10991 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000010992 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010993 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010994 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010995 then LDSHARED='$(CC) -shared'
10996 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010997 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010998 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010999 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011000 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011001 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011002 *) LDSHARED="ld";;
11003 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011005echo "$as_me:$LINENO: result: $LDSHARED" >&5
11006echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011007BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000011008# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011009# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011010echo "$as_me:$LINENO: checking CCSHARED" >&5
11011echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011012if test -z "$CCSHARED"
11013then
Guido van Rossum07397971997-04-29 21:49:50 +000011014 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011015 SunOS*) if test "$GCC" = yes;
11016 then CCSHARED="-fPIC";
Martin v. Löwisd5845ec2005-12-30 12:31:38 +000011017 else CCSHARED="-xcode=pic32";
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011018 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000011019 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000011020 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000011021 else CCSHARED="+z";
11022 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011023 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011024 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011025 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011026 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011027 if test "$GCC" = "yes"
11028 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011029 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000011030 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011031 SCO_SV*)
11032 if test "$GCC" = "yes"
11033 then CCSHARED="-fPIC"
11034 else CCSHARED="-Kpic -belf"
11035 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000011036 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011037 IRIX*/6*) case $CC in
11038 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000011039 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011040 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011041 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011042 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011043fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011044echo "$as_me:$LINENO: result: $CCSHARED" >&5
11045echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011046# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011047# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000011048echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
11049echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011050if test -z "$LINKFORSHARED"
11051then
Guido van Rossum07397971997-04-29 21:49:50 +000011052 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011053 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000011054 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000011055 LINKFORSHARED="-Wl,-E -Wl,+s";;
11056# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011057 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011058 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011059 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011061 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
11062 # which is
Jack Jansene578a632001-08-15 01:27:14 +000011063 # not used by the core itself but which needs to be in the core so
11064 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000011065 # -prebind is no longer used, because it actually seems to give a
11066 # slowdown in stead of a speedup, maybe due to the large number of
11067 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011068
11069 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000011070 if test "$enable_framework"
11071 then
Jack Jansenda49e192005-01-07 13:08:22 +000011072 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011073 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011074 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011075 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011076 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000011077 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011078 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000011079 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11080 then
11081 LINKFORSHARED="-Wl,--export-dynamic"
11082 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011083 SunOS/5*) case $CC in
11084 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000011085 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000011086 then
11087 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011088 fi;;
11089 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000011090 CYGWIN*)
11091 if test $enable_shared = "no"
11092 then
11093 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
11094 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011095 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011096fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011097echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
11098echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011099
Michael W. Hudson54241132001-12-07 15:38:26 +000011100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
11102echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011103if test ! "$LIBRARY" = "$LDLIBRARY"
11104then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000011105 case $ac_sys_system in
11106 CYGWIN*)
11107 # Cygwin needs CCSHARED when building extension DLLs
11108 # but not when building the interpreter DLL.
11109 CFLAGSFORSHARED='';;
11110 *)
11111 CFLAGSFORSHARED='$(CCSHARED)'
11112 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011114echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
11115echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011116
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011117# SHLIBS are libraries (except -lc and -lm) to link to the python shared
11118# library (with --enable-shared).
11119# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011120# symbols, this must be set to $(LIBS) (expanded by make). We do this even
11121# if it is not required, since it creates a dependency of the shared library
11122# to LIBS. This, in turn, means that applications linking the shared libpython
11123# don't need to link LIBS explicitly. The default should be only changed
11124# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011125
11126echo "$as_me:$LINENO: checking SHLIBS" >&5
11127echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
11128case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011129 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011130 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011131esac
11132echo "$as_me:$LINENO: result: $SHLIBS" >&5
11133echo "${ECHO_T}$SHLIBS" >&6
11134
11135
Guido van Rossum627b2d71993-12-24 10:39:16 +000011136# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
11138echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11139echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
11140if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11141 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011144LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* confdefs.h. */
11147_ACEOF
11148cat confdefs.h >>conftest.$ac_ext
11149cat >>conftest.$ac_ext <<_ACEOF
11150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011152/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011153#ifdef __cplusplus
11154extern "C"
11155#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011156/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 builtin and then its argument prototype would still apply. */
11158char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
11162dlopen ();
11163 ;
11164 return 0;
11165}
11166_ACEOF
11167rm -f conftest.$ac_objext conftest$ac_exeext
11168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011169 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011171 grep -v '^ *+' conftest.er1 >conftest.err
11172 rm -f conftest.er1
11173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11175 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011176 { ac_try='test -z "$ac_c_werror_flag"
11177 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11179 (eval $ac_try) 2>&5
11180 ac_status=$?
11181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11182 (exit $ac_status); }; } &&
11183 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11185 (eval $ac_try) 2>&5
11186 ac_status=$?
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); }; }; then
11189 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011190else
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011192sed 's/^/| /' conftest.$ac_ext >&5
11193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011195fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011196rm -f conftest.err conftest.$ac_objext \
11197 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011198LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011200echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11201echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
11202if test $ac_cv_lib_dl_dlopen = yes; then
11203 cat >>confdefs.h <<_ACEOF
11204#define HAVE_LIBDL 1
11205_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011206
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011207 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011208
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011209fi
11210 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011211
11212echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11213echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
11214if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11215 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216else
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011218LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011219cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* confdefs.h. */
11221_ACEOF
11222cat confdefs.h >>conftest.$ac_ext
11223cat >>conftest.$ac_ext <<_ACEOF
11224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011226/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011227#ifdef __cplusplus
11228extern "C"
11229#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011230/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 builtin and then its argument prototype would still apply. */
11232char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011233int
11234main ()
11235{
11236shl_load ();
11237 ;
11238 return 0;
11239}
11240_ACEOF
11241rm -f conftest.$ac_objext conftest$ac_exeext
11242if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011243 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011245 grep -v '^ *+' conftest.er1 >conftest.err
11246 rm -f conftest.er1
11247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11249 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011250 { ac_try='test -z "$ac_c_werror_flag"
11251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11253 (eval $ac_try) 2>&5
11254 ac_status=$?
11255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11256 (exit $ac_status); }; } &&
11257 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11260 ac_status=$?
11261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011264else
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011266sed 's/^/| /' conftest.$ac_ext >&5
11267
Martin v. Löwis11437992002-04-12 09:54:03 +000011268ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011269fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011270rm -f conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011272LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011274echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11275echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
11276if test $ac_cv_lib_dld_shl_load = yes; then
11277 cat >>confdefs.h <<_ACEOF
11278#define HAVE_LIBDLD 1
11279_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011280
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011281 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011283fi
11284 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011285
11286# only check for sem_ini if thread support is requested
11287if test "$with_threads" = "yes" -o -z "$with_threads"; then
11288 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011289echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
11290if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011292else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011293 ac_func_search_save_LIBS=$LIBS
11294ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* confdefs.h. */
11297_ACEOF
11298cat confdefs.h >>conftest.$ac_ext
11299cat >>conftest.$ac_ext <<_ACEOF
11300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011302/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011303#ifdef __cplusplus
11304extern "C"
11305#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011306/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 builtin and then its argument prototype would still apply. */
11308char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011309int
11310main ()
11311{
11312sem_init ();
11313 ;
11314 return 0;
11315}
11316_ACEOF
11317rm -f conftest.$ac_objext conftest$ac_exeext
11318if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011319 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011321 grep -v '^ *+' conftest.er1 >conftest.err
11322 rm -f conftest.er1
11323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11325 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011326 { ac_try='test -z "$ac_c_werror_flag"
11327 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11329 (eval $ac_try) 2>&5
11330 ac_status=$?
11331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11332 (exit $ac_status); }; } &&
11333 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11335 (eval $ac_try) 2>&5
11336 ac_status=$?
11337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011339 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011340else
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011342sed 's/^/| /' conftest.$ac_ext >&5
11343
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011344fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011345rm -f conftest.err conftest.$ac_objext \
11346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011347if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011348 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011349 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011351/* confdefs.h. */
11352_ACEOF
11353cat confdefs.h >>conftest.$ac_ext
11354cat >>conftest.$ac_ext <<_ACEOF
11355/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011356
11357/* Override any gcc2 internal prototype to avoid an error. */
11358#ifdef __cplusplus
11359extern "C"
11360#endif
11361/* We use char because int might match the return type of a gcc2
11362 builtin and then its argument prototype would still apply. */
11363char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011364int
11365main ()
11366{
11367sem_init ();
11368 ;
11369 return 0;
11370}
Martin v. Löwis11437992002-04-12 09:54:03 +000011371_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011372rm -f conftest.$ac_objext conftest$ac_exeext
11373if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011374 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011376 grep -v '^ *+' conftest.er1 >conftest.err
11377 rm -f conftest.er1
11378 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011381 { ac_try='test -z "$ac_c_werror_flag"
11382 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11384 (eval $ac_try) 2>&5
11385 ac_status=$?
11386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387 (exit $ac_status); }; } &&
11388 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
11391 ac_status=$?
11392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11393 (exit $ac_status); }; }; then
11394 ac_cv_search_sem_init="-l$ac_lib"
11395break
11396else
11397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011398sed 's/^/| /' conftest.$ac_ext >&5
11399
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011401rm -f conftest.err conftest.$ac_objext \
11402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011403 done
11404fi
11405LIBS=$ac_func_search_save_LIBS
11406fi
11407echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
11408echo "${ECHO_T}$ac_cv_search_sem_init" >&6
11409if test "$ac_cv_search_sem_init" != no; then
11410 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011411
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011412fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000011413 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000011414 # posix4 on Solaris 2.6
11415 # pthread (first!) on Linux
11416fi
11417
Martin v. Löwis19d17342003-06-14 21:03:05 +000011418# check if we need libintl for locale functions
11419echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
11420echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
11421if test "${ac_cv_lib_intl_textdomain+set}" = set; then
11422 echo $ECHO_N "(cached) $ECHO_C" >&6
11423else
11424 ac_check_lib_save_LIBS=$LIBS
11425LIBS="-lintl $LIBS"
11426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* confdefs.h. */
11428_ACEOF
11429cat confdefs.h >>conftest.$ac_ext
11430cat >>conftest.$ac_ext <<_ACEOF
11431/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000011432
11433/* Override any gcc2 internal prototype to avoid an error. */
11434#ifdef __cplusplus
11435extern "C"
11436#endif
11437/* We use char because int might match the return type of a gcc2
11438 builtin and then its argument prototype would still apply. */
11439char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000011440int
11441main ()
11442{
11443textdomain ();
11444 ;
11445 return 0;
11446}
11447_ACEOF
11448rm -f conftest.$ac_objext conftest$ac_exeext
11449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011450 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000011451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011452 grep -v '^ *+' conftest.er1 >conftest.err
11453 rm -f conftest.er1
11454 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000011455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011457 { ac_try='test -z "$ac_c_werror_flag"
11458 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11460 (eval $ac_try) 2>&5
11461 ac_status=$?
11462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11463 (exit $ac_status); }; } &&
11464 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000011465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11466 (eval $ac_try) 2>&5
11467 ac_status=$?
11468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469 (exit $ac_status); }; }; then
11470 ac_cv_lib_intl_textdomain=yes
11471else
11472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011473sed 's/^/| /' conftest.$ac_ext >&5
11474
Martin v. Löwis19d17342003-06-14 21:03:05 +000011475ac_cv_lib_intl_textdomain=no
11476fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011477rm -f conftest.err conftest.$ac_objext \
11478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000011479LIBS=$ac_check_lib_save_LIBS
11480fi
11481echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
11482echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
11483if test $ac_cv_lib_intl_textdomain = yes; then
11484
11485cat >>confdefs.h <<\_ACEOF
11486#define WITH_LIBINTL 1
11487_ACEOF
11488
11489fi
11490
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011491
11492# checks for system dependent C++ extensions support
11493case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
11495echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
11496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011497/* confdefs.h. */
11498_ACEOF
11499cat confdefs.h >>conftest.$ac_ext
11500cat >>conftest.$ac_ext <<_ACEOF
11501/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011502#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000011503int
11504main ()
11505{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011506loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ;
11508 return 0;
11509}
11510_ACEOF
11511rm -f conftest.$ac_objext conftest$ac_exeext
11512if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011513 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011515 grep -v '^ *+' conftest.er1 >conftest.err
11516 rm -f conftest.er1
11517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11519 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011520 { ac_try='test -z "$ac_c_werror_flag"
11521 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11523 (eval $ac_try) 2>&5
11524 ac_status=$?
11525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11526 (exit $ac_status); }; } &&
11527 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11529 (eval $ac_try) 2>&5
11530 ac_status=$?
11531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011533
Martin v. Löwis11437992002-04-12 09:54:03 +000011534cat >>confdefs.h <<\_ACEOF
11535#define AIX_GENUINE_CPLUSPLUS 1
11536_ACEOF
11537
11538 echo "$as_me:$LINENO: result: yes" >&5
11539echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011540else
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011542sed 's/^/| /' conftest.$ac_ext >&5
11543
Martin v. Löwis11437992002-04-12 09:54:03 +000011544echo "$as_me:$LINENO: result: no" >&5
11545echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011546fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011547rm -f conftest.err conftest.$ac_objext \
11548 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000011549 *) ;;
11550esac
11551
Guido van Rossum70c7f481998-03-26 18:44:10 +000011552# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000011554echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
11555echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
11556if test "${ac_cv_lib_nsl_t_open+set}" = set; then
11557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011558else
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011560LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011568/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011569#ifdef __cplusplus
11570extern "C"
11571#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011572/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 builtin and then its argument prototype would still apply. */
11574char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011575int
11576main ()
11577{
11578t_open ();
11579 ;
11580 return 0;
11581}
11582_ACEOF
11583rm -f conftest.$ac_objext conftest$ac_exeext
11584if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011585 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011592 { ac_try='test -z "$ac_c_werror_flag"
11593 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595 (eval $ac_try) 2>&5
11596 ac_status=$?
11597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598 (exit $ac_status); }; } &&
11599 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601 (eval $ac_try) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); }; }; then
11605 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011606else
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011608sed 's/^/| /' conftest.$ac_ext >&5
11609
Martin v. Löwis11437992002-04-12 09:54:03 +000011610ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011611fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011612rm -f conftest.err conftest.$ac_objext \
11613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011614LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011616echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11617echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11618if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011619 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011620fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011621 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011622echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11623echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11624if test "${ac_cv_lib_socket_socket+set}" = set; then
11625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626else
Martin v. Löwis11437992002-04-12 09:54:03 +000011627 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011628LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* confdefs.h. */
11631_ACEOF
11632cat confdefs.h >>conftest.$ac_ext
11633cat >>conftest.$ac_ext <<_ACEOF
11634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011635
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011636/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011637#ifdef __cplusplus
11638extern "C"
11639#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011640/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 builtin and then its argument prototype would still apply. */
11642char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011643int
11644main ()
11645{
11646socket ();
11647 ;
11648 return 0;
11649}
11650_ACEOF
11651rm -f conftest.$ac_objext conftest$ac_exeext
11652if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011653 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011655 grep -v '^ *+' conftest.er1 >conftest.err
11656 rm -f conftest.er1
11657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011660 { ac_try='test -z "$ac_c_werror_flag"
11661 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663 (eval $ac_try) 2>&5
11664 ac_status=$?
11665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666 (exit $ac_status); }; } &&
11667 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11669 (eval $ac_try) 2>&5
11670 ac_status=$?
11671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672 (exit $ac_status); }; }; then
11673 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011674else
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011676sed 's/^/| /' conftest.$ac_ext >&5
11677
Martin v. Löwis11437992002-04-12 09:54:03 +000011678ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011679fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011680rm -f conftest.err conftest.$ac_objext \
11681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011682LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011683fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011684echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11685echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11686if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011687 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011688fi
11689 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011690
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011691case "$ac_sys_system" in
11692BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011693echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11694echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11695if test "${ac_cv_lib_net_socket+set}" = set; then
11696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011697else
Martin v. Löwis11437992002-04-12 09:54:03 +000011698 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011699LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* confdefs.h. */
11702_ACEOF
11703cat confdefs.h >>conftest.$ac_ext
11704cat >>conftest.$ac_ext <<_ACEOF
11705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011706
Guido van Rossumad678af1998-10-02 14:42:15 +000011707/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011708#ifdef __cplusplus
11709extern "C"
11710#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011711/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 builtin and then its argument prototype would still apply. */
11713char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011714int
11715main ()
11716{
11717socket ();
11718 ;
11719 return 0;
11720}
11721_ACEOF
11722rm -f conftest.$ac_objext conftest$ac_exeext
11723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011724 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011726 grep -v '^ *+' conftest.er1 >conftest.err
11727 rm -f conftest.er1
11728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11730 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011731 { ac_try='test -z "$ac_c_werror_flag"
11732 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11734 (eval $ac_try) 2>&5
11735 ac_status=$?
11736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11737 (exit $ac_status); }; } &&
11738 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11740 (eval $ac_try) 2>&5
11741 ac_status=$?
11742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11743 (exit $ac_status); }; }; then
11744 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011745else
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011747sed 's/^/| /' conftest.$ac_ext >&5
11748
Martin v. Löwis11437992002-04-12 09:54:03 +000011749ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011750fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011751rm -f conftest.err conftest.$ac_objext \
11752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011753LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011755echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11756echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11757if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011758 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011759fi
11760 # BeOS
11761;;
11762esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011763
Martin v. Löwis11437992002-04-12 09:54:03 +000011764echo "$as_me:$LINENO: checking for --with-libs" >&5
11765echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11766
Guido van Rossuma68acba1996-07-31 17:36:39 +000011767# Check whether --with-libs or --without-libs was given.
11768if test "${with_libs+set}" = set; then
11769 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
11771echo "$as_me:$LINENO: result: $withval" >&5
11772echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011773LIBS="$withval $LIBS"
11774
11775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 echo "$as_me:$LINENO: result: no" >&5
11777echo "${ECHO_T}no" >&6
11778fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011779
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011780# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011781
11782
Martin v. Löwis11437992002-04-12 09:54:03 +000011783echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11784echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11785
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011786# Check whether --with-signal-module or --without-signal-module was given.
11787if test "${with_signal_module+set}" = set; then
11788 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011791
11792if test -z "$with_signal_module"
11793then with_signal_module="yes"
11794fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011795echo "$as_me:$LINENO: result: $with_signal_module" >&5
11796echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011797
11798if test "${with_signal_module}" = "yes"; then
11799 USE_SIGNAL_MODULE=""
11800 SIGNAL_OBJS=""
11801else
11802 USE_SIGNAL_MODULE="#"
11803 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11804fi
11805
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011806# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011807
Barry Warsawc0d24d82000-06-29 16:12:00 +000011808USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011809
Martin v. Löwis11437992002-04-12 09:54:03 +000011810echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11811echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11812
Guido van Rossumec2f0731997-01-22 20:54:01 +000011813
11814# Check whether --with-dec-threads or --without-dec-threads was given.
11815if test "${with_dec_threads+set}" = set; then
11816 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011817
11818echo "$as_me:$LINENO: result: $withval" >&5
11819echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011820LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011821if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011822 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011823fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011824else
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 echo "$as_me:$LINENO: result: no" >&5
11826echo "${ECHO_T}no" >&6
11827fi;
11828
11829# Templates for things AC_DEFINEd more than once.
11830# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011831
11832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833
11834
11835
11836
11837
11838echo "$as_me:$LINENO: checking for --with-threads" >&5
11839echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11840
Guido van Rossumec2f0731997-01-22 20:54:01 +000011841# Check whether --with-threads or --without-threads was given.
11842if test "${with_threads+set}" = set; then
11843 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011846
Barry Warsawc0d24d82000-06-29 16:12:00 +000011847# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011850if test "${with_thread+set}" = set; then
11851 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011852 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011853fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000011854
11855if test -z "$with_threads"
11856then with_threads="yes"
11857fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011858echo "$as_me:$LINENO: result: $with_threads" >&5
11859echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000011860
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011861
Barry Warsawc0d24d82000-06-29 16:12:00 +000011862if test "$with_threads" = "no"
11863then
11864 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011865elif test "$ac_cv_pthread_is_default" = yes
11866then
Martin v. Löwis11437992002-04-12 09:54:03 +000011867 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011868#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011869_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011870
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011871 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011873#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011874_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011875
11876 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011877 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011878elif test "$ac_cv_kpthread" = "yes"
11879then
11880 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011881 if test "$ac_cv_cxx_thread" = "yes"; then
11882 CXX="$CXX -Kpthread"
11883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011884 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011885#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011886_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011887
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011888 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011889 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011890elif test "$ac_cv_kthread" = "yes"
11891then
11892 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011893 if test "$ac_cv_cxx_thread" = "yes"; then
11894 CXX="$CXX -Kthread"
11895 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011896 cat >>confdefs.h <<\_ACEOF
11897#define WITH_THREAD 1
11898_ACEOF
11899
11900 posix_threads=yes
11901 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011902elif test "$ac_cv_pthread" = "yes"
11903then
11904 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011905 if test "$ac_cv_cxx_thread" = "yes"; then
11906 CXX="$CXX -pthread"
11907 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011908 cat >>confdefs.h <<\_ACEOF
11909#define WITH_THREAD 1
11910_ACEOF
11911
11912 posix_threads=yes
11913 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011914else
11915 if test ! -z "$with_threads" -a -d "$with_threads"
11916 then LDFLAGS="$LDFLAGS -L$with_threads"
11917 fi
11918 if test ! -z "$withval" -a -d "$withval"
11919 then LDFLAGS="$LDFLAGS -L$withval"
11920 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011921
11922 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011923 # define _POSIX_THREADS in unistd.h. Some apparently don't
11924 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11926echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011928/* confdefs.h. */
11929_ACEOF
11930cat confdefs.h >>conftest.$ac_ext
11931cat >>conftest.$ac_ext <<_ACEOF
11932/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011933
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011934#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011935#ifdef _POSIX_THREADS
11936yes
11937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
11939_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011941 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011942 unistd_defines_pthreads=yes
11943else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011944 unistd_defines_pthreads=no
11945fi
11946rm -f conftest*
11947
Martin v. Löwis11437992002-04-12 09:54:03 +000011948 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11949echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011950
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011952#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011953_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011954
Martin v. Löwis11437992002-04-12 09:54:03 +000011955 if test "${ac_cv_header_cthreads_h+set}" = set; then
11956 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11957echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11958if test "${ac_cv_header_cthreads_h+set}" = set; then
11959 echo $ECHO_N "(cached) $ECHO_C" >&6
11960fi
11961echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11962echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011963else
Martin v. Löwis11437992002-04-12 09:54:03 +000011964 # Is the header compilable?
11965echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11966echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011968/* confdefs.h. */
11969_ACEOF
11970cat confdefs.h >>conftest.$ac_ext
11971cat >>conftest.$ac_ext <<_ACEOF
11972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011973$ac_includes_default
11974#include <cthreads.h>
11975_ACEOF
11976rm -f conftest.$ac_objext
11977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011978 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011980 grep -v '^ *+' conftest.er1 >conftest.err
11981 rm -f conftest.er1
11982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11984 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011985 { ac_try='test -z "$ac_c_werror_flag"
11986 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11988 (eval $ac_try) 2>&5
11989 ac_status=$?
11990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11991 (exit $ac_status); }; } &&
11992 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11994 (eval $ac_try) 2>&5
11995 ac_status=$?
11996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11997 (exit $ac_status); }; }; then
11998 ac_header_compiler=yes
11999else
12000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012001sed 's/^/| /' conftest.$ac_ext >&5
12002
Martin v. Löwis11437992002-04-12 09:54:03 +000012003ac_header_compiler=no
12004fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012005rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012006echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12007echo "${ECHO_T}$ac_header_compiler" >&6
12008
12009# Is the header present?
12010echo "$as_me:$LINENO: checking cthreads.h presence" >&5
12011echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
12012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012013/* confdefs.h. */
12014_ACEOF
12015cat confdefs.h >>conftest.$ac_ext
12016cat >>conftest.$ac_ext <<_ACEOF
12017/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012018#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012019_ACEOF
12020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12022 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012023 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 rm -f conftest.er1
12025 cat conftest.err >&5
12026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12027 (exit $ac_status); } >/dev/null; then
12028 if test -s conftest.err; then
12029 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012030 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 else
12032 ac_cpp_err=
12033 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012034else
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ac_cpp_err=yes
12036fi
12037if test -z "$ac_cpp_err"; then
12038 ac_header_preproc=yes
12039else
12040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012041sed 's/^/| /' conftest.$ac_ext >&5
12042
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012045rm -f conftest.err conftest.$ac_ext
12046echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12047echo "${ECHO_T}$ac_header_preproc" >&6
12048
12049# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012050case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12051 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12053echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012054 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
12055echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
12056 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012057 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012058 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012059 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
12060echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012061 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
12062echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
12063 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
12064echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
12065 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12066echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012067 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
12068echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012069 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
12070echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012071 (
12072 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012073## ------------------------------------------------ ##
12074## Report this to http://www.python.org/python-bugs ##
12075## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012076_ASBOX
12077 ) |
12078 sed "s/^/$as_me: WARNING: /" >&2
12079 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012080esac
12081echo "$as_me:$LINENO: checking for cthreads.h" >&5
12082echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
12083if test "${ac_cv_header_cthreads_h+set}" = set; then
12084 echo $ECHO_N "(cached) $ECHO_C" >&6
12085else
12086 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012087fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012088echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12089echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
12090
12091fi
12092if test $ac_cv_header_cthreads_h = yes; then
12093 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012094#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012095_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012096
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012098#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012099_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101
12102cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012103#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012104_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012105
12106 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012107 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012108else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012109
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12111 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12112echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12113if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12114 echo $ECHO_N "(cached) $ECHO_C" >&6
12115fi
12116echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12117echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012118else
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 # Is the header compilable?
12120echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
12121echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
12122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012123/* confdefs.h. */
12124_ACEOF
12125cat confdefs.h >>conftest.$ac_ext
12126cat >>conftest.$ac_ext <<_ACEOF
12127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012128$ac_includes_default
12129#include <mach/cthreads.h>
12130_ACEOF
12131rm -f conftest.$ac_objext
12132if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012133 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012135 grep -v '^ *+' conftest.er1 >conftest.err
12136 rm -f conftest.er1
12137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12139 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012140 { ac_try='test -z "$ac_c_werror_flag"
12141 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12144 ac_status=$?
12145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146 (exit $ac_status); }; } &&
12147 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12150 ac_status=$?
12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12152 (exit $ac_status); }; }; then
12153 ac_header_compiler=yes
12154else
12155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012156sed 's/^/| /' conftest.$ac_ext >&5
12157
Martin v. Löwis11437992002-04-12 09:54:03 +000012158ac_header_compiler=no
12159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012161echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12162echo "${ECHO_T}$ac_header_compiler" >&6
12163
12164# Is the header present?
12165echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
12166echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
12167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012168/* confdefs.h. */
12169_ACEOF
12170cat confdefs.h >>conftest.$ac_ext
12171cat >>conftest.$ac_ext <<_ACEOF
12172/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012173#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012174_ACEOF
12175if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12176 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12177 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012178 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 rm -f conftest.er1
12180 cat conftest.err >&5
12181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12182 (exit $ac_status); } >/dev/null; then
12183 if test -s conftest.err; then
12184 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012185 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 else
12187 ac_cpp_err=
12188 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012189else
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 ac_cpp_err=yes
12191fi
12192if test -z "$ac_cpp_err"; then
12193 ac_header_preproc=yes
12194else
12195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012196sed 's/^/| /' conftest.$ac_ext >&5
12197
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012199fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012200rm -f conftest.err conftest.$ac_ext
12201echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12202echo "${ECHO_T}$ac_header_preproc" >&6
12203
12204# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012205case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12206 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12208echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012209 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12210echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12211 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012212 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012213 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012214 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12215echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012216 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12217echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12218 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12219echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12220 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12221echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012222 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12223echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012224 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12225echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012226 (
12227 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012228## ------------------------------------------------ ##
12229## Report this to http://www.python.org/python-bugs ##
12230## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012231_ASBOX
12232 ) |
12233 sed "s/^/$as_me: WARNING: /" >&2
12234 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012235esac
12236echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12237echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
12238if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12239 echo $ECHO_N "(cached) $ECHO_C" >&6
12240else
12241 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012243echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12244echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
12245
12246fi
12247if test $ac_cv_header_mach_cthreads_h = yes; then
12248 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012249#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012250_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012253#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012254_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012255
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
12257cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012258#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012259_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012260
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012261 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012262else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012263
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 echo "$as_me:$LINENO: checking for --with-pth" >&5
12265echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
12266
12267# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012268if test "${with_pth+set}" = set; then
12269 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012270 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012271echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012272 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012273#define WITH_THREAD 1
12274_ACEOF
12275
12276
12277cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012278#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012279_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012280
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012281 LIBS="-lpth $LIBS"
12282 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012283else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012284 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012285echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012286
12287 # Just looking for pthread_create in libpthread is not enough:
12288 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12289 # So we really have to include pthread.h, and then link.
12290 _libs=$LIBS
12291 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12293echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
12294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* confdefs.h. */
12296_ACEOF
12297cat confdefs.h >>conftest.$ac_ext
12298cat >>conftest.$ac_ext <<_ACEOF
12299/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012300#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012301
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012302void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012303int
12304main ()
12305{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012306
12307pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012308 ;
12309 return 0;
12310}
12311_ACEOF
12312rm -f conftest.$ac_objext conftest$ac_exeext
12313if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012314 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012316 grep -v '^ *+' conftest.er1 >conftest.err
12317 rm -f conftest.er1
12318 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12320 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012321 { ac_try='test -z "$ac_c_werror_flag"
12322 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12324 (eval $ac_try) 2>&5
12325 ac_status=$?
12326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12327 (exit $ac_status); }; } &&
12328 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12330 (eval $ac_try) 2>&5
12331 ac_status=$?
12332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12333 (exit $ac_status); }; }; then
12334
12335 echo "$as_me:$LINENO: result: yes" >&5
12336echo "${ECHO_T}yes" >&6
12337 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012338#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012339_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012340
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012341 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012342 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012343else
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012345sed 's/^/| /' conftest.$ac_ext >&5
12346
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012348 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12350echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
12351if test "${ac_cv_func_pthread_detach+set}" = set; then
12352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012353else
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012355/* confdefs.h. */
12356_ACEOF
12357cat confdefs.h >>conftest.$ac_ext
12358cat >>conftest.$ac_ext <<_ACEOF
12359/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012360/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12361 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12362#define pthread_detach innocuous_pthread_detach
12363
Guido van Rossumad678af1998-10-02 14:42:15 +000012364/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012365 which can conflict with char pthread_detach (); below.
12366 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012367 <limits.h> exists even on freestanding compilers. */
12368
12369#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000012370# include <limits.h>
12371#else
12372# include <assert.h>
12373#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012374
12375#undef pthread_detach
12376
Guido van Rossumad678af1998-10-02 14:42:15 +000012377/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#ifdef __cplusplus
12379extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012380{
Martin v. Löwis11437992002-04-12 09:54:03 +000012381#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000012382/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 builtin and then its argument prototype would still apply. */
12384char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000012385/* The GNU C library defines this for functions which it implements
12386 to always fail with ENOSYS. Some functions are actually named
12387 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000012388#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000012389choke me
12390#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012391char (*f) () = pthread_detach;
12392#endif
12393#ifdef __cplusplus
12394}
Guido van Rossumad678af1998-10-02 14:42:15 +000012395#endif
12396
Skip Montanaro6dead952003-09-25 14:50:04 +000012397int
12398main ()
12399{
12400return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
12405rm -f conftest.$ac_objext conftest$ac_exeext
12406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012407 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012409 grep -v '^ *+' conftest.er1 >conftest.err
12410 rm -f conftest.er1
12411 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12413 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012414 { ac_try='test -z "$ac_c_werror_flag"
12415 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12417 (eval $ac_try) 2>&5
12418 ac_status=$?
12419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12420 (exit $ac_status); }; } &&
12421 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12423 (eval $ac_try) 2>&5
12424 ac_status=$?
12425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12426 (exit $ac_status); }; }; then
12427 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012428else
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012430sed 's/^/| /' conftest.$ac_ext >&5
12431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012433fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012434rm -f conftest.err conftest.$ac_objext \
12435 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000012436fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012437echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
12438echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
12439if test $ac_cv_func_pthread_detach = yes; then
12440 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012442_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012443
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012444 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012445 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000012446else
Guido van Rossumad678af1998-10-02 14:42:15 +000012447
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012448 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12449 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12450echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12451if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12452 echo $ECHO_N "(cached) $ECHO_C" >&6
12453fi
12454echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12455echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12456else
12457 # Is the header compilable?
12458echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
12459echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
12460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* confdefs.h. */
12462_ACEOF
12463cat confdefs.h >>conftest.$ac_ext
12464cat >>conftest.$ac_ext <<_ACEOF
12465/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012466$ac_includes_default
12467#include <atheos/threads.h>
12468_ACEOF
12469rm -f conftest.$ac_objext
12470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012471 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012473 grep -v '^ *+' conftest.er1 >conftest.err
12474 rm -f conftest.er1
12475 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012478 { ac_try='test -z "$ac_c_werror_flag"
12479 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12481 (eval $ac_try) 2>&5
12482 ac_status=$?
12483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12484 (exit $ac_status); }; } &&
12485 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12487 (eval $ac_try) 2>&5
12488 ac_status=$?
12489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12490 (exit $ac_status); }; }; then
12491 ac_header_compiler=yes
12492else
12493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012494sed 's/^/| /' conftest.$ac_ext >&5
12495
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012496ac_header_compiler=no
12497fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012499echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12500echo "${ECHO_T}$ac_header_compiler" >&6
12501
12502# Is the header present?
12503echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
12504echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
12505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* confdefs.h. */
12507_ACEOF
12508cat confdefs.h >>conftest.$ac_ext
12509cat >>conftest.$ac_ext <<_ACEOF
12510/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012511#include <atheos/threads.h>
12512_ACEOF
12513if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12514 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12515 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012516 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012517 rm -f conftest.er1
12518 cat conftest.err >&5
12519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12520 (exit $ac_status); } >/dev/null; then
12521 if test -s conftest.err; then
12522 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012523 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012524 else
12525 ac_cpp_err=
12526 fi
12527else
12528 ac_cpp_err=yes
12529fi
12530if test -z "$ac_cpp_err"; then
12531 ac_header_preproc=yes
12532else
12533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012534sed 's/^/| /' conftest.$ac_ext >&5
12535
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012536 ac_header_preproc=no
12537fi
12538rm -f conftest.err conftest.$ac_ext
12539echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12540echo "${ECHO_T}$ac_header_preproc" >&6
12541
12542# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012543case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12544 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012545 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12546echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012547 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
12548echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
12549 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012550 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012551 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012552 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
12553echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012554 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
12555echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
12556 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
12557echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
12558 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
12559echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012560 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
12561echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012562 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
12563echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012564 (
12565 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012566## ------------------------------------------------ ##
12567## Report this to http://www.python.org/python-bugs ##
12568## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012569_ASBOX
12570 ) |
12571 sed "s/^/$as_me: WARNING: /" >&2
12572 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012573esac
12574echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12575echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
12576if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12577 echo $ECHO_N "(cached) $ECHO_C" >&6
12578else
12579 ac_cv_header_atheos_threads_h=$ac_header_preproc
12580fi
12581echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12582echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
12583
12584fi
12585if test $ac_cv_header_atheos_threads_h = yes; then
12586 cat >>confdefs.h <<\_ACEOF
12587#define WITH_THREAD 1
12588_ACEOF
12589
12590
12591cat >>confdefs.h <<\_ACEOF
12592#define ATHEOS_THREADS 1
12593_ACEOF
12594
12595 THREADOBJ="Python/thread.o"
12596else
12597
Martin v. Löwis11437992002-04-12 09:54:03 +000012598 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12599 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12600echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12601if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12602 echo $ECHO_N "(cached) $ECHO_C" >&6
12603fi
12604echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12605echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 # Is the header compilable?
12608echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
12609echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
12610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* confdefs.h. */
12612_ACEOF
12613cat confdefs.h >>conftest.$ac_ext
12614cat >>conftest.$ac_ext <<_ACEOF
12615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616$ac_includes_default
12617#include <kernel/OS.h>
12618_ACEOF
12619rm -f conftest.$ac_objext
12620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012621 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012623 grep -v '^ *+' conftest.er1 >conftest.err
12624 rm -f conftest.er1
12625 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012628 { ac_try='test -z "$ac_c_werror_flag"
12629 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012630 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12631 (eval $ac_try) 2>&5
12632 ac_status=$?
12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12634 (exit $ac_status); }; } &&
12635 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12638 ac_status=$?
12639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12640 (exit $ac_status); }; }; then
12641 ac_header_compiler=yes
12642else
12643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012644sed 's/^/| /' conftest.$ac_ext >&5
12645
Martin v. Löwis11437992002-04-12 09:54:03 +000012646ac_header_compiler=no
12647fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012649echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12650echo "${ECHO_T}$ac_header_compiler" >&6
12651
12652# Is the header present?
12653echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12654echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* confdefs.h. */
12657_ACEOF
12658cat confdefs.h >>conftest.$ac_ext
12659cat >>conftest.$ac_ext <<_ACEOF
12660/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012661#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012662_ACEOF
12663if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12664 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12665 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012666 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 rm -f conftest.er1
12668 cat conftest.err >&5
12669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12670 (exit $ac_status); } >/dev/null; then
12671 if test -s conftest.err; then
12672 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012673 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 else
12675 ac_cpp_err=
12676 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012677else
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ac_cpp_err=yes
12679fi
12680if test -z "$ac_cpp_err"; then
12681 ac_header_preproc=yes
12682else
12683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012684sed 's/^/| /' conftest.$ac_ext >&5
12685
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012688rm -f conftest.err conftest.$ac_ext
12689echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12690echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012691
Martin v. Löwis11437992002-04-12 09:54:03 +000012692# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012693case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12694 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12696echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012697 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12698echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12699 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012700 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012701 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12703echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012704 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12705echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12706 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12707echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12708 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12709echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12711echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012712 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12713echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012714 (
12715 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012716## ------------------------------------------------ ##
12717## Report this to http://www.python.org/python-bugs ##
12718## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012719_ASBOX
12720 ) |
12721 sed "s/^/$as_me: WARNING: /" >&2
12722 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012723esac
12724echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12725echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12726if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6
12728else
12729 ac_cv_header_kernel_OS_h=$ac_header_preproc
12730fi
12731echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12732echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12733
12734fi
12735if test $ac_cv_header_kernel_OS_h = yes; then
12736 cat >>confdefs.h <<\_ACEOF
12737#define WITH_THREAD 1
12738_ACEOF
12739
12740
12741cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012742#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012744
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012745 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012746else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012747
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12749echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12750if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012752else
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012754LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012756/* confdefs.h. */
12757_ACEOF
12758cat confdefs.h >>conftest.$ac_ext
12759cat >>conftest.$ac_ext <<_ACEOF
12760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Greg Steinadf63d62000-07-05 10:38:09 +000012762/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012763#ifdef __cplusplus
12764extern "C"
12765#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012766/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 builtin and then its argument prototype would still apply. */
12768char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012769int
12770main ()
12771{
12772pthread_create ();
12773 ;
12774 return 0;
12775}
12776_ACEOF
12777rm -f conftest.$ac_objext conftest$ac_exeext
12778if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012779 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012781 grep -v '^ *+' conftest.er1 >conftest.err
12782 rm -f conftest.er1
12783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012786 { ac_try='test -z "$ac_c_werror_flag"
12787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12789 (eval $ac_try) 2>&5
12790 ac_status=$?
12791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12792 (exit $ac_status); }; } &&
12793 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12795 (eval $ac_try) 2>&5
12796 ac_status=$?
12797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12798 (exit $ac_status); }; }; then
12799 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012800else
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012802sed 's/^/| /' conftest.$ac_ext >&5
12803
Martin v. Löwis11437992002-04-12 09:54:03 +000012804ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012806rm -f conftest.err conftest.$ac_objext \
12807 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012808LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012809fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012810echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12811echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12812if test $ac_cv_lib_pthreads_pthread_create = yes; then
12813 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012814#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012816
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012817 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012818 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012819 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012820else
Greg Steinadf63d62000-07-05 10:38:09 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12823echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12824if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12825 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012826else
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012828LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012830/* confdefs.h. */
12831_ACEOF
12832cat confdefs.h >>conftest.$ac_ext
12833cat >>conftest.$ac_ext <<_ACEOF
12834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012835
Guido van Rossum49545951997-12-02 19:28:29 +000012836/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012837#ifdef __cplusplus
12838extern "C"
12839#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 builtin and then its argument prototype would still apply. */
12842char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012843int
12844main ()
12845{
12846pthread_create ();
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851rm -f conftest.$ac_objext conftest$ac_exeext
12852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012853 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012855 grep -v '^ *+' conftest.er1 >conftest.err
12856 rm -f conftest.er1
12857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12859 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012860 { ac_try='test -z "$ac_c_werror_flag"
12861 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12863 (eval $ac_try) 2>&5
12864 ac_status=$?
12865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12866 (exit $ac_status); }; } &&
12867 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12869 (eval $ac_try) 2>&5
12870 ac_status=$?
12871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12872 (exit $ac_status); }; }; then
12873 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012876sed 's/^/| /' conftest.$ac_ext >&5
12877
Martin v. Löwis11437992002-04-12 09:54:03 +000012878ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012879fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012880rm -f conftest.err conftest.$ac_objext \
12881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012882LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012883fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012884echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12885echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12886if test $ac_cv_lib_c_r_pthread_create = yes; then
12887 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012888#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012889_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012890
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012891 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012892 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012893 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012894else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012895
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12897echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12898if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12899 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012900else
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012902LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012904/* confdefs.h. */
12905_ACEOF
12906cat confdefs.h >>conftest.$ac_ext
12907cat >>conftest.$ac_ext <<_ACEOF
12908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012909
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012910/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012911#ifdef __cplusplus
12912extern "C"
12913#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012914/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 builtin and then its argument prototype would still apply. */
12916char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012917int
12918main ()
12919{
12920__pthread_create_system ();
12921 ;
12922 return 0;
12923}
12924_ACEOF
12925rm -f conftest.$ac_objext conftest$ac_exeext
12926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012927 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012929 grep -v '^ *+' conftest.er1 >conftest.err
12930 rm -f conftest.er1
12931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12933 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012934 { ac_try='test -z "$ac_c_werror_flag"
12935 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12937 (eval $ac_try) 2>&5
12938 ac_status=$?
12939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12940 (exit $ac_status); }; } &&
12941 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12943 (eval $ac_try) 2>&5
12944 ac_status=$?
12945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12946 (exit $ac_status); }; }; then
12947 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012948else
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012950sed 's/^/| /' conftest.$ac_ext >&5
12951
Martin v. Löwis11437992002-04-12 09:54:03 +000012952ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012954rm -f conftest.err conftest.$ac_objext \
12955 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012956LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012958echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12959echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12960if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12961 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012962#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012963_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012965 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012966 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012967 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012968else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012969
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12971echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12972if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012974else
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012976LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* confdefs.h. */
12979_ACEOF
12980cat confdefs.h >>conftest.$ac_ext
12981cat >>conftest.$ac_ext <<_ACEOF
12982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Guido van Rossumb93a8621998-05-07 13:27:32 +000012984/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012985#ifdef __cplusplus
12986extern "C"
12987#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 builtin and then its argument prototype would still apply. */
12990char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012991int
12992main ()
12993{
12994pthread_create ();
12995 ;
12996 return 0;
12997}
12998_ACEOF
12999rm -f conftest.$ac_objext conftest$ac_exeext
13000if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013001 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013003 grep -v '^ *+' conftest.er1 >conftest.err
13004 rm -f conftest.er1
13005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13007 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013008 { ac_try='test -z "$ac_c_werror_flag"
13009 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13011 (eval $ac_try) 2>&5
13012 ac_status=$?
13013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13014 (exit $ac_status); }; } &&
13015 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13017 (eval $ac_try) 2>&5
13018 ac_status=$?
13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); }; }; then
13021 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013022else
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013024sed 's/^/| /' conftest.$ac_ext >&5
13025
Martin v. Löwis11437992002-04-12 09:54:03 +000013026ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000013027fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013028rm -f conftest.err conftest.$ac_objext \
13029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013030LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013031fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013032echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
13033echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
13034if test $ac_cv_lib_cma_pthread_create = yes; then
13035 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013036#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013037_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013038
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013039 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013040 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013041 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000013042else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000013043
Martin v. Löwis130fb172001-07-19 11:00:41 +000013044 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000013045fi
13046
Guido van Rossum627b2d71993-12-24 10:39:16 +000013047
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013048fi
13049
Guido van Rossum0be3e491997-05-22 20:33:33 +000013050fi
13051
Guido van Rossum49545951997-12-02 19:28:29 +000013052fi
13053
Guido van Rossumb93a8621998-05-07 13:27:32 +000013054fi
13055
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013056
Michael W. Hudson54241132001-12-07 15:38:26 +000013057fi
13058
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013059
13060fi
13061
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013062fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013063rm -f conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013065fi;
13066fi
13067
13068
13069fi
13070
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013071
Michael W. Hudson54241132001-12-07 15:38:26 +000013072
Martin v. Löwis11437992002-04-12 09:54:03 +000013073 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
13074echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
13075if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
13076 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013077else
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013079LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013081/* confdefs.h. */
13082_ACEOF
13083cat confdefs.h >>conftest.$ac_ext
13084cat >>conftest.$ac_ext <<_ACEOF
13085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013087/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013088#ifdef __cplusplus
13089extern "C"
13090#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013091/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 builtin and then its argument prototype would still apply. */
13093char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
13097usconfig ();
13098 ;
13099 return 0;
13100}
13101_ACEOF
13102rm -f conftest.$ac_objext conftest$ac_exeext
13103if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013104 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013106 grep -v '^ *+' conftest.er1 >conftest.err
13107 rm -f conftest.er1
13108 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13110 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013111 { ac_try='test -z "$ac_c_werror_flag"
13112 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13114 (eval $ac_try) 2>&5
13115 ac_status=$?
13116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13117 (exit $ac_status); }; } &&
13118 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13120 (eval $ac_try) 2>&5
13121 ac_status=$?
13122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13123 (exit $ac_status); }; }; then
13124 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125else
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013127sed 's/^/| /' conftest.$ac_ext >&5
13128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013130fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013131rm -f conftest.err conftest.$ac_objext \
13132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013133LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013135echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
13136echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
13137if test $ac_cv_lib_mpc_usconfig = yes; then
13138 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013140_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013141
Martin v. Löwis130fb172001-07-19 11:00:41 +000013142 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013143 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013144 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013145fi
13146
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013147
Neal Norwitza978ab02002-11-02 16:58:05 +000013148 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
13150echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
13151if test "${ac_cv_lib_thread_thr_create+set}" = set; then
13152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013153else
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013155LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013157/* confdefs.h. */
13158_ACEOF
13159cat confdefs.h >>conftest.$ac_ext
13160cat >>conftest.$ac_ext <<_ACEOF
13161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013163/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013164#ifdef __cplusplus
13165extern "C"
13166#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013167/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 builtin and then its argument prototype would still apply. */
13169char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
13173thr_create ();
13174 ;
13175 return 0;
13176}
13177_ACEOF
13178rm -f conftest.$ac_objext conftest$ac_exeext
13179if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013180 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013182 grep -v '^ *+' conftest.er1 >conftest.err
13183 rm -f conftest.er1
13184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13186 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013187 { ac_try='test -z "$ac_c_werror_flag"
13188 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13190 (eval $ac_try) 2>&5
13191 ac_status=$?
13192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193 (exit $ac_status); }; } &&
13194 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13196 (eval $ac_try) 2>&5
13197 ac_status=$?
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); }; }; then
13200 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201else
Martin v. Löwis11437992002-04-12 09:54:03 +000013202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013203sed 's/^/| /' conftest.$ac_ext >&5
13204
Martin v. Löwis11437992002-04-12 09:54:03 +000013205ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013206fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013207rm -f conftest.err conftest.$ac_objext \
13208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013209LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013211echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13212echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
13213if test $ac_cv_lib_thread_thr_create = yes; then
13214 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013215#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013216_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013217
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013218 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013219 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013220 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013221fi
13222
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013223 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013224
Martin v. Löwis130fb172001-07-19 11:00:41 +000013225 if test "$USE_THREAD_MODULE" != "#"
13226 then
13227 # If the above checks didn't disable threads, (at least) OSF1
13228 # needs this '-threads' argument during linking.
13229 case $ac_sys_system in
13230 OSF1) LDLAST=-threads;;
13231 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013232 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013233fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013234
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013235if test "$posix_threads" = "yes"; then
13236 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013237
13238cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013239#define _POSIX_THREADS 1
13240_ACEOF
13241
13242 fi
13243
13244 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13245 case $ac_sys_system/$ac_sys_release in
13246 SunOS/5.6)
13247cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013248#define HAVE_PTHREAD_DESTRUCTOR 1
13249_ACEOF
13250
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013251 ;;
13252 SunOS/5.8)
13253cat >>confdefs.h <<\_ACEOF
13254#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13255_ACEOF
13256
13257 ;;
13258 esac
13259
13260 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13261echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
13262 if test "${ac_cv_pthread_system_supported+set}" = set; then
13263 echo $ECHO_N "(cached) $ECHO_C" >&6
13264else
13265 if test "$cross_compiling" = yes; then
13266 ac_cv_pthread_system_supported=no
13267else
13268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013269/* confdefs.h. */
13270_ACEOF
13271cat confdefs.h >>conftest.$ac_ext
13272cat >>conftest.$ac_ext <<_ACEOF
13273/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013274#include <pthread.h>
13275 void *foo(void *parm) {
13276 return NULL;
13277 }
13278 main() {
13279 pthread_attr_t attr;
13280 pthread_t id;
13281 if (pthread_attr_init(&attr)) exit(-1);
13282 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13283 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13284 exit(0);
13285 }
13286_ACEOF
13287rm -f conftest$ac_exeext
13288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13289 (eval $ac_link) 2>&5
13290 ac_status=$?
13291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13294 (eval $ac_try) 2>&5
13295 ac_status=$?
13296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13297 (exit $ac_status); }; }; then
13298 ac_cv_pthread_system_supported=yes
13299else
13300 echo "$as_me: program exited with status $ac_status" >&5
13301echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013302sed 's/^/| /' conftest.$ac_ext >&5
13303
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013304( exit $ac_status )
13305ac_cv_pthread_system_supported=no
13306fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013307rm -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 +000013308fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013309
Guido van Rossum627b2d71993-12-24 10:39:16 +000013310fi
13311
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013312 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13313echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
13314 if test "$ac_cv_pthread_system_supported" = "yes"; then
13315
13316cat >>confdefs.h <<\_ACEOF
13317#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13318_ACEOF
13319
13320 fi
13321
13322for ac_func in pthread_sigmask
13323do
13324as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13325echo "$as_me:$LINENO: checking for $ac_func" >&5
13326echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13327if eval "test \"\${$as_ac_var+set}\" = set"; then
13328 echo $ECHO_N "(cached) $ECHO_C" >&6
13329else
13330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013331/* confdefs.h. */
13332_ACEOF
13333cat confdefs.h >>conftest.$ac_ext
13334cat >>conftest.$ac_ext <<_ACEOF
13335/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013336/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13337 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13338#define $ac_func innocuous_$ac_func
13339
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013340/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013341 which can conflict with char $ac_func (); below.
13342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013343 <limits.h> exists even on freestanding compilers. */
13344
13345#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013346# include <limits.h>
13347#else
13348# include <assert.h>
13349#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013350
13351#undef $ac_func
13352
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013353/* Override any gcc2 internal prototype to avoid an error. */
13354#ifdef __cplusplus
13355extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013356{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013357#endif
13358/* We use char because int might match the return type of a gcc2
13359 builtin and then its argument prototype would still apply. */
13360char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013361/* The GNU C library defines this for functions which it implements
13362 to always fail with ENOSYS. Some functions are actually named
13363 something starting with __ and the normal name is an alias. */
13364#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13365choke me
13366#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013367char (*f) () = $ac_func;
13368#endif
13369#ifdef __cplusplus
13370}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013371#endif
13372
Skip Montanaro6dead952003-09-25 14:50:04 +000013373int
13374main ()
13375{
13376return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013377 ;
13378 return 0;
13379}
13380_ACEOF
13381rm -f conftest.$ac_objext conftest$ac_exeext
13382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013383 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013385 grep -v '^ *+' conftest.er1 >conftest.err
13386 rm -f conftest.er1
13387 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013390 { ac_try='test -z "$ac_c_werror_flag"
13391 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13393 (eval $ac_try) 2>&5
13394 ac_status=$?
13395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13396 (exit $ac_status); }; } &&
13397 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13399 (eval $ac_try) 2>&5
13400 ac_status=$?
13401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13402 (exit $ac_status); }; }; then
13403 eval "$as_ac_var=yes"
13404else
13405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013406sed 's/^/| /' conftest.$ac_ext >&5
13407
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013408eval "$as_ac_var=no"
13409fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013410rm -f conftest.err conftest.$ac_objext \
13411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013412fi
13413echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13414echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13415if test `eval echo '${'$as_ac_var'}'` = yes; then
13416 cat >>confdefs.h <<_ACEOF
13417#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13418_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000013419 case $ac_sys_system in
13420 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013421
Jason Tishlerfac083d2003-07-22 15:20:49 +000013422cat >>confdefs.h <<\_ACEOF
13423#define HAVE_BROKEN_PTHREAD_SIGMASK 1
13424_ACEOF
13425
13426 ;;
13427 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013428fi
13429done
13430
13431fi
13432
13433
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013434# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
13436
13437echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
13438echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013439# Check whether --enable-ipv6 or --disable-ipv6 was given.
13440if test "${enable_ipv6+set}" = set; then
13441 enableval="$enable_ipv6"
13442 case "$enableval" in
13443 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 echo "$as_me:$LINENO: result: no" >&5
13445echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013446 ipv6=no
13447 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013448 *) echo "$as_me:$LINENO: result: yes" >&5
13449echo "${ECHO_T}yes" >&6
13450 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013451#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013452_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013453
13454 ipv6=yes
13455 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013457else
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013459 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 echo "$as_me:$LINENO: result: no" >&5
13461echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013462 ipv6=no
13463
13464else
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* confdefs.h. */
13467_ACEOF
13468cat confdefs.h >>conftest.$ac_ext
13469cat >>conftest.$ac_ext <<_ACEOF
13470/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013471 /* AF_INET6 available check */
13472#include <sys/types.h>
13473#include <sys/socket.h>
13474main()
13475{
13476 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
13477 exit(1);
13478 else
13479 exit(0);
13480}
13481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482_ACEOF
13483rm -f conftest$ac_exeext
13484if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13485 (eval $ac_link) 2>&5
13486 ac_status=$?
13487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13489 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13490 (eval $ac_try) 2>&5
13491 ac_status=$?
13492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13493 (exit $ac_status); }; }; then
13494 echo "$as_me:$LINENO: result: yes" >&5
13495echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013496 ipv6=yes
13497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 echo "$as_me: program exited with status $ac_status" >&5
13499echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013500sed 's/^/| /' conftest.$ac_ext >&5
13501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502( exit $ac_status )
13503echo "$as_me:$LINENO: result: no" >&5
13504echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013505 ipv6=no
13506fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013507rm -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 +000013508fi
13509
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013510if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13512echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
13513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* confdefs.h. */
13515_ACEOF
13516cat confdefs.h >>conftest.$ac_ext
13517cat >>conftest.$ac_ext <<_ACEOF
13518/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013519#include <sys/types.h>
13520#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013521int
13522main ()
13523{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013524struct sockaddr_in6 x;
13525x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
13530rm -f conftest.$ac_objext
13531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013532 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013534 grep -v '^ *+' conftest.er1 >conftest.err
13535 rm -f conftest.er1
13536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013539 { ac_try='test -z "$ac_c_werror_flag"
13540 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13542 (eval $ac_try) 2>&5
13543 ac_status=$?
13544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13545 (exit $ac_status); }; } &&
13546 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13548 (eval $ac_try) 2>&5
13549 ac_status=$?
13550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13551 (exit $ac_status); }; }; then
13552 echo "$as_me:$LINENO: result: yes" >&5
13553echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013554 ipv6=yes
13555else
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013557sed 's/^/| /' conftest.$ac_ext >&5
13558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559echo "$as_me:$LINENO: result: no" >&5
13560echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013561 ipv6=no
13562fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013564fi
13565
13566if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013568#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013569_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013570
13571fi
13572
Martin v. Löwis11437992002-04-12 09:54:03 +000013573fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013574
13575ipv6type=unknown
13576ipv6lib=none
13577ipv6trylibc=no
13578
13579if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13581echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013582 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13583 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013584 case $i in
13585 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* confdefs.h. */
13588_ACEOF
13589cat confdefs.h >>conftest.$ac_ext
13590cat >>conftest.$ac_ext <<_ACEOF
13591/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013592
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013593#include <netinet/in.h>
13594#ifdef IPV6_INRIA_VERSION
13595yes
13596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013597_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013599 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013600 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013601fi
13602rm -f conftest*
13603
13604 ;;
13605 kame)
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 __KAME__
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öwisa2ac6022001-08-09 11:40:14 +000013620 ipv6type=$i;
13621 ipv6lib=inet6
13622 ipv6libdir=/usr/local/v6/lib
13623 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013624fi
13625rm -f conftest*
13626
13627 ;;
13628 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013630/* confdefs.h. */
13631_ACEOF
13632cat confdefs.h >>conftest.$ac_ext
13633cat >>conftest.$ac_ext <<_ACEOF
13634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013636#include <features.h>
13637#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13638yes
13639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013642 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013643 ipv6type=$i;
13644 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013645fi
13646rm -f conftest*
13647
13648 ;;
13649 linux-inet6)
13650 if test -d /usr/inet6; then
13651 ipv6type=$i
13652 ipv6lib=inet6
13653 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013654 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013655 fi
13656 ;;
13657 solaris)
13658 if test -f /etc/netconfig; then
13659 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13660 ipv6type=$i
13661 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013662 fi
13663 fi
13664 ;;
13665 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013672
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013673#include <sys/param.h>
13674#ifdef _TOSHIBA_INET6
13675yes
13676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013677_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013679 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013680 ipv6type=$i;
13681 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013682 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013683fi
13684rm -f conftest*
13685
13686 ;;
13687 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013689/* confdefs.h. */
13690_ACEOF
13691cat confdefs.h >>conftest.$ac_ext
13692cat >>conftest.$ac_ext <<_ACEOF
13693/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013695#include </usr/local/v6/include/sys/v6config.h>
13696#ifdef __V6D__
13697yes
13698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013699_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013701 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013702 ipv6type=$i;
13703 ipv6lib=v6;
13704 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013705 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013706fi
13707rm -f conftest*
13708
13709 ;;
13710 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013718#include <sys/param.h>
13719#ifdef _ZETA_MINAMI_INET6
13720yes
13721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013724 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013725 ipv6type=$i;
13726 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013727 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013728fi
13729rm -f conftest*
13730
13731 ;;
13732 esac
13733 if test "$ipv6type" != "unknown"; then
13734 break
13735 fi
13736 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 echo "$as_me:$LINENO: result: $ipv6type" >&5
13738echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013739fi
13740
13741if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13742 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13743 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13744 echo "using lib$ipv6lib"
13745 else
13746 if test $ipv6trylibc = "yes"; then
13747 echo "using libc"
13748 else
13749 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13750 echo "You need to fetch lib$ipv6lib.a from appropriate"
13751 echo 'ipv6 kit and compile beforehand.'
13752 exit 1
13753 fi
13754 fi
13755fi
13756
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013757# Check for --with-doc-strings
13758echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13759echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13760
13761# Check whether --with-doc-strings or --without-doc-strings was given.
13762if test "${with_doc_strings+set}" = set; then
13763 withval="$with_doc_strings"
13764
13765fi;
13766
13767if test -z "$with_doc_strings"
13768then with_doc_strings="yes"
13769fi
13770if test "$with_doc_strings" != "no"
13771then
13772
13773cat >>confdefs.h <<\_ACEOF
13774#define WITH_DOC_STRINGS 1
13775_ACEOF
13776
13777fi
13778echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13779echo "${ECHO_T}$with_doc_strings" >&6
13780
Neil Schemenauera35c6882001-02-27 04:45:05 +000013781# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013782echo "$as_me:$LINENO: checking for --with-tsc" >&5
13783echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13784
13785# Check whether --with-tsc or --without-tsc was given.
13786if test "${with_tsc+set}" = set; then
13787 withval="$with_tsc"
13788
13789if test "$withval" != no
13790then
13791
13792cat >>confdefs.h <<\_ACEOF
13793#define WITH_TSC 1
13794_ACEOF
13795
13796 echo "$as_me:$LINENO: result: yes" >&5
13797echo "${ECHO_T}yes" >&6
13798else echo "$as_me:$LINENO: result: no" >&5
13799echo "${ECHO_T}no" >&6
13800fi
13801else
13802 echo "$as_me:$LINENO: result: no" >&5
13803echo "${ECHO_T}no" >&6
13804fi;
13805
13806# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013807echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13808echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13809
Neil Schemenauera35c6882001-02-27 04:45:05 +000013810# Check whether --with-pymalloc or --without-pymalloc was given.
13811if test "${with_pymalloc+set}" = set; then
13812 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013813
Martin v. Löwis11437992002-04-12 09:54:03 +000013814fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013815
Neil Schemenauer16c22972002-03-22 15:34:49 +000013816if test -z "$with_pymalloc"
13817then with_pymalloc="yes"
13818fi
13819if test "$with_pymalloc" != "no"
13820then
Martin v. Löwis11437992002-04-12 09:54:03 +000013821
13822cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013823#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013824_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013825
13826fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013827echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13828echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013829
Barry Warsawef82cd72000-06-30 16:21:01 +000013830# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013831echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13832echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13833
Barry Warsawef82cd72000-06-30 16:21:01 +000013834# Check whether --with-wctype-functions or --without-wctype-functions was given.
13835if test "${with_wctype_functions+set}" = set; then
13836 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Barry Warsawef82cd72000-06-30 16:21:01 +000013838if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013839then
13840
13841cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013842#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013843_ACEOF
13844
13845 echo "$as_me:$LINENO: result: yes" >&5
13846echo "${ECHO_T}yes" >&6
13847else echo "$as_me:$LINENO: result: no" >&5
13848echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013849fi
13850else
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 echo "$as_me:$LINENO: result: no" >&5
13852echo "${ECHO_T}no" >&6
13853fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013855# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856
Guido van Rossum98935bf2001-09-05 19:13:16 +000013857DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013858
Guido van Rossume97ee181999-12-20 21:27:22 +000013859# the dlopen() function means we might want to use dynload_shlib.o. some
13860# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013861
Thomas Wouters3a584202000-08-05 23:28:51 +000013862for ac_func in dlopen
13863do
Martin v. Löwis11437992002-04-12 09:54:03 +000013864as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13865echo "$as_me:$LINENO: checking for $ac_func" >&5
13866echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13867if eval "test \"\${$as_ac_var+set}\" = set"; then
13868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013869else
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013871/* confdefs.h. */
13872_ACEOF
13873cat confdefs.h >>conftest.$ac_ext
13874cat >>conftest.$ac_ext <<_ACEOF
13875/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013876/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13877 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13878#define $ac_func innocuous_$ac_func
13879
Guido van Rossume97ee181999-12-20 21:27:22 +000013880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013881 which can conflict with char $ac_func (); below.
13882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013883 <limits.h> exists even on freestanding compilers. */
13884
13885#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013886# include <limits.h>
13887#else
13888# include <assert.h>
13889#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013890
13891#undef $ac_func
13892
Guido van Rossume97ee181999-12-20 21:27:22 +000013893/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013894#ifdef __cplusplus
13895extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013896{
Martin v. Löwis11437992002-04-12 09:54:03 +000013897#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013898/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 builtin and then its argument prototype would still apply. */
13900char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013901/* The GNU C library defines this for functions which it implements
13902 to always fail with ENOSYS. Some functions are actually named
13903 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013904#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013905choke me
13906#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013907char (*f) () = $ac_func;
13908#endif
13909#ifdef __cplusplus
13910}
Guido van Rossume97ee181999-12-20 21:27:22 +000013911#endif
13912
Skip Montanaro6dead952003-09-25 14:50:04 +000013913int
13914main ()
13915{
13916return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 ;
13918 return 0;
13919}
13920_ACEOF
13921rm -f conftest.$ac_objext conftest$ac_exeext
13922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013923 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013925 grep -v '^ *+' conftest.er1 >conftest.err
13926 rm -f conftest.er1
13927 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013930 { ac_try='test -z "$ac_c_werror_flag"
13931 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13933 (eval $ac_try) 2>&5
13934 ac_status=$?
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); }; } &&
13937 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13939 (eval $ac_try) 2>&5
13940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); }; }; then
13943 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013944else
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013946sed 's/^/| /' conftest.$ac_ext >&5
13947
Martin v. Löwis11437992002-04-12 09:54:03 +000013948eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013949fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013950rm -f conftest.err conftest.$ac_objext \
13951 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013953echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13954echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13955if test `eval echo '${'$as_ac_var'}'` = yes; then
13956 cat >>confdefs.h <<_ACEOF
13957#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13958_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013959
Guido van Rossume97ee181999-12-20 21:27:22 +000013960fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013961done
Guido van Rossume97ee181999-12-20 21:27:22 +000013962
Michael W. Hudson54241132001-12-07 15:38:26 +000013963
Guido van Rossume97ee181999-12-20 21:27:22 +000013964# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13965# loading of modules.
13966
Martin v. Löwis11437992002-04-12 09:54:03 +000013967echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13968echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013969if test -z "$DYNLOADFILE"
13970then
13971 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013972 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13973 if test "$ac_cv_func_dlopen" = yes
13974 then DYNLOADFILE="dynload_shlib.o"
13975 else DYNLOADFILE="dynload_aix.o"
13976 fi
13977 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013978 BeOS*) DYNLOADFILE="dynload_beos.o";;
13979 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013980 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013981 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013982 *)
13983 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13984 # out any dynamic loading
13985 if test "$ac_cv_func_dlopen" = yes
13986 then DYNLOADFILE="dynload_shlib.o"
13987 else DYNLOADFILE="dynload_stub.o"
13988 fi
13989 ;;
13990 esac
13991fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013992echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13993echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013994if test "$DYNLOADFILE" != "dynload_stub.o"
13995then
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
13997cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013998#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013999_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014000
14001fi
14002
Neil Schemenauer4e425612001-06-19 15:44:15 +000014003# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14004
Michael W. Hudson54241132001-12-07 15:38:26 +000014005
Martin v. Löwis11437992002-04-12 09:54:03 +000014006echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14007echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014008if test -z "$MACHDEP_OBJS"
14009then
Jack Jansene578a632001-08-15 01:27:14 +000014010 MACHDEP_OBJS=$extra_machdep_objs
14011else
14012 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014014echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14015echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014016
Guido van Rossum627b2d71993-12-24 10:39:16 +000014017# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000014089
Martin v. Löwisc3001752005-01-23 09:27:24 +000014090
14091
Neal Norwitz05a45592006-03-20 06:30:08 +000014092
14093
Martin v. Löwisd6320502004-08-12 13:45:08 +000014094for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
14095 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000014096 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000014097 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000014098 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000014099 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000014100 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000014101 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000014102 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000014103 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000014104 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000014105 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000014106do
Martin v. Löwis11437992002-04-12 09:54:03 +000014107as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14108echo "$as_me:$LINENO: checking for $ac_func" >&5
14109echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14110if eval "test \"\${$as_ac_var+set}\" = set"; then
14111 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112else
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014119/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14120 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14121#define $ac_func innocuous_$ac_func
14122
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014123/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014124 which can conflict with char $ac_func (); below.
14125 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014126 <limits.h> exists even on freestanding compilers. */
14127
14128#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014129# include <limits.h>
14130#else
14131# include <assert.h>
14132#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014133
14134#undef $ac_func
14135
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014136/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014137#ifdef __cplusplus
14138extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014139{
Martin v. Löwis11437992002-04-12 09:54:03 +000014140#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014141/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 builtin and then its argument prototype would still apply. */
14143char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014144/* The GNU C library defines this for functions which it implements
14145 to always fail with ENOSYS. Some functions are actually named
14146 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014147#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014148choke me
14149#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014150char (*f) () = $ac_func;
14151#endif
14152#ifdef __cplusplus
14153}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014154#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014155
Skip Montanaro6dead952003-09-25 14:50:04 +000014156int
14157main ()
14158{
14159return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ;
14161 return 0;
14162}
14163_ACEOF
14164rm -f conftest.$ac_objext conftest$ac_exeext
14165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014166 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014168 grep -v '^ *+' conftest.er1 >conftest.err
14169 rm -f conftest.er1
14170 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014173 { ac_try='test -z "$ac_c_werror_flag"
14174 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14176 (eval $ac_try) 2>&5
14177 ac_status=$?
14178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14179 (exit $ac_status); }; } &&
14180 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14182 (eval $ac_try) 2>&5
14183 ac_status=$?
14184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14185 (exit $ac_status); }; }; then
14186 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014187else
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014189sed 's/^/| /' conftest.$ac_ext >&5
14190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014192fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014193rm -f conftest.err conftest.$ac_objext \
14194 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014195fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014196echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14197echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14198if test `eval echo '${'$as_ac_var'}'` = yes; then
14199 cat >>confdefs.h <<_ACEOF
14200#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14201_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014203fi
14204done
14205
Michael W. Hudson54241132001-12-07 15:38:26 +000014206
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014207# For some functions, having a definition is not sufficient, since
14208# we want to take their address.
14209echo "$as_me:$LINENO: checking for chroot" >&5
14210echo $ECHO_N "checking for chroot... $ECHO_C" >&6
14211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014212/* confdefs.h. */
14213_ACEOF
14214cat confdefs.h >>conftest.$ac_ext
14215cat >>conftest.$ac_ext <<_ACEOF
14216/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014217#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014218int
14219main ()
14220{
14221void *x=chroot
14222 ;
14223 return 0;
14224}
14225_ACEOF
14226rm -f conftest.$ac_objext
14227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014228 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014230 grep -v '^ *+' conftest.er1 >conftest.err
14231 rm -f conftest.er1
14232 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014235 { ac_try='test -z "$ac_c_werror_flag"
14236 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14238 (eval $ac_try) 2>&5
14239 ac_status=$?
14240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14241 (exit $ac_status); }; } &&
14242 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14244 (eval $ac_try) 2>&5
14245 ac_status=$?
14246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14247 (exit $ac_status); }; }; then
14248
14249cat >>confdefs.h <<\_ACEOF
14250#define HAVE_CHROOT 1
14251_ACEOF
14252
14253 echo "$as_me:$LINENO: result: yes" >&5
14254echo "${ECHO_T}yes" >&6
14255else
14256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014257sed 's/^/| /' conftest.$ac_ext >&5
14258
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014259echo "$as_me:$LINENO: result: no" >&5
14260echo "${ECHO_T}no" >&6
14261
14262fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014263rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014264echo "$as_me:$LINENO: checking for link" >&5
14265echo $ECHO_N "checking for link... $ECHO_C" >&6
14266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014267/* confdefs.h. */
14268_ACEOF
14269cat confdefs.h >>conftest.$ac_ext
14270cat >>conftest.$ac_ext <<_ACEOF
14271/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014272#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014273int
14274main ()
14275{
14276void *x=link
14277 ;
14278 return 0;
14279}
14280_ACEOF
14281rm -f conftest.$ac_objext
14282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014283 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014285 grep -v '^ *+' conftest.er1 >conftest.err
14286 rm -f conftest.er1
14287 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14289 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014290 { ac_try='test -z "$ac_c_werror_flag"
14291 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293 (eval $ac_try) 2>&5
14294 ac_status=$?
14295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296 (exit $ac_status); }; } &&
14297 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14300 ac_status=$?
14301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303
14304cat >>confdefs.h <<\_ACEOF
14305#define HAVE_LINK 1
14306_ACEOF
14307
14308 echo "$as_me:$LINENO: result: yes" >&5
14309echo "${ECHO_T}yes" >&6
14310else
14311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014312sed 's/^/| /' conftest.$ac_ext >&5
14313
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014314echo "$as_me:$LINENO: result: no" >&5
14315echo "${ECHO_T}no" >&6
14316
14317fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014318rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014319echo "$as_me:$LINENO: checking for symlink" >&5
14320echo $ECHO_N "checking for symlink... $ECHO_C" >&6
14321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014322/* confdefs.h. */
14323_ACEOF
14324cat confdefs.h >>conftest.$ac_ext
14325cat >>conftest.$ac_ext <<_ACEOF
14326/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014327#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014328int
14329main ()
14330{
14331void *x=symlink
14332 ;
14333 return 0;
14334}
14335_ACEOF
14336rm -f conftest.$ac_objext
14337if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014338 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014340 grep -v '^ *+' conftest.er1 >conftest.err
14341 rm -f conftest.er1
14342 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14344 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014345 { ac_try='test -z "$ac_c_werror_flag"
14346 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014347 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14348 (eval $ac_try) 2>&5
14349 ac_status=$?
14350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351 (exit $ac_status); }; } &&
14352 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14354 (eval $ac_try) 2>&5
14355 ac_status=$?
14356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14357 (exit $ac_status); }; }; then
14358
14359cat >>confdefs.h <<\_ACEOF
14360#define HAVE_SYMLINK 1
14361_ACEOF
14362
14363 echo "$as_me:$LINENO: result: yes" >&5
14364echo "${ECHO_T}yes" >&6
14365else
14366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014367sed 's/^/| /' conftest.$ac_ext >&5
14368
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014369echo "$as_me:$LINENO: result: no" >&5
14370echo "${ECHO_T}no" >&6
14371
14372fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014374echo "$as_me:$LINENO: checking for fchdir" >&5
14375echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
14376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014377/* confdefs.h. */
14378_ACEOF
14379cat confdefs.h >>conftest.$ac_ext
14380cat >>conftest.$ac_ext <<_ACEOF
14381/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014382#include <unistd.h>
14383int
14384main ()
14385{
14386void *x=fchdir
14387 ;
14388 return 0;
14389}
14390_ACEOF
14391rm -f conftest.$ac_objext
14392if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014393 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014395 grep -v '^ *+' conftest.er1 >conftest.err
14396 rm -f conftest.er1
14397 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14399 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014400 { ac_try='test -z "$ac_c_werror_flag"
14401 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14403 (eval $ac_try) 2>&5
14404 ac_status=$?
14405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14406 (exit $ac_status); }; } &&
14407 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14409 (eval $ac_try) 2>&5
14410 ac_status=$?
14411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14412 (exit $ac_status); }; }; then
14413
14414cat >>confdefs.h <<\_ACEOF
14415#define HAVE_FCHDIR 1
14416_ACEOF
14417
14418 echo "$as_me:$LINENO: result: yes" >&5
14419echo "${ECHO_T}yes" >&6
14420else
14421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014422sed 's/^/| /' conftest.$ac_ext >&5
14423
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014424echo "$as_me:$LINENO: result: no" >&5
14425echo "${ECHO_T}no" >&6
14426
14427fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014429echo "$as_me:$LINENO: checking for fsync" >&5
14430echo $ECHO_N "checking for fsync... $ECHO_C" >&6
14431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014432/* confdefs.h. */
14433_ACEOF
14434cat confdefs.h >>conftest.$ac_ext
14435cat >>conftest.$ac_ext <<_ACEOF
14436/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014437#include <unistd.h>
14438int
14439main ()
14440{
14441void *x=fsync
14442 ;
14443 return 0;
14444}
14445_ACEOF
14446rm -f conftest.$ac_objext
14447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014448 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014450 grep -v '^ *+' conftest.er1 >conftest.err
14451 rm -f conftest.er1
14452 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14454 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014455 { ac_try='test -z "$ac_c_werror_flag"
14456 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14458 (eval $ac_try) 2>&5
14459 ac_status=$?
14460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14461 (exit $ac_status); }; } &&
14462 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14464 (eval $ac_try) 2>&5
14465 ac_status=$?
14466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14467 (exit $ac_status); }; }; then
14468
14469cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014470#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014471_ACEOF
14472
14473 echo "$as_me:$LINENO: result: yes" >&5
14474echo "${ECHO_T}yes" >&6
14475else
14476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014477sed 's/^/| /' conftest.$ac_ext >&5
14478
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014479echo "$as_me:$LINENO: result: no" >&5
14480echo "${ECHO_T}no" >&6
14481
14482fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014484echo "$as_me:$LINENO: checking for fdatasync" >&5
14485echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
14486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014487/* confdefs.h. */
14488_ACEOF
14489cat confdefs.h >>conftest.$ac_ext
14490cat >>conftest.$ac_ext <<_ACEOF
14491/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014492#include <unistd.h>
14493int
14494main ()
14495{
14496void *x=fdatasync
14497 ;
14498 return 0;
14499}
14500_ACEOF
14501rm -f conftest.$ac_objext
14502if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014503 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014505 grep -v '^ *+' conftest.er1 >conftest.err
14506 rm -f conftest.er1
14507 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014510 { ac_try='test -z "$ac_c_werror_flag"
14511 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14513 (eval $ac_try) 2>&5
14514 ac_status=$?
14515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14516 (exit $ac_status); }; } &&
14517 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14519 (eval $ac_try) 2>&5
14520 ac_status=$?
14521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522 (exit $ac_status); }; }; then
14523
14524cat >>confdefs.h <<\_ACEOF
14525#define HAVE_FDATASYNC 1
14526_ACEOF
14527
14528 echo "$as_me:$LINENO: result: yes" >&5
14529echo "${ECHO_T}yes" >&6
14530else
14531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014532sed 's/^/| /' conftest.$ac_ext >&5
14533
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014534echo "$as_me:$LINENO: result: no" >&5
14535echo "${ECHO_T}no" >&6
14536
14537fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014538rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014539
Martin v. Löwisd5843682002-11-21 20:41:28 +000014540# On some systems (eg. FreeBSD 5), we would find a definition of the
14541# functions ctermid_r, setgroups in the library, but no prototype
14542# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14543# address to avoid compiler warnings and potential miscompilations
14544# because of the missing prototypes.
14545
14546echo "$as_me:$LINENO: checking for ctermid_r" >&5
14547echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
14548cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014549/* confdefs.h. */
14550_ACEOF
14551cat confdefs.h >>conftest.$ac_ext
14552cat >>conftest.$ac_ext <<_ACEOF
14553/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014554
14555#include "confdefs.h"
14556#include <stdio.h>
14557
Martin v. Löwisd5843682002-11-21 20:41:28 +000014558int
14559main ()
14560{
14561void* p = ctermid_r
14562 ;
14563 return 0;
14564}
14565_ACEOF
14566rm -f conftest.$ac_objext
14567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014568 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014570 grep -v '^ *+' conftest.er1 >conftest.err
14571 rm -f conftest.er1
14572 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14574 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014575 { ac_try='test -z "$ac_c_werror_flag"
14576 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14578 (eval $ac_try) 2>&5
14579 ac_status=$?
14580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14581 (exit $ac_status); }; } &&
14582 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14584 (eval $ac_try) 2>&5
14585 ac_status=$?
14586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14587 (exit $ac_status); }; }; then
14588
14589cat >>confdefs.h <<\_ACEOF
14590#define HAVE_CTERMID_R 1
14591_ACEOF
14592
14593 echo "$as_me:$LINENO: result: yes" >&5
14594echo "${ECHO_T}yes" >&6
14595else
14596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014597sed 's/^/| /' conftest.$ac_ext >&5
14598
Martin v. Löwisd5843682002-11-21 20:41:28 +000014599echo "$as_me:$LINENO: result: no" >&5
14600echo "${ECHO_T}no" >&6
14601
14602fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014603rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014604
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014605echo "$as_me:$LINENO: checking for flock" >&5
14606echo $ECHO_N "checking for flock... $ECHO_C" >&6
14607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014608/* confdefs.h. */
14609_ACEOF
14610cat confdefs.h >>conftest.$ac_ext
14611cat >>conftest.$ac_ext <<_ACEOF
14612/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014613
14614#include "confdefs.h"
14615#include <sys/file.h>
14616
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014617int
14618main ()
14619{
14620void* p = flock
14621 ;
14622 return 0;
14623}
14624_ACEOF
14625rm -f conftest.$ac_objext
14626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014627 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014629 grep -v '^ *+' conftest.er1 >conftest.err
14630 rm -f conftest.er1
14631 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14633 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014634 { ac_try='test -z "$ac_c_werror_flag"
14635 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14637 (eval $ac_try) 2>&5
14638 ac_status=$?
14639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14640 (exit $ac_status); }; } &&
14641 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14643 (eval $ac_try) 2>&5
14644 ac_status=$?
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); }; }; then
14647
14648cat >>confdefs.h <<\_ACEOF
14649#define HAVE_FLOCK 1
14650_ACEOF
14651
14652 echo "$as_me:$LINENO: result: yes" >&5
14653echo "${ECHO_T}yes" >&6
14654else
14655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014656sed 's/^/| /' conftest.$ac_ext >&5
14657
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014658echo "$as_me:$LINENO: result: no" >&5
14659echo "${ECHO_T}no" >&6
14660
14661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014662rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014663
14664echo "$as_me:$LINENO: checking for getpagesize" >&5
14665echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014667/* confdefs.h. */
14668_ACEOF
14669cat confdefs.h >>conftest.$ac_ext
14670cat >>conftest.$ac_ext <<_ACEOF
14671/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014672
14673#include "confdefs.h"
14674#include <unistd.h>
14675
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014676int
14677main ()
14678{
14679void* p = getpagesize
14680 ;
14681 return 0;
14682}
14683_ACEOF
14684rm -f conftest.$ac_objext
14685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014686 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014688 grep -v '^ *+' conftest.er1 >conftest.err
14689 rm -f conftest.er1
14690 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14692 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014693 { ac_try='test -z "$ac_c_werror_flag"
14694 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14696 (eval $ac_try) 2>&5
14697 ac_status=$?
14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14699 (exit $ac_status); }; } &&
14700 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14702 (eval $ac_try) 2>&5
14703 ac_status=$?
14704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14705 (exit $ac_status); }; }; then
14706
14707cat >>confdefs.h <<\_ACEOF
14708#define HAVE_GETPAGESIZE 1
14709_ACEOF
14710
14711 echo "$as_me:$LINENO: result: yes" >&5
14712echo "${ECHO_T}yes" >&6
14713else
14714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014715sed 's/^/| /' conftest.$ac_ext >&5
14716
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014717echo "$as_me:$LINENO: result: no" >&5
14718echo "${ECHO_T}no" >&6
14719
14720fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014721rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014722
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014723for ac_prog in true
14724do
14725 # Extract the first word of "$ac_prog", so it can be a program name with args.
14726set dummy $ac_prog; ac_word=$2
14727echo "$as_me:$LINENO: checking for $ac_word" >&5
14728echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14729if test "${ac_cv_prog_TRUE+set}" = set; then
14730 echo $ECHO_N "(cached) $ECHO_C" >&6
14731else
14732 if test -n "$TRUE"; then
14733 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14734else
14735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14736for as_dir in $PATH
14737do
14738 IFS=$as_save_IFS
14739 test -z "$as_dir" && as_dir=.
14740 for ac_exec_ext in '' $ac_executable_extensions; do
14741 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14742 ac_cv_prog_TRUE="$ac_prog"
14743 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14744 break 2
14745 fi
14746done
14747done
14748
14749fi
14750fi
14751TRUE=$ac_cv_prog_TRUE
14752if test -n "$TRUE"; then
14753 echo "$as_me:$LINENO: result: $TRUE" >&5
14754echo "${ECHO_T}$TRUE" >&6
14755else
14756 echo "$as_me:$LINENO: result: no" >&5
14757echo "${ECHO_T}no" >&6
14758fi
14759
14760 test -n "$TRUE" && break
14761done
14762test -n "$TRUE" || TRUE="/bin/true"
14763
14764
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014765echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14766echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14767if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14768 echo $ECHO_N "(cached) $ECHO_C" >&6
14769else
14770 ac_check_lib_save_LIBS=$LIBS
14771LIBS="-lc $LIBS"
14772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* confdefs.h. */
14774_ACEOF
14775cat confdefs.h >>conftest.$ac_ext
14776cat >>conftest.$ac_ext <<_ACEOF
14777/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014778
14779/* Override any gcc2 internal prototype to avoid an error. */
14780#ifdef __cplusplus
14781extern "C"
14782#endif
14783/* We use char because int might match the return type of a gcc2
14784 builtin and then its argument prototype would still apply. */
14785char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014786int
14787main ()
14788{
14789inet_aton ();
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794rm -f conftest.$ac_objext conftest$ac_exeext
14795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014796 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014798 grep -v '^ *+' conftest.er1 >conftest.err
14799 rm -f conftest.er1
14800 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014803 { ac_try='test -z "$ac_c_werror_flag"
14804 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14806 (eval $ac_try) 2>&5
14807 ac_status=$?
14808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809 (exit $ac_status); }; } &&
14810 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14812 (eval $ac_try) 2>&5
14813 ac_status=$?
14814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815 (exit $ac_status); }; }; then
14816 ac_cv_lib_c_inet_aton=yes
14817else
14818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014819sed 's/^/| /' conftest.$ac_ext >&5
14820
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014821ac_cv_lib_c_inet_aton=no
14822fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014823rm -f conftest.err conftest.$ac_objext \
14824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014825LIBS=$ac_check_lib_save_LIBS
14826fi
14827echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14828echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14829if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014830 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014831else
14832
14833echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14834echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14835if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14836 echo $ECHO_N "(cached) $ECHO_C" >&6
14837else
14838 ac_check_lib_save_LIBS=$LIBS
14839LIBS="-lresolv $LIBS"
14840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014841/* confdefs.h. */
14842_ACEOF
14843cat confdefs.h >>conftest.$ac_ext
14844cat >>conftest.$ac_ext <<_ACEOF
14845/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014846
14847/* Override any gcc2 internal prototype to avoid an error. */
14848#ifdef __cplusplus
14849extern "C"
14850#endif
14851/* We use char because int might match the return type of a gcc2
14852 builtin and then its argument prototype would still apply. */
14853char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014854int
14855main ()
14856{
14857inet_aton ();
14858 ;
14859 return 0;
14860}
14861_ACEOF
14862rm -f conftest.$ac_objext conftest$ac_exeext
14863if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014864 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014866 grep -v '^ *+' conftest.er1 >conftest.err
14867 rm -f conftest.er1
14868 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14870 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014871 { ac_try='test -z "$ac_c_werror_flag"
14872 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14874 (eval $ac_try) 2>&5
14875 ac_status=$?
14876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14877 (exit $ac_status); }; } &&
14878 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14880 (eval $ac_try) 2>&5
14881 ac_status=$?
14882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14883 (exit $ac_status); }; }; then
14884 ac_cv_lib_resolv_inet_aton=yes
14885else
14886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014887sed 's/^/| /' conftest.$ac_ext >&5
14888
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014889ac_cv_lib_resolv_inet_aton=no
14890fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014891rm -f conftest.err conftest.$ac_objext \
14892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014893LIBS=$ac_check_lib_save_LIBS
14894fi
14895echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14896echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14897if test $ac_cv_lib_resolv_inet_aton = yes; then
14898 cat >>confdefs.h <<_ACEOF
14899#define HAVE_LIBRESOLV 1
14900_ACEOF
14901
14902 LIBS="-lresolv $LIBS"
14903
14904fi
14905
14906
14907fi
14908
14909
Martin v. Löwise9416172003-05-03 10:12:45 +000014910echo "$as_me:$LINENO: checking for hstrerror" >&5
14911echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014913/* confdefs.h. */
14914_ACEOF
14915cat confdefs.h >>conftest.$ac_ext
14916cat >>conftest.$ac_ext <<_ACEOF
14917/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014918
14919#include "confdefs.h"
14920#include <netdb.h>
14921
Martin v. Löwise9416172003-05-03 10:12:45 +000014922int
14923main ()
14924{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014925void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014926 ;
14927 return 0;
14928}
14929_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014930rm -f conftest.$ac_objext conftest$ac_exeext
14931if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014932 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014934 grep -v '^ *+' conftest.er1 >conftest.err
14935 rm -f conftest.er1
14936 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14938 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014939 { ac_try='test -z "$ac_c_werror_flag"
14940 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014941 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14942 (eval $ac_try) 2>&5
14943 ac_status=$?
14944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14945 (exit $ac_status); }; } &&
14946 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14948 (eval $ac_try) 2>&5
14949 ac_status=$?
14950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951 (exit $ac_status); }; }; then
14952
14953cat >>confdefs.h <<\_ACEOF
14954#define HAVE_HSTRERROR 1
14955_ACEOF
14956
14957 echo "$as_me:$LINENO: result: yes" >&5
14958echo "${ECHO_T}yes" >&6
14959else
14960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014961sed 's/^/| /' conftest.$ac_ext >&5
14962
Martin v. Löwise9416172003-05-03 10:12:45 +000014963echo "$as_me:$LINENO: result: no" >&5
14964echo "${ECHO_T}no" >&6
14965
14966fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014967rm -f conftest.err conftest.$ac_objext \
14968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014969
14970echo "$as_me:$LINENO: checking for inet_aton" >&5
14971echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014973/* confdefs.h. */
14974_ACEOF
14975cat confdefs.h >>conftest.$ac_ext
14976cat >>conftest.$ac_ext <<_ACEOF
14977/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014978
14979#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000014980#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014981#include <sys/socket.h>
14982#include <netinet/in.h>
14983#include <arpa/inet.h>
14984
Martin v. Löwise9416172003-05-03 10:12:45 +000014985int
14986main ()
14987{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014988void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014989 ;
14990 return 0;
14991}
14992_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014993rm -f conftest.$ac_objext conftest$ac_exeext
14994if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014995 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 grep -v '^ *+' conftest.er1 >conftest.err
14998 rm -f conftest.er1
14999 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15001 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015002 { ac_try='test -z "$ac_c_werror_flag"
15003 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15005 (eval $ac_try) 2>&5
15006 ac_status=$?
15007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15008 (exit $ac_status); }; } &&
15009 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15011 (eval $ac_try) 2>&5
15012 ac_status=$?
15013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15014 (exit $ac_status); }; }; then
15015
15016cat >>confdefs.h <<\_ACEOF
15017#define HAVE_INET_ATON 1
15018_ACEOF
15019
15020 echo "$as_me:$LINENO: result: yes" >&5
15021echo "${ECHO_T}yes" >&6
15022else
15023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015024sed 's/^/| /' conftest.$ac_ext >&5
15025
Martin v. Löwise9416172003-05-03 10:12:45 +000015026echo "$as_me:$LINENO: result: no" >&5
15027echo "${ECHO_T}no" >&6
15028
15029fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015030rm -f conftest.err conftest.$ac_objext \
15031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015032
15033echo "$as_me:$LINENO: checking for inet_pton" >&5
15034echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
15035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015036/* confdefs.h. */
15037_ACEOF
15038cat confdefs.h >>conftest.$ac_ext
15039cat >>conftest.$ac_ext <<_ACEOF
15040/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015041
15042#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015043#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015044#include <sys/socket.h>
15045#include <netinet/in.h>
15046#include <arpa/inet.h>
15047
Martin v. Löwise9416172003-05-03 10:12:45 +000015048int
15049main ()
15050{
15051void* p = inet_pton
15052 ;
15053 return 0;
15054}
15055_ACEOF
15056rm -f conftest.$ac_objext
15057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015058 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015060 grep -v '^ *+' conftest.er1 >conftest.err
15061 rm -f conftest.er1
15062 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15064 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015065 { ac_try='test -z "$ac_c_werror_flag"
15066 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15068 (eval $ac_try) 2>&5
15069 ac_status=$?
15070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15071 (exit $ac_status); }; } &&
15072 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000015073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15074 (eval $ac_try) 2>&5
15075 ac_status=$?
15076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15077 (exit $ac_status); }; }; then
15078
15079cat >>confdefs.h <<\_ACEOF
15080#define HAVE_INET_PTON 1
15081_ACEOF
15082
15083 echo "$as_me:$LINENO: result: yes" >&5
15084echo "${ECHO_T}yes" >&6
15085else
15086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015087sed 's/^/| /' conftest.$ac_ext >&5
15088
Martin v. Löwise9416172003-05-03 10:12:45 +000015089echo "$as_me:$LINENO: result: no" >&5
15090echo "${ECHO_T}no" >&6
15091
15092fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015094
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015095# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000015096echo "$as_me:$LINENO: checking for setgroups" >&5
15097echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
15098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015099/* confdefs.h. */
15100_ACEOF
15101cat confdefs.h >>conftest.$ac_ext
15102cat >>conftest.$ac_ext <<_ACEOF
15103/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015104
15105#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015106#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015107#ifdef HAVE_GRP_H
15108#include <grp.h>
15109#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000015110
Martin v. Löwisd5843682002-11-21 20:41:28 +000015111int
15112main ()
15113{
15114void* p = setgroups
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119rm -f conftest.$ac_objext
15120if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015121 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015123 grep -v '^ *+' conftest.er1 >conftest.err
15124 rm -f conftest.er1
15125 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15127 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015128 { ac_try='test -z "$ac_c_werror_flag"
15129 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15131 (eval $ac_try) 2>&5
15132 ac_status=$?
15133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134 (exit $ac_status); }; } &&
15135 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000015136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15137 (eval $ac_try) 2>&5
15138 ac_status=$?
15139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140 (exit $ac_status); }; }; then
15141
15142cat >>confdefs.h <<\_ACEOF
15143#define HAVE_SETGROUPS 1
15144_ACEOF
15145
15146 echo "$as_me:$LINENO: result: yes" >&5
15147echo "${ECHO_T}yes" >&6
15148else
15149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015150sed 's/^/| /' conftest.$ac_ext >&5
15151
Martin v. Löwisd5843682002-11-21 20:41:28 +000015152echo "$as_me:$LINENO: result: no" >&5
15153echo "${ECHO_T}no" >&6
15154
15155fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015156rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015158# check for openpty and forkpty
15159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015161for ac_func in openpty
15162do
Martin v. Löwis11437992002-04-12 09:54:03 +000015163as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15164echo "$as_me:$LINENO: checking for $ac_func" >&5
15165echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15166if eval "test \"\${$as_ac_var+set}\" = set"; then
15167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015170/* confdefs.h. */
15171_ACEOF
15172cat confdefs.h >>conftest.$ac_ext
15173cat >>conftest.$ac_ext <<_ACEOF
15174/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015175/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15176 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15177#define $ac_func innocuous_$ac_func
15178
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015179/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015180 which can conflict with char $ac_func (); below.
15181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015182 <limits.h> exists even on freestanding compilers. */
15183
15184#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015185# include <limits.h>
15186#else
15187# include <assert.h>
15188#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015189
15190#undef $ac_func
15191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015192/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015195{
Martin v. Löwis11437992002-04-12 09:54:03 +000015196#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015197/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 builtin and then its argument prototype would still apply. */
15199char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015200/* The GNU C library defines this for functions which it implements
15201 to always fail with ENOSYS. Some functions are actually named
15202 something starting with __ and the normal name is an alias. */
15203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15204choke me
15205#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015206char (*f) () = $ac_func;
15207#endif
15208#ifdef __cplusplus
15209}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015210#endif
15211
Skip Montanaro6dead952003-09-25 14:50:04 +000015212int
15213main ()
15214{
15215return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ;
15217 return 0;
15218}
15219_ACEOF
15220rm -f conftest.$ac_objext conftest$ac_exeext
15221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015222 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015224 grep -v '^ *+' conftest.er1 >conftest.err
15225 rm -f conftest.er1
15226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15228 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015229 { ac_try='test -z "$ac_c_werror_flag"
15230 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15232 (eval $ac_try) 2>&5
15233 ac_status=$?
15234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15235 (exit $ac_status); }; } &&
15236 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15238 (eval $ac_try) 2>&5
15239 ac_status=$?
15240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15241 (exit $ac_status); }; }; then
15242 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015243else
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015245sed 's/^/| /' conftest.$ac_ext >&5
15246
Martin v. Löwis11437992002-04-12 09:54:03 +000015247eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015248fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249rm -f conftest.err conftest.$ac_objext \
15250 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015251fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015252echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15253echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15254if test `eval echo '${'$as_ac_var'}'` = yes; then
15255 cat >>confdefs.h <<_ACEOF
15256#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15257_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015259else
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15261echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15262if test "${ac_cv_lib_util_openpty+set}" = set; then
15263 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015264else
Martin v. Löwis11437992002-04-12 09:54:03 +000015265 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015266LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015268/* confdefs.h. */
15269_ACEOF
15270cat confdefs.h >>conftest.$ac_ext
15271cat >>conftest.$ac_ext <<_ACEOF
15272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015273
Fred Drake8cef4cf2000-06-28 16:40:38 +000015274/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015275#ifdef __cplusplus
15276extern "C"
15277#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015278/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 builtin and then its argument prototype would still apply. */
15280char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015281int
15282main ()
15283{
15284openpty ();
15285 ;
15286 return 0;
15287}
15288_ACEOF
15289rm -f conftest.$ac_objext conftest$ac_exeext
15290if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015291 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015293 grep -v '^ *+' conftest.er1 >conftest.err
15294 rm -f conftest.er1
15295 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15297 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015298 { ac_try='test -z "$ac_c_werror_flag"
15299 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15301 (eval $ac_try) 2>&5
15302 ac_status=$?
15303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304 (exit $ac_status); }; } &&
15305 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015306 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15307 (eval $ac_try) 2>&5
15308 ac_status=$?
15309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15310 (exit $ac_status); }; }; then
15311 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015312else
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015314sed 's/^/| /' conftest.$ac_ext >&5
15315
Martin v. Löwis11437992002-04-12 09:54:03 +000015316ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015317fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015318rm -f conftest.err conftest.$ac_objext \
15319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015320LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015322echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
15323echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15324if test $ac_cv_lib_util_openpty = yes; then
15325 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015326#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015327_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015328 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015329else
15330 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
15331echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
15332if test "${ac_cv_lib_bsd_openpty+set}" = set; then
15333 echo $ECHO_N "(cached) $ECHO_C" >&6
15334else
15335 ac_check_lib_save_LIBS=$LIBS
15336LIBS="-lbsd $LIBS"
15337cat >conftest.$ac_ext <<_ACEOF
15338/* confdefs.h. */
15339_ACEOF
15340cat confdefs.h >>conftest.$ac_ext
15341cat >>conftest.$ac_ext <<_ACEOF
15342/* end confdefs.h. */
15343
15344/* Override any gcc2 internal prototype to avoid an error. */
15345#ifdef __cplusplus
15346extern "C"
15347#endif
15348/* We use char because int might match the return type of a gcc2
15349 builtin and then its argument prototype would still apply. */
15350char openpty ();
15351int
15352main ()
15353{
15354openpty ();
15355 ;
15356 return 0;
15357}
15358_ACEOF
15359rm -f conftest.$ac_objext conftest$ac_exeext
15360if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15361 (eval $ac_link) 2>conftest.er1
15362 ac_status=$?
15363 grep -v '^ *+' conftest.er1 >conftest.err
15364 rm -f conftest.er1
15365 cat conftest.err >&5
15366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15367 (exit $ac_status); } &&
15368 { ac_try='test -z "$ac_c_werror_flag"
15369 || test ! -s conftest.err'
15370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15371 (eval $ac_try) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); }; } &&
15375 { ac_try='test -s conftest$ac_exeext'
15376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15377 (eval $ac_try) 2>&5
15378 ac_status=$?
15379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15380 (exit $ac_status); }; }; then
15381 ac_cv_lib_bsd_openpty=yes
15382else
15383 echo "$as_me: failed program was:" >&5
15384sed 's/^/| /' conftest.$ac_ext >&5
15385
15386ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015387fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015388rm -f conftest.err conftest.$ac_objext \
15389 conftest$ac_exeext conftest.$ac_ext
15390LIBS=$ac_check_lib_save_LIBS
15391fi
15392echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
15393echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
15394if test $ac_cv_lib_bsd_openpty = yes; then
15395 cat >>confdefs.h <<\_ACEOF
15396#define HAVE_OPENPTY 1
15397_ACEOF
15398 LIBS="$LIBS -lbsd"
15399fi
15400
15401
15402fi
15403
Fred Drake8cef4cf2000-06-28 16:40:38 +000015404
15405fi
15406done
15407
Martin v. Löwis11437992002-04-12 09:54:03 +000015408
Fred Drake8cef4cf2000-06-28 16:40:38 +000015409for ac_func in forkpty
15410do
Martin v. Löwis11437992002-04-12 09:54:03 +000015411as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15412echo "$as_me:$LINENO: checking for $ac_func" >&5
15413echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15414if eval "test \"\${$as_ac_var+set}\" = set"; then
15415 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015416else
Martin v. Löwis11437992002-04-12 09:54:03 +000015417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015418/* confdefs.h. */
15419_ACEOF
15420cat confdefs.h >>conftest.$ac_ext
15421cat >>conftest.$ac_ext <<_ACEOF
15422/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015423/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15424 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15425#define $ac_func innocuous_$ac_func
15426
Fred Drake8cef4cf2000-06-28 16:40:38 +000015427/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015428 which can conflict with char $ac_func (); below.
15429 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015430 <limits.h> exists even on freestanding compilers. */
15431
15432#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015433# include <limits.h>
15434#else
15435# include <assert.h>
15436#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015437
15438#undef $ac_func
15439
Fred Drake8cef4cf2000-06-28 16:40:38 +000015440/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015441#ifdef __cplusplus
15442extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015443{
Martin v. Löwis11437992002-04-12 09:54:03 +000015444#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015445/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 builtin and then its argument prototype would still apply. */
15447char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000015448/* The GNU C library defines this for functions which it implements
15449 to always fail with ENOSYS. Some functions are actually named
15450 something starting with __ and the normal name is an alias. */
15451#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15452choke me
15453#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015454char (*f) () = $ac_func;
15455#endif
15456#ifdef __cplusplus
15457}
Fred Drake8cef4cf2000-06-28 16:40:38 +000015458#endif
15459
Skip Montanaro6dead952003-09-25 14:50:04 +000015460int
15461main ()
15462{
15463return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 ;
15465 return 0;
15466}
15467_ACEOF
15468rm -f conftest.$ac_objext conftest$ac_exeext
15469if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015470 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015472 grep -v '^ *+' conftest.er1 >conftest.err
15473 rm -f conftest.er1
15474 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15476 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015477 { ac_try='test -z "$ac_c_werror_flag"
15478 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480 (eval $ac_try) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); }; } &&
15484 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15486 (eval $ac_try) 2>&5
15487 ac_status=$?
15488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15489 (exit $ac_status); }; }; then
15490 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015491else
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015493sed 's/^/| /' conftest.$ac_ext >&5
15494
Martin v. Löwis11437992002-04-12 09:54:03 +000015495eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015496fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015497rm -f conftest.err conftest.$ac_objext \
15498 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015499fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015500echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15501echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15502if test `eval echo '${'$as_ac_var'}'` = yes; then
15503 cat >>confdefs.h <<_ACEOF
15504#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15505_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015506
Fred Drake8cef4cf2000-06-28 16:40:38 +000015507else
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
15509echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
15510if test "${ac_cv_lib_util_forkpty+set}" = set; then
15511 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015512else
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015514LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015515cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015516/* confdefs.h. */
15517_ACEOF
15518cat confdefs.h >>conftest.$ac_ext
15519cat >>conftest.$ac_ext <<_ACEOF
15520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015521
Fred Drake8cef4cf2000-06-28 16:40:38 +000015522/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015523#ifdef __cplusplus
15524extern "C"
15525#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000015526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 builtin and then its argument prototype would still apply. */
15528char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015529int
15530main ()
15531{
15532forkpty ();
15533 ;
15534 return 0;
15535}
15536_ACEOF
15537rm -f conftest.$ac_objext conftest$ac_exeext
15538if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015539 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015541 grep -v '^ *+' conftest.er1 >conftest.err
15542 rm -f conftest.er1
15543 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15545 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015546 { ac_try='test -z "$ac_c_werror_flag"
15547 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15549 (eval $ac_try) 2>&5
15550 ac_status=$?
15551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15552 (exit $ac_status); }; } &&
15553 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15555 (eval $ac_try) 2>&5
15556 ac_status=$?
15557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15558 (exit $ac_status); }; }; then
15559 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015560else
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015562sed 's/^/| /' conftest.$ac_ext >&5
15563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015565fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015566rm -f conftest.err conftest.$ac_objext \
15567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015568LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015570echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
15571echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
15572if test $ac_cv_lib_util_forkpty = yes; then
15573 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015574#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015575_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015576 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015577else
15578 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
15579echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
15580if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
15581 echo $ECHO_N "(cached) $ECHO_C" >&6
15582else
15583 ac_check_lib_save_LIBS=$LIBS
15584LIBS="-lbsd $LIBS"
15585cat >conftest.$ac_ext <<_ACEOF
15586/* confdefs.h. */
15587_ACEOF
15588cat confdefs.h >>conftest.$ac_ext
15589cat >>conftest.$ac_ext <<_ACEOF
15590/* end confdefs.h. */
15591
15592/* Override any gcc2 internal prototype to avoid an error. */
15593#ifdef __cplusplus
15594extern "C"
15595#endif
15596/* We use char because int might match the return type of a gcc2
15597 builtin and then its argument prototype would still apply. */
15598char forkpty ();
15599int
15600main ()
15601{
15602forkpty ();
15603 ;
15604 return 0;
15605}
15606_ACEOF
15607rm -f conftest.$ac_objext conftest$ac_exeext
15608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15609 (eval $ac_link) 2>conftest.er1
15610 ac_status=$?
15611 grep -v '^ *+' conftest.er1 >conftest.err
15612 rm -f conftest.er1
15613 cat conftest.err >&5
15614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15615 (exit $ac_status); } &&
15616 { ac_try='test -z "$ac_c_werror_flag"
15617 || test ! -s conftest.err'
15618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15619 (eval $ac_try) 2>&5
15620 ac_status=$?
15621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15622 (exit $ac_status); }; } &&
15623 { ac_try='test -s conftest$ac_exeext'
15624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15625 (eval $ac_try) 2>&5
15626 ac_status=$?
15627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15628 (exit $ac_status); }; }; then
15629 ac_cv_lib_bsd_forkpty=yes
15630else
15631 echo "$as_me: failed program was:" >&5
15632sed 's/^/| /' conftest.$ac_ext >&5
15633
15634ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015635fi
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015636rm -f conftest.err conftest.$ac_objext \
15637 conftest$ac_exeext conftest.$ac_ext
15638LIBS=$ac_check_lib_save_LIBS
15639fi
15640echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
15641echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
15642if test $ac_cv_lib_bsd_forkpty = yes; then
15643 cat >>confdefs.h <<\_ACEOF
15644#define HAVE_FORKPTY 1
15645_ACEOF
15646 LIBS="$LIBS -lbsd"
15647fi
15648
15649
15650fi
15651
Fred Drake8cef4cf2000-06-28 16:40:38 +000015652
15653fi
15654done
15655
Jack Jansendd19cf82001-12-06 22:36:17 +000015656
Michael W. Hudson54241132001-12-07 15:38:26 +000015657# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015658
15659
15660
15661
15662
15663
Fred Drake8cef4cf2000-06-28 16:40:38 +000015664for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
15665do
Martin v. Löwis11437992002-04-12 09:54:03 +000015666as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15667echo "$as_me:$LINENO: checking for $ac_func" >&5
15668echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15669if eval "test \"\${$as_ac_var+set}\" = set"; then
15670 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015671else
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015673/* confdefs.h. */
15674_ACEOF
15675cat confdefs.h >>conftest.$ac_ext
15676cat >>conftest.$ac_ext <<_ACEOF
15677/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015678/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15679 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15680#define $ac_func innocuous_$ac_func
15681
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015682/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015683 which can conflict with char $ac_func (); below.
15684 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015685 <limits.h> exists even on freestanding compilers. */
15686
15687#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015688# include <limits.h>
15689#else
15690# include <assert.h>
15691#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015692
15693#undef $ac_func
15694
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015695/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015696#ifdef __cplusplus
15697extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015698{
Martin v. Löwis11437992002-04-12 09:54:03 +000015699#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015700/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 builtin and then its argument prototype would still apply. */
15702char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015703/* The GNU C library defines this for functions which it implements
15704 to always fail with ENOSYS. Some functions are actually named
15705 something starting with __ and the normal name is an alias. */
15706#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15707choke me
15708#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015709char (*f) () = $ac_func;
15710#endif
15711#ifdef __cplusplus
15712}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000015713#endif
15714
Skip Montanaro6dead952003-09-25 14:50:04 +000015715int
15716main ()
15717{
15718return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ;
15720 return 0;
15721}
15722_ACEOF
15723rm -f conftest.$ac_objext conftest$ac_exeext
15724if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015725 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015727 grep -v '^ *+' conftest.er1 >conftest.err
15728 rm -f conftest.er1
15729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15731 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015732 { ac_try='test -z "$ac_c_werror_flag"
15733 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15735 (eval $ac_try) 2>&5
15736 ac_status=$?
15737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15738 (exit $ac_status); }; } &&
15739 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15741 (eval $ac_try) 2>&5
15742 ac_status=$?
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); }; }; then
15745 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015746else
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015748sed 's/^/| /' conftest.$ac_ext >&5
15749
Martin v. Löwis11437992002-04-12 09:54:03 +000015750eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015751fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015752rm -f conftest.err conftest.$ac_objext \
15753 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015755echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15756echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15757if test `eval echo '${'$as_ac_var'}'` = yes; then
15758 cat >>confdefs.h <<_ACEOF
15759#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15760_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000015761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015762fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015763done
15764
Michael W. Hudson54241132001-12-07 15:38:26 +000015765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766
15767
15768
15769
15770
Martin v. Löwis1142de32002-03-29 16:28:31 +000015771for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000015772do
Martin v. Löwis11437992002-04-12 09:54:03 +000015773as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15774echo "$as_me:$LINENO: checking for $ac_func" >&5
15775echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15776if eval "test \"\${$as_ac_var+set}\" = set"; then
15777 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015778else
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015780/* confdefs.h. */
15781_ACEOF
15782cat confdefs.h >>conftest.$ac_ext
15783cat >>conftest.$ac_ext <<_ACEOF
15784/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015785/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15786 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15787#define $ac_func innocuous_$ac_func
15788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015789/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015790 which can conflict with char $ac_func (); below.
15791 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015792 <limits.h> exists even on freestanding compilers. */
15793
15794#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015795# include <limits.h>
15796#else
15797# include <assert.h>
15798#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015799
15800#undef $ac_func
15801
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015802/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015803#ifdef __cplusplus
15804extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015805{
Martin v. Löwis11437992002-04-12 09:54:03 +000015806#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015807/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 builtin and then its argument prototype would still apply. */
15809char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015810/* The GNU C library defines this for functions which it implements
15811 to always fail with ENOSYS. Some functions are actually named
15812 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015813#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015814choke me
15815#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015816char (*f) () = $ac_func;
15817#endif
15818#ifdef __cplusplus
15819}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015820#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015821
Skip Montanaro6dead952003-09-25 14:50:04 +000015822int
15823main ()
15824{
15825return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 ;
15827 return 0;
15828}
15829_ACEOF
15830rm -f conftest.$ac_objext conftest$ac_exeext
15831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015834 grep -v '^ *+' conftest.er1 >conftest.err
15835 rm -f conftest.er1
15836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15838 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015839 { ac_try='test -z "$ac_c_werror_flag"
15840 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15842 (eval $ac_try) 2>&5
15843 ac_status=$?
15844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15845 (exit $ac_status); }; } &&
15846 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15848 (eval $ac_try) 2>&5
15849 ac_status=$?
15850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15851 (exit $ac_status); }; }; then
15852 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015853else
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015855sed 's/^/| /' conftest.$ac_ext >&5
15856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015858fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015859rm -f conftest.err conftest.$ac_objext \
15860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015862echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15863echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15864if test `eval echo '${'$as_ac_var'}'` = yes; then
15865 cat >>confdefs.h <<_ACEOF
15866#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15867_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015868
Martin v. Löwis1142de32002-03-29 16:28:31 +000015869else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015870 case $LIBOBJS in
15871 "$ac_func.$ac_objext" | \
15872 *" $ac_func.$ac_objext" | \
15873 "$ac_func.$ac_objext "* | \
15874 *" $ac_func.$ac_objext "* ) ;;
15875 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15876esac
15877
Martin v. Löwis1142de32002-03-29 16:28:31 +000015878fi
15879done
15880
15881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882
Martin v. Löwis1142de32002-03-29 16:28:31 +000015883for ac_func in getpgrp
15884do
Martin v. Löwis11437992002-04-12 09:54:03 +000015885as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15886echo "$as_me:$LINENO: checking for $ac_func" >&5
15887echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15888if eval "test \"\${$as_ac_var+set}\" = set"; then
15889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015892/* confdefs.h. */
15893_ACEOF
15894cat confdefs.h >>conftest.$ac_ext
15895cat >>conftest.$ac_ext <<_ACEOF
15896/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015897/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15898 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15899#define $ac_func innocuous_$ac_func
15900
Martin v. Löwis1142de32002-03-29 16:28:31 +000015901/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015902 which can conflict with char $ac_func (); below.
15903 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015904 <limits.h> exists even on freestanding compilers. */
15905
15906#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015907# include <limits.h>
15908#else
15909# include <assert.h>
15910#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015911
15912#undef $ac_func
15913
Martin v. Löwis1142de32002-03-29 16:28:31 +000015914/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015915#ifdef __cplusplus
15916extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015917{
Martin v. Löwis11437992002-04-12 09:54:03 +000015918#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015919/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 builtin and then its argument prototype would still apply. */
15921char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015922/* The GNU C library defines this for functions which it implements
15923 to always fail with ENOSYS. Some functions are actually named
15924 something starting with __ and the normal name is an alias. */
15925#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15926choke me
15927#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015928char (*f) () = $ac_func;
15929#endif
15930#ifdef __cplusplus
15931}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015932#endif
15933
Skip Montanaro6dead952003-09-25 14:50:04 +000015934int
15935main ()
15936{
15937return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 ;
15939 return 0;
15940}
15941_ACEOF
15942rm -f conftest.$ac_objext conftest$ac_exeext
15943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015944 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015946 grep -v '^ *+' conftest.er1 >conftest.err
15947 rm -f conftest.er1
15948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15950 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015951 { ac_try='test -z "$ac_c_werror_flag"
15952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15954 (eval $ac_try) 2>&5
15955 ac_status=$?
15956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15957 (exit $ac_status); }; } &&
15958 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15960 (eval $ac_try) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); }; }; then
15964 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015965else
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015967sed 's/^/| /' conftest.$ac_ext >&5
15968
Martin v. Löwis11437992002-04-12 09:54:03 +000015969eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015970fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015971rm -f conftest.err conftest.$ac_objext \
15972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015974echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15975echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15976if test `eval echo '${'$as_ac_var'}'` = yes; then
15977 cat >>confdefs.h <<_ACEOF
15978#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15979_ACEOF
15980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015981/* confdefs.h. */
15982_ACEOF
15983cat confdefs.h >>conftest.$ac_ext
15984cat >>conftest.$ac_ext <<_ACEOF
15985/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015986#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015987int
15988main ()
15989{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015990getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 ;
15992 return 0;
15993}
15994_ACEOF
15995rm -f conftest.$ac_objext
15996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015997 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015999 grep -v '^ *+' conftest.er1 >conftest.err
16000 rm -f conftest.er1
16001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16003 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016004 { ac_try='test -z "$ac_c_werror_flag"
16005 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16007 (eval $ac_try) 2>&5
16008 ac_status=$?
16009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16010 (exit $ac_status); }; } &&
16011 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016012 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16013 (eval $ac_try) 2>&5
16014 ac_status=$?
16015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16016 (exit $ac_status); }; }; then
16017
16018cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016019#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016020_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016021
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
Guido van Rossumf78abae1997-01-21 22:02:36 +000016023else
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016025sed 's/^/| /' conftest.$ac_ext >&5
16026
Guido van Rossum627b2d71993-12-24 10:39:16 +000016027fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016028rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016029
Guido van Rossum627b2d71993-12-24 10:39:16 +000016030fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016031done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016032
Jack Jansen150753c2003-03-29 22:07:47 +000016033
16034for ac_func in setpgrp
16035do
16036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16037echo "$as_me:$LINENO: checking for $ac_func" >&5
16038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16039if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016040 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016041else
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16050#define $ac_func innocuous_$ac_func
16051
Jack Jansen150753c2003-03-29 22:07:47 +000016052/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016053 which can conflict with char $ac_func (); below.
16054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016055 <limits.h> exists even on freestanding compilers. */
16056
16057#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016058# include <limits.h>
16059#else
16060# include <assert.h>
16061#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016062
16063#undef $ac_func
16064
Jack Jansen150753c2003-03-29 22:07:47 +000016065/* Override any gcc2 internal prototype to avoid an error. */
16066#ifdef __cplusplus
16067extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016068{
Martin v. Löwis11437992002-04-12 09:54:03 +000016069#endif
Jack Jansen150753c2003-03-29 22:07:47 +000016070/* We use char because int might match the return type of a gcc2
16071 builtin and then its argument prototype would still apply. */
16072char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000016073/* The GNU C library defines this for functions which it implements
16074 to always fail with ENOSYS. Some functions are actually named
16075 something starting with __ and the normal name is an alias. */
16076#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16077choke me
16078#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016079char (*f) () = $ac_func;
16080#endif
16081#ifdef __cplusplus
16082}
Jack Jansen150753c2003-03-29 22:07:47 +000016083#endif
16084
Skip Montanaro6dead952003-09-25 14:50:04 +000016085int
16086main ()
16087{
16088return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ;
16090 return 0;
16091}
16092_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016093rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000016094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016095 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016097 grep -v '^ *+' conftest.er1 >conftest.err
16098 rm -f conftest.er1
16099 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016101 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016102 { ac_try='test -z "$ac_c_werror_flag"
16103 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; } &&
16109 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16111 (eval $ac_try) 2>&5
16112 ac_status=$?
16113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16114 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000016115 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016116else
Jack Jansen150753c2003-03-29 22:07:47 +000016117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016118sed 's/^/| /' conftest.$ac_ext >&5
16119
Jack Jansen150753c2003-03-29 22:07:47 +000016120eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016121fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016122rm -f conftest.err conftest.$ac_objext \
16123 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016124fi
Jack Jansen150753c2003-03-29 22:07:47 +000016125echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16126echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16127if test `eval echo '${'$as_ac_var'}'` = yes; then
16128 cat >>confdefs.h <<_ACEOF
16129#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16130_ACEOF
16131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016132/* confdefs.h. */
16133_ACEOF
16134cat confdefs.h >>conftest.$ac_ext
16135cat >>conftest.$ac_ext <<_ACEOF
16136/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000016137#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000016138int
16139main ()
16140{
16141setpgrp(0,0);
16142 ;
16143 return 0;
16144}
16145_ACEOF
16146rm -f conftest.$ac_objext
16147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016148 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000016149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016150 grep -v '^ *+' conftest.er1 >conftest.err
16151 rm -f conftest.er1
16152 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16154 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016155 { ac_try='test -z "$ac_c_werror_flag"
16156 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16158 (eval $ac_try) 2>&5
16159 ac_status=$?
16160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16161 (exit $ac_status); }; } &&
16162 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000016163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16164 (eval $ac_try) 2>&5
16165 ac_status=$?
16166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016168
16169cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016170#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016171_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016172
Jack Jansen150753c2003-03-29 22:07:47 +000016173
16174else
16175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016176sed 's/^/| /' conftest.$ac_ext >&5
16177
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016178fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016179rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000016180
16181fi
16182done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016183
Martin v. Löwis11437992002-04-12 09:54:03 +000016184
Thomas Wouters3a584202000-08-05 23:28:51 +000016185for ac_func in gettimeofday
16186do
Martin v. Löwis11437992002-04-12 09:54:03 +000016187as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16188echo "$as_me:$LINENO: checking for $ac_func" >&5
16189echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16190if eval "test \"\${$as_ac_var+set}\" = set"; then
16191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016192else
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016194/* confdefs.h. */
16195_ACEOF
16196cat confdefs.h >>conftest.$ac_ext
16197cat >>conftest.$ac_ext <<_ACEOF
16198/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016199/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16200 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16201#define $ac_func innocuous_$ac_func
16202
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016203/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016204 which can conflict with char $ac_func (); below.
16205 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016206 <limits.h> exists even on freestanding compilers. */
16207
16208#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016209# include <limits.h>
16210#else
16211# include <assert.h>
16212#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016213
16214#undef $ac_func
16215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016216/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016217#ifdef __cplusplus
16218extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016219{
Martin v. Löwis11437992002-04-12 09:54:03 +000016220#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016221/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 builtin and then its argument prototype would still apply. */
16223char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016224/* The GNU C library defines this for functions which it implements
16225 to always fail with ENOSYS. Some functions are actually named
16226 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016227#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016228choke me
16229#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016230char (*f) () = $ac_func;
16231#endif
16232#ifdef __cplusplus
16233}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016234#endif
16235
Skip Montanaro6dead952003-09-25 14:50:04 +000016236int
16237main ()
16238{
16239return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 ;
16241 return 0;
16242}
16243_ACEOF
16244rm -f conftest.$ac_objext conftest$ac_exeext
16245if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016246 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016248 grep -v '^ *+' conftest.er1 >conftest.err
16249 rm -f conftest.er1
16250 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16252 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016253 { ac_try='test -z "$ac_c_werror_flag"
16254 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16256 (eval $ac_try) 2>&5
16257 ac_status=$?
16258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16259 (exit $ac_status); }; } &&
16260 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16262 (eval $ac_try) 2>&5
16263 ac_status=$?
16264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16265 (exit $ac_status); }; }; then
16266 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016267else
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016269sed 's/^/| /' conftest.$ac_ext >&5
16270
Martin v. Löwis11437992002-04-12 09:54:03 +000016271eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016272fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016273rm -f conftest.err conftest.$ac_objext \
16274 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016275fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016276echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16277echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16278if test `eval echo '${'$as_ac_var'}'` = yes; then
16279 cat >>confdefs.h <<_ACEOF
16280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16281_ACEOF
16282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016283/* confdefs.h. */
16284_ACEOF
16285cat confdefs.h >>conftest.$ac_ext
16286cat >>conftest.$ac_ext <<_ACEOF
16287/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016288#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016289int
16290main ()
16291{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016292gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 ;
16294 return 0;
16295}
16296_ACEOF
16297rm -f conftest.$ac_objext
16298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016299 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301 grep -v '^ *+' conftest.er1 >conftest.err
16302 rm -f conftest.er1
16303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16305 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016306 { ac_try='test -z "$ac_c_werror_flag"
16307 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16309 (eval $ac_try) 2>&5
16310 ac_status=$?
16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16312 (exit $ac_status); }; } &&
16313 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16315 (eval $ac_try) 2>&5
16316 ac_status=$?
16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16318 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016319 :
16320else
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016322sed 's/^/| /' conftest.$ac_ext >&5
16323
Martin v. Löwis11437992002-04-12 09:54:03 +000016324
16325cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016326#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016327_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016328
Martin v. Löwis11437992002-04-12 09:54:03 +000016329
Guido van Rossum627b2d71993-12-24 10:39:16 +000016330fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016333fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016334done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016335
Michael W. Hudson54241132001-12-07 15:38:26 +000016336
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016337echo "$as_me:$LINENO: checking for major" >&5
16338echo $ECHO_N "checking for major... $ECHO_C" >&6
16339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016340/* confdefs.h. */
16341_ACEOF
16342cat confdefs.h >>conftest.$ac_ext
16343cat >>conftest.$ac_ext <<_ACEOF
16344/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016345
Neal Norwitz6eb37f02003-02-23 23:28:15 +000016346#if defined(MAJOR_IN_MKDEV)
16347#include <sys/mkdev.h>
16348#elif defined(MAJOR_IN_SYSMACROS)
16349#include <sys/sysmacros.h>
16350#else
16351#include <sys/types.h>
16352#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016353
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016354int
16355main ()
16356{
16357
16358 makedev(major(0),minor(0));
16359
16360 ;
16361 return 0;
16362}
16363_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000016364rm -f conftest.$ac_objext conftest$ac_exeext
16365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016366 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016368 grep -v '^ *+' conftest.er1 >conftest.err
16369 rm -f conftest.er1
16370 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16372 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016373 { ac_try='test -z "$ac_c_werror_flag"
16374 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16376 (eval $ac_try) 2>&5
16377 ac_status=$?
16378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379 (exit $ac_status); }; } &&
16380 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16382 (eval $ac_try) 2>&5
16383 ac_status=$?
16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16385 (exit $ac_status); }; }; then
16386
16387
16388cat >>confdefs.h <<\_ACEOF
16389#define HAVE_DEVICE_MACROS 1
16390_ACEOF
16391
16392 echo "$as_me:$LINENO: result: yes" >&5
16393echo "${ECHO_T}yes" >&6
16394
16395else
16396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016397sed 's/^/| /' conftest.$ac_ext >&5
16398
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016399
16400 echo "$as_me:$LINENO: result: no" >&5
16401echo "${ECHO_T}no" >&6
16402
16403fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016404rm -f conftest.err conftest.$ac_objext \
16405 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016406
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016407# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000016408# for [no]getaddrinfo in netdb.h.
16409echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16410echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
16411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016412/* confdefs.h. */
16413_ACEOF
16414cat confdefs.h >>conftest.$ac_ext
16415cat >>conftest.$ac_ext <<_ACEOF
16416/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016417
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016418#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016419#include <sys/socket.h>
16420#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016421#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016422
Martin v. Löwis11437992002-04-12 09:54:03 +000016423int
16424main ()
16425{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016426
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016427getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 ;
16430 return 0;
16431}
16432_ACEOF
16433rm -f conftest.$ac_objext conftest$ac_exeext
16434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 grep -v '^ *+' conftest.er1 >conftest.err
16438 rm -f conftest.er1
16439 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16441 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016442 { ac_try='test -z "$ac_c_werror_flag"
16443 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16445 (eval $ac_try) 2>&5
16446 ac_status=$?
16447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16448 (exit $ac_status); }; } &&
16449 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16451 (eval $ac_try) 2>&5
16452 ac_status=$?
16453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454 (exit $ac_status); }; }; then
16455
16456echo "$as_me:$LINENO: result: yes" >&5
16457echo "${ECHO_T}yes" >&6
16458echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
16459echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016460if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016461 echo "$as_me:$LINENO: result: buggy" >&5
16462echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016463buggygetaddrinfo=yes
16464else
Martin v. Löwis11437992002-04-12 09:54:03 +000016465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016466/* confdefs.h. */
16467_ACEOF
16468cat confdefs.h >>conftest.$ac_ext
16469cat >>conftest.$ac_ext <<_ACEOF
16470/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016471
16472#include <sys/types.h>
16473#include <netdb.h>
16474#include <string.h>
16475#include <sys/socket.h>
16476#include <netinet/in.h>
16477
16478main()
16479{
16480 int passive, gaierr, inet4 = 0, inet6 = 0;
16481 struct addrinfo hints, *ai, *aitop;
16482 char straddr[INET6_ADDRSTRLEN], strport[16];
16483
16484 for (passive = 0; passive <= 1; passive++) {
16485 memset(&hints, 0, sizeof(hints));
16486 hints.ai_family = AF_UNSPEC;
16487 hints.ai_flags = passive ? AI_PASSIVE : 0;
16488 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000016489 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016490 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
16491 (void)gai_strerror(gaierr);
16492 goto bad;
16493 }
16494 for (ai = aitop; ai; ai = ai->ai_next) {
16495 if (ai->ai_addr == NULL ||
16496 ai->ai_addrlen == 0 ||
16497 getnameinfo(ai->ai_addr, ai->ai_addrlen,
16498 straddr, sizeof(straddr), strport, sizeof(strport),
16499 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
16500 goto bad;
16501 }
16502 switch (ai->ai_family) {
16503 case AF_INET:
16504 if (strcmp(strport, "54321") != 0) {
16505 goto bad;
16506 }
16507 if (passive) {
16508 if (strcmp(straddr, "0.0.0.0") != 0) {
16509 goto bad;
16510 }
16511 } else {
16512 if (strcmp(straddr, "127.0.0.1") != 0) {
16513 goto bad;
16514 }
16515 }
16516 inet4++;
16517 break;
16518 case AF_INET6:
16519 if (strcmp(strport, "54321") != 0) {
16520 goto bad;
16521 }
16522 if (passive) {
16523 if (strcmp(straddr, "::") != 0) {
16524 goto bad;
16525 }
16526 } else {
16527 if (strcmp(straddr, "::1") != 0) {
16528 goto bad;
16529 }
16530 }
16531 inet6++;
16532 break;
16533 case AF_UNSPEC:
16534 goto bad;
16535 break;
16536 default:
16537 /* another family support? */
16538 break;
16539 }
16540 }
16541 }
16542
16543 if (!(inet4 == 0 || inet4 == 2))
16544 goto bad;
16545 if (!(inet6 == 0 || inet6 == 2))
16546 goto bad;
16547
16548 if (aitop)
16549 freeaddrinfo(aitop);
16550 exit(0);
16551
16552 bad:
16553 if (aitop)
16554 freeaddrinfo(aitop);
16555 exit(1);
16556}
16557
Martin v. Löwis11437992002-04-12 09:54:03 +000016558_ACEOF
16559rm -f conftest$ac_exeext
16560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16561 (eval $ac_link) 2>&5
16562 ac_status=$?
16563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16566 (eval $ac_try) 2>&5
16567 ac_status=$?
16568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16569 (exit $ac_status); }; }; then
16570 echo "$as_me:$LINENO: result: good" >&5
16571echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016572buggygetaddrinfo=no
16573else
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 echo "$as_me: program exited with status $ac_status" >&5
16575echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016576sed 's/^/| /' conftest.$ac_ext >&5
16577
Martin v. Löwis11437992002-04-12 09:54:03 +000016578( exit $ac_status )
16579echo "$as_me:$LINENO: result: buggy" >&5
16580echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016581buggygetaddrinfo=yes
16582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016583rm -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 +000016584fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016585else
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589
16590echo "$as_me:$LINENO: result: no" >&5
16591echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016592buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016593
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016594fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016595rm -f conftest.err conftest.$ac_objext \
16596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016597
16598if test "$buggygetaddrinfo" = "yes"; then
16599 if test "$ipv6" = "yes"; then
16600 echo 'Fatal: You must get working getaddrinfo() function.'
16601 echo ' or you can specify "--disable-ipv6"'.
16602 exit 1
16603 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016604else
Martin v. Löwis11437992002-04-12 09:54:03 +000016605
16606cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016607#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016608_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016609
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016610fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016611
Jack Jansen9a66b6d2001-08-08 13:56:14 +000016612for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016613do
Martin v. Löwis11437992002-04-12 09:54:03 +000016614as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16615echo "$as_me:$LINENO: checking for $ac_func" >&5
16616echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16617if eval "test \"\${$as_ac_var+set}\" = set"; then
16618 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016619else
Martin v. Löwis11437992002-04-12 09:54:03 +000016620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016621/* confdefs.h. */
16622_ACEOF
16623cat confdefs.h >>conftest.$ac_ext
16624cat >>conftest.$ac_ext <<_ACEOF
16625/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016626/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16627 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16628#define $ac_func innocuous_$ac_func
16629
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016630/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016631 which can conflict with char $ac_func (); below.
16632 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016633 <limits.h> exists even on freestanding compilers. */
16634
16635#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016636# include <limits.h>
16637#else
16638# include <assert.h>
16639#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016640
16641#undef $ac_func
16642
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016644#ifdef __cplusplus
16645extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016646{
Martin v. Löwis11437992002-04-12 09:54:03 +000016647#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016648/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 builtin and then its argument prototype would still apply. */
16650char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016651/* The GNU C library defines this for functions which it implements
16652 to always fail with ENOSYS. Some functions are actually named
16653 something starting with __ and the normal name is an alias. */
16654#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16655choke me
16656#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016657char (*f) () = $ac_func;
16658#endif
16659#ifdef __cplusplus
16660}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016661#endif
16662
Skip Montanaro6dead952003-09-25 14:50:04 +000016663int
16664main ()
16665{
16666return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 ;
16668 return 0;
16669}
16670_ACEOF
16671rm -f conftest.$ac_objext conftest$ac_exeext
16672if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016673 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016675 grep -v '^ *+' conftest.er1 >conftest.err
16676 rm -f conftest.er1
16677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16679 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016680 { ac_try='test -z "$ac_c_werror_flag"
16681 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16683 (eval $ac_try) 2>&5
16684 ac_status=$?
16685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16686 (exit $ac_status); }; } &&
16687 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16689 (eval $ac_try) 2>&5
16690 ac_status=$?
16691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16692 (exit $ac_status); }; }; then
16693 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016694else
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016696sed 's/^/| /' conftest.$ac_ext >&5
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016699fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016700rm -f conftest.err conftest.$ac_objext \
16701 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016703echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16704echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16705if test `eval echo '${'$as_ac_var'}'` = yes; then
16706 cat >>confdefs.h <<_ACEOF
16707#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16708_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016709
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016710fi
16711done
16712
Michael W. Hudson54241132001-12-07 15:38:26 +000016713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000016715echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
16716echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16717if test "${ac_cv_header_time+set}" = set; then
16718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016719else
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016721/* confdefs.h. */
16722_ACEOF
16723cat confdefs.h >>conftest.$ac_ext
16724cat >>conftest.$ac_ext <<_ACEOF
16725/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016726#include <sys/types.h>
16727#include <sys/time.h>
16728#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730int
16731main ()
16732{
16733if ((struct tm *) 0)
16734return 0;
16735 ;
16736 return 0;
16737}
16738_ACEOF
16739rm -f conftest.$ac_objext
16740if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016741 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 grep -v '^ *+' conftest.er1 >conftest.err
16744 rm -f conftest.er1
16745 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16747 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016748 { ac_try='test -z "$ac_c_werror_flag"
16749 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16751 (eval $ac_try) 2>&5
16752 ac_status=$?
16753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16754 (exit $ac_status); }; } &&
16755 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16757 (eval $ac_try) 2>&5
16758 ac_status=$?
16759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16760 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016761 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016762else
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016764sed 's/^/| /' conftest.$ac_ext >&5
16765
Martin v. Löwis11437992002-04-12 09:54:03 +000016766ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016767fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016768rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016769fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016770echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
16771echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016772if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016773
16774cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016775#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016776_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016777
16778fi
16779
Martin v. Löwis11437992002-04-12 09:54:03 +000016780echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
16781echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
16782if test "${ac_cv_struct_tm+set}" = set; then
16783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016784else
Martin v. Löwis11437992002-04-12 09:54:03 +000016785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016786/* confdefs.h. */
16787_ACEOF
16788cat confdefs.h >>conftest.$ac_ext
16789cat >>conftest.$ac_ext <<_ACEOF
16790/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016791#include <sys/types.h>
16792#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016793
Martin v. Löwis11437992002-04-12 09:54:03 +000016794int
16795main ()
16796{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016797struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext
16803if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016804 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016806 grep -v '^ *+' conftest.er1 >conftest.err
16807 rm -f conftest.er1
16808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16810 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016811 { ac_try='test -z "$ac_c_werror_flag"
16812 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16814 (eval $ac_try) 2>&5
16815 ac_status=$?
16816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16817 (exit $ac_status); }; } &&
16818 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16820 (eval $ac_try) 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016824 ac_cv_struct_tm=time.h
16825else
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016827sed 's/^/| /' conftest.$ac_ext >&5
16828
Martin v. Löwis11437992002-04-12 09:54:03 +000016829ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016832fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016833echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16834echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016835if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016836
16837cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016838#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016839_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016840
16841fi
16842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16844echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16845if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016847else
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016849/* confdefs.h. */
16850_ACEOF
16851cat confdefs.h >>conftest.$ac_ext
16852cat >>conftest.$ac_ext <<_ACEOF
16853/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854#include <sys/types.h>
16855#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
16857
Martin v. Löwis11437992002-04-12 09:54:03 +000016858int
16859main ()
16860{
16861static struct tm ac_aggr;
16862if (ac_aggr.tm_zone)
16863return 0;
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868rm -f conftest.$ac_objext
16869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016872 grep -v '^ *+' conftest.er1 >conftest.err
16873 rm -f conftest.er1
16874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16876 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016877 { ac_try='test -z "$ac_c_werror_flag"
16878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16880 (eval $ac_try) 2>&5
16881 ac_status=$?
16882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16883 (exit $ac_status); }; } &&
16884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886 (eval $ac_try) 2>&5
16887 ac_status=$?
16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889 (exit $ac_status); }; }; then
16890 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016891else
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016893sed 's/^/| /' conftest.$ac_ext >&5
16894
16895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
16901#include <sys/types.h>
16902#include <$ac_cv_struct_tm>
16903
16904
16905int
16906main ()
16907{
16908static struct tm ac_aggr;
16909if (sizeof ac_aggr.tm_zone)
16910return 0;
16911 ;
16912 return 0;
16913}
16914_ACEOF
16915rm -f conftest.$ac_objext
16916if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016917 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016919 grep -v '^ *+' conftest.er1 >conftest.err
16920 rm -f conftest.er1
16921 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016924 { ac_try='test -z "$ac_c_werror_flag"
16925 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16927 (eval $ac_try) 2>&5
16928 ac_status=$?
16929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930 (exit $ac_status); }; } &&
16931 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16933 (eval $ac_try) 2>&5
16934 ac_status=$?
16935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16936 (exit $ac_status); }; }; then
16937 ac_cv_member_struct_tm_tm_zone=yes
16938else
16939 echo "$as_me: failed program was:" >&5
16940sed 's/^/| /' conftest.$ac_ext >&5
16941
Martin v. Löwis11437992002-04-12 09:54:03 +000016942ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016943fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016945fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016946rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016947fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016948echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16949echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16950if test $ac_cv_member_struct_tm_tm_zone = yes; then
16951
16952cat >>confdefs.h <<_ACEOF
16953#define HAVE_STRUCT_TM_TM_ZONE 1
16954_ACEOF
16955
16956
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016957fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016958
Martin v. Löwis11437992002-04-12 09:54:03 +000016959if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16960
16961cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016962#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016963_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016964
16965else
Martin v. Löwis11437992002-04-12 09:54:03 +000016966 echo "$as_me:$LINENO: checking for tzname" >&5
16967echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16968if test "${ac_cv_var_tzname+set}" = set; then
16969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016970else
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016972/* confdefs.h. */
16973_ACEOF
16974cat confdefs.h >>conftest.$ac_ext
16975cat >>conftest.$ac_ext <<_ACEOF
16976/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016977#include <time.h>
16978#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016979extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016981
Martin v. Löwis11437992002-04-12 09:54:03 +000016982int
16983main ()
16984{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016985atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 ;
16987 return 0;
16988}
16989_ACEOF
16990rm -f conftest.$ac_objext conftest$ac_exeext
16991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016992 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016994 grep -v '^ *+' conftest.er1 >conftest.err
16995 rm -f conftest.er1
16996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16998 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016999 { ac_try='test -z "$ac_c_werror_flag"
17000 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17002 (eval $ac_try) 2>&5
17003 ac_status=$?
17004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17005 (exit $ac_status); }; } &&
17006 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17008 (eval $ac_try) 2>&5
17009 ac_status=$?
17010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017012 ac_cv_var_tzname=yes
17013else
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017015sed 's/^/| /' conftest.$ac_ext >&5
17016
Martin v. Löwis11437992002-04-12 09:54:03 +000017017ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017018fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017019rm -f conftest.err conftest.$ac_objext \
17020 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017022echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17023echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017024 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017025
17026cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017027#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017028_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017030 fi
17031fi
17032
Martin v. Löwis11437992002-04-12 09:54:03 +000017033echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
17034echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
17035if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
17036 echo $ECHO_N "(cached) $ECHO_C" >&6
17037else
17038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017039/* confdefs.h. */
17040_ACEOF
17041cat confdefs.h >>conftest.$ac_ext
17042cat >>conftest.$ac_ext <<_ACEOF
17043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017044$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017045int
17046main ()
17047{
17048static struct stat ac_aggr;
17049if (ac_aggr.st_rdev)
17050return 0;
17051 ;
17052 return 0;
17053}
17054_ACEOF
17055rm -f conftest.$ac_objext
17056if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017057 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017059 grep -v '^ *+' conftest.er1 >conftest.err
17060 rm -f conftest.er1
17061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17063 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017064 { ac_try='test -z "$ac_c_werror_flag"
17065 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17067 (eval $ac_try) 2>&5
17068 ac_status=$?
17069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17070 (exit $ac_status); }; } &&
17071 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17073 (eval $ac_try) 2>&5
17074 ac_status=$?
17075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17076 (exit $ac_status); }; }; then
17077 ac_cv_member_struct_stat_st_rdev=yes
17078else
17079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017080sed 's/^/| /' conftest.$ac_ext >&5
17081
17082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017083/* confdefs.h. */
17084_ACEOF
17085cat confdefs.h >>conftest.$ac_ext
17086cat >>conftest.$ac_ext <<_ACEOF
17087/* end confdefs.h. */
17088$ac_includes_default
17089int
17090main ()
17091{
17092static struct stat ac_aggr;
17093if (sizeof ac_aggr.st_rdev)
17094return 0;
17095 ;
17096 return 0;
17097}
17098_ACEOF
17099rm -f conftest.$ac_objext
17100if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017101 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017103 grep -v '^ *+' conftest.er1 >conftest.err
17104 rm -f conftest.er1
17105 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17107 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017108 { ac_try='test -z "$ac_c_werror_flag"
17109 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017110 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17111 (eval $ac_try) 2>&5
17112 ac_status=$?
17113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17114 (exit $ac_status); }; } &&
17115 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17117 (eval $ac_try) 2>&5
17118 ac_status=$?
17119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17120 (exit $ac_status); }; }; then
17121 ac_cv_member_struct_stat_st_rdev=yes
17122else
17123 echo "$as_me: failed program was:" >&5
17124sed 's/^/| /' conftest.$ac_ext >&5
17125
Martin v. Löwis11437992002-04-12 09:54:03 +000017126ac_cv_member_struct_stat_st_rdev=no
17127fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017128rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017129fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017132echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
17133echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
17134if test $ac_cv_member_struct_stat_st_rdev = yes; then
17135
17136cat >>confdefs.h <<_ACEOF
17137#define HAVE_STRUCT_STAT_ST_RDEV 1
17138_ACEOF
17139
17140
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017141fi
17142
Martin v. Löwis11437992002-04-12 09:54:03 +000017143echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
17144echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
17145if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
17146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017147else
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017154$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017155int
17156main ()
17157{
17158static struct stat ac_aggr;
17159if (ac_aggr.st_blksize)
17160return 0;
17161 ;
17162 return 0;
17163}
17164_ACEOF
17165rm -f conftest.$ac_objext
17166if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017167 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017169 grep -v '^ *+' conftest.er1 >conftest.err
17170 rm -f conftest.er1
17171 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17173 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017174 { ac_try='test -z "$ac_c_werror_flag"
17175 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17177 (eval $ac_try) 2>&5
17178 ac_status=$?
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); }; } &&
17181 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17183 (eval $ac_try) 2>&5
17184 ac_status=$?
17185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17186 (exit $ac_status); }; }; then
17187 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017188else
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017190sed 's/^/| /' conftest.$ac_ext >&5
17191
17192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017193/* confdefs.h. */
17194_ACEOF
17195cat confdefs.h >>conftest.$ac_ext
17196cat >>conftest.$ac_ext <<_ACEOF
17197/* end confdefs.h. */
17198$ac_includes_default
17199int
17200main ()
17201{
17202static struct stat ac_aggr;
17203if (sizeof ac_aggr.st_blksize)
17204return 0;
17205 ;
17206 return 0;
17207}
17208_ACEOF
17209rm -f conftest.$ac_objext
17210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017211 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017213 grep -v '^ *+' conftest.er1 >conftest.err
17214 rm -f conftest.er1
17215 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017218 { ac_try='test -z "$ac_c_werror_flag"
17219 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17221 (eval $ac_try) 2>&5
17222 ac_status=$?
17223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17224 (exit $ac_status); }; } &&
17225 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17227 (eval $ac_try) 2>&5
17228 ac_status=$?
17229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17230 (exit $ac_status); }; }; then
17231 ac_cv_member_struct_stat_st_blksize=yes
17232else
17233 echo "$as_me: failed program was:" >&5
17234sed 's/^/| /' conftest.$ac_ext >&5
17235
Martin v. Löwis11437992002-04-12 09:54:03 +000017236ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017237fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017238rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017239fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017240rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017242echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17243echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
17244if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017245
Martin v. Löwis11437992002-04-12 09:54:03 +000017246cat >>confdefs.h <<_ACEOF
17247#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17248_ACEOF
17249
17250
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017251fi
17252
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017253echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17254echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
17255if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17256 echo $ECHO_N "(cached) $ECHO_C" >&6
17257else
17258 cat >conftest.$ac_ext <<_ACEOF
17259/* confdefs.h. */
17260_ACEOF
17261cat confdefs.h >>conftest.$ac_ext
17262cat >>conftest.$ac_ext <<_ACEOF
17263/* end confdefs.h. */
17264$ac_includes_default
17265int
17266main ()
17267{
17268static struct stat ac_aggr;
17269if (ac_aggr.st_flags)
17270return 0;
17271 ;
17272 return 0;
17273}
17274_ACEOF
17275rm -f conftest.$ac_objext
17276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17277 (eval $ac_compile) 2>conftest.er1
17278 ac_status=$?
17279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
17282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17283 (exit $ac_status); } &&
17284 { ac_try='test -z "$ac_c_werror_flag"
17285 || test ! -s conftest.err'
17286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17287 (eval $ac_try) 2>&5
17288 ac_status=$?
17289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17290 (exit $ac_status); }; } &&
17291 { ac_try='test -s conftest.$ac_objext'
17292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17293 (eval $ac_try) 2>&5
17294 ac_status=$?
17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17296 (exit $ac_status); }; }; then
17297 ac_cv_member_struct_stat_st_flags=yes
17298else
17299 echo "$as_me: failed program was:" >&5
17300sed 's/^/| /' conftest.$ac_ext >&5
17301
17302cat >conftest.$ac_ext <<_ACEOF
17303/* confdefs.h. */
17304_ACEOF
17305cat confdefs.h >>conftest.$ac_ext
17306cat >>conftest.$ac_ext <<_ACEOF
17307/* end confdefs.h. */
17308$ac_includes_default
17309int
17310main ()
17311{
17312static struct stat ac_aggr;
17313if (sizeof ac_aggr.st_flags)
17314return 0;
17315 ;
17316 return 0;
17317}
17318_ACEOF
17319rm -f conftest.$ac_objext
17320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17321 (eval $ac_compile) 2>conftest.er1
17322 ac_status=$?
17323 grep -v '^ *+' conftest.er1 >conftest.err
17324 rm -f conftest.er1
17325 cat conftest.err >&5
17326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17327 (exit $ac_status); } &&
17328 { ac_try='test -z "$ac_c_werror_flag"
17329 || test ! -s conftest.err'
17330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17331 (eval $ac_try) 2>&5
17332 ac_status=$?
17333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17334 (exit $ac_status); }; } &&
17335 { ac_try='test -s conftest.$ac_objext'
17336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17337 (eval $ac_try) 2>&5
17338 ac_status=$?
17339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17340 (exit $ac_status); }; }; then
17341 ac_cv_member_struct_stat_st_flags=yes
17342else
17343 echo "$as_me: failed program was:" >&5
17344sed 's/^/| /' conftest.$ac_ext >&5
17345
17346ac_cv_member_struct_stat_st_flags=no
17347fi
17348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17349fi
17350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17351fi
17352echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
17353echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
17354if test $ac_cv_member_struct_stat_st_flags = yes; then
17355
17356cat >>confdefs.h <<_ACEOF
17357#define HAVE_STRUCT_STAT_ST_FLAGS 1
17358_ACEOF
17359
17360
17361fi
17362
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017363echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
17364echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
17365if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
17366 echo $ECHO_N "(cached) $ECHO_C" >&6
17367else
17368 cat >conftest.$ac_ext <<_ACEOF
17369/* confdefs.h. */
17370_ACEOF
17371cat confdefs.h >>conftest.$ac_ext
17372cat >>conftest.$ac_ext <<_ACEOF
17373/* end confdefs.h. */
17374$ac_includes_default
17375int
17376main ()
17377{
17378static struct stat ac_aggr;
17379if (ac_aggr.st_gen)
17380return 0;
17381 ;
17382 return 0;
17383}
17384_ACEOF
17385rm -f conftest.$ac_objext
17386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17387 (eval $ac_compile) 2>conftest.er1
17388 ac_status=$?
17389 grep -v '^ *+' conftest.er1 >conftest.err
17390 rm -f conftest.er1
17391 cat conftest.err >&5
17392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17393 (exit $ac_status); } &&
17394 { ac_try='test -z "$ac_c_werror_flag"
17395 || test ! -s conftest.err'
17396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17397 (eval $ac_try) 2>&5
17398 ac_status=$?
17399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17400 (exit $ac_status); }; } &&
17401 { ac_try='test -s conftest.$ac_objext'
17402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17403 (eval $ac_try) 2>&5
17404 ac_status=$?
17405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17406 (exit $ac_status); }; }; then
17407 ac_cv_member_struct_stat_st_gen=yes
17408else
17409 echo "$as_me: failed program was:" >&5
17410sed 's/^/| /' conftest.$ac_ext >&5
17411
17412cat >conftest.$ac_ext <<_ACEOF
17413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
17418$ac_includes_default
17419int
17420main ()
17421{
17422static struct stat ac_aggr;
17423if (sizeof ac_aggr.st_gen)
17424return 0;
17425 ;
17426 return 0;
17427}
17428_ACEOF
17429rm -f conftest.$ac_objext
17430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17431 (eval $ac_compile) 2>conftest.er1
17432 ac_status=$?
17433 grep -v '^ *+' conftest.er1 >conftest.err
17434 rm -f conftest.er1
17435 cat conftest.err >&5
17436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17437 (exit $ac_status); } &&
17438 { ac_try='test -z "$ac_c_werror_flag"
17439 || test ! -s conftest.err'
17440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17441 (eval $ac_try) 2>&5
17442 ac_status=$?
17443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17444 (exit $ac_status); }; } &&
17445 { ac_try='test -s conftest.$ac_objext'
17446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17447 (eval $ac_try) 2>&5
17448 ac_status=$?
17449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); }; }; then
17451 ac_cv_member_struct_stat_st_gen=yes
17452else
17453 echo "$as_me: failed program was:" >&5
17454sed 's/^/| /' conftest.$ac_ext >&5
17455
17456ac_cv_member_struct_stat_st_gen=no
17457fi
17458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17459fi
17460rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17461fi
17462echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
17463echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
17464if test $ac_cv_member_struct_stat_st_gen = yes; then
17465
17466cat >>confdefs.h <<_ACEOF
17467#define HAVE_STRUCT_STAT_ST_GEN 1
17468_ACEOF
17469
17470
17471fi
17472
17473echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
17474echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
17475if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
17476 echo $ECHO_N "(cached) $ECHO_C" >&6
17477else
17478 cat >conftest.$ac_ext <<_ACEOF
17479/* confdefs.h. */
17480_ACEOF
17481cat confdefs.h >>conftest.$ac_ext
17482cat >>conftest.$ac_ext <<_ACEOF
17483/* end confdefs.h. */
17484$ac_includes_default
17485int
17486main ()
17487{
17488static struct stat ac_aggr;
17489if (ac_aggr.st_birthtime)
17490return 0;
17491 ;
17492 return 0;
17493}
17494_ACEOF
17495rm -f conftest.$ac_objext
17496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17497 (eval $ac_compile) 2>conftest.er1
17498 ac_status=$?
17499 grep -v '^ *+' conftest.er1 >conftest.err
17500 rm -f conftest.er1
17501 cat conftest.err >&5
17502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17503 (exit $ac_status); } &&
17504 { ac_try='test -z "$ac_c_werror_flag"
17505 || test ! -s conftest.err'
17506 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17507 (eval $ac_try) 2>&5
17508 ac_status=$?
17509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17510 (exit $ac_status); }; } &&
17511 { ac_try='test -s conftest.$ac_objext'
17512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17513 (eval $ac_try) 2>&5
17514 ac_status=$?
17515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17516 (exit $ac_status); }; }; then
17517 ac_cv_member_struct_stat_st_birthtime=yes
17518else
17519 echo "$as_me: failed program was:" >&5
17520sed 's/^/| /' conftest.$ac_ext >&5
17521
17522cat >conftest.$ac_ext <<_ACEOF
17523/* confdefs.h. */
17524_ACEOF
17525cat confdefs.h >>conftest.$ac_ext
17526cat >>conftest.$ac_ext <<_ACEOF
17527/* end confdefs.h. */
17528$ac_includes_default
17529int
17530main ()
17531{
17532static struct stat ac_aggr;
17533if (sizeof ac_aggr.st_birthtime)
17534return 0;
17535 ;
17536 return 0;
17537}
17538_ACEOF
17539rm -f conftest.$ac_objext
17540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17541 (eval $ac_compile) 2>conftest.er1
17542 ac_status=$?
17543 grep -v '^ *+' conftest.er1 >conftest.err
17544 rm -f conftest.er1
17545 cat conftest.err >&5
17546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17547 (exit $ac_status); } &&
17548 { ac_try='test -z "$ac_c_werror_flag"
17549 || test ! -s conftest.err'
17550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17551 (eval $ac_try) 2>&5
17552 ac_status=$?
17553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17554 (exit $ac_status); }; } &&
17555 { ac_try='test -s conftest.$ac_objext'
17556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17557 (eval $ac_try) 2>&5
17558 ac_status=$?
17559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17560 (exit $ac_status); }; }; then
17561 ac_cv_member_struct_stat_st_birthtime=yes
17562else
17563 echo "$as_me: failed program was:" >&5
17564sed 's/^/| /' conftest.$ac_ext >&5
17565
17566ac_cv_member_struct_stat_st_birthtime=no
17567fi
17568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17569fi
17570rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17571fi
17572echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
17573echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
17574if test $ac_cv_member_struct_stat_st_birthtime = yes; then
17575
17576cat >>confdefs.h <<_ACEOF
17577#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
17578_ACEOF
17579
17580
17581fi
17582
Martin v. Löwis11437992002-04-12 09:54:03 +000017583echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
17584echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
17585if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
17586 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017587else
Martin v. Löwis11437992002-04-12 09:54:03 +000017588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017589/* confdefs.h. */
17590_ACEOF
17591cat confdefs.h >>conftest.$ac_ext
17592cat >>conftest.$ac_ext <<_ACEOF
17593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017594$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017595int
17596main ()
17597{
17598static struct stat ac_aggr;
17599if (ac_aggr.st_blocks)
17600return 0;
17601 ;
17602 return 0;
17603}
17604_ACEOF
17605rm -f conftest.$ac_objext
17606if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017607 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017609 grep -v '^ *+' conftest.er1 >conftest.err
17610 rm -f conftest.er1
17611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17613 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017614 { ac_try='test -z "$ac_c_werror_flag"
17615 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17617 (eval $ac_try) 2>&5
17618 ac_status=$?
17619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17620 (exit $ac_status); }; } &&
17621 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17623 (eval $ac_try) 2>&5
17624 ac_status=$?
17625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17626 (exit $ac_status); }; }; then
17627 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017628else
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017630sed 's/^/| /' conftest.$ac_ext >&5
17631
17632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017633/* confdefs.h. */
17634_ACEOF
17635cat confdefs.h >>conftest.$ac_ext
17636cat >>conftest.$ac_ext <<_ACEOF
17637/* end confdefs.h. */
17638$ac_includes_default
17639int
17640main ()
17641{
17642static struct stat ac_aggr;
17643if (sizeof ac_aggr.st_blocks)
17644return 0;
17645 ;
17646 return 0;
17647}
17648_ACEOF
17649rm -f conftest.$ac_objext
17650if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017651 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017653 grep -v '^ *+' conftest.er1 >conftest.err
17654 rm -f conftest.er1
17655 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17657 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017658 { ac_try='test -z "$ac_c_werror_flag"
17659 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17661 (eval $ac_try) 2>&5
17662 ac_status=$?
17663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17664 (exit $ac_status); }; } &&
17665 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000017666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17667 (eval $ac_try) 2>&5
17668 ac_status=$?
17669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17670 (exit $ac_status); }; }; then
17671 ac_cv_member_struct_stat_st_blocks=yes
17672else
17673 echo "$as_me: failed program was:" >&5
17674sed 's/^/| /' conftest.$ac_ext >&5
17675
Martin v. Löwis11437992002-04-12 09:54:03 +000017676ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017677fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017678rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017679fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017681fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017682echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
17683echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
17684if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017685
Martin v. Löwis11437992002-04-12 09:54:03 +000017686cat >>confdefs.h <<_ACEOF
17687#define HAVE_STRUCT_STAT_ST_BLOCKS 1
17688_ACEOF
17689
17690
17691cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017692#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017693_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017694
17695else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017696 case $LIBOBJS in
17697 "fileblocks.$ac_objext" | \
17698 *" fileblocks.$ac_objext" | \
17699 "fileblocks.$ac_objext "* | \
17700 *" fileblocks.$ac_objext "* ) ;;
17701 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
17702esac
17703
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017704fi
17705
Michael W. Hudson54241132001-12-07 15:38:26 +000017706
Martin v. Löwis11437992002-04-12 09:54:03 +000017707
17708echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
17709echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
17710if test "${ac_cv_header_time_altzone+set}" = set; then
17711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017712else
Martin v. Löwis11437992002-04-12 09:54:03 +000017713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017719#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017720int
17721main ()
17722{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017723return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000017724 ;
17725 return 0;
17726}
17727_ACEOF
17728rm -f conftest.$ac_objext
17729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017730 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017732 grep -v '^ *+' conftest.er1 >conftest.err
17733 rm -f conftest.er1
17734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17736 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017737 { ac_try='test -z "$ac_c_werror_flag"
17738 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17740 (eval $ac_try) 2>&5
17741 ac_status=$?
17742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17743 (exit $ac_status); }; } &&
17744 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17746 (eval $ac_try) 2>&5
17747 ac_status=$?
17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17749 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017750 ac_cv_header_time_altzone=yes
17751else
Martin v. Löwis11437992002-04-12 09:54:03 +000017752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017753sed 's/^/| /' conftest.$ac_ext >&5
17754
Martin v. Löwis11437992002-04-12 09:54:03 +000017755ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000017756fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758fi
17759
Martin v. Löwis11437992002-04-12 09:54:03 +000017760echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
17761echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017762if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017763
17764cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017765#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017766_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017767
17768fi
17769
Guido van Rossumda88dad1995-01-26 00:46:29 +000017770was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017771echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
17772echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
17773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017774/* confdefs.h. */
17775_ACEOF
17776cat confdefs.h >>conftest.$ac_ext
17777cat >>conftest.$ac_ext <<_ACEOF
17778/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017779
17780#include <sys/types.h>
17781#include <sys/select.h>
17782#include <sys/time.h>
17783
Martin v. Löwis11437992002-04-12 09:54:03 +000017784int
17785main ()
17786{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017787;
Martin v. Löwis11437992002-04-12 09:54:03 +000017788 ;
17789 return 0;
17790}
17791_ACEOF
17792rm -f conftest.$ac_objext
17793if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017794 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017796 grep -v '^ *+' conftest.er1 >conftest.err
17797 rm -f conftest.er1
17798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17800 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017801 { ac_try='test -z "$ac_c_werror_flag"
17802 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017803 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17804 (eval $ac_try) 2>&5
17805 ac_status=$?
17806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17807 (exit $ac_status); }; } &&
17808 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17810 (eval $ac_try) 2>&5
17811 ac_status=$?
17812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17813 (exit $ac_status); }; }; then
17814
17815
17816cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017817#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017818_ACEOF
17819
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017820 was_it_defined=yes
17821
Guido van Rossumf78abae1997-01-21 22:02:36 +000017822else
Martin v. Löwis11437992002-04-12 09:54:03 +000017823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017824sed 's/^/| /' conftest.$ac_ext >&5
17825
Guido van Rossum7f43da71994-08-01 12:15:30 +000017826fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017828echo "$as_me:$LINENO: result: $was_it_defined" >&5
17829echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000017830
Martin v. Löwis11437992002-04-12 09:54:03 +000017831echo "$as_me:$LINENO: checking for addrinfo" >&5
17832echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
17833if test "${ac_cv_struct_addrinfo+set}" = set; then
17834 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017835else
Martin v. Löwis11437992002-04-12 09:54:03 +000017836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017837/* confdefs.h. */
17838_ACEOF
17839cat confdefs.h >>conftest.$ac_ext
17840cat >>conftest.$ac_ext <<_ACEOF
17841/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017842
17843# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017844int
17845main ()
17846{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017847struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 ;
17849 return 0;
17850}
17851_ACEOF
17852rm -f conftest.$ac_objext
17853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017854 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017856 grep -v '^ *+' conftest.er1 >conftest.err
17857 rm -f conftest.er1
17858 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17860 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017861 { ac_try='test -z "$ac_c_werror_flag"
17862 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17864 (eval $ac_try) 2>&5
17865 ac_status=$?
17866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867 (exit $ac_status); }; } &&
17868 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17870 (eval $ac_try) 2>&5
17871 ac_status=$?
17872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17873 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017874 ac_cv_struct_addrinfo=yes
17875else
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017877sed 's/^/| /' conftest.$ac_ext >&5
17878
Martin v. Löwis11437992002-04-12 09:54:03 +000017879ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017880fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017882fi
17883
Martin v. Löwis11437992002-04-12 09:54:03 +000017884echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
17885echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017886if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017887
17888cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017889#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017890_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017891
17892fi
17893
Martin v. Löwis11437992002-04-12 09:54:03 +000017894echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
17895echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
17896if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
17897 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017898else
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017900/* confdefs.h. */
17901_ACEOF
17902cat confdefs.h >>conftest.$ac_ext
17903cat >>conftest.$ac_ext <<_ACEOF
17904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017905
17906# include <sys/types.h>
17907# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017908int
17909main ()
17910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017911struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 ;
17913 return 0;
17914}
17915_ACEOF
17916rm -f conftest.$ac_objext
17917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017918 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017920 grep -v '^ *+' conftest.er1 >conftest.err
17921 rm -f conftest.er1
17922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17924 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017925 { ac_try='test -z "$ac_c_werror_flag"
17926 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17928 (eval $ac_try) 2>&5
17929 ac_status=$?
17930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17931 (exit $ac_status); }; } &&
17932 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17934 (eval $ac_try) 2>&5
17935 ac_status=$?
17936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17937 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017938 ac_cv_struct_sockaddr_storage=yes
17939else
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017941sed 's/^/| /' conftest.$ac_ext >&5
17942
Martin v. Löwis11437992002-04-12 09:54:03 +000017943ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017946fi
17947
Martin v. Löwis11437992002-04-12 09:54:03 +000017948echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
17949echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017950if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017951
17952cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017953#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017954_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017955
17956fi
17957
Guido van Rossum627b2d71993-12-24 10:39:16 +000017958# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000017959
Michael W. Hudson54241132001-12-07 15:38:26 +000017960
Martin v. Löwis11437992002-04-12 09:54:03 +000017961echo "$as_me:$LINENO: checking whether char is unsigned" >&5
17962echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
17963if test "${ac_cv_c_char_unsigned+set}" = set; then
17964 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000017965else
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017967/* confdefs.h. */
17968_ACEOF
17969cat confdefs.h >>conftest.$ac_ext
17970cat >>conftest.$ac_ext <<_ACEOF
17971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017973int
17974main ()
17975{
17976static int test_array [1 - 2 * !(((char) -1) < 0)];
17977test_array [0] = 0
17978
17979 ;
17980 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000017981}
Martin v. Löwis11437992002-04-12 09:54:03 +000017982_ACEOF
17983rm -f conftest.$ac_objext
17984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017987 grep -v '^ *+' conftest.er1 >conftest.err
17988 rm -f conftest.er1
17989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17991 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017992 { ac_try='test -z "$ac_c_werror_flag"
17993 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17995 (eval $ac_try) 2>&5
17996 ac_status=$?
17997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17998 (exit $ac_status); }; } &&
17999 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18001 (eval $ac_try) 2>&5
18002 ac_status=$?
18003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18004 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018005 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018006else
18007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018008sed 's/^/| /' conftest.$ac_ext >&5
18009
Martin v. Löwis11437992002-04-12 09:54:03 +000018010ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018011fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018013fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018014echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18015echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018016if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018018#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018019_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018020
18021fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018022
Martin v. Löwis11437992002-04-12 09:54:03 +000018023echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18024echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18025if test "${ac_cv_c_const+set}" = set; then
18026 echo $ECHO_N "(cached) $ECHO_C" >&6
18027else
18028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018029/* confdefs.h. */
18030_ACEOF
18031cat confdefs.h >>conftest.$ac_ext
18032cat >>conftest.$ac_ext <<_ACEOF
18033/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018034
Martin v. Löwis11437992002-04-12 09:54:03 +000018035int
18036main ()
18037{
18038/* FIXME: Include the comments suggested by Paul. */
18039#ifndef __cplusplus
18040 /* Ultrix mips cc rejects this. */
18041 typedef int charset[2];
18042 const charset x;
18043 /* SunOS 4.1.1 cc rejects this. */
18044 char const *const *ccp;
18045 char **p;
18046 /* NEC SVR4.0.2 mips cc rejects this. */
18047 struct point {int x, y;};
18048 static struct point const zero = {0,0};
18049 /* AIX XL C 1.02.0.0 rejects this.
18050 It does not let you subtract one const X* pointer from another in
18051 an arm of an if-expression whose if-part is not a constant
18052 expression */
18053 const char *g = "string";
18054 ccp = &g + (g ? g-g : 0);
18055 /* HPUX 7.0 cc rejects these. */
18056 ++ccp;
18057 p = (char**) ccp;
18058 ccp = (char const *const *) p;
18059 { /* SCO 3.2v4 cc rejects this. */
18060 char *t;
18061 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018062
Martin v. Löwis11437992002-04-12 09:54:03 +000018063 *t++ = 0;
18064 }
18065 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18066 int x[] = {25, 17};
18067 const int *foo = &x[0];
18068 ++foo;
18069 }
18070 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18071 typedef const int *iptr;
18072 iptr p = 0;
18073 ++p;
18074 }
18075 { /* AIX XL C 1.02.0.0 rejects this saying
18076 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18077 struct s { int j; const int *ap[3]; };
18078 struct s *b; b->j = 5;
18079 }
18080 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18081 const int foo = 10;
18082 }
18083#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018084
Martin v. Löwis11437992002-04-12 09:54:03 +000018085 ;
18086 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018087}
Martin v. Löwis11437992002-04-12 09:54:03 +000018088_ACEOF
18089rm -f conftest.$ac_objext
18090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018091 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018093 grep -v '^ *+' conftest.er1 >conftest.err
18094 rm -f conftest.er1
18095 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18097 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018098 { ac_try='test -z "$ac_c_werror_flag"
18099 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18101 (eval $ac_try) 2>&5
18102 ac_status=$?
18103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18104 (exit $ac_status); }; } &&
18105 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18107 (eval $ac_try) 2>&5
18108 ac_status=$?
18109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18110 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018111 ac_cv_c_const=yes
18112else
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018114sed 's/^/| /' conftest.$ac_ext >&5
18115
Martin v. Löwis11437992002-04-12 09:54:03 +000018116ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018117fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018118rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018119fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018120echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
18121echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018122if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018123
18124cat >>confdefs.h <<\_ACEOF
18125#define const
18126_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018127
18128fi
18129
Michael W. Hudson54241132001-12-07 15:38:26 +000018130
Guido van Rossumda88dad1995-01-26 00:46:29 +000018131works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018132echo "$as_me:$LINENO: checking for working volatile" >&5
18133echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
18134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018135/* confdefs.h. */
18136_ACEOF
18137cat confdefs.h >>conftest.$ac_ext
18138cat >>conftest.$ac_ext <<_ACEOF
18139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018140
Martin v. Löwis11437992002-04-12 09:54:03 +000018141int
18142main ()
18143{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018144volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018145 ;
18146 return 0;
18147}
18148_ACEOF
18149rm -f conftest.$ac_objext
18150if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018151 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018153 grep -v '^ *+' conftest.er1 >conftest.err
18154 rm -f conftest.er1
18155 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18157 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018158 { ac_try='test -z "$ac_c_werror_flag"
18159 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18161 (eval $ac_try) 2>&5
18162 ac_status=$?
18163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18164 (exit $ac_status); }; } &&
18165 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18167 (eval $ac_try) 2>&5
18168 ac_status=$?
18169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18170 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018171 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018172else
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018174sed 's/^/| /' conftest.$ac_ext >&5
18175
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177cat >>confdefs.h <<\_ACEOF
18178#define volatile
18179_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018180
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018181
Guido van Rossum627b2d71993-12-24 10:39:16 +000018182fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018183rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018184echo "$as_me:$LINENO: result: $works" >&5
18185echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018186
Guido van Rossumda88dad1995-01-26 00:46:29 +000018187works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018188echo "$as_me:$LINENO: checking for working signed char" >&5
18189echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
18190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018191/* confdefs.h. */
18192_ACEOF
18193cat confdefs.h >>conftest.$ac_ext
18194cat >>conftest.$ac_ext <<_ACEOF
18195/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018196
Martin v. Löwis11437992002-04-12 09:54:03 +000018197int
18198main ()
18199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018200signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000018201 ;
18202 return 0;
18203}
18204_ACEOF
18205rm -f conftest.$ac_objext
18206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018207 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018209 grep -v '^ *+' conftest.er1 >conftest.err
18210 rm -f conftest.er1
18211 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18213 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018214 { ac_try='test -z "$ac_c_werror_flag"
18215 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18217 (eval $ac_try) 2>&5
18218 ac_status=$?
18219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18220 (exit $ac_status); }; } &&
18221 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18223 (eval $ac_try) 2>&5
18224 ac_status=$?
18225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18226 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018227 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018228else
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018230sed 's/^/| /' conftest.$ac_ext >&5
18231
Martin v. Löwis11437992002-04-12 09:54:03 +000018232
18233cat >>confdefs.h <<\_ACEOF
18234#define signed
18235_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018236
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018237
Guido van Rossum7f43da71994-08-01 12:15:30 +000018238fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018240echo "$as_me:$LINENO: result: $works" >&5
18241echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018242
Guido van Rossumda88dad1995-01-26 00:46:29 +000018243have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018244echo "$as_me:$LINENO: checking for prototypes" >&5
18245echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
18246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018247/* confdefs.h. */
18248_ACEOF
18249cat confdefs.h >>conftest.$ac_ext
18250cat >>conftest.$ac_ext <<_ACEOF
18251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018252int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018253int
18254main ()
18255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018256return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018257 ;
18258 return 0;
18259}
18260_ACEOF
18261rm -f conftest.$ac_objext
18262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265 grep -v '^ *+' conftest.er1 >conftest.err
18266 rm -f conftest.er1
18267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18269 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018270 { ac_try='test -z "$ac_c_werror_flag"
18271 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18273 (eval $ac_try) 2>&5
18274 ac_status=$?
18275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18276 (exit $ac_status); }; } &&
18277 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18279 (eval $ac_try) 2>&5
18280 ac_status=$?
18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); }; }; then
18283
18284
18285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018286#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018287_ACEOF
18288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018289 have_prototypes=yes
18290
Guido van Rossumf78abae1997-01-21 22:02:36 +000018291else
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018293sed 's/^/| /' conftest.$ac_ext >&5
18294
Guido van Rossum7f43da71994-08-01 12:15:30 +000018295fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018297echo "$as_me:$LINENO: result: $have_prototypes" >&5
18298echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018299
Guido van Rossumda88dad1995-01-26 00:46:29 +000018300works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018301echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
18302echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
18303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018309
18310#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000018311int foo(int x, ...) {
18312 va_list va;
18313 va_start(va, x);
18314 va_arg(va, int);
18315 va_arg(va, char *);
18316 va_arg(va, double);
18317 return 0;
18318}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018319
Martin v. Löwis11437992002-04-12 09:54:03 +000018320int
18321main ()
18322{
Guido van Rossum90eea071996-08-30 20:58:57 +000018323return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000018324 ;
18325 return 0;
18326}
18327_ACEOF
18328rm -f conftest.$ac_objext
18329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018330 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018332 grep -v '^ *+' conftest.er1 >conftest.err
18333 rm -f conftest.er1
18334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018337 { ac_try='test -z "$ac_c_werror_flag"
18338 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18340 (eval $ac_try) 2>&5
18341 ac_status=$?
18342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18343 (exit $ac_status); }; } &&
18344 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18346 (eval $ac_try) 2>&5
18347 ac_status=$?
18348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18349 (exit $ac_status); }; }; then
18350
18351
18352cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018353#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018354_ACEOF
18355
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018356 works=yes
18357
Guido van Rossumf78abae1997-01-21 22:02:36 +000018358else
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018360sed 's/^/| /' conftest.$ac_ext >&5
18361
Guido van Rossum627b2d71993-12-24 10:39:16 +000018362fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018363rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018364echo "$as_me:$LINENO: result: $works" >&5
18365echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018366
Martin v. Löwisd6320502004-08-12 13:45:08 +000018367# check for socketpair
18368echo "$as_me:$LINENO: checking for socketpair" >&5
18369echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
18370cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000018371/* confdefs.h. */
18372_ACEOF
18373cat confdefs.h >>conftest.$ac_ext
18374cat >>conftest.$ac_ext <<_ACEOF
18375/* end confdefs.h. */
18376
18377#include <sys/types.h>
18378#include <sys/socket.h>
18379
18380int
18381main ()
18382{
18383void *x=socketpair
18384 ;
18385 return 0;
18386}
18387_ACEOF
18388rm -f conftest.$ac_objext
18389if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000018391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018392 grep -v '^ *+' conftest.er1 >conftest.err
18393 rm -f conftest.er1
18394 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000018395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18396 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018397 { ac_try='test -z "$ac_c_werror_flag"
18398 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18400 (eval $ac_try) 2>&5
18401 ac_status=$?
18402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18403 (exit $ac_status); }; } &&
18404 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000018405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18406 (eval $ac_try) 2>&5
18407 ac_status=$?
18408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18409 (exit $ac_status); }; }; then
18410
18411cat >>confdefs.h <<\_ACEOF
18412#define HAVE_SOCKETPAIR 1
18413_ACEOF
18414
18415 echo "$as_me:$LINENO: result: yes" >&5
18416echo "${ECHO_T}yes" >&6
18417else
18418 echo "$as_me: failed program was:" >&5
18419sed 's/^/| /' conftest.$ac_ext >&5
18420
18421echo "$as_me:$LINENO: result: no" >&5
18422echo "${ECHO_T}no" >&6
18423
18424fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018425rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000018426
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018427# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000018428echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
18429echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
18430cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018431/* confdefs.h. */
18432_ACEOF
18433cat confdefs.h >>conftest.$ac_ext
18434cat >>conftest.$ac_ext <<_ACEOF
18435/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018436#include <sys/types.h>
18437#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018438int
18439main ()
18440{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018441struct sockaddr x;
18442x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018443 ;
18444 return 0;
18445}
18446_ACEOF
18447rm -f conftest.$ac_objext
18448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018449 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018451 grep -v '^ *+' conftest.er1 >conftest.err
18452 rm -f conftest.er1
18453 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18455 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018456 { ac_try='test -z "$ac_c_werror_flag"
18457 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18459 (eval $ac_try) 2>&5
18460 ac_status=$?
18461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18462 (exit $ac_status); }; } &&
18463 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18465 (eval $ac_try) 2>&5
18466 ac_status=$?
18467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18468 (exit $ac_status); }; }; then
18469 echo "$as_me:$LINENO: result: yes" >&5
18470echo "${ECHO_T}yes" >&6
18471
18472cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018473#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018474_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018475
18476else
Martin v. Löwis11437992002-04-12 09:54:03 +000018477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018478sed 's/^/| /' conftest.$ac_ext >&5
18479
Martin v. Löwis11437992002-04-12 09:54:03 +000018480echo "$as_me:$LINENO: result: no" >&5
18481echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018482fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018483rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018484
Guido van Rossumda88dad1995-01-26 00:46:29 +000018485va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018486echo "$as_me:$LINENO: checking whether va_list is an array" >&5
18487echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
18488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018489/* confdefs.h. */
18490_ACEOF
18491cat confdefs.h >>conftest.$ac_ext
18492cat >>conftest.$ac_ext <<_ACEOF
18493/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018494
18495#ifdef HAVE_STDARG_PROTOTYPES
18496#include <stdarg.h>
18497#else
18498#include <varargs.h>
18499#endif
18500
Martin v. Löwis11437992002-04-12 09:54:03 +000018501int
18502main ()
18503{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018504va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000018505 ;
18506 return 0;
18507}
18508_ACEOF
18509rm -f conftest.$ac_objext
18510if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018511 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18517 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018518 { ac_try='test -z "$ac_c_werror_flag"
18519 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18521 (eval $ac_try) 2>&5
18522 ac_status=$?
18523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18524 (exit $ac_status); }; } &&
18525 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18527 (eval $ac_try) 2>&5
18528 ac_status=$?
18529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18530 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018531 :
18532else
Martin v. Löwis11437992002-04-12 09:54:03 +000018533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018534sed 's/^/| /' conftest.$ac_ext >&5
18535
Martin v. Löwis11437992002-04-12 09:54:03 +000018536
18537
18538cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018539#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018540_ACEOF
18541
Guido van Rossumda88dad1995-01-26 00:46:29 +000018542 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018544fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018545rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018546echo "$as_me:$LINENO: result: $va_list_is_array" >&5
18547echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018549# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000018550
18551
18552
18553echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
18554echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
18555if test "${ac_cv_func_gethostbyname_r+set}" = set; then
18556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018557else
Martin v. Löwis11437992002-04-12 09:54:03 +000018558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018559/* confdefs.h. */
18560_ACEOF
18561cat confdefs.h >>conftest.$ac_ext
18562cat >>conftest.$ac_ext <<_ACEOF
18563/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018564/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
18565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18566#define gethostbyname_r innocuous_gethostbyname_r
18567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018568/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018569 which can conflict with char gethostbyname_r (); below.
18570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018571 <limits.h> exists even on freestanding compilers. */
18572
18573#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018574# include <limits.h>
18575#else
18576# include <assert.h>
18577#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018578
18579#undef gethostbyname_r
18580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018581/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018582#ifdef __cplusplus
18583extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018584{
Martin v. Löwis11437992002-04-12 09:54:03 +000018585#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018586/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018587 builtin and then its argument prototype would still apply. */
18588char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018589/* The GNU C library defines this for functions which it implements
18590 to always fail with ENOSYS. Some functions are actually named
18591 something starting with __ and the normal name is an alias. */
18592#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
18593choke me
18594#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018595char (*f) () = gethostbyname_r;
18596#endif
18597#ifdef __cplusplus
18598}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018599#endif
18600
Skip Montanaro6dead952003-09-25 14:50:04 +000018601int
18602main ()
18603{
18604return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000018605 ;
18606 return 0;
18607}
18608_ACEOF
18609rm -f conftest.$ac_objext conftest$ac_exeext
18610if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018611 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018613 grep -v '^ *+' conftest.er1 >conftest.err
18614 rm -f conftest.er1
18615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18617 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018618 { ac_try='test -z "$ac_c_werror_flag"
18619 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18621 (eval $ac_try) 2>&5
18622 ac_status=$?
18623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18624 (exit $ac_status); }; } &&
18625 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18627 (eval $ac_try) 2>&5
18628 ac_status=$?
18629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18630 (exit $ac_status); }; }; then
18631 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018632else
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018634sed 's/^/| /' conftest.$ac_ext >&5
18635
Martin v. Löwis11437992002-04-12 09:54:03 +000018636ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018637fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018638rm -f conftest.err conftest.$ac_objext \
18639 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018640fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018641echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
18642echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
18643if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018644
Martin v. Löwis11437992002-04-12 09:54:03 +000018645 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018646#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018647_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018648
Martin v. Löwis11437992002-04-12 09:54:03 +000018649 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
18650echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018651 OLD_CFLAGS=$CFLAGS
18652 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018654/* confdefs.h. */
18655_ACEOF
18656cat confdefs.h >>conftest.$ac_ext
18657cat >>conftest.$ac_ext <<_ACEOF
18658/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018659
18660# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018661
Martin v. Löwis11437992002-04-12 09:54:03 +000018662int
18663main ()
18664{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018665
18666 char *name;
18667 struct hostent *he, *res;
18668 char buffer[2048];
18669 int buflen = 2048;
18670 int h_errnop;
18671
18672 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018673
18674 ;
18675 return 0;
18676}
18677_ACEOF
18678rm -f conftest.$ac_objext
18679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018680 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018682 grep -v '^ *+' conftest.er1 >conftest.err
18683 rm -f conftest.er1
18684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18686 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018687 { ac_try='test -z "$ac_c_werror_flag"
18688 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18690 (eval $ac_try) 2>&5
18691 ac_status=$?
18692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18693 (exit $ac_status); }; } &&
18694 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18696 (eval $ac_try) 2>&5
18697 ac_status=$?
18698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699 (exit $ac_status); }; }; then
18700
18701 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018702#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018703_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018704
Martin v. Löwis11437992002-04-12 09:54:03 +000018705
18706cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018707#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018708_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018709
Martin v. Löwis11437992002-04-12 09:54:03 +000018710 echo "$as_me:$LINENO: result: yes" >&5
18711echo "${ECHO_T}yes" >&6
18712
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018713else
Martin v. Löwis11437992002-04-12 09:54:03 +000018714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018715sed 's/^/| /' conftest.$ac_ext >&5
18716
Martin v. Löwis11437992002-04-12 09:54:03 +000018717
18718 echo "$as_me:$LINENO: result: no" >&5
18719echo "${ECHO_T}no" >&6
18720 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
18721echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
18722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018723/* confdefs.h. */
18724_ACEOF
18725cat confdefs.h >>conftest.$ac_ext
18726cat >>conftest.$ac_ext <<_ACEOF
18727/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018728
18729# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018730
Martin v. Löwis11437992002-04-12 09:54:03 +000018731int
18732main ()
18733{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018734
18735 char *name;
18736 struct hostent *he;
18737 char buffer[2048];
18738 int buflen = 2048;
18739 int h_errnop;
18740
18741 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000018742
18743 ;
18744 return 0;
18745}
18746_ACEOF
18747rm -f conftest.$ac_objext
18748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1
18753 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018756 { ac_try='test -z "$ac_c_werror_flag"
18757 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18759 (eval $ac_try) 2>&5
18760 ac_status=$?
18761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18762 (exit $ac_status); }; } &&
18763 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18765 (eval $ac_try) 2>&5
18766 ac_status=$?
18767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18768 (exit $ac_status); }; }; then
18769
18770 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018771#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018772_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018773
Martin v. Löwis11437992002-04-12 09:54:03 +000018774
18775cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018776#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018777_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018778
Martin v. Löwis11437992002-04-12 09:54:03 +000018779 echo "$as_me:$LINENO: result: yes" >&5
18780echo "${ECHO_T}yes" >&6
18781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018782else
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018784sed 's/^/| /' conftest.$ac_ext >&5
18785
Martin v. Löwis11437992002-04-12 09:54:03 +000018786
18787 echo "$as_me:$LINENO: result: no" >&5
18788echo "${ECHO_T}no" >&6
18789 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
18790echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
18791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018792/* confdefs.h. */
18793_ACEOF
18794cat confdefs.h >>conftest.$ac_ext
18795cat >>conftest.$ac_ext <<_ACEOF
18796/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018797
18798# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018799
Martin v. Löwis11437992002-04-12 09:54:03 +000018800int
18801main ()
18802{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018803
18804 char *name;
18805 struct hostent *he;
18806 struct hostent_data data;
18807
18808 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000018809
18810 ;
18811 return 0;
18812}
18813_ACEOF
18814rm -f conftest.$ac_objext
18815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018816 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018818 grep -v '^ *+' conftest.er1 >conftest.err
18819 rm -f conftest.er1
18820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18822 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018823 { ac_try='test -z "$ac_c_werror_flag"
18824 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18826 (eval $ac_try) 2>&5
18827 ac_status=$?
18828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18829 (exit $ac_status); }; } &&
18830 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18832 (eval $ac_try) 2>&5
18833 ac_status=$?
18834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18835 (exit $ac_status); }; }; then
18836
18837 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018838#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018839_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000018840
Martin v. Löwis11437992002-04-12 09:54:03 +000018841
18842cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018843#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018844_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018845
Martin v. Löwis11437992002-04-12 09:54:03 +000018846 echo "$as_me:$LINENO: result: yes" >&5
18847echo "${ECHO_T}yes" >&6
18848
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018849else
Martin v. Löwis11437992002-04-12 09:54:03 +000018850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018851sed 's/^/| /' conftest.$ac_ext >&5
18852
Martin v. Löwis11437992002-04-12 09:54:03 +000018853
18854 echo "$as_me:$LINENO: result: no" >&5
18855echo "${ECHO_T}no" >&6
18856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018857fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018859
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018860fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018861rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018862
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018863fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018864rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018865 CFLAGS=$OLD_CFLAGS
18866
18867else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018868
Martin v. Löwis11437992002-04-12 09:54:03 +000018869
18870for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000018871do
Martin v. Löwis11437992002-04-12 09:54:03 +000018872as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18873echo "$as_me:$LINENO: checking for $ac_func" >&5
18874echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18875if eval "test \"\${$as_ac_var+set}\" = set"; then
18876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018877else
Martin v. Löwis11437992002-04-12 09:54:03 +000018878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018879/* confdefs.h. */
18880_ACEOF
18881cat confdefs.h >>conftest.$ac_ext
18882cat >>conftest.$ac_ext <<_ACEOF
18883/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018884/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18885 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18886#define $ac_func innocuous_$ac_func
18887
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018888/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018889 which can conflict with char $ac_func (); below.
18890 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018891 <limits.h> exists even on freestanding compilers. */
18892
18893#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018894# include <limits.h>
18895#else
18896# include <assert.h>
18897#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018898
18899#undef $ac_func
18900
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018901/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018902#ifdef __cplusplus
18903extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018904{
Martin v. Löwis11437992002-04-12 09:54:03 +000018905#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018906/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018907 builtin and then its argument prototype would still apply. */
18908char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018909/* The GNU C library defines this for functions which it implements
18910 to always fail with ENOSYS. Some functions are actually named
18911 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000018912#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018913choke me
18914#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018915char (*f) () = $ac_func;
18916#endif
18917#ifdef __cplusplus
18918}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018919#endif
18920
Skip Montanaro6dead952003-09-25 14:50:04 +000018921int
18922main ()
18923{
18924return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018925 ;
18926 return 0;
18927}
18928_ACEOF
18929rm -f conftest.$ac_objext conftest$ac_exeext
18930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018931 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18937 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018938 { ac_try='test -z "$ac_c_werror_flag"
18939 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18941 (eval $ac_try) 2>&5
18942 ac_status=$?
18943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18944 (exit $ac_status); }; } &&
18945 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18947 (eval $ac_try) 2>&5
18948 ac_status=$?
18949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18950 (exit $ac_status); }; }; then
18951 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018952else
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018954sed 's/^/| /' conftest.$ac_ext >&5
18955
Martin v. Löwis11437992002-04-12 09:54:03 +000018956eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018958rm -f conftest.err conftest.$ac_objext \
18959 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018961echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18962echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18963if test `eval echo '${'$as_ac_var'}'` = yes; then
18964 cat >>confdefs.h <<_ACEOF
18965#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18966_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018968fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018969done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018970
Michael W. Hudson54241132001-12-07 15:38:26 +000018971
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000018972fi
18973
Michael W. Hudson54241132001-12-07 15:38:26 +000018974
18975
18976
18977
18978
18979
Guido van Rossum627b2d71993-12-24 10:39:16 +000018980# checks for system services
18981# (none yet)
18982
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018983# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000018984echo "$as_me:$LINENO: checking for __fpu_control" >&5
18985echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
18986if test "${ac_cv_func___fpu_control+set}" = set; then
18987 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018988else
Martin v. Löwis11437992002-04-12 09:54:03 +000018989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018990/* confdefs.h. */
18991_ACEOF
18992cat confdefs.h >>conftest.$ac_ext
18993cat >>conftest.$ac_ext <<_ACEOF
18994/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018995/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
18996 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18997#define __fpu_control innocuous___fpu_control
18998
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018999/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019000 which can conflict with char __fpu_control (); below.
19001 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019002 <limits.h> exists even on freestanding compilers. */
19003
19004#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019005# include <limits.h>
19006#else
19007# include <assert.h>
19008#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019009
19010#undef __fpu_control
19011
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019012/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019013#ifdef __cplusplus
19014extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019015{
Martin v. Löwis11437992002-04-12 09:54:03 +000019016#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019017/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019018 builtin and then its argument prototype would still apply. */
19019char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019020/* The GNU C library defines this for functions which it implements
19021 to always fail with ENOSYS. Some functions are actually named
19022 something starting with __ and the normal name is an alias. */
19023#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
19024choke me
19025#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019026char (*f) () = __fpu_control;
19027#endif
19028#ifdef __cplusplus
19029}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019030#endif
19031
Skip Montanaro6dead952003-09-25 14:50:04 +000019032int
19033main ()
19034{
19035return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000019036 ;
19037 return 0;
19038}
19039_ACEOF
19040rm -f conftest.$ac_objext conftest$ac_exeext
19041if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019042 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019044 grep -v '^ *+' conftest.er1 >conftest.err
19045 rm -f conftest.er1
19046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19048 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019049 { ac_try='test -z "$ac_c_werror_flag"
19050 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19052 (eval $ac_try) 2>&5
19053 ac_status=$?
19054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19055 (exit $ac_status); }; } &&
19056 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19058 (eval $ac_try) 2>&5
19059 ac_status=$?
19060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061 (exit $ac_status); }; }; then
19062 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019063else
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019065sed 's/^/| /' conftest.$ac_ext >&5
19066
Martin v. Löwis11437992002-04-12 09:54:03 +000019067ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019068fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019069rm -f conftest.err conftest.$ac_objext \
19070 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019071fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019072echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19073echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
19074if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019075 :
19076else
Martin v. Löwis11437992002-04-12 09:54:03 +000019077
19078echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19079echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
19080if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19081 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019082else
Martin v. Löwis11437992002-04-12 09:54:03 +000019083 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019084LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019086/* confdefs.h. */
19087_ACEOF
19088cat confdefs.h >>conftest.$ac_ext
19089cat >>conftest.$ac_ext <<_ACEOF
19090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019092/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019093#ifdef __cplusplus
19094extern "C"
19095#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019096/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019097 builtin and then its argument prototype would still apply. */
19098char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019099int
19100main ()
19101{
19102__fpu_control ();
19103 ;
19104 return 0;
19105}
19106_ACEOF
19107rm -f conftest.$ac_objext conftest$ac_exeext
19108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019109 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019111 grep -v '^ *+' conftest.er1 >conftest.err
19112 rm -f conftest.er1
19113 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19115 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019116 { ac_try='test -z "$ac_c_werror_flag"
19117 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19119 (eval $ac_try) 2>&5
19120 ac_status=$?
19121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19122 (exit $ac_status); }; } &&
19123 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19125 (eval $ac_try) 2>&5
19126 ac_status=$?
19127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19128 (exit $ac_status); }; }; then
19129 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019130else
Martin v. Löwis11437992002-04-12 09:54:03 +000019131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019132sed 's/^/| /' conftest.$ac_ext >&5
19133
Martin v. Löwis11437992002-04-12 09:54:03 +000019134ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019135fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019136rm -f conftest.err conftest.$ac_objext \
19137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019138LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019140echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19141echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
19142if test $ac_cv_lib_ieee___fpu_control = yes; then
19143 cat >>confdefs.h <<_ACEOF
19144#define HAVE_LIBIEEE 1
19145_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019146
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019147 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019148
Guido van Rossum627b2d71993-12-24 10:39:16 +000019149fi
19150
Michael W. Hudson54241132001-12-07 15:38:26 +000019151
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019152fi
19153
Michael W. Hudson54241132001-12-07 15:38:26 +000019154
Guido van Rossum7f253911997-05-09 02:42:48 +000019155# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000019156echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19157echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
19158
Guido van Rossum7f253911997-05-09 02:42:48 +000019159# Check whether --with-fpectl or --without-fpectl was given.
19160if test "${with_fpectl+set}" = set; then
19161 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000019162
Guido van Rossum7f253911997-05-09 02:42:48 +000019163if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019164then
19165
19166cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000019167#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019168_ACEOF
19169
19170 echo "$as_me:$LINENO: result: yes" >&5
19171echo "${ECHO_T}yes" >&6
19172else echo "$as_me:$LINENO: result: no" >&5
19173echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019174fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019175else
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 echo "$as_me:$LINENO: result: no" >&5
19177echo "${ECHO_T}no" >&6
19178fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000019179
Guido van Rossum7f43da71994-08-01 12:15:30 +000019180# check for --with-libm=...
19181
Guido van Rossum563e7081996-09-10 18:20:48 +000019182case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019183Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000019184BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000019185*) LIBM=-lm
19186esac
Martin v. Löwis11437992002-04-12 09:54:03 +000019187echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
19188echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
19189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019190# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019191if test "${with_libm+set}" = set; then
19192 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000019193
Guido van Rossum7f253911997-05-09 02:42:48 +000019194if test "$withval" = no
19195then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 echo "$as_me:$LINENO: result: force LIBM empty" >&5
19197echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019198elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019199then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019200 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
19201echo "${ECHO_T}set LIBM=\"$withval\"" >&6
19202else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
19203echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
19204 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019205fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019206else
Martin v. Löwis11437992002-04-12 09:54:03 +000019207 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
19208echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
19209fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019210
19211# check for --with-libc=...
19212
Martin v. Löwis11437992002-04-12 09:54:03 +000019213echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
19214echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
19215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019216# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019217if test "${with_libc+set}" = set; then
19218 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000019219
Guido van Rossum7f253911997-05-09 02:42:48 +000019220if test "$withval" = no
19221then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 echo "$as_me:$LINENO: result: force LIBC empty" >&5
19223echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019224elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019225then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000019226 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
19227echo "${ECHO_T}set LIBC=\"$withval\"" >&6
19228else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
19229echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
19230 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019231fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019232else
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
19234echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
19235fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019236
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019237# check for hypot() in math library
19238LIBS_SAVE=$LIBS
19239LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000019240
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019241for ac_func in hypot
19242do
Martin v. Löwis11437992002-04-12 09:54:03 +000019243as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19244echo "$as_me:$LINENO: checking for $ac_func" >&5
19245echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19246if eval "test \"\${$as_ac_var+set}\" = set"; then
19247 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019248else
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019250/* confdefs.h. */
19251_ACEOF
19252cat confdefs.h >>conftest.$ac_ext
19253cat >>conftest.$ac_ext <<_ACEOF
19254/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019255/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19256 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19257#define $ac_func innocuous_$ac_func
19258
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019259/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019260 which can conflict with char $ac_func (); below.
19261 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019262 <limits.h> exists even on freestanding compilers. */
19263
19264#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019265# include <limits.h>
19266#else
19267# include <assert.h>
19268#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019269
19270#undef $ac_func
19271
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019272/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019273#ifdef __cplusplus
19274extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000019275{
Martin v. Löwis11437992002-04-12 09:54:03 +000019276#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019277/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019278 builtin and then its argument prototype would still apply. */
19279char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019280/* The GNU C library defines this for functions which it implements
19281 to always fail with ENOSYS. Some functions are actually named
19282 something starting with __ and the normal name is an alias. */
19283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19284choke me
19285#else
Skip Montanaro6dead952003-09-25 14:50:04 +000019286char (*f) () = $ac_func;
19287#endif
19288#ifdef __cplusplus
19289}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019290#endif
19291
Skip Montanaro6dead952003-09-25 14:50:04 +000019292int
19293main ()
19294{
19295return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019296 ;
19297 return 0;
19298}
19299_ACEOF
19300rm -f conftest.$ac_objext conftest$ac_exeext
19301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019302 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019304 grep -v '^ *+' conftest.er1 >conftest.err
19305 rm -f conftest.er1
19306 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19308 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019309 { ac_try='test -z "$ac_c_werror_flag"
19310 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19312 (eval $ac_try) 2>&5
19313 ac_status=$?
19314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19315 (exit $ac_status); }; } &&
19316 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19318 (eval $ac_try) 2>&5
19319 ac_status=$?
19320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19321 (exit $ac_status); }; }; then
19322 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019323else
Martin v. Löwis11437992002-04-12 09:54:03 +000019324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019325sed 's/^/| /' conftest.$ac_ext >&5
19326
Martin v. Löwis11437992002-04-12 09:54:03 +000019327eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019329rm -f conftest.err conftest.$ac_objext \
19330 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019332echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19333echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19334if test `eval echo '${'$as_ac_var'}'` = yes; then
19335 cat >>confdefs.h <<_ACEOF
19336#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19337_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019338
Michael W. Hudson54241132001-12-07 15:38:26 +000019339else
Skip Montanarof0d5f792004-08-15 14:08:23 +000019340 case $LIBOBJS in
19341 "$ac_func.$ac_objext" | \
19342 *" $ac_func.$ac_objext" | \
19343 "$ac_func.$ac_objext "* | \
19344 *" $ac_func.$ac_objext "* ) ;;
19345 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
19346esac
19347
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019348fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019349done
19350
Michael W. Hudson54241132001-12-07 15:38:26 +000019351
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019352LIBS=$LIBS_SAVE
19353
Guido van Rossumef2255b2000-03-10 22:30:29 +000019354# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000019355if test "${ac_cv_header_wchar_h+set}" = set; then
19356 echo "$as_me:$LINENO: checking for wchar.h" >&5
19357echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19358if test "${ac_cv_header_wchar_h+set}" = set; then
19359 echo $ECHO_N "(cached) $ECHO_C" >&6
19360fi
19361echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19362echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019363else
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 # Is the header compilable?
19365echo "$as_me:$LINENO: checking wchar.h usability" >&5
19366echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
19367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019368/* confdefs.h. */
19369_ACEOF
19370cat confdefs.h >>conftest.$ac_ext
19371cat >>conftest.$ac_ext <<_ACEOF
19372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019373$ac_includes_default
19374#include <wchar.h>
19375_ACEOF
19376rm -f conftest.$ac_objext
19377if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019378 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019380 grep -v '^ *+' conftest.er1 >conftest.err
19381 rm -f conftest.er1
19382 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19384 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019385 { ac_try='test -z "$ac_c_werror_flag"
19386 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19388 (eval $ac_try) 2>&5
19389 ac_status=$?
19390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19391 (exit $ac_status); }; } &&
19392 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19394 (eval $ac_try) 2>&5
19395 ac_status=$?
19396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19397 (exit $ac_status); }; }; then
19398 ac_header_compiler=yes
19399else
19400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019401sed 's/^/| /' conftest.$ac_ext >&5
19402
Martin v. Löwis11437992002-04-12 09:54:03 +000019403ac_header_compiler=no
19404fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019405rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019406echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19407echo "${ECHO_T}$ac_header_compiler" >&6
19408
19409# Is the header present?
19410echo "$as_me:$LINENO: checking wchar.h presence" >&5
19411echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
19412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019413/* confdefs.h. */
19414_ACEOF
19415cat confdefs.h >>conftest.$ac_ext
19416cat >>conftest.$ac_ext <<_ACEOF
19417/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019418#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019419_ACEOF
19420if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19422 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019423 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000019424 rm -f conftest.er1
19425 cat conftest.err >&5
19426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19427 (exit $ac_status); } >/dev/null; then
19428 if test -s conftest.err; then
19429 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019430 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000019431 else
19432 ac_cpp_err=
19433 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019434else
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 ac_cpp_err=yes
19436fi
19437if test -z "$ac_cpp_err"; then
19438 ac_header_preproc=yes
19439else
19440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019441sed 's/^/| /' conftest.$ac_ext >&5
19442
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019444fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019445rm -f conftest.err conftest.$ac_ext
19446echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19447echo "${ECHO_T}$ac_header_preproc" >&6
19448
19449# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019450case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19451 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
19453echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
19455echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
19456 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019457 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019458 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019459 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
19460echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019461 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
19462echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
19463 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
19464echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
19465 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
19466echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019467 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
19468echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019469 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
19470echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019471 (
19472 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000019473## ------------------------------------------------ ##
19474## Report this to http://www.python.org/python-bugs ##
19475## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000019476_ASBOX
19477 ) |
19478 sed "s/^/$as_me: WARNING: /" >&2
19479 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019480esac
19481echo "$as_me:$LINENO: checking for wchar.h" >&5
19482echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
19483if test "${ac_cv_header_wchar_h+set}" = set; then
19484 echo $ECHO_N "(cached) $ECHO_C" >&6
19485else
19486 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000019487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019488echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19489echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
19490
19491fi
19492if test $ac_cv_header_wchar_h = yes; then
19493
19494
19495cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019496#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019497_ACEOF
19498
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019499 wchar_h="yes"
19500
Guido van Rossumef2255b2000-03-10 22:30:29 +000019501else
Martin v. Löwis11437992002-04-12 09:54:03 +000019502 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000019503
19504fi
19505
Michael W. Hudson54241132001-12-07 15:38:26 +000019506
Martin v. Löwis11437992002-04-12 09:54:03 +000019507
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019508# determine wchar_t size
19509if test "$wchar_h" = yes
19510then
Martin v. Löwis11437992002-04-12 09:54:03 +000019511 echo "$as_me:$LINENO: checking for wchar_t" >&5
19512echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19513if test "${ac_cv_type_wchar_t+set}" = set; then
19514 echo $ECHO_N "(cached) $ECHO_C" >&6
19515else
19516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019517/* confdefs.h. */
19518_ACEOF
19519cat confdefs.h >>conftest.$ac_ext
19520cat >>conftest.$ac_ext <<_ACEOF
19521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019522#include <wchar.h>
19523
Martin v. Löwis11437992002-04-12 09:54:03 +000019524int
19525main ()
19526{
19527if ((wchar_t *) 0)
19528 return 0;
19529if (sizeof (wchar_t))
19530 return 0;
19531 ;
19532 return 0;
19533}
19534_ACEOF
19535rm -f conftest.$ac_objext
19536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019537 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019539 grep -v '^ *+' conftest.er1 >conftest.err
19540 rm -f conftest.er1
19541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19543 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019544 { ac_try='test -z "$ac_c_werror_flag"
19545 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19547 (eval $ac_try) 2>&5
19548 ac_status=$?
19549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19550 (exit $ac_status); }; } &&
19551 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19553 (eval $ac_try) 2>&5
19554 ac_status=$?
19555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19556 (exit $ac_status); }; }; then
19557 ac_cv_type_wchar_t=yes
19558else
19559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019560sed 's/^/| /' conftest.$ac_ext >&5
19561
Martin v. Löwis11437992002-04-12 09:54:03 +000019562ac_cv_type_wchar_t=no
19563fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019565fi
19566echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
19567echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19568
19569echo "$as_me:$LINENO: checking size of wchar_t" >&5
19570echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19571if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19572 echo $ECHO_N "(cached) $ECHO_C" >&6
19573else
19574 if test "$ac_cv_type_wchar_t" = yes; then
19575 # The cast to unsigned long works around a bug in the HP C Compiler
19576 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19577 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19578 # This bug is HP SR number 8606223364.
19579 if test "$cross_compiling" = yes; then
19580 # Depending upon the size, compute the lo and hi bounds.
19581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019582/* confdefs.h. */
19583_ACEOF
19584cat confdefs.h >>conftest.$ac_ext
19585cat >>conftest.$ac_ext <<_ACEOF
19586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019587#include <wchar.h>
19588
Martin v. Löwis11437992002-04-12 09:54:03 +000019589int
19590main ()
19591{
19592static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
19593test_array [0] = 0
19594
19595 ;
19596 return 0;
19597}
19598_ACEOF
19599rm -f conftest.$ac_objext
19600if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019601 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019603 grep -v '^ *+' conftest.er1 >conftest.err
19604 rm -f conftest.er1
19605 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19607 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019608 { ac_try='test -z "$ac_c_werror_flag"
19609 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19611 (eval $ac_try) 2>&5
19612 ac_status=$?
19613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19614 (exit $ac_status); }; } &&
19615 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19617 (eval $ac_try) 2>&5
19618 ac_status=$?
19619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19620 (exit $ac_status); }; }; then
19621 ac_lo=0 ac_mid=0
19622 while :; do
19623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019624/* confdefs.h. */
19625_ACEOF
19626cat confdefs.h >>conftest.$ac_ext
19627cat >>conftest.$ac_ext <<_ACEOF
19628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019629#include <wchar.h>
19630
Martin v. Löwis11437992002-04-12 09:54:03 +000019631int
19632main ()
19633{
19634static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19635test_array [0] = 0
19636
19637 ;
19638 return 0;
19639}
19640_ACEOF
19641rm -f conftest.$ac_objext
19642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019645 grep -v '^ *+' conftest.er1 >conftest.err
19646 rm -f conftest.er1
19647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19649 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019650 { ac_try='test -z "$ac_c_werror_flag"
19651 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19653 (eval $ac_try) 2>&5
19654 ac_status=$?
19655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19656 (exit $ac_status); }; } &&
19657 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19659 (eval $ac_try) 2>&5
19660 ac_status=$?
19661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19662 (exit $ac_status); }; }; then
19663 ac_hi=$ac_mid; break
19664else
19665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019666sed 's/^/| /' conftest.$ac_ext >&5
19667
Martin v. Löwis11437992002-04-12 09:54:03 +000019668ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 if test $ac_lo -le $ac_mid; then
19670 ac_lo= ac_hi=
19671 break
19672 fi
19673 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000019674fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 done
19677else
19678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019679sed 's/^/| /' conftest.$ac_ext >&5
19680
Martin v. Löwis11437992002-04-12 09:54:03 +000019681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019682/* confdefs.h. */
19683_ACEOF
19684cat confdefs.h >>conftest.$ac_ext
19685cat >>conftest.$ac_ext <<_ACEOF
19686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019687#include <wchar.h>
19688
Martin v. Löwis11437992002-04-12 09:54:03 +000019689int
19690main ()
19691{
19692static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
19693test_array [0] = 0
19694
19695 ;
19696 return 0;
19697}
19698_ACEOF
19699rm -f conftest.$ac_objext
19700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019708 { ac_try='test -z "$ac_c_werror_flag"
19709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19711 (eval $ac_try) 2>&5
19712 ac_status=$?
19713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19714 (exit $ac_status); }; } &&
19715 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19717 (eval $ac_try) 2>&5
19718 ac_status=$?
19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19720 (exit $ac_status); }; }; then
19721 ac_hi=-1 ac_mid=-1
19722 while :; do
19723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019724/* confdefs.h. */
19725_ACEOF
19726cat confdefs.h >>conftest.$ac_ext
19727cat >>conftest.$ac_ext <<_ACEOF
19728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019729#include <wchar.h>
19730
Martin v. Löwis11437992002-04-12 09:54:03 +000019731int
19732main ()
19733{
19734static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
19735test_array [0] = 0
19736
19737 ;
19738 return 0;
19739}
19740_ACEOF
19741rm -f conftest.$ac_objext
19742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019743 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019745 grep -v '^ *+' conftest.er1 >conftest.err
19746 rm -f conftest.er1
19747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19749 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019750 { ac_try='test -z "$ac_c_werror_flag"
19751 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19753 (eval $ac_try) 2>&5
19754 ac_status=$?
19755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19756 (exit $ac_status); }; } &&
19757 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19759 (eval $ac_try) 2>&5
19760 ac_status=$?
19761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19762 (exit $ac_status); }; }; then
19763 ac_lo=$ac_mid; break
19764else
19765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019766sed 's/^/| /' conftest.$ac_ext >&5
19767
Martin v. Löwis11437992002-04-12 09:54:03 +000019768ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000019769 if test $ac_mid -le $ac_hi; then
19770 ac_lo= ac_hi=
19771 break
19772 fi
19773 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000019774fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019776 done
19777else
19778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019779sed 's/^/| /' conftest.$ac_ext >&5
19780
Martin v. Löwis11437992002-04-12 09:54:03 +000019781ac_lo= ac_hi=
19782fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019783rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019784fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019785rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019786# Binary search between lo and hi bounds.
19787while test "x$ac_lo" != "x$ac_hi"; do
19788 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019790/* confdefs.h. */
19791_ACEOF
19792cat confdefs.h >>conftest.$ac_ext
19793cat >>conftest.$ac_ext <<_ACEOF
19794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019795#include <wchar.h>
19796
Martin v. Löwis11437992002-04-12 09:54:03 +000019797int
19798main ()
19799{
19800static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
19801test_array [0] = 0
19802
19803 ;
19804 return 0;
19805}
19806_ACEOF
19807rm -f conftest.$ac_objext
19808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019809 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019811 grep -v '^ *+' conftest.er1 >conftest.err
19812 rm -f conftest.er1
19813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19815 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019816 { ac_try='test -z "$ac_c_werror_flag"
19817 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19819 (eval $ac_try) 2>&5
19820 ac_status=$?
19821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19822 (exit $ac_status); }; } &&
19823 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19825 (eval $ac_try) 2>&5
19826 ac_status=$?
19827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19828 (exit $ac_status); }; }; then
19829 ac_hi=$ac_mid
19830else
19831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019832sed 's/^/| /' conftest.$ac_ext >&5
19833
Martin v. Löwis11437992002-04-12 09:54:03 +000019834ac_lo=`expr '(' $ac_mid ')' + 1`
19835fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019837done
19838case $ac_lo in
19839?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000019840'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19841See \`config.log' for more details." >&5
19842echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19843See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019844 { (exit 1); exit 1; }; } ;;
19845esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019846else
19847 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000019848 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19849See \`config.log' for more details." >&5
19850echo "$as_me: error: cannot run test program while cross compiling
19851See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019852 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000019853else
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019855/* confdefs.h. */
19856_ACEOF
19857cat confdefs.h >>conftest.$ac_ext
19858cat >>conftest.$ac_ext <<_ACEOF
19859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019860#include <wchar.h>
19861
19862long longval () { return (long) (sizeof (wchar_t)); }
19863unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000019864#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019865#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019866int
19867main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019868{
Martin v. Löwis11437992002-04-12 09:54:03 +000019869
19870 FILE *f = fopen ("conftest.val", "w");
19871 if (! f)
19872 exit (1);
19873 if (((long) (sizeof (wchar_t))) < 0)
19874 {
19875 long i = longval ();
19876 if (i != ((long) (sizeof (wchar_t))))
19877 exit (1);
19878 fprintf (f, "%ld\n", i);
19879 }
19880 else
19881 {
19882 unsigned long i = ulongval ();
19883 if (i != ((long) (sizeof (wchar_t))))
19884 exit (1);
19885 fprintf (f, "%lu\n", i);
19886 }
19887 exit (ferror (f) || fclose (f) != 0);
19888
19889 ;
19890 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000019891}
Martin v. Löwis11437992002-04-12 09:54:03 +000019892_ACEOF
19893rm -f conftest$ac_exeext
19894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19895 (eval $ac_link) 2>&5
19896 ac_status=$?
19897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19898 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19900 (eval $ac_try) 2>&5
19901 ac_status=$?
19902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19903 (exit $ac_status); }; }; then
19904 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000019905else
Martin v. Löwis11437992002-04-12 09:54:03 +000019906 echo "$as_me: program exited with status $ac_status" >&5
19907echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019908sed 's/^/| /' conftest.$ac_ext >&5
19909
Martin v. Löwis11437992002-04-12 09:54:03 +000019910( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000019911{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
19912See \`config.log' for more details." >&5
19913echo "$as_me: error: cannot compute sizeof (wchar_t), 77
19914See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 { (exit 1); exit 1; }; }
19916fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019917rm -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 +000019918fi
19919fi
19920rm -f conftest.val
19921else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019922 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000019923fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019924fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019925echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
19926echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
19927cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019928#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019929_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019930
Michael W. Hudson54241132001-12-07 15:38:26 +000019931
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019932fi
19933
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019934echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
19935echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
19936have_ucs4_tcl=no
19937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019938/* confdefs.h. */
19939_ACEOF
19940cat confdefs.h >>conftest.$ac_ext
19941cat >>conftest.$ac_ext <<_ACEOF
19942/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019943
19944#include <tcl.h>
19945#if TCL_UTF_MAX != 6
19946# error "NOT UCS4_TCL"
19947#endif
19948int
19949main ()
19950{
19951
19952 ;
19953 return 0;
19954}
19955_ACEOF
19956rm -f conftest.$ac_objext
19957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019958 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019960 grep -v '^ *+' conftest.er1 >conftest.err
19961 rm -f conftest.er1
19962 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19964 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019965 { ac_try='test -z "$ac_c_werror_flag"
19966 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19968 (eval $ac_try) 2>&5
19969 ac_status=$?
19970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19971 (exit $ac_status); }; } &&
19972 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19974 (eval $ac_try) 2>&5
19975 ac_status=$?
19976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19977 (exit $ac_status); }; }; then
19978
19979
19980cat >>confdefs.h <<\_ACEOF
19981#define HAVE_UCS4_TCL 1
19982_ACEOF
19983
19984 have_ucs4_tcl=yes
19985
19986else
19987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019988sed 's/^/| /' conftest.$ac_ext >&5
19989
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019990fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000019992echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
19993echo "${ECHO_T}$have_ucs4_tcl" >&6
19994
Skip Montanaro6dead952003-09-25 14:50:04 +000019995# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019996if test "$wchar_h" = yes
19997then
19998 # check whether wchar_t is signed or not
19999 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20000echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
20001 if test "${ac_cv_wchar_t_signed+set}" = set; then
20002 echo $ECHO_N "(cached) $ECHO_C" >&6
20003else
20004
20005 if test "$cross_compiling" = yes; then
20006 ac_cv_wchar_t_signed=yes
20007else
20008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020009/* confdefs.h. */
20010_ACEOF
20011cat confdefs.h >>conftest.$ac_ext
20012cat >>conftest.$ac_ext <<_ACEOF
20013/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020014
20015 #include <wchar.h>
20016 int main()
20017 {
20018 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
20019 }
20020
20021_ACEOF
20022rm -f conftest$ac_exeext
20023if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20024 (eval $ac_link) 2>&5
20025 ac_status=$?
20026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20029 (eval $ac_try) 2>&5
20030 ac_status=$?
20031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20032 (exit $ac_status); }; }; then
20033 ac_cv_wchar_t_signed=yes
20034else
20035 echo "$as_me: program exited with status $ac_status" >&5
20036echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020037sed 's/^/| /' conftest.$ac_ext >&5
20038
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020039( exit $ac_status )
20040ac_cv_wchar_t_signed=no
20041fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020042rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020043fi
20044fi
20045
20046 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20047echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
20048fi
20049
Martin v. Löwis11437992002-04-12 09:54:03 +000020050echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20051echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020052# Check whether --enable-unicode or --disable-unicode was given.
20053if test "${enable_unicode+set}" = set; then
20054 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000020055
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020056else
20057 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000020058fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020059
20060if test $enable_unicode = yes
20061then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020062 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020063 case "$have_ucs4_tcl" in
20064 yes) enable_unicode="ucs4"
20065 ;;
20066 *) enable_unicode="ucs2"
20067 ;;
20068 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020069fi
20070
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020071
20072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020073case "$enable_unicode" in
20074ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020075 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020076#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020077_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020078
20079 ;;
20080ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020081 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020082#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020083_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020084
20085 ;;
20086esac
20087
Michael W. Hudson54241132001-12-07 15:38:26 +000020088
Martin v. Löwis11437992002-04-12 09:54:03 +000020089
20090
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020091
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020092if test "$enable_unicode" = "no"
20093then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020094 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000020095 echo "$as_me:$LINENO: result: not used" >&5
20096echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020097else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020098 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020099
20100cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020101#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020102_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020103
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020104
20105 # wchar_t is only usable if it maps to an unsigned type
20106 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020107 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020108 then
20109 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020110
Martin v. Löwis11437992002-04-12 09:54:03 +000020111cat >>confdefs.h <<\_ACEOF
20112#define HAVE_USABLE_WCHAR_T 1
20113_ACEOF
20114
20115 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020116#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020117_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020118
20119 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20120 then
20121 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020122 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020123#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020125
20126 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20127 then
20128 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020129 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020130#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020131_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020132
20133 else
20134 PY_UNICODE_TYPE="no type found"
20135 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020136 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20137echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020138fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020139
20140# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020141echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20142echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
20143if test "${ac_cv_c_bigendian+set}" = set; then
20144 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020145else
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 # See if sys/param.h defines the BYTE_ORDER macro.
20147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020148/* confdefs.h. */
20149_ACEOF
20150cat confdefs.h >>conftest.$ac_ext
20151cat >>conftest.$ac_ext <<_ACEOF
20152/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020153#include <sys/types.h>
20154#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020155
Martin v. Löwis11437992002-04-12 09:54:03 +000020156int
20157main ()
20158{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020159#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20160 bogus endian macros
20161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020162
20163 ;
20164 return 0;
20165}
20166_ACEOF
20167rm -f conftest.$ac_objext
20168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020169 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020171 grep -v '^ *+' conftest.er1 >conftest.err
20172 rm -f conftest.er1
20173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20175 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020176 { ac_try='test -z "$ac_c_werror_flag"
20177 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20179 (eval $ac_try) 2>&5
20180 ac_status=$?
20181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20182 (exit $ac_status); }; } &&
20183 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20185 (eval $ac_try) 2>&5
20186 ac_status=$?
20187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020189 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000020190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020191/* confdefs.h. */
20192_ACEOF
20193cat confdefs.h >>conftest.$ac_ext
20194cat >>conftest.$ac_ext <<_ACEOF
20195/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020196#include <sys/types.h>
20197#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020198
Martin v. Löwis11437992002-04-12 09:54:03 +000020199int
20200main ()
20201{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020202#if BYTE_ORDER != BIG_ENDIAN
20203 not big endian
20204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020205
20206 ;
20207 return 0;
20208}
20209_ACEOF
20210rm -f conftest.$ac_objext
20211if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020212 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020214 grep -v '^ *+' conftest.er1 >conftest.err
20215 rm -f conftest.er1
20216 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20218 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020219 { ac_try='test -z "$ac_c_werror_flag"
20220 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20222 (eval $ac_try) 2>&5
20223 ac_status=$?
20224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20225 (exit $ac_status); }; } &&
20226 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20228 (eval $ac_try) 2>&5
20229 ac_status=$?
20230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20231 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020232 ac_cv_c_bigendian=yes
20233else
Martin v. Löwis11437992002-04-12 09:54:03 +000020234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020235sed 's/^/| /' conftest.$ac_ext >&5
20236
Martin v. Löwis11437992002-04-12 09:54:03 +000020237ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020238fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020239rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020240else
Martin v. Löwis11437992002-04-12 09:54:03 +000020241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020242sed 's/^/| /' conftest.$ac_ext >&5
20243
Martin v. Löwis11437992002-04-12 09:54:03 +000020244# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000020245if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020246 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 ac_cv_c_bigendian=unknown
20248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020249/* confdefs.h. */
20250_ACEOF
20251cat confdefs.h >>conftest.$ac_ext
20252cat >>conftest.$ac_ext <<_ACEOF
20253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020254short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20255short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
20256void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
20257short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20258short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
20259void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020260int
20261main ()
20262{
20263 _ascii (); _ebcdic ();
20264 ;
20265 return 0;
20266}
20267_ACEOF
20268rm -f conftest.$ac_objext
20269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020270 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020272 grep -v '^ *+' conftest.er1 >conftest.err
20273 rm -f conftest.er1
20274 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20276 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020277 { ac_try='test -z "$ac_c_werror_flag"
20278 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20280 (eval $ac_try) 2>&5
20281 ac_status=$?
20282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20283 (exit $ac_status); }; } &&
20284 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20286 (eval $ac_try) 2>&5
20287 ac_status=$?
20288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20289 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020290 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 ac_cv_c_bigendian=yes
20292fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020293if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 if test "$ac_cv_c_bigendian" = unknown; then
20295 ac_cv_c_bigendian=no
20296 else
20297 # finding both strings is unlikely to happen, but who knows?
20298 ac_cv_c_bigendian=unknown
20299 fi
20300fi
20301else
20302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020303sed 's/^/| /' conftest.$ac_ext >&5
20304
Martin v. Löwis11437992002-04-12 09:54:03 +000020305fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020307else
20308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020309/* confdefs.h. */
20310_ACEOF
20311cat confdefs.h >>conftest.$ac_ext
20312cat >>conftest.$ac_ext <<_ACEOF
20313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020314int
20315main ()
20316{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020317 /* Are we little or big endian? From Harbison&Steele. */
20318 union
20319 {
20320 long l;
20321 char c[sizeof (long)];
20322 } u;
20323 u.l = 1;
20324 exit (u.c[sizeof (long) - 1] == 1);
20325}
Martin v. Löwis11437992002-04-12 09:54:03 +000020326_ACEOF
20327rm -f conftest$ac_exeext
20328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20329 (eval $ac_link) 2>&5
20330 ac_status=$?
20331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20334 (eval $ac_try) 2>&5
20335 ac_status=$?
20336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20337 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020338 ac_cv_c_bigendian=no
20339else
Martin v. Löwis11437992002-04-12 09:54:03 +000020340 echo "$as_me: program exited with status $ac_status" >&5
20341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020342sed 's/^/| /' conftest.$ac_ext >&5
20343
Martin v. Löwis11437992002-04-12 09:54:03 +000020344( exit $ac_status )
20345ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000020346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020347rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020349fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020351fi
20352echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
20353echo "${ECHO_T}$ac_cv_c_bigendian" >&6
20354case $ac_cv_c_bigendian in
20355 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000020356
Martin v. Löwis11437992002-04-12 09:54:03 +000020357cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020358#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020359_ACEOF
20360 ;;
20361 no)
20362 ;;
20363 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020364 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020365presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020366echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020367presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
20368 { (exit 1); exit 1; }; } ;;
20369esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000020370
Michael W. Hudson54241132001-12-07 15:38:26 +000020371
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020372# Check whether right shifting a negative integer extends the sign bit
20373# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000020374echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
20375echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
20376if test "${ac_cv_rshift_extends_sign+set}" = set; then
20377 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020378else
Martin v. Löwis11437992002-04-12 09:54:03 +000020379
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020380if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020381 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020382else
Martin v. Löwis11437992002-04-12 09:54:03 +000020383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020384/* confdefs.h. */
20385_ACEOF
20386cat confdefs.h >>conftest.$ac_ext
20387cat >>conftest.$ac_ext <<_ACEOF
20388/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020389
20390int main()
20391{
Vladimir Marangozova6180282000-07-12 05:05:06 +000020392 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020393}
20394
Martin v. Löwis11437992002-04-12 09:54:03 +000020395_ACEOF
20396rm -f conftest$ac_exeext
20397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20398 (eval $ac_link) 2>&5
20399 ac_status=$?
20400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20403 (eval $ac_try) 2>&5
20404 ac_status=$?
20405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20406 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000020407 ac_cv_rshift_extends_sign=yes
20408else
Martin v. Löwis11437992002-04-12 09:54:03 +000020409 echo "$as_me: program exited with status $ac_status" >&5
20410echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020411sed 's/^/| /' conftest.$ac_ext >&5
20412
Martin v. Löwis11437992002-04-12 09:54:03 +000020413( exit $ac_status )
20414ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000020415fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020416rm -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 +000020417fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000020418fi
20419
Martin v. Löwis11437992002-04-12 09:54:03 +000020420echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
20421echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020422if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020423then
Martin v. Löwis11437992002-04-12 09:54:03 +000020424
20425cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020426#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020427_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020428
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020429fi
20430
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020431# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020432echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
20433echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
20434if test "${ac_cv_have_getc_unlocked+set}" = set; then
20435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020436else
Martin v. Löwis11437992002-04-12 09:54:03 +000020437
20438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020439/* confdefs.h. */
20440_ACEOF
20441cat confdefs.h >>conftest.$ac_ext
20442cat >>conftest.$ac_ext <<_ACEOF
20443/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020444#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020445int
20446main ()
20447{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020448
20449 FILE *f = fopen("/dev/null", "r");
20450 flockfile(f);
20451 getc_unlocked(f);
20452 funlockfile(f);
20453
Martin v. Löwis11437992002-04-12 09:54:03 +000020454 ;
20455 return 0;
20456}
20457_ACEOF
20458rm -f conftest.$ac_objext conftest$ac_exeext
20459if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020460 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020462 grep -v '^ *+' conftest.er1 >conftest.err
20463 rm -f conftest.er1
20464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20466 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020467 { ac_try='test -z "$ac_c_werror_flag"
20468 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20470 (eval $ac_try) 2>&5
20471 ac_status=$?
20472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20473 (exit $ac_status); }; } &&
20474 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20476 (eval $ac_try) 2>&5
20477 ac_status=$?
20478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20479 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020480 ac_cv_have_getc_unlocked=yes
20481else
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020483sed 's/^/| /' conftest.$ac_ext >&5
20484
Martin v. Löwis11437992002-04-12 09:54:03 +000020485ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020486fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020487rm -f conftest.err conftest.$ac_objext \
20488 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020489fi
20490
Martin v. Löwis11437992002-04-12 09:54:03 +000020491echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
20492echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020493if test "$ac_cv_have_getc_unlocked" = yes
20494then
Martin v. Löwis11437992002-04-12 09:54:03 +000020495
20496cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020497#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020499
20500fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020501
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020502# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000020503# save the value of LIBS so we don't actually link Python with readline
20504LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020505
20506echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
20507echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
20508if test "${ac_cv_lib_readline_readline+set}" = set; then
20509 echo $ECHO_N "(cached) $ECHO_C" >&6
20510else
20511 ac_check_lib_save_LIBS=$LIBS
20512LIBS="-lreadline $LIBS"
20513cat >conftest.$ac_ext <<_ACEOF
20514/* confdefs.h. */
20515_ACEOF
20516cat confdefs.h >>conftest.$ac_ext
20517cat >>conftest.$ac_ext <<_ACEOF
20518/* end confdefs.h. */
20519
20520/* Override any gcc2 internal prototype to avoid an error. */
20521#ifdef __cplusplus
20522extern "C"
20523#endif
20524/* We use char because int might match the return type of a gcc2
20525 builtin and then its argument prototype would still apply. */
20526char readline ();
20527int
20528main ()
20529{
20530readline ();
20531 ;
20532 return 0;
20533}
20534_ACEOF
20535rm -f conftest.$ac_objext conftest$ac_exeext
20536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20537 (eval $ac_link) 2>conftest.er1
20538 ac_status=$?
20539 grep -v '^ *+' conftest.er1 >conftest.err
20540 rm -f conftest.er1
20541 cat conftest.err >&5
20542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20543 (exit $ac_status); } &&
20544 { ac_try='test -z "$ac_c_werror_flag"
20545 || test ! -s conftest.err'
20546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20547 (eval $ac_try) 2>&5
20548 ac_status=$?
20549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20550 (exit $ac_status); }; } &&
20551 { ac_try='test -s conftest$ac_exeext'
20552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20553 (eval $ac_try) 2>&5
20554 ac_status=$?
20555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20556 (exit $ac_status); }; }; then
20557 ac_cv_lib_readline_readline=yes
20558else
20559 echo "$as_me: failed program was:" >&5
20560sed 's/^/| /' conftest.$ac_ext >&5
20561
20562ac_cv_lib_readline_readline=no
20563fi
20564rm -f conftest.err conftest.$ac_objext \
20565 conftest$ac_exeext conftest.$ac_ext
20566LIBS=$ac_check_lib_save_LIBS
20567fi
20568echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
20569echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
20570if test $ac_cv_lib_readline_readline = yes; then
20571 cat >>confdefs.h <<_ACEOF
20572#define HAVE_LIBREADLINE 1
20573_ACEOF
20574
20575 LIBS="-lreadline $LIBS"
20576
20577fi
20578
20579if test "$ac_cv_have_readline_readline" = no
20580then
20581
20582echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
20583echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
20584if test "${ac_cv_lib_termcap_readline+set}" = set; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
20586else
20587 ac_check_lib_save_LIBS=$LIBS
20588LIBS="-ltermcap $LIBS"
20589cat >conftest.$ac_ext <<_ACEOF
20590/* confdefs.h. */
20591_ACEOF
20592cat confdefs.h >>conftest.$ac_ext
20593cat >>conftest.$ac_ext <<_ACEOF
20594/* end confdefs.h. */
20595
20596/* Override any gcc2 internal prototype to avoid an error. */
20597#ifdef __cplusplus
20598extern "C"
20599#endif
20600/* We use char because int might match the return type of a gcc2
20601 builtin and then its argument prototype would still apply. */
20602char readline ();
20603int
20604main ()
20605{
20606readline ();
20607 ;
20608 return 0;
20609}
20610_ACEOF
20611rm -f conftest.$ac_objext conftest$ac_exeext
20612if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20613 (eval $ac_link) 2>conftest.er1
20614 ac_status=$?
20615 grep -v '^ *+' conftest.er1 >conftest.err
20616 rm -f conftest.er1
20617 cat conftest.err >&5
20618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20619 (exit $ac_status); } &&
20620 { ac_try='test -z "$ac_c_werror_flag"
20621 || test ! -s conftest.err'
20622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20623 (eval $ac_try) 2>&5
20624 ac_status=$?
20625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20626 (exit $ac_status); }; } &&
20627 { ac_try='test -s conftest$ac_exeext'
20628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20629 (eval $ac_try) 2>&5
20630 ac_status=$?
20631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20632 (exit $ac_status); }; }; then
20633 ac_cv_lib_termcap_readline=yes
20634else
20635 echo "$as_me: failed program was:" >&5
20636sed 's/^/| /' conftest.$ac_ext >&5
20637
20638ac_cv_lib_termcap_readline=no
20639fi
20640rm -f conftest.err conftest.$ac_objext \
20641 conftest$ac_exeext conftest.$ac_ext
20642LIBS=$ac_check_lib_save_LIBS
20643fi
20644echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
20645echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
20646if test $ac_cv_lib_termcap_readline = yes; then
20647 cat >>confdefs.h <<_ACEOF
20648#define HAVE_LIBTERMCAP 1
20649_ACEOF
20650
20651 LIBS="-ltermcap $LIBS"
20652
20653fi
20654
20655fi
20656
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020657# check for readline 2.1
20658echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
20659echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
20660if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
20661 echo $ECHO_N "(cached) $ECHO_C" >&6
20662else
20663 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020664LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020665cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020666/* confdefs.h. */
20667_ACEOF
20668cat confdefs.h >>conftest.$ac_ext
20669cat >>conftest.$ac_ext <<_ACEOF
20670/* end confdefs.h. */
20671
20672/* Override any gcc2 internal prototype to avoid an error. */
20673#ifdef __cplusplus
20674extern "C"
20675#endif
20676/* We use char because int might match the return type of a gcc2
20677 builtin and then its argument prototype would still apply. */
20678char rl_callback_handler_install ();
20679int
20680main ()
20681{
20682rl_callback_handler_install ();
20683 ;
20684 return 0;
20685}
20686_ACEOF
20687rm -f conftest.$ac_objext conftest$ac_exeext
20688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020689 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020691 grep -v '^ *+' conftest.er1 >conftest.err
20692 rm -f conftest.er1
20693 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20695 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020696 { ac_try='test -z "$ac_c_werror_flag"
20697 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20699 (eval $ac_try) 2>&5
20700 ac_status=$?
20701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20702 (exit $ac_status); }; } &&
20703 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20705 (eval $ac_try) 2>&5
20706 ac_status=$?
20707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20708 (exit $ac_status); }; }; then
20709 ac_cv_lib_readline_rl_callback_handler_install=yes
20710else
20711 echo "$as_me: failed program was:" >&5
20712sed 's/^/| /' conftest.$ac_ext >&5
20713
20714ac_cv_lib_readline_rl_callback_handler_install=no
20715fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020716rm -f conftest.err conftest.$ac_objext \
20717 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020718LIBS=$ac_check_lib_save_LIBS
20719fi
20720echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
20721echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
20722if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
20723
20724cat >>confdefs.h <<\_ACEOF
20725#define HAVE_RL_CALLBACK 1
20726_ACEOF
20727
20728fi
20729
20730
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020731# check for readline 2.2
20732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020733/* confdefs.h. */
20734_ACEOF
20735cat confdefs.h >>conftest.$ac_ext
20736cat >>conftest.$ac_ext <<_ACEOF
20737/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020738#include <readline/readline.h>
20739_ACEOF
20740if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20741 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20742 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020743 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020744 rm -f conftest.er1
20745 cat conftest.err >&5
20746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20747 (exit $ac_status); } >/dev/null; then
20748 if test -s conftest.err; then
20749 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020750 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020751 else
20752 ac_cpp_err=
20753 fi
20754else
20755 ac_cpp_err=yes
20756fi
20757if test -z "$ac_cpp_err"; then
20758 have_readline=yes
20759else
20760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020761sed 's/^/| /' conftest.$ac_ext >&5
20762
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020763 have_readline=no
20764fi
20765rm -f conftest.err conftest.$ac_ext
20766if test $have_readline = yes
20767then
20768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020769/* confdefs.h. */
20770_ACEOF
20771cat confdefs.h >>conftest.$ac_ext
20772cat >>conftest.$ac_ext <<_ACEOF
20773/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020774#include <readline/readline.h>
20775
20776_ACEOF
20777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000020778 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000020779
20780cat >>confdefs.h <<\_ACEOF
20781#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
20782_ACEOF
20783
20784fi
20785rm -f conftest*
20786
20787fi
20788
Martin v. Löwis0daad592001-09-30 21:09:59 +000020789# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000020790echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
20791echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
20792if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
20793 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000020794else
Martin v. Löwis11437992002-04-12 09:54:03 +000020795 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020796LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020798/* confdefs.h. */
20799_ACEOF
20800cat confdefs.h >>conftest.$ac_ext
20801cat >>conftest.$ac_ext <<_ACEOF
20802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020803
Guido van Rossum353ae582001-07-10 16:45:32 +000020804/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020805#ifdef __cplusplus
20806extern "C"
20807#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000020808/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 builtin and then its argument prototype would still apply. */
20810char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020811int
20812main ()
20813{
20814rl_pre_input_hook ();
20815 ;
20816 return 0;
20817}
20818_ACEOF
20819rm -f conftest.$ac_objext conftest$ac_exeext
20820if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020821 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020823 grep -v '^ *+' conftest.er1 >conftest.err
20824 rm -f conftest.er1
20825 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20827 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020828 { ac_try='test -z "$ac_c_werror_flag"
20829 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20831 (eval $ac_try) 2>&5
20832 ac_status=$?
20833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20834 (exit $ac_status); }; } &&
20835 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20837 (eval $ac_try) 2>&5
20838 ac_status=$?
20839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20840 (exit $ac_status); }; }; then
20841 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000020842else
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020844sed 's/^/| /' conftest.$ac_ext >&5
20845
Martin v. Löwis11437992002-04-12 09:54:03 +000020846ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000020847fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020848rm -f conftest.err conftest.$ac_objext \
20849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020850LIBS=$ac_check_lib_save_LIBS
20851fi
20852echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
20853echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
20854if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020855
Martin v. Löwis11437992002-04-12 09:54:03 +000020856cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020857#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020858_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000020859
Martin v. Löwis0daad592001-09-30 21:09:59 +000020860fi
20861
Michael W. Hudson54241132001-12-07 15:38:26 +000020862
Martin v. Löwis0daad592001-09-30 21:09:59 +000020863# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000020864echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
20865echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
20866if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
20867 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000020868else
Martin v. Löwis11437992002-04-12 09:54:03 +000020869 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020870LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020872/* confdefs.h. */
20873_ACEOF
20874cat confdefs.h >>conftest.$ac_ext
20875cat >>conftest.$ac_ext <<_ACEOF
20876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
Martin v. Löwis0daad592001-09-30 21:09:59 +000020878/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020879#ifdef __cplusplus
20880extern "C"
20881#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000020882/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000020883 builtin and then its argument prototype would still apply. */
20884char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020885int
20886main ()
20887{
20888rl_completion_matches ();
20889 ;
20890 return 0;
20891}
20892_ACEOF
20893rm -f conftest.$ac_objext conftest$ac_exeext
20894if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020895 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020897 grep -v '^ *+' conftest.er1 >conftest.err
20898 rm -f conftest.er1
20899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20901 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020902 { ac_try='test -z "$ac_c_werror_flag"
20903 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20905 (eval $ac_try) 2>&5
20906 ac_status=$?
20907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20908 (exit $ac_status); }; } &&
20909 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20911 (eval $ac_try) 2>&5
20912 ac_status=$?
20913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20914 (exit $ac_status); }; }; then
20915 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000020916else
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020918sed 's/^/| /' conftest.$ac_ext >&5
20919
Martin v. Löwis11437992002-04-12 09:54:03 +000020920ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000020921fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020922rm -f conftest.err conftest.$ac_objext \
20923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020924LIBS=$ac_check_lib_save_LIBS
20925fi
20926echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
20927echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
20928if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020929
Martin v. Löwis11437992002-04-12 09:54:03 +000020930cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020931#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020932_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000020933
Guido van Rossum353ae582001-07-10 16:45:32 +000020934fi
20935
Jack Jansendd19cf82001-12-06 22:36:17 +000020936
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020937# also in readline 4.2
20938cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020939/* confdefs.h. */
20940_ACEOF
20941cat confdefs.h >>conftest.$ac_ext
20942cat >>conftest.$ac_ext <<_ACEOF
20943/* end confdefs.h. */
20944#include <readline/readline.h>
20945_ACEOF
20946if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20947 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20948 ac_status=$?
20949 grep -v '^ *+' conftest.er1 >conftest.err
20950 rm -f conftest.er1
20951 cat conftest.err >&5
20952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20953 (exit $ac_status); } >/dev/null; then
20954 if test -s conftest.err; then
20955 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000020956 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020957 else
20958 ac_cpp_err=
20959 fi
20960else
20961 ac_cpp_err=yes
20962fi
20963if test -z "$ac_cpp_err"; then
20964 have_readline=yes
20965else
20966 echo "$as_me: failed program was:" >&5
20967sed 's/^/| /' conftest.$ac_ext >&5
20968
20969 have_readline=no
20970fi
20971rm -f conftest.err conftest.$ac_ext
20972if test $have_readline = yes
20973then
20974 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020975/* confdefs.h. */
20976_ACEOF
20977cat confdefs.h >>conftest.$ac_ext
20978cat >>conftest.$ac_ext <<_ACEOF
20979/* end confdefs.h. */
20980#include <readline/readline.h>
20981
20982_ACEOF
20983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20984 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
20985
20986cat >>confdefs.h <<\_ACEOF
20987#define HAVE_RL_CATCH_SIGNAL 1
20988_ACEOF
20989
20990fi
20991rm -f conftest*
20992
20993fi
20994
Martin v. Löwis82bca632006-02-10 20:49:30 +000020995# End of readline checks: restore LIBS
20996LIBS=$LIBS_no_readline
20997
Martin v. Löwis11437992002-04-12 09:54:03 +000020998echo "$as_me:$LINENO: checking for broken nice()" >&5
20999echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
21000if test "${ac_cv_broken_nice+set}" = set; then
21001 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021002else
Martin v. Löwis11437992002-04-12 09:54:03 +000021003
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021004if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021005 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021006else
Martin v. Löwis11437992002-04-12 09:54:03 +000021007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021008/* confdefs.h. */
21009_ACEOF
21010cat confdefs.h >>conftest.$ac_ext
21011cat >>conftest.$ac_ext <<_ACEOF
21012/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021013
21014int main()
21015{
21016 int val1 = nice(1);
21017 if (val1 != -1 && val1 == nice(2))
21018 exit(0);
21019 exit(1);
21020}
21021
Martin v. Löwis11437992002-04-12 09:54:03 +000021022_ACEOF
21023rm -f conftest$ac_exeext
21024if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21025 (eval $ac_link) 2>&5
21026 ac_status=$?
21027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21030 (eval $ac_try) 2>&5
21031 ac_status=$?
21032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21033 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021034 ac_cv_broken_nice=yes
21035else
Martin v. Löwis11437992002-04-12 09:54:03 +000021036 echo "$as_me: program exited with status $ac_status" >&5
21037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021038sed 's/^/| /' conftest.$ac_ext >&5
21039
Martin v. Löwis11437992002-04-12 09:54:03 +000021040( exit $ac_status )
21041ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021042fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021043rm -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 +000021044fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021045fi
21046
Martin v. Löwis11437992002-04-12 09:54:03 +000021047echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21048echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021049if test "$ac_cv_broken_nice" = yes
21050then
Martin v. Löwis11437992002-04-12 09:54:03 +000021051
21052cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021053#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021054_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021055
21056fi
21057
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021058echo "$as_me:$LINENO: checking for broken poll()" >&5
21059echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
21060if test "$cross_compiling" = yes; then
21061 ac_cv_broken_poll=no
21062else
21063 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021064/* confdefs.h. */
21065_ACEOF
21066cat confdefs.h >>conftest.$ac_ext
21067cat >>conftest.$ac_ext <<_ACEOF
21068/* end confdefs.h. */
21069
21070#include <poll.h>
21071
21072int main (void)
21073 {
21074 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21075
21076 close (42);
21077
21078 int poll_test = poll (&poll_struct, 1, 0);
21079
21080 if (poll_test < 0)
21081 {
21082 exit(0);
21083 }
21084 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21085 {
21086 exit(0);
21087 }
21088 else
21089 {
21090 exit(1);
21091 }
21092 }
21093
21094_ACEOF
21095rm -f conftest$ac_exeext
21096if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21097 (eval $ac_link) 2>&5
21098 ac_status=$?
21099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21102 (eval $ac_try) 2>&5
21103 ac_status=$?
21104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21105 (exit $ac_status); }; }; then
21106 ac_cv_broken_poll=yes
21107else
21108 echo "$as_me: program exited with status $ac_status" >&5
21109echo "$as_me: failed program was:" >&5
21110sed 's/^/| /' conftest.$ac_ext >&5
21111
21112( exit $ac_status )
21113ac_cv_broken_poll=no
21114fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021115rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021116fi
21117echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21118echo "${ECHO_T}$ac_cv_broken_poll" >&6
21119if test "$ac_cv_broken_poll" = yes
21120then
21121
21122cat >>confdefs.h <<\_ACEOF
21123#define HAVE_BROKEN_POLL 1
21124_ACEOF
21125
21126fi
21127
Brett Cannon43802422005-02-10 20:48:03 +000021128# 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 +000021129# (which is not required by ISO C or UNIX spec) and/or if we support
21130# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000021131echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21132echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
21133if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21134 echo $ECHO_N "(cached) $ECHO_C" >&6
21135else
21136 cat >conftest.$ac_ext <<_ACEOF
21137/* confdefs.h. */
21138_ACEOF
21139cat confdefs.h >>conftest.$ac_ext
21140cat >>conftest.$ac_ext <<_ACEOF
21141/* end confdefs.h. */
21142#include <sys/types.h>
21143#include <$ac_cv_struct_tm>
21144
21145
21146int
21147main ()
21148{
21149static struct tm ac_aggr;
21150if (ac_aggr.tm_zone)
21151return 0;
21152 ;
21153 return 0;
21154}
21155_ACEOF
21156rm -f conftest.$ac_objext
21157if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21158 (eval $ac_compile) 2>conftest.er1
21159 ac_status=$?
21160 grep -v '^ *+' conftest.er1 >conftest.err
21161 rm -f conftest.er1
21162 cat conftest.err >&5
21163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21164 (exit $ac_status); } &&
21165 { ac_try='test -z "$ac_c_werror_flag"
21166 || test ! -s conftest.err'
21167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21168 (eval $ac_try) 2>&5
21169 ac_status=$?
21170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21171 (exit $ac_status); }; } &&
21172 { ac_try='test -s conftest.$ac_objext'
21173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21174 (eval $ac_try) 2>&5
21175 ac_status=$?
21176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21177 (exit $ac_status); }; }; then
21178 ac_cv_member_struct_tm_tm_zone=yes
21179else
21180 echo "$as_me: failed program was:" >&5
21181sed 's/^/| /' conftest.$ac_ext >&5
21182
21183cat >conftest.$ac_ext <<_ACEOF
21184/* confdefs.h. */
21185_ACEOF
21186cat confdefs.h >>conftest.$ac_ext
21187cat >>conftest.$ac_ext <<_ACEOF
21188/* end confdefs.h. */
21189#include <sys/types.h>
21190#include <$ac_cv_struct_tm>
21191
21192
21193int
21194main ()
21195{
21196static struct tm ac_aggr;
21197if (sizeof ac_aggr.tm_zone)
21198return 0;
21199 ;
21200 return 0;
21201}
21202_ACEOF
21203rm -f conftest.$ac_objext
21204if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21205 (eval $ac_compile) 2>conftest.er1
21206 ac_status=$?
21207 grep -v '^ *+' conftest.er1 >conftest.err
21208 rm -f conftest.er1
21209 cat conftest.err >&5
21210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21211 (exit $ac_status); } &&
21212 { ac_try='test -z "$ac_c_werror_flag"
21213 || test ! -s conftest.err'
21214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21215 (eval $ac_try) 2>&5
21216 ac_status=$?
21217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21218 (exit $ac_status); }; } &&
21219 { ac_try='test -s conftest.$ac_objext'
21220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21221 (eval $ac_try) 2>&5
21222 ac_status=$?
21223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21224 (exit $ac_status); }; }; then
21225 ac_cv_member_struct_tm_tm_zone=yes
21226else
21227 echo "$as_me: failed program was:" >&5
21228sed 's/^/| /' conftest.$ac_ext >&5
21229
21230ac_cv_member_struct_tm_tm_zone=no
21231fi
21232rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21233fi
21234rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21235fi
21236echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21237echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
21238if test $ac_cv_member_struct_tm_tm_zone = yes; then
21239
21240cat >>confdefs.h <<_ACEOF
21241#define HAVE_STRUCT_TM_TM_ZONE 1
21242_ACEOF
21243
21244
21245fi
21246
21247if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21248
21249cat >>confdefs.h <<\_ACEOF
21250#define HAVE_TM_ZONE 1
21251_ACEOF
21252
21253else
21254 echo "$as_me:$LINENO: checking for tzname" >&5
21255echo $ECHO_N "checking for tzname... $ECHO_C" >&6
21256if test "${ac_cv_var_tzname+set}" = set; then
21257 echo $ECHO_N "(cached) $ECHO_C" >&6
21258else
21259 cat >conftest.$ac_ext <<_ACEOF
21260/* confdefs.h. */
21261_ACEOF
21262cat confdefs.h >>conftest.$ac_ext
21263cat >>conftest.$ac_ext <<_ACEOF
21264/* end confdefs.h. */
21265#include <time.h>
21266#ifndef tzname /* For SGI. */
21267extern char *tzname[]; /* RS6000 and others reject char **tzname. */
21268#endif
21269
21270int
21271main ()
21272{
21273atoi(*tzname);
21274 ;
21275 return 0;
21276}
21277_ACEOF
21278rm -f conftest.$ac_objext conftest$ac_exeext
21279if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21280 (eval $ac_link) 2>conftest.er1
21281 ac_status=$?
21282 grep -v '^ *+' conftest.er1 >conftest.err
21283 rm -f conftest.er1
21284 cat conftest.err >&5
21285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21286 (exit $ac_status); } &&
21287 { ac_try='test -z "$ac_c_werror_flag"
21288 || test ! -s conftest.err'
21289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21290 (eval $ac_try) 2>&5
21291 ac_status=$?
21292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21293 (exit $ac_status); }; } &&
21294 { ac_try='test -s conftest$ac_exeext'
21295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21296 (eval $ac_try) 2>&5
21297 ac_status=$?
21298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21299 (exit $ac_status); }; }; then
21300 ac_cv_var_tzname=yes
21301else
21302 echo "$as_me: failed program was:" >&5
21303sed 's/^/| /' conftest.$ac_ext >&5
21304
21305ac_cv_var_tzname=no
21306fi
21307rm -f conftest.err conftest.$ac_objext \
21308 conftest$ac_exeext conftest.$ac_ext
21309fi
21310echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21311echo "${ECHO_T}$ac_cv_var_tzname" >&6
21312 if test $ac_cv_var_tzname = yes; then
21313
21314cat >>confdefs.h <<\_ACEOF
21315#define HAVE_TZNAME 1
21316_ACEOF
21317
21318 fi
21319fi
21320
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021321
Martin v. Löwis1d459062005-03-14 21:23:33 +000021322# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021323echo "$as_me:$LINENO: checking for working tzset()" >&5
21324echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
21325if test "${ac_cv_working_tzset+set}" = set; then
21326 echo $ECHO_N "(cached) $ECHO_C" >&6
21327else
21328
21329if test "$cross_compiling" = yes; then
21330 ac_cv_working_tzset=no
21331else
21332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021333/* confdefs.h. */
21334_ACEOF
21335cat confdefs.h >>conftest.$ac_ext
21336cat >>conftest.$ac_ext <<_ACEOF
21337/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021338
21339#include <stdlib.h>
21340#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000021341#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000021342
21343#if HAVE_TZNAME
21344extern char *tzname[];
21345#endif
21346
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021347int main()
21348{
Brett Cannon18367812003-09-19 00:59:16 +000021349 /* Note that we need to ensure that not only does tzset(3)
21350 do 'something' with localtime, but it works as documented
21351 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000021352 This includes making sure that tzname is set properly if
21353 tm->tm_zone does not exist since it is the alternative way
21354 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000021355
21356 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000021357 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000021358 */
21359
Martin v. Löwis1d459062005-03-14 21:23:33 +000021360 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000021361 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
21362
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021363 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021364 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021365 if (localtime(&groundhogday)->tm_hour != 0)
21366 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021367#if HAVE_TZNAME
21368 /* For UTC, tzname[1] is sometimes "", sometimes " " */
21369 if (strcmp(tzname[0], "UTC") ||
21370 (tzname[1][0] != 0 && tzname[1][0] != ' '))
21371 exit(1);
21372#endif
Brett Cannon18367812003-09-19 00:59:16 +000021373
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021374 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021375 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021376 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021377 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021378#if HAVE_TZNAME
21379 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
21380 exit(1);
21381#endif
Brett Cannon18367812003-09-19 00:59:16 +000021382
21383 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
21384 tzset();
21385 if (localtime(&groundhogday)->tm_hour != 11)
21386 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021387#if HAVE_TZNAME
21388 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
21389 exit(1);
21390#endif
21391
21392#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000021393 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
21394 exit(1);
21395 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
21396 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021397#endif
Brett Cannon18367812003-09-19 00:59:16 +000021398
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021399 exit(0);
21400}
21401
21402_ACEOF
21403rm -f conftest$ac_exeext
21404if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21405 (eval $ac_link) 2>&5
21406 ac_status=$?
21407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21410 (eval $ac_try) 2>&5
21411 ac_status=$?
21412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21413 (exit $ac_status); }; }; then
21414 ac_cv_working_tzset=yes
21415else
21416 echo "$as_me: program exited with status $ac_status" >&5
21417echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021418sed 's/^/| /' conftest.$ac_ext >&5
21419
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021420( exit $ac_status )
21421ac_cv_working_tzset=no
21422fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021423rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021424fi
21425fi
21426
21427echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
21428echo "${ECHO_T}$ac_cv_working_tzset" >&6
21429if test "$ac_cv_working_tzset" = yes
21430then
21431
21432cat >>confdefs.h <<\_ACEOF
21433#define HAVE_WORKING_TZSET 1
21434_ACEOF
21435
21436fi
21437
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021438# Look for subsecond timestamps in struct stat
21439echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
21440echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
21441if test "${ac_cv_stat_tv_nsec+set}" = set; then
21442 echo $ECHO_N "(cached) $ECHO_C" >&6
21443else
21444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021445/* confdefs.h. */
21446_ACEOF
21447cat confdefs.h >>conftest.$ac_ext
21448cat >>conftest.$ac_ext <<_ACEOF
21449/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021450#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021451int
21452main ()
21453{
21454
21455struct stat st;
21456st.st_mtim.tv_nsec = 1;
21457
21458 ;
21459 return 0;
21460}
21461_ACEOF
21462rm -f conftest.$ac_objext
21463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021464 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021466 grep -v '^ *+' conftest.er1 >conftest.err
21467 rm -f conftest.er1
21468 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21470 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021471 { ac_try='test -z "$ac_c_werror_flag"
21472 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21474 (eval $ac_try) 2>&5
21475 ac_status=$?
21476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21477 (exit $ac_status); }; } &&
21478 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21480 (eval $ac_try) 2>&5
21481 ac_status=$?
21482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21483 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000021484 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021485else
21486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021487sed 's/^/| /' conftest.$ac_ext >&5
21488
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021489ac_cv_stat_tv_nsec=no
21490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021492fi
21493
21494echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
21495echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
21496if test "$ac_cv_stat_tv_nsec" = yes
21497then
21498
21499cat >>confdefs.h <<\_ACEOF
21500#define HAVE_STAT_TV_NSEC 1
21501_ACEOF
21502
21503fi
21504
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021505# Look for BSD style subsecond timestamps in struct stat
21506echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
21507echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
21508if test "${ac_cv_stat_tv_nsec2+set}" = set; then
21509 echo $ECHO_N "(cached) $ECHO_C" >&6
21510else
21511 cat >conftest.$ac_ext <<_ACEOF
21512/* confdefs.h. */
21513_ACEOF
21514cat confdefs.h >>conftest.$ac_ext
21515cat >>conftest.$ac_ext <<_ACEOF
21516/* end confdefs.h. */
21517#include <sys/stat.h>
21518int
21519main ()
21520{
21521
21522struct stat st;
21523st.st_mtimespec.tv_nsec = 1;
21524
21525 ;
21526 return 0;
21527}
21528_ACEOF
21529rm -f conftest.$ac_objext
21530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21531 (eval $ac_compile) 2>conftest.er1
21532 ac_status=$?
21533 grep -v '^ *+' conftest.er1 >conftest.err
21534 rm -f conftest.er1
21535 cat conftest.err >&5
21536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21537 (exit $ac_status); } &&
21538 { ac_try='test -z "$ac_c_werror_flag"
21539 || test ! -s conftest.err'
21540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21541 (eval $ac_try) 2>&5
21542 ac_status=$?
21543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21544 (exit $ac_status); }; } &&
21545 { ac_try='test -s conftest.$ac_objext'
21546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21547 (eval $ac_try) 2>&5
21548 ac_status=$?
21549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21550 (exit $ac_status); }; }; then
21551 ac_cv_stat_tv_nsec2=yes
21552else
21553 echo "$as_me: failed program was:" >&5
21554sed 's/^/| /' conftest.$ac_ext >&5
21555
21556ac_cv_stat_tv_nsec2=no
21557fi
21558rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21559fi
21560
21561echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
21562echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
21563if test "$ac_cv_stat_tv_nsec2" = yes
21564then
21565
21566cat >>confdefs.h <<\_ACEOF
21567#define HAVE_STAT_TV_NSEC2 1
21568_ACEOF
21569
21570fi
21571
Jack Jansen666b1e72001-10-31 12:11:48 +000021572# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000021573echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
21574echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
21575if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
21576 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021577else
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021579/* confdefs.h. */
21580_ACEOF
21581cat confdefs.h >>conftest.$ac_ext
21582cat >>conftest.$ac_ext <<_ACEOF
21583/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021584#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021585int
21586main ()
21587{
Jack Jansen666b1e72001-10-31 12:11:48 +000021588
21589 int rtn;
21590 rtn = mvwdelch(0,0,0);
21591
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 ;
21593 return 0;
21594}
21595_ACEOF
21596rm -f conftest.$ac_objext
21597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021598 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021600 grep -v '^ *+' conftest.er1 >conftest.err
21601 rm -f conftest.er1
21602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21604 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021605 { ac_try='test -z "$ac_c_werror_flag"
21606 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21608 (eval $ac_try) 2>&5
21609 ac_status=$?
21610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21611 (exit $ac_status); }; } &&
21612 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21614 (eval $ac_try) 2>&5
21615 ac_status=$?
21616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21617 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021618 ac_cv_mvwdelch_is_expression=yes
21619else
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021621sed 's/^/| /' conftest.$ac_ext >&5
21622
Martin v. Löwis11437992002-04-12 09:54:03 +000021623ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021624fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021626fi
21627
Martin v. Löwis11437992002-04-12 09:54:03 +000021628echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
21629echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021630
21631if test "$ac_cv_mvwdelch_is_expression" = yes
21632then
Martin v. Löwis11437992002-04-12 09:54:03 +000021633
21634cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021635#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021636_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021637
21638fi
21639
Martin v. Löwis11437992002-04-12 09:54:03 +000021640echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
21641echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
21642if test "${ac_cv_window_has_flags+set}" = set; then
21643 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000021644else
Martin v. Löwis11437992002-04-12 09:54:03 +000021645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021646/* confdefs.h. */
21647_ACEOF
21648cat confdefs.h >>conftest.$ac_ext
21649cat >>conftest.$ac_ext <<_ACEOF
21650/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000021651#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021652int
21653main ()
21654{
Jack Jansen666b1e72001-10-31 12:11:48 +000021655
21656 WINDOW *w;
21657 w->_flags = 0;
21658
Martin v. Löwis11437992002-04-12 09:54:03 +000021659 ;
21660 return 0;
21661}
21662_ACEOF
21663rm -f conftest.$ac_objext
21664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021665 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021667 grep -v '^ *+' conftest.er1 >conftest.err
21668 rm -f conftest.er1
21669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21671 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021672 { ac_try='test -z "$ac_c_werror_flag"
21673 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21675 (eval $ac_try) 2>&5
21676 ac_status=$?
21677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21678 (exit $ac_status); }; } &&
21679 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21681 (eval $ac_try) 2>&5
21682 ac_status=$?
21683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21684 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000021685 ac_cv_window_has_flags=yes
21686else
Martin v. Löwis11437992002-04-12 09:54:03 +000021687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021688sed 's/^/| /' conftest.$ac_ext >&5
21689
Martin v. Löwis11437992002-04-12 09:54:03 +000021690ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000021691fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021692rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000021693fi
21694
Martin v. Löwis11437992002-04-12 09:54:03 +000021695echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
21696echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021697
Jack Jansen666b1e72001-10-31 12:11:48 +000021698
21699if test "$ac_cv_window_has_flags" = yes
21700then
Martin v. Löwis11437992002-04-12 09:54:03 +000021701
21702cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021703#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021704_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000021705
21706fi
21707
Martin v. Löwis24a880b2002-12-31 12:55:15 +000021708echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
21709echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
21710
21711if test -e /dev/ptmx
21712then
21713 echo "$as_me:$LINENO: result: yes" >&5
21714echo "${ECHO_T}yes" >&6
21715
21716cat >>confdefs.h <<\_ACEOF
21717#define HAVE_DEV_PTMX 1
21718_ACEOF
21719
21720else
21721 echo "$as_me:$LINENO: result: no" >&5
21722echo "${ECHO_T}no" >&6
21723fi
21724
Neal Norwitz865400f2003-03-21 01:42:58 +000021725echo "$as_me:$LINENO: checking for /dev/ptc" >&5
21726echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
21727
21728if test -e /dev/ptc
21729then
21730 echo "$as_me:$LINENO: result: yes" >&5
21731echo "${ECHO_T}yes" >&6
21732
21733cat >>confdefs.h <<\_ACEOF
21734#define HAVE_DEV_PTC 1
21735_ACEOF
21736
21737else
21738 echo "$as_me:$LINENO: result: no" >&5
21739echo "${ECHO_T}no" >&6
21740fi
21741
Martin v. Löwis11437992002-04-12 09:54:03 +000021742echo "$as_me:$LINENO: checking for socklen_t" >&5
21743echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
21744if test "${ac_cv_type_socklen_t+set}" = set; then
21745 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000021746else
Martin v. Löwis11437992002-04-12 09:54:03 +000021747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021748/* confdefs.h. */
21749_ACEOF
21750cat confdefs.h >>conftest.$ac_ext
21751cat >>conftest.$ac_ext <<_ACEOF
21752/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000021753
21754#ifdef HAVE_SYS_TYPES_H
21755#include <sys/types.h>
21756#endif
21757#ifdef HAVE_SYS_SOCKET_H
21758#include <sys/socket.h>
21759#endif
21760
21761
Martin v. Löwis11437992002-04-12 09:54:03 +000021762int
21763main ()
21764{
21765if ((socklen_t *) 0)
21766 return 0;
21767if (sizeof (socklen_t))
21768 return 0;
21769 ;
21770 return 0;
21771}
21772_ACEOF
21773rm -f conftest.$ac_objext
21774if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000021775 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021777 grep -v '^ *+' conftest.er1 >conftest.err
21778 rm -f conftest.er1
21779 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21781 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000021782 { ac_try='test -z "$ac_c_werror_flag"
21783 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21785 (eval $ac_try) 2>&5
21786 ac_status=$?
21787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21788 (exit $ac_status); }; } &&
21789 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000021790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21791 (eval $ac_try) 2>&5
21792 ac_status=$?
21793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21794 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000021795 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000021796else
Martin v. Löwis11437992002-04-12 09:54:03 +000021797 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021798sed 's/^/| /' conftest.$ac_ext >&5
21799
Martin v. Löwis11437992002-04-12 09:54:03 +000021800ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000021801fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021803fi
21804echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
21805echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
21806if test $ac_cv_type_socklen_t = yes; then
21807 :
21808else
Guido van Rossum95713eb2000-05-18 20:53:31 +000021809
Martin v. Löwis01c04012002-11-11 14:58:44 +000021810cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021811#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000021812_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000021813
21814fi
21815
Michael W. Hudson54241132001-12-07 15:38:26 +000021816
Michael W. Hudson54241132001-12-07 15:38:26 +000021817
21818
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000021819for h in `(cd $srcdir;echo Python/thread_*.h)`
21820do
21821 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
21822done
21823
Michael W. Hudson54241132001-12-07 15:38:26 +000021824
Neal Norwitzd24499d2005-12-18 21:36:39 +000021825SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwis11437992002-04-12 09:54:03 +000021826echo "$as_me:$LINENO: checking for build directories" >&5
21827echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021828for dir in $SRCDIRS; do
21829 if test ! -d $dir; then
21830 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000021831 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000021832done
Martin v. Löwis11437992002-04-12 09:54:03 +000021833echo "$as_me:$LINENO: result: done" >&5
21834echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000021835
Guido van Rossum627b2d71993-12-24 10:39:16 +000021836# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000021837 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000021838
Martin v. Löwis11437992002-04-12 09:54:03 +000021839cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021840# This file is a shell script that caches the results of configure
21841# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000021842# scripts and configure runs, see configure's option --config-cache.
21843# It is not useful on other systems. If it contains results you don't
21844# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021845#
Martin v. Löwis11437992002-04-12 09:54:03 +000021846# config.status only pays attention to the cache file if you give it
21847# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021848#
Skip Montanaro6dead952003-09-25 14:50:04 +000021849# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000021850# loading this file, other *unset* `ac_cv_foo' will be assigned the
21851# following values.
21852
21853_ACEOF
21854
Guido van Rossumf78abae1997-01-21 22:02:36 +000021855# The following way of writing the cache mishandles newlines in values,
21856# but we know of no workaround that is simple, portable, and efficient.
21857# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021858# Ultrix sh set writes to stderr and can't be redirected directly,
21859# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000021860{
21861 (set) 2>&1 |
21862 case `(ac_space=' '; set | grep ac_space) 2>&1` in
21863 *ac_space=\ *)
21864 # `set' does not quote correctly, so add quotes (double-quote
21865 # substitution turns \\\\ into \\, and sed turns \\ into \).
21866 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021867 "s/'/'\\\\''/g;
21868 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021869 ;;
21870 *)
21871 # `set' quotes correctly as required by POSIX, so do not add quotes.
21872 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021873 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ;;
21875 esac;
21876} |
21877 sed '
21878 t clear
21879 : clear
21880 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21881 t end
21882 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21883 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000021884if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021885 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021886 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21887 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021888 else
21889 echo "not updating unwritable cache $cache_file"
21890 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021891fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021892rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000021893
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021894test "x$prefix" = xNONE && prefix=$ac_default_prefix
21895# Let make expand exec_prefix.
21896test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000021897
Martin v. Löwis11437992002-04-12 09:54:03 +000021898# VPATH may cause trouble with some makes, so we remove $(srcdir),
21899# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21900# trailing colons and then remove the whole line if VPATH becomes empty
21901# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000021902if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021903 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000021904s/:*\$(srcdir):*/:/;
21905s/:*\${srcdir}:*/:/;
21906s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021907s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000021908s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021909s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000021910}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021911fi
21912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021913DEFS=-DHAVE_CONFIG_H
21914
Skip Montanaro6dead952003-09-25 14:50:04 +000021915ac_libobjs=
21916ac_ltlibobjs=
21917for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21918 # 1. Remove the extension, and $U if already installed.
21919 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021920 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021921 # 2. Add them.
21922 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
21923 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
21924done
21925LIBOBJS=$ac_libobjs
21926
21927LTLIBOBJS=$ac_ltlibobjs
21928
21929
Martin v. Löwis11437992002-04-12 09:54:03 +000021930
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021931: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000021932ac_clean_files_save=$ac_clean_files
21933ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21934{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
21935echo "$as_me: creating $CONFIG_STATUS" >&6;}
21936cat >$CONFIG_STATUS <<_ACEOF
21937#! $SHELL
21938# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021939# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021940# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000021941# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000021942
Martin v. Löwis11437992002-04-12 09:54:03 +000021943debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000021944ac_cs_recheck=false
21945ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021946SHELL=\${CONFIG_SHELL-$SHELL}
21947_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000021948
Martin v. Löwis11437992002-04-12 09:54:03 +000021949cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021950## --------------------- ##
21951## M4sh Initialization. ##
21952## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000021953
Martin v. Löwis11437992002-04-12 09:54:03 +000021954# Be Bourne compatible
21955if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21956 emulate sh
21957 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021958 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21959 # is contrary to our usage. Disable this feature.
21960 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021961elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21962 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000021963fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000021964DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000021965
Martin v. Löwis11437992002-04-12 09:54:03 +000021966# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021967if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021968 as_unset=unset
21969else
21970 as_unset=false
21971fi
Michael W. Hudson54241132001-12-07 15:38:26 +000021972
Skip Montanaro6dead952003-09-25 14:50:04 +000021973
21974# Work around bugs in pre-3.0 UWIN ksh.
21975$as_unset ENV MAIL MAILPATH
21976PS1='$ '
21977PS2='> '
21978PS4='+ '
21979
21980# NLS nuisances.
21981for as_var in \
21982 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
21983 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
21984 LC_TELEPHONE LC_TIME
21985do
Skip Montanarof0d5f792004-08-15 14:08:23 +000021986 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000021987 eval $as_var=C; export $as_var
21988 else
21989 $as_unset $as_var
21990 fi
21991done
21992
21993# Required to use basename.
21994if expr a : '\(a\)' >/dev/null 2>&1; then
21995 as_expr=expr
21996else
21997 as_expr=false
21998fi
21999
22000if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22001 as_basename=basename
22002else
22003 as_basename=false
22004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022005
22006
22007# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000022008as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022009$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22010 X"$0" : 'X\(//\)$' \| \
22011 X"$0" : 'X\(/\)$' \| \
22012 . : '\(.\)' 2>/dev/null ||
22013echo X/"$0" |
22014 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22015 /^X\/\(\/\/\)$/{ s//\1/; q; }
22016 /^X\/\(\/\).*/{ s//\1/; q; }
22017 s/.*/./; q'`
22018
Skip Montanaro6dead952003-09-25 14:50:04 +000022019
Martin v. Löwis11437992002-04-12 09:54:03 +000022020# PATH needs CR, and LINENO needs CR and PATH.
22021# Avoid depending upon Character Ranges.
22022as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22023as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22024as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22025as_cr_digits='0123456789'
22026as_cr_alnum=$as_cr_Letters$as_cr_digits
22027
22028# The user is always right.
22029if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022030 echo "#! /bin/sh" >conf$$.sh
22031 echo "exit 0" >>conf$$.sh
22032 chmod +x conf$$.sh
22033 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022034 PATH_SEPARATOR=';'
22035 else
22036 PATH_SEPARATOR=:
22037 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022038 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000022039fi
22040
22041
22042 as_lineno_1=$LINENO
22043 as_lineno_2=$LINENO
22044 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22045 test "x$as_lineno_1" != "x$as_lineno_2" &&
22046 test "x$as_lineno_3" = "x$as_lineno_2" || {
22047 # Find who we are. Look in the path if we contain no path at all
22048 # relative or not.
22049 case $0 in
22050 *[\\/]* ) as_myself=$0 ;;
22051 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22052for as_dir in $PATH
22053do
22054 IFS=$as_save_IFS
22055 test -z "$as_dir" && as_dir=.
22056 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22057done
22058
22059 ;;
22060 esac
22061 # We did not find ourselves, most probably we were run as `sh COMMAND'
22062 # in which case we are not to be found in the path.
22063 if test "x$as_myself" = x; then
22064 as_myself=$0
22065 fi
22066 if test ! -f "$as_myself"; then
22067 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22068echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22069 { (exit 1); exit 1; }; }
22070 fi
22071 case $CONFIG_SHELL in
22072 '')
22073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22074for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22075do
22076 IFS=$as_save_IFS
22077 test -z "$as_dir" && as_dir=.
22078 for as_base in sh bash ksh sh5; do
22079 case $as_dir in
22080 /*)
22081 if ("$as_dir/$as_base" -c '
22082 as_lineno_1=$LINENO
22083 as_lineno_2=$LINENO
22084 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22085 test "x$as_lineno_1" != "x$as_lineno_2" &&
22086 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022087 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22088 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022089 CONFIG_SHELL=$as_dir/$as_base
22090 export CONFIG_SHELL
22091 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22092 fi;;
22093 esac
22094 done
22095done
22096;;
Jack Jansendd19cf82001-12-06 22:36:17 +000022097 esac
22098
Martin v. Löwis11437992002-04-12 09:54:03 +000022099 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22100 # uniformly replaced by the line number. The first 'sed' inserts a
22101 # line-number line before each line; the second 'sed' does the real
22102 # work. The second script uses 'N' to pair each line-number line
22103 # with the numbered line, and appends trailing '-' during
22104 # substitution so that $LINENO is not a special case at line end.
22105 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22106 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22107 sed '=' <$as_myself |
22108 sed '
22109 N
22110 s,$,-,
22111 : loop
22112 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22113 t loop
22114 s,-$,,
22115 s,^['$as_cr_digits']*\n,,
22116 ' >$as_me.lineno &&
22117 chmod +x $as_me.lineno ||
22118 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22119echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22120 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022121
Martin v. Löwis11437992002-04-12 09:54:03 +000022122 # Don't try to exec as it changes $[0], causing all sort of problems
22123 # (the dirname of $[0] is not the place where we might find the
22124 # original and so on. Autoconf is especially sensible to this).
22125 . ./$as_me.lineno
22126 # Exit status is that of the last command.
22127 exit
22128}
22129
22130
22131case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22132 *c*,-n*) ECHO_N= ECHO_C='
22133' ECHO_T=' ' ;;
22134 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22135 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
22136esac
22137
22138if expr a : '\(a\)' >/dev/null 2>&1; then
22139 as_expr=expr
22140else
22141 as_expr=false
22142fi
22143
22144rm -f conf$$ conf$$.exe conf$$.file
22145echo >conf$$.file
22146if ln -s conf$$.file conf$$ 2>/dev/null; then
22147 # We could just check for DJGPP; but this test a) works b) is more generic
22148 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22149 if test -f conf$$.exe; then
22150 # Don't use ln at all; we don't have any links
22151 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022152 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 as_ln_s='ln -s'
22154 fi
22155elif ln conf$$.file conf$$ 2>/dev/null; then
22156 as_ln_s=ln
22157else
22158 as_ln_s='cp -p'
22159fi
22160rm -f conf$$ conf$$.exe conf$$.file
22161
Skip Montanaro6dead952003-09-25 14:50:04 +000022162if mkdir -p . 2>/dev/null; then
22163 as_mkdir_p=:
22164else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022165 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000022166 as_mkdir_p=false
22167fi
22168
Martin v. Löwis11437992002-04-12 09:54:03 +000022169as_executable_p="test -f"
22170
22171# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022172as_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 +000022173
22174# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022175as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000022176
22177
22178# IFS
22179# We need space, tab and new line, in precisely that order.
22180as_nl='
22181'
22182IFS=" $as_nl"
22183
22184# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000022185$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000022186
22187exec 6>&1
22188
22189# Open the log real soon, to keep \$[0] and so on meaningful, and to
22190# report actual input values of CONFIG_FILES etc. instead of their
22191# values after options handling. Logging --version etc. is OK.
22192exec 5>>config.log
22193{
22194 echo
22195 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22196## Running $as_me. ##
22197_ASBOX
22198} >&5
22199cat >&5 <<_CSEOF
22200
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022201This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000022202generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000022203
22204 CONFIG_FILES = $CONFIG_FILES
22205 CONFIG_HEADERS = $CONFIG_HEADERS
22206 CONFIG_LINKS = $CONFIG_LINKS
22207 CONFIG_COMMANDS = $CONFIG_COMMANDS
22208 $ $0 $@
22209
22210_CSEOF
22211echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22212echo >&5
22213_ACEOF
22214
22215# Files that config.status was made for.
22216if test -n "$ac_config_files"; then
22217 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22218fi
22219
22220if test -n "$ac_config_headers"; then
22221 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22222fi
22223
22224if test -n "$ac_config_links"; then
22225 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22226fi
22227
22228if test -n "$ac_config_commands"; then
22229 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22230fi
22231
22232cat >>$CONFIG_STATUS <<\_ACEOF
22233
22234ac_cs_usage="\
22235\`$as_me' instantiates files from templates according to the
22236current configuration.
22237
22238Usage: $0 [OPTIONS] [FILE]...
22239
22240 -h, --help print this help, then exit
22241 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000022242 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000022243 -d, --debug don't remove temporary files
22244 --recheck update $as_me by reconfiguring in the same conditions
22245 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022246 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022247 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022248 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022249
22250Configuration files:
22251$config_files
22252
22253Configuration headers:
22254$config_headers
22255
22256Report bugs to <bug-autoconf@gnu.org>."
22257_ACEOF
22258
22259cat >>$CONFIG_STATUS <<_ACEOF
22260ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000022261python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000022262configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000022263 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22264
Skip Montanarof0d5f792004-08-15 14:08:23 +000022265Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000022266This config.status script is free software; the Free Software Foundation
22267gives unlimited permission to copy, distribute and modify it."
22268srcdir=$srcdir
22269INSTALL="$INSTALL"
22270_ACEOF
22271
22272cat >>$CONFIG_STATUS <<\_ACEOF
22273# If no file are specified by the user, then we need to provide default
22274# value. By we need to know if files were specified by the user.
22275ac_need_defaults=:
22276while test $# != 0
22277do
22278 case $1 in
22279 --*=*)
22280 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22281 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022282 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000022283 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022284 -*)
22285 ac_option=$1
22286 ac_optarg=$2
22287 ac_shift=shift
22288 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022289 *) # This is not an option, so the user has probably given explicit
22290 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000022291 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000022292 ac_need_defaults=false;;
22293 esac
22294
Skip Montanaro6dead952003-09-25 14:50:04 +000022295 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000022296 # Handling of the options.
22297_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022298cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022299 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22300 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022301 --version | --vers* | -V )
22302 echo "$ac_cs_version"; exit 0 ;;
22303 --he | --h)
22304 # Conflict between --help and --header
22305 { { echo "$as_me:$LINENO: error: ambiguous option: $1
22306Try \`$0 --help' for more information." >&5
22307echo "$as_me: error: ambiguous option: $1
22308Try \`$0 --help' for more information." >&2;}
22309 { (exit 1); exit 1; }; };;
22310 --help | --hel | -h )
22311 echo "$ac_cs_usage"; exit 0 ;;
22312 --debug | --d* | -d )
22313 debug=: ;;
22314 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000022315 $ac_shift
22316 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022317 ac_need_defaults=false;;
22318 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000022319 $ac_shift
22320 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000022321 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000022322 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22323 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22324 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022325
22326 # This is an error.
22327 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
22328Try \`$0 --help' for more information." >&5
22329echo "$as_me: error: unrecognized option: $1
22330Try \`$0 --help' for more information." >&2;}
22331 { (exit 1); exit 1; }; } ;;
22332
22333 *) ac_config_targets="$ac_config_targets $1" ;;
22334
22335 esac
22336 shift
22337done
22338
Skip Montanaro6dead952003-09-25 14:50:04 +000022339ac_configure_extra_args=
22340
22341if $ac_cs_silent; then
22342 exec 6>/dev/null
22343 ac_configure_extra_args="$ac_configure_extra_args --silent"
22344fi
22345
22346_ACEOF
22347cat >>$CONFIG_STATUS <<_ACEOF
22348if \$ac_cs_recheck; then
22349 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22350 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22351fi
22352
Martin v. Löwis11437992002-04-12 09:54:03 +000022353_ACEOF
22354
22355
22356
22357
22358
22359cat >>$CONFIG_STATUS <<\_ACEOF
22360for ac_config_target in $ac_config_targets
22361do
22362 case "$ac_config_target" in
22363 # Handling of arguments.
22364 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
22365 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
22366 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
22367 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22368echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22369 { (exit 1); exit 1; }; };;
22370 esac
22371done
22372
22373# If the user did not use the arguments to specify the items to instantiate,
22374# then the envvar interface is used. Set only those that are not.
22375# We use the long form for the default assignment because of an extremely
22376# bizarre bug on SunOS 4.1.3.
22377if $ac_need_defaults; then
22378 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22379 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22380fi
22381
Skip Montanaro6dead952003-09-25 14:50:04 +000022382# Have a temporary directory for convenience. Make it in the build tree
22383# simply because there is no reason to put it here, and in addition,
22384# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000022385# Create a temporary directory, and hook for its removal unless debugging.
22386$debug ||
22387{
22388 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22389 trap '{ (exit 1); exit 1; }' 1 2 13 15
22390}
22391
22392# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000022393
Martin v. Löwis11437992002-04-12 09:54:03 +000022394{
Skip Montanaro6dead952003-09-25 14:50:04 +000022395 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000022396 test -n "$tmp" && test -d "$tmp"
22397} ||
22398{
Skip Montanaro6dead952003-09-25 14:50:04 +000022399 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000022400 (umask 077 && mkdir $tmp)
22401} ||
22402{
Skip Montanaro6dead952003-09-25 14:50:04 +000022403 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000022404 { (exit 1); exit 1; }
22405}
22406
22407_ACEOF
22408
22409cat >>$CONFIG_STATUS <<_ACEOF
22410
22411#
22412# CONFIG_FILES section.
22413#
22414
22415# No need to generate the scripts if there are no CONFIG_FILES.
22416# This happens for instance when ./config.status config.h
22417if test -n "\$CONFIG_FILES"; then
22418 # Protect against being on the right side of a sed subst in config.status.
22419 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22420 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22421s,@SHELL@,$SHELL,;t t
22422s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22423s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22424s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22425s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22426s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22427s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22428s,@exec_prefix@,$exec_prefix,;t t
22429s,@prefix@,$prefix,;t t
22430s,@program_transform_name@,$program_transform_name,;t t
22431s,@bindir@,$bindir,;t t
22432s,@sbindir@,$sbindir,;t t
22433s,@libexecdir@,$libexecdir,;t t
22434s,@datadir@,$datadir,;t t
22435s,@sysconfdir@,$sysconfdir,;t t
22436s,@sharedstatedir@,$sharedstatedir,;t t
22437s,@localstatedir@,$localstatedir,;t t
22438s,@libdir@,$libdir,;t t
22439s,@includedir@,$includedir,;t t
22440s,@oldincludedir@,$oldincludedir,;t t
22441s,@infodir@,$infodir,;t t
22442s,@mandir@,$mandir,;t t
22443s,@build_alias@,$build_alias,;t t
22444s,@host_alias@,$host_alias,;t t
22445s,@target_alias@,$target_alias,;t t
22446s,@DEFS@,$DEFS,;t t
22447s,@ECHO_C@,$ECHO_C,;t t
22448s,@ECHO_N@,$ECHO_N,;t t
22449s,@ECHO_T@,$ECHO_T,;t t
22450s,@LIBS@,$LIBS,;t t
22451s,@VERSION@,$VERSION,;t t
22452s,@SOVERSION@,$SOVERSION,;t t
22453s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
22454s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
22455s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
22456s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
22457s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
22458s,@MACHDEP@,$MACHDEP,;t t
22459s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000022460s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000022461s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000022462s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022463s,@CXX@,$CXX,;t t
22464s,@MAINOBJ@,$MAINOBJ,;t t
22465s,@EXEEXT@,$EXEEXT,;t t
22466s,@CC@,$CC,;t t
22467s,@CFLAGS@,$CFLAGS,;t t
22468s,@LDFLAGS@,$LDFLAGS,;t t
22469s,@CPPFLAGS@,$CPPFLAGS,;t t
22470s,@ac_ct_CC@,$ac_ct_CC,;t t
22471s,@OBJEXT@,$OBJEXT,;t t
22472s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022473s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022474s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
22475s,@LIBRARY@,$LIBRARY,;t t
22476s,@LDLIBRARY@,$LDLIBRARY,;t t
22477s,@DLLLIBRARY@,$DLLLIBRARY,;t t
22478s,@BLDLIBRARY@,$BLDLIBRARY,;t t
22479s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
22480s,@INSTSONAME@,$INSTSONAME,;t t
22481s,@RUNSHARED@,$RUNSHARED,;t t
22482s,@LINKCC@,$LINKCC,;t t
22483s,@RANLIB@,$RANLIB,;t t
22484s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22485s,@AR@,$AR,;t t
Martin v. Löwisdea59e52006-01-05 10:00:36 +000022486s,@SVNVERSION@,$SVNVERSION,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022487s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22488s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22489s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22490s,@LN@,$LN,;t t
22491s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000022492s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000022493s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022494s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
22495s,@SO@,$SO,;t t
22496s,@LDSHARED@,$LDSHARED,;t t
22497s,@BLDSHARED@,$BLDSHARED,;t t
22498s,@CCSHARED@,$CCSHARED,;t t
22499s,@LINKFORSHARED@,$LINKFORSHARED,;t t
22500s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000022501s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022502s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
22503s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
22504s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
22505s,@LDLAST@,$LDLAST,;t t
22506s,@THREADOBJ@,$THREADOBJ,;t t
22507s,@DLINCLDIR@,$DLINCLDIR,;t t
22508s,@DYNLOADFILE@,$DYNLOADFILE,;t t
22509s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000022510s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022511s,@LIBOBJS@,$LIBOBJS,;t t
22512s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
22513s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
22514s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
22515s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
22516s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
22517s,@LIBM@,$LIBM,;t t
22518s,@LIBC@,$LIBC,;t t
22519s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
22520s,@THREADHEADERS@,$THREADHEADERS,;t t
22521s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000022522s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000022523CEOF
22524
22525_ACEOF
22526
22527 cat >>$CONFIG_STATUS <<\_ACEOF
22528 # Split the substitutions into bite-sized pieces for seds with
22529 # small command number limits, like on Digital OSF/1 and HP-UX.
22530 ac_max_sed_lines=48
22531 ac_sed_frag=1 # Number of current file.
22532 ac_beg=1 # First line for current file.
22533 ac_end=$ac_max_sed_lines # Line after last line for current file.
22534 ac_more_lines=:
22535 ac_sed_cmds=
22536 while $ac_more_lines; do
22537 if test $ac_beg -gt 1; then
22538 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22539 else
22540 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22541 fi
22542 if test ! -s $tmp/subs.frag; then
22543 ac_more_lines=false
22544 else
22545 # The purpose of the label and of the branching condition is to
22546 # speed up the sed processing (if there are no `@' at all, there
22547 # is no need to browse any of the substitutions).
22548 # These are the two extra sed commands mentioned above.
22549 (echo ':t
22550 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22551 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000022552 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022553 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022554 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000022555 fi
22556 ac_sed_frag=`expr $ac_sed_frag + 1`
22557 ac_beg=$ac_end
22558 ac_end=`expr $ac_end + $ac_max_sed_lines`
22559 fi
22560 done
22561 if test -z "$ac_sed_cmds"; then
22562 ac_sed_cmds=cat
22563 fi
22564fi # test -n "$CONFIG_FILES"
22565
22566_ACEOF
22567cat >>$CONFIG_STATUS <<\_ACEOF
22568for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22569 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22570 case $ac_file in
22571 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022572 cat >$tmp/stdin
22573 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22574 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022575 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022576 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022577 * ) ac_file_in=$ac_file.in ;;
22578 esac
22579
22580 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22581 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22582$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022583 X"$ac_file" : 'X\(//\)[^/]' \| \
22584 X"$ac_file" : 'X\(//\)$' \| \
22585 X"$ac_file" : 'X\(/\)' \| \
22586 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022587echo X"$ac_file" |
22588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22589 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22590 /^X\(\/\/\)$/{ s//\1/; q; }
22591 /^X\(\/\).*/{ s//\1/; q; }
22592 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022593 { if $as_mkdir_p; then
22594 mkdir -p "$ac_dir"
22595 else
22596 as_dir="$ac_dir"
22597 as_dirs=
22598 while test ! -d "$as_dir"; do
22599 as_dirs="$as_dir $as_dirs"
22600 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22601$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022602 X"$as_dir" : 'X\(//\)[^/]' \| \
22603 X"$as_dir" : 'X\(//\)$' \| \
22604 X"$as_dir" : 'X\(/\)' \| \
22605 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022606echo X"$as_dir" |
22607 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22608 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22609 /^X\(\/\/\)$/{ s//\1/; q; }
22610 /^X\(\/\).*/{ s//\1/; q; }
22611 s/.*/./; q'`
22612 done
22613 test ! -n "$as_dirs" || mkdir $as_dirs
22614 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22615echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22616 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022617
22618 ac_builddir=.
22619
22620if test "$ac_dir" != .; then
22621 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
22622 # A "../" for each directory in $ac_dir_suffix.
22623 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
22624else
22625 ac_dir_suffix= ac_top_builddir=
22626fi
22627
22628case $srcdir in
22629 .) # No --srcdir option. We are building in place.
22630 ac_srcdir=.
22631 if test -z "$ac_top_builddir"; then
22632 ac_top_srcdir=.
22633 else
22634 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
22635 fi ;;
22636 [\\/]* | ?:[\\/]* ) # Absolute path.
22637 ac_srcdir=$srcdir$ac_dir_suffix;
22638 ac_top_srcdir=$srcdir ;;
22639 *) # Relative path.
22640 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
22641 ac_top_srcdir=$ac_top_builddir$srcdir ;;
22642esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000022643
22644# Do not use `cd foo && pwd` to compute absolute paths, because
22645# the directories may not exist.
22646case `pwd` in
22647.) ac_abs_builddir="$ac_dir";;
22648*)
22649 case "$ac_dir" in
22650 .) ac_abs_builddir=`pwd`;;
22651 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
22652 *) ac_abs_builddir=`pwd`/"$ac_dir";;
22653 esac;;
22654esac
22655case $ac_abs_builddir in
22656.) ac_abs_top_builddir=${ac_top_builddir}.;;
22657*)
22658 case ${ac_top_builddir}. in
22659 .) ac_abs_top_builddir=$ac_abs_builddir;;
22660 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
22661 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
22662 esac;;
22663esac
22664case $ac_abs_builddir in
22665.) ac_abs_srcdir=$ac_srcdir;;
22666*)
22667 case $ac_srcdir in
22668 .) ac_abs_srcdir=$ac_abs_builddir;;
22669 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
22670 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
22671 esac;;
22672esac
22673case $ac_abs_builddir in
22674.) ac_abs_top_srcdir=$ac_top_srcdir;;
22675*)
22676 case $ac_top_srcdir in
22677 .) ac_abs_top_srcdir=$ac_abs_builddir;;
22678 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
22679 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
22680 esac;;
22681esac
Martin v. Löwis11437992002-04-12 09:54:03 +000022682
22683
22684 case $INSTALL in
22685 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22686 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
22687 esac
22688
Brett Cannon43802422005-02-10 20:48:03 +000022689 if test x"$ac_file" != x-; then
22690 { echo "$as_me:$LINENO: creating $ac_file" >&5
22691echo "$as_me: creating $ac_file" >&6;}
22692 rm -f "$ac_file"
22693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022694 # Let's still pretend it is `configure' which instantiates (i.e., don't
22695 # use $as_me), people would be surprised to read:
22696 # /* config.h. Generated by config.status. */
22697 if test x"$ac_file" = x-; then
22698 configure_input=
22699 else
22700 configure_input="$ac_file. "
22701 fi
22702 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000022703 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000022704
22705 # First look for the input files in the build tree, otherwise in the
22706 # src tree.
22707 ac_file_inputs=`IFS=:
22708 for f in $ac_file_in; do
22709 case $f in
22710 -) echo $tmp/stdin ;;
22711 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022712 # Absolute (can't be DOS-style, as IFS=:)
22713 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022714echo "$as_me: error: cannot find input file: $f" >&2;}
22715 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022716 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022717 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022718 if test -f "$f"; then
22719 # Build tree
22720 echo "$f"
22721 elif test -f "$srcdir/$f"; then
22722 # Source tree
22723 echo "$srcdir/$f"
22724 else
22725 # /dev/null tree
22726 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022727echo "$as_me: error: cannot find input file: $f" >&2;}
22728 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022729 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022730 esac
22731 done` || { (exit 1); exit 1; }
22732_ACEOF
22733cat >>$CONFIG_STATUS <<_ACEOF
22734 sed "$ac_vpsub
22735$extrasub
22736_ACEOF
22737cat >>$CONFIG_STATUS <<\_ACEOF
22738:t
22739/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22740s,@configure_input@,$configure_input,;t t
22741s,@srcdir@,$ac_srcdir,;t t
22742s,@abs_srcdir@,$ac_abs_srcdir,;t t
22743s,@top_srcdir@,$ac_top_srcdir,;t t
22744s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
22745s,@builddir@,$ac_builddir,;t t
22746s,@abs_builddir@,$ac_abs_builddir,;t t
22747s,@top_builddir@,$ac_top_builddir,;t t
22748s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
22749s,@INSTALL@,$ac_INSTALL,;t t
22750" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22751 rm -f $tmp/stdin
22752 if test x"$ac_file" != x-; then
22753 mv $tmp/out $ac_file
22754 else
22755 cat $tmp/out
22756 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022757 fi
22758
Martin v. Löwis11437992002-04-12 09:54:03 +000022759done
22760_ACEOF
22761cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022762
Martin v. Löwis11437992002-04-12 09:54:03 +000022763#
22764# CONFIG_HEADER section.
22765#
Guido van Rossum627b2d71993-12-24 10:39:16 +000022766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022767# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22768# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000022769#
22770# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022771ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
22772ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000022773ac_dC=' '
22774ac_dD=',;t'
22775# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000022776ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000022777ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022778ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000022779ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000022780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000022782 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000022783 case $ac_file in
22784 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000022785 cat >$tmp/stdin
22786 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22787 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022788 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000022789 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022790 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022791 esac
22792
Martin v. Löwis11437992002-04-12 09:54:03 +000022793 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
22794echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022795
Martin v. Löwis11437992002-04-12 09:54:03 +000022796 # First look for the input files in the build tree, otherwise in the
22797 # src tree.
22798 ac_file_inputs=`IFS=:
22799 for f in $ac_file_in; do
22800 case $f in
22801 -) echo $tmp/stdin ;;
22802 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000022803 # Absolute (can't be DOS-style, as IFS=:)
22804 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022805echo "$as_me: error: cannot find input file: $f" >&2;}
22806 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022807 # Do quote $f, to prevent DOS paths from being IFS'd.
22808 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000022809 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000022810 if test -f "$f"; then
22811 # Build tree
22812 echo "$f"
22813 elif test -f "$srcdir/$f"; then
22814 # Source tree
22815 echo "$srcdir/$f"
22816 else
22817 # /dev/null tree
22818 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022819echo "$as_me: error: cannot find input file: $f" >&2;}
22820 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000022821 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022822 esac
22823 done` || { (exit 1); exit 1; }
22824 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022825 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022826
Martin v. Löwis11437992002-04-12 09:54:03 +000022827_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022828
Martin v. Löwis11437992002-04-12 09:54:03 +000022829# Transform confdefs.h into two sed scripts, `conftest.defines' and
22830# `conftest.undefs', that substitutes the proper values into
22831# config.h.in to produce config.h. The first handles `#define'
22832# templates, and the second `#undef' templates.
22833# And first: Protect against being on the right side of a sed subst in
22834# config.status. Protect against being in an unquoted here document
22835# in config.status.
22836rm -f conftest.defines conftest.undefs
22837# Using a here document instead of a string reduces the quoting nightmare.
22838# Putting comments in sed scripts is not portable.
22839#
22840# `end' is used to avoid that the second main sed command (meant for
22841# 0-ary CPP macros) applies to n-ary macro definitions.
22842# See the Autoconf documentation for `clear'.
22843cat >confdef2sed.sed <<\_ACEOF
22844s/[\\&,]/\\&/g
22845s,[\\$`],\\&,g
22846t clear
22847: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000022848s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022849t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000022850s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000022851: end
22852_ACEOF
22853# If some macros were called several times there might be several times
22854# the same #defines, which is useless. Nevertheless, we may not want to
22855# sort them, since we want the *last* AC-DEFINE to be honored.
22856uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22857sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22858rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022859
22860# This sed command replaces #undef with comments. This is necessary, for
22861# example, in the case of _POSIX_SOURCE, which is predefined and required
22862# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000022863cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000022864s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000022865_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022866
Martin v. Löwis11437992002-04-12 09:54:03 +000022867# Break up conftest.defines because some shells have a limit on the size
22868# of here documents, and old seds have small limits too (100 cmds).
22869echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000022870echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022871echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22872echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022873rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000022874while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000022875do
Martin v. Löwis11437992002-04-12 09:54:03 +000022876 # Write a limited-size here document to $tmp/defines.sed.
22877 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22878 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022879 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022880 # Work around the forget-to-reset-the-flag bug.
22881 echo 't clr' >>$CONFIG_STATUS
22882 echo ': clr' >>$CONFIG_STATUS
22883 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022884 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022885 sed -f $tmp/defines.sed $tmp/in >$tmp/out
22886 rm -f $tmp/in
22887 mv $tmp/out $tmp/in
22888' >>$CONFIG_STATUS
22889 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22890 rm -f conftest.defines
22891 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000022892done
Martin v. Löwis11437992002-04-12 09:54:03 +000022893rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000022894echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022895echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000022896
Martin v. Löwis11437992002-04-12 09:54:03 +000022897# Break up conftest.undefs because some shells have a limit on the size
22898# of here documents, and old seds have small limits too (100 cmds).
22899echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
22900rm -f conftest.tail
22901while grep . conftest.undefs >/dev/null
22902do
22903 # Write a limited-size here document to $tmp/undefs.sed.
22904 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22905 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000022906 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022907 # Work around the forget-to-reset-the-flag bug.
22908 echo 't clr' >>$CONFIG_STATUS
22909 echo ': clr' >>$CONFIG_STATUS
22910 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22911 echo 'CEOF
22912 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22913 rm -f $tmp/in
22914 mv $tmp/out $tmp/in
22915' >>$CONFIG_STATUS
22916 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22917 rm -f conftest.undefs
22918 mv conftest.tail conftest.undefs
22919done
22920rm -f conftest.undefs
22921
22922cat >>$CONFIG_STATUS <<\_ACEOF
22923 # Let's still pretend it is `configure' which instantiates (i.e., don't
22924 # use $as_me), people would be surprised to read:
22925 # /* config.h. Generated by config.status. */
22926 if test x"$ac_file" = x-; then
22927 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000022928 else
Martin v. Löwis11437992002-04-12 09:54:03 +000022929 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000022930 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 cat $tmp/in >>$tmp/config.h
22932 rm -f $tmp/in
22933 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022934 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022935 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
22936echo "$as_me: $ac_file is unchanged" >&6;}
22937 else
22938 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
22939$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022940 X"$ac_file" : 'X\(//\)[^/]' \| \
22941 X"$ac_file" : 'X\(//\)$' \| \
22942 X"$ac_file" : 'X\(/\)' \| \
22943 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000022944echo X"$ac_file" |
22945 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22946 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22947 /^X\(\/\/\)$/{ s//\1/; q; }
22948 /^X\(\/\).*/{ s//\1/; q; }
22949 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022950 { if $as_mkdir_p; then
22951 mkdir -p "$ac_dir"
22952 else
22953 as_dir="$ac_dir"
22954 as_dirs=
22955 while test ! -d "$as_dir"; do
22956 as_dirs="$as_dir $as_dirs"
22957 as_dir=`(dirname "$as_dir") 2>/dev/null ||
22958$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022959 X"$as_dir" : 'X\(//\)[^/]' \| \
22960 X"$as_dir" : 'X\(//\)$' \| \
22961 X"$as_dir" : 'X\(/\)' \| \
22962 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000022963echo X"$as_dir" |
22964 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22965 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22966 /^X\(\/\/\)$/{ s//\1/; q; }
22967 /^X\(\/\).*/{ s//\1/; q; }
22968 s/.*/./; q'`
22969 done
22970 test ! -n "$as_dirs" || mkdir $as_dirs
22971 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
22972echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
22973 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022974
Martin v. Löwis11437992002-04-12 09:54:03 +000022975 rm -f $ac_file
22976 mv $tmp/config.h $ac_file
22977 fi
22978 else
22979 cat $tmp/config.h
22980 rm -f $tmp/config.h
22981 fi
22982done
22983_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022984
Martin v. Löwis11437992002-04-12 09:54:03 +000022985cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022986
Martin v. Löwis11437992002-04-12 09:54:03 +000022987{ (exit 0); exit 0; }
22988_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022989chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000022990ac_clean_files=$ac_clean_files_save
22991
22992
22993# configure is writing to config.log, and then calls config.status.
22994# config.status does its own redirection, appending to config.log.
22995# Unfortunately, on DOS this fails, as config.log is still kept open
22996# by configure, so config.status won't be able to write to it; its
22997# output is simply discarded. So we exec the FD to /dev/null,
22998# effectively closing config.log, so it can be properly (re)opened and
22999# appended to by config.status. When coming back to configure, we
23000# need to make the FD available again.
23001if test "$no_create" != yes; then
23002 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023003 ac_config_status_args=
23004 test "$silent" = yes &&
23005 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000023006 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000023007 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 exec 5>>config.log
23009 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23010 # would make configure fail if this is the last instruction.
23011 $ac_cs_success || { (exit 1); exit 1; }
23012fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000023013
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023014
23015echo "creating Setup"
23016if test ! -f Modules/Setup
23017then
23018 cp $srcdir/Modules/Setup.dist Modules/Setup
23019fi
23020
23021echo "creating Setup.local"
23022if test ! -f Modules/Setup.local
23023then
23024 echo "# Edit this file for local setup changes" >Modules/Setup.local
23025fi
23026
23027echo "creating Makefile"
23028$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
23029 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000023030 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000023031mv config.c Modules