blob: 26403dd15ec7ce28341f00dcac611d3266f29b2d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis147fbe52005-08-07 21:09:30 +00002# From configure.in Revision: 1.485 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanarof0d5f792004-08-15 14:08:23 +00008# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000011## --------------------- ##
12## M4sh Initialization. ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000025DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026
Martin v. Löwis11437992002-04-12 09:54:03 +000027# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000029 as_unset=unset
30else
31 as_unset=false
32fi
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
35# Work around bugs in pre-3.0 UWIN ksh.
36$as_unset ENV MAIL MAILPATH
37PS1='$ '
38PS2='> '
39PS4='+ '
40
41# NLS nuisances.
42for as_var in \
43 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
44 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
45 LC_TELEPHONE LC_TIME
46do
Skip Montanarof0d5f792004-08-15 14:08:23 +000047 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000048 eval $as_var=C; export $as_var
49 else
50 $as_unset $as_var
51 fi
52done
53
54# Required to use basename.
55if expr a : '\(a\)' >/dev/null 2>&1; then
56 as_expr=expr
57else
58 as_expr=false
59fi
60
61if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
62 as_basename=basename
63else
64 as_basename=false
65fi
Martin v. Löwis11437992002-04-12 09:54:03 +000066
67
68# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000069as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000070$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
71 X"$0" : 'X\(//\)$' \| \
72 X"$0" : 'X\(/\)$' \| \
73 . : '\(.\)' 2>/dev/null ||
74echo X/"$0" |
75 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
76 /^X\/\(\/\/\)$/{ s//\1/; q; }
77 /^X\/\(\/\).*/{ s//\1/; q; }
78 s/.*/./; q'`
79
Skip Montanaro6dead952003-09-25 14:50:04 +000080
Martin v. Löwis11437992002-04-12 09:54:03 +000081# PATH needs CR, and LINENO needs CR and PATH.
82# Avoid depending upon Character Ranges.
83as_cr_letters='abcdefghijklmnopqrstuvwxyz'
84as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
85as_cr_Letters=$as_cr_letters$as_cr_LETTERS
86as_cr_digits='0123456789'
87as_cr_alnum=$as_cr_Letters$as_cr_digits
88
89# The user is always right.
90if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000091 echo "#! /bin/sh" >conf$$.sh
92 echo "exit 0" >>conf$$.sh
93 chmod +x conf$$.sh
94 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000095 PATH_SEPARATOR=';'
96 else
97 PATH_SEPARATOR=:
98 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000099 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +0000100fi
101
102
103 as_lineno_1=$LINENO
104 as_lineno_2=$LINENO
105 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
106 test "x$as_lineno_1" != "x$as_lineno_2" &&
107 test "x$as_lineno_3" = "x$as_lineno_2" || {
108 # Find who we are. Look in the path if we contain no path at all
109 # relative or not.
110 case $0 in
111 *[\\/]* ) as_myself=$0 ;;
112 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
113for as_dir in $PATH
114do
115 IFS=$as_save_IFS
116 test -z "$as_dir" && as_dir=.
117 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
118done
119
120 ;;
121 esac
122 # We did not find ourselves, most probably we were run as `sh COMMAND'
123 # in which case we are not to be found in the path.
124 if test "x$as_myself" = x; then
125 as_myself=$0
126 fi
127 if test ! -f "$as_myself"; then
128 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
129 { (exit 1); exit 1; }; }
130 fi
131 case $CONFIG_SHELL in
132 '')
133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
140 /*)
141 if ("$as_dir/$as_base" -c '
142 as_lineno_1=$LINENO
143 as_lineno_2=$LINENO
144 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
145 test "x$as_lineno_1" != "x$as_lineno_2" &&
146 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000147 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
148 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
155done
156;;
157 esac
158
159 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
160 # uniformly replaced by the line number. The first 'sed' inserts a
161 # line-number line before each line; the second 'sed' does the real
162 # work. The second script uses 'N' to pair each line-number line
163 # with the numbered line, and appends trailing '-' during
164 # substitution so that $LINENO is not a special case at line end.
165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
168 sed '
169 N
170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
173 t loop
174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
176 ' >$as_me.lineno &&
177 chmod +x $as_me.lineno ||
178 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
179 { (exit 1); exit 1; }; }
180
181 # Don't try to exec as it changes $[0], causing all sort of problems
182 # (the dirname of $[0] is not the place where we might find the
183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
185 # Exit status is that of the last command.
186 exit
187}
188
189
190case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
191 *c*,-n*) ECHO_N= ECHO_C='
192' ECHO_T=' ' ;;
193 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
194 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
195esac
196
197if expr a : '\(a\)' >/dev/null 2>&1; then
198 as_expr=expr
199else
200 as_expr=false
201fi
202
203rm -f conf$$ conf$$.exe conf$$.file
204echo >conf$$.file
205if ln -s conf$$.file conf$$ 2>/dev/null; then
206 # We could just check for DJGPP; but this test a) works b) is more generic
207 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
208 if test -f conf$$.exe; then
209 # Don't use ln at all; we don't have any links
210 as_ln_s='cp -p'
211 else
212 as_ln_s='ln -s'
213 fi
214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
219rm -f conf$$ conf$$.exe conf$$.file
220
Skip Montanaro6dead952003-09-25 14:50:04 +0000221if mkdir -p . 2>/dev/null; then
222 as_mkdir_p=:
223else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000224 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000225 as_mkdir_p=false
226fi
227
Martin v. Löwis11437992002-04-12 09:54:03 +0000228as_executable_p="test -f"
229
230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000235
236
237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
242
243# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000244$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245
246
247# Name of the host.
248# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
249# so uname gets run too.
250ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
251
252exec 6>&1
253
254#
255# Initializations.
256#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000257ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000258ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000259cross_compiling=no
260subdirs=
261MFLAGS=
262MAKEFLAGS=
263SHELL=${CONFIG_SHELL-/bin/sh}
264
265# Maximum number of lines to put in a shell here document.
266# This variable seems obsolete. It should probably be removed, and
267# only ac_max_sed_lines should be used.
268: ${ac_max_here_lines=38}
269
270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000273PACKAGE_VERSION='2.5'
274PACKAGE_STRING='python 2.5'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292# include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297# include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
Bob Ippolito7026a0a2005-03-28 23:23:47 +0000315ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000316ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000317
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000319ac_init_help=
320ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000321# The variables have the same names as the options, with
322# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000323cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000334verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335x_includes=NONE
336x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share'
347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include'
352oldincludedir='/usr/include'
353infodir='${prefix}/info'
354mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000355
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356ac_prev=
357for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000358do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 # If the previous option needs an argument, assign it.
360 if test -n "$ac_prev"; then
361 eval "$ac_prev=\$ac_option"
362 ac_prev=
363 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Martin v. Löwis11437992002-04-12 09:54:03 +0000366 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000367
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000368 # Accept the important Cygnus configure options, so we can diagnose typos.
369
Martin v. Löwis11437992002-04-12 09:54:03 +0000370 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000372 -bindir | --bindir | --bindi | --bind | --bin | --bi)
373 ac_prev=bindir ;;
374 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376
377 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000379 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000380 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000382 -cache-file | --cache-file | --cache-fil | --cache-fi \
383 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
384 ac_prev=cache_file ;;
385 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
386 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000387 cache_file=$ac_optarg ;;
388
389 --config-cache | -C)
390 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393 ac_prev=datadir ;;
394 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000397
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; }
404 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
405 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000409 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; }
413 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414 case $ac_option in
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416 *) ac_optarg=yes ;;
417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000418 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422 | --exec | --exe | --ex)
423 ac_prev=exec_prefix ;;
424 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000427 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000428
429 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 # Obsolete; use --with-gas.
431 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432
Martin v. Löwis11437992002-04-12 09:54:03 +0000433 -help | --help | --hel | --he | -h)
434 ac_init_help=long ;;
435 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
436 ac_init_help=recursive ;;
437 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
438 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439
440 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000443 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000445 -includedir | --includedir | --includedi | --included | --include \
446 | --includ | --inclu | --incl | --inc)
447 ac_prev=includedir ;;
448 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
449 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000451
452 -infodir | --infodir | --infodi | --infod | --info | --inf)
453 ac_prev=infodir ;;
454 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000456
457 -libdir | --libdir | --libdi | --libd)
458 ac_prev=libdir ;;
459 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000461
462 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
463 | --libexe | --libex | --libe)
464 ac_prev=libexecdir ;;
465 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
466 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000467 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000468
469 -localstatedir | --localstatedir | --localstatedi | --localstated \
470 | --localstate | --localstat | --localsta | --localst \
471 | --locals | --local | --loca | --loc | --lo)
472 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000476 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000477
478 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
479 ac_prev=mandir ;;
480 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000481 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000482
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484 # Obsolete; use --without-fp.
485 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489 no_create=yes ;;
490
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
493 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000495 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
496 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
497 | --oldin | --oldi | --old | --ol | --o)
498 ac_prev=oldincludedir ;;
499 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
500 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
501 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000502 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000503
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
505 ac_prev=prefix ;;
506 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508
509 -program-prefix | --program-prefix | --program-prefi | --program-pref \
510 | --program-pre | --program-pr | --program-p)
511 ac_prev=program_prefix ;;
512 -program-prefix=* | --program-prefix=* | --program-prefi=* \
513 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000514 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000515
516 -program-suffix | --program-suffix | --program-suffi | --program-suff \
517 | --program-suf | --program-su | --program-s)
518 ac_prev=program_suffix ;;
519 -program-suffix=* | --program-suffix=* | --program-suffi=* \
520 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000521 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000522
523 -program-transform-name | --program-transform-name \
524 | --program-transform-nam | --program-transform-na \
525 | --program-transform-n | --program-transform- \
526 | --program-transform | --program-transfor \
527 | --program-transfo | --program-transf \
528 | --program-trans | --program-tran \
529 | --progr-tra | --program-tr | --program-t)
530 ac_prev=program_transform_name ;;
531 -program-transform-name=* | --program-transform-name=* \
532 | --program-transform-nam=* | --program-transform-na=* \
533 | --program-transform-n=* | --program-transform-=* \
534 | --program-transform=* | --program-transfor=* \
535 | --program-transfo=* | --program-transf=* \
536 | --program-trans=* | --program-tran=* \
537 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000538 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000539
540 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541 | -silent | --silent | --silen | --sile | --sil)
542 silent=yes ;;
543
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000544 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
545 ac_prev=sbindir ;;
546 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
547 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000548 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549
550 -sharedstatedir | --sharedstatedir | --sharedstatedi \
551 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
552 | --sharedst | --shareds | --shared | --share | --shar \
553 | --sha | --sh)
554 ac_prev=sharedstatedir ;;
555 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
556 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
557 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
558 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000559 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000560
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000561 -site | --site | --sit)
562 ac_prev=site ;;
563 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000564 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565
Guido van Rossum7f43da71994-08-01 12:15:30 +0000566 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
567 ac_prev=srcdir ;;
568 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000569 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000571 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
572 | --syscon | --sysco | --sysc | --sys | --sy)
573 ac_prev=sysconfdir ;;
574 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
575 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000577
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000579 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000581 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582
583 -v | -verbose | --verbose | --verbos | --verbo | --verb)
584 verbose=yes ;;
585
Martin v. Löwis11437992002-04-12 09:54:03 +0000586 -version | --version | --versio | --versi | --vers | -V)
587 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000588
589 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000591 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000596 case $ac_option in
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598 *) ac_optarg=yes ;;
599 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000601
602 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000604 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
606 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; }
608 ac_package=`echo $ac_package | sed 's/-/_/g'`
609 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000610
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000611 --x)
612 # Obsolete; use --with-x.
613 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000614
615 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
616 | --x-incl | --x-inc | --x-in | --x-i)
617 ac_prev=x_includes ;;
618 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
619 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000620 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000621
622 -x-libraries | --x-libraries | --x-librarie | --x-librari \
623 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
624 ac_prev=x_libraries ;;
625 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
626 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000628
Martin v. Löwis11437992002-04-12 09:54:03 +0000629 -*) { echo "$as_me: error: unrecognized option: $ac_option
630Try \`$0 --help' for more information." >&2
631 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632 ;;
633
Martin v. Löwis11437992002-04-12 09:54:03 +0000634 *=*)
635 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
636 # Reject names that are not valid shell variable names.
637 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639 { (exit 1); exit 1; }; }
640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641 eval "$ac_envvar='$ac_optarg'"
642 export $ac_envvar ;;
643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000644 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000645 # FIXME: should be removed in autoconf 3.0.
646 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
647 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
648 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
649 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000650 ;;
651
652 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000653done
654
Guido van Rossum7f43da71994-08-01 12:15:30 +0000655if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000656 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
657 { echo "$as_me: error: missing argument to $ac_option" >&2
658 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000659fi
660
Martin v. Löwis11437992002-04-12 09:54:03 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Martin v. Löwis11437992002-04-12 09:54:03 +0000664 eval ac_val=$`echo $ac_var`
665 case $ac_val in
666 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000669 esac
670done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671
Martin v. Löwis11437992002-04-12 09:54:03 +0000672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000674 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000675do
676 eval ac_val=$`echo $ac_var`
677 case $ac_val in
678 [\\/$]* | ?:[\\/]* ) ;;
679 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
680 { (exit 1); exit 1; }; };;
681 esac
682done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683
Martin v. Löwis11437992002-04-12 09:54:03 +0000684# There might be people who depend on the old broken behavior: `$host'
685# used to hold the argument of --host etc.
686# FIXME: To remove some day.
687build=$build_alias
688host=$host_alias
689target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690
Martin v. Löwis11437992002-04-12 09:54:03 +0000691# FIXME: To remove some day.
692if test "x$host_alias" != x; then
693 if test "x$build_alias" = x; then
694 cross_compiling=maybe
695 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
696 If a cross compiler is detected then cross compile mode will be used." >&2
697 elif test "x$build_alias" != "x$host_alias"; then
698 cross_compiling=yes
699 fi
700fi
701
702ac_tool_prefix=
703test -n "$host_alias" && ac_tool_prefix=$host_alias-
704
705test "$silent" = yes && exec 6>/dev/null
706
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707
708# Find the source files, if location was not specified.
709if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000710 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000711 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000712 ac_confdir=`(dirname "$0") 2>/dev/null ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000714 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \
716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
719 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
720 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
721 /^X\(\/\/\)$/{ s//\1/; q; }
722 /^X\(\/\).*/{ s//\1/; q; }
723 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724 srcdir=$ac_confdir
725 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000726 srcdir=..
727 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000728else
729 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000732 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000739fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
741 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
742 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CC_set=${CC+set}
757ac_env_CC_value=$CC
758ac_cv_env_CC_set=${CC+set}
759ac_cv_env_CC_value=$CC
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Martin v. Löwis11437992002-04-12 09:54:03 +0000777#
778# Report the --help message.
779#
780if test "$ac_init_help" = "long"; then
781 # Omit some internal or obsolete options to make the list less imposing.
782 # This message is too long to be a string in the A/UX 3.1 sh.
783 cat <<_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000784\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
804_ACEOF
805
806 cat <<_ACEOF
807Installation directories:
808 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000811 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000812
813By default, \`make install' will install all the files in
814\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
815an installation prefix other than \`$ac_default_prefix' using \`--prefix',
816for instance \`--prefix=\$HOME'.
817
818For better control, use the options below.
819
820Fine tuning of the installation directories:
821 --bindir=DIR user executables [EPREFIX/bin]
822 --sbindir=DIR system admin executables [EPREFIX/sbin]
823 --libexecdir=DIR program executables [EPREFIX/libexec]
824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
825 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
826 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
827 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
828 --libdir=DIR object code libraries [EPREFIX/lib]
829 --includedir=DIR C header files [PREFIX/include]
830 --oldincludedir=DIR C header files for non-gcc [/usr/include]
831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000841 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000848 --enable-framework[=INSTALLDIR]
849 Build (MacOSX|Darwin) framework
850 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000851 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000852 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
853 --enable-ipv6 Enable ipv6 (with ipv4) support
854 --disable-ipv6 Disable ipv6 support
855 --enable-unicode[=ucs[24]]
856 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857
858Optional Packages:
859 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
860 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000861 --without-gcc never use gcc
862 --with-cxx=<compiler> enable C++ support
863 --with-suffix=.exe set executable suffix
864 --with-pydebug build with Py_DEBUG defined
865 --with-libs='lib1 ...' link against additional libs
866 --with-signal-module disable/enable signal module
867 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
868 --with(out)-threads[=DIRECTORY]
869 disable/enable thread support
870 --with(out)-thread[=DIRECTORY]
871 deprecated; use --with(out)-threads
872 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000874 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with(out)-pymalloc disable/enable specialized mallocs
876 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000877 --with-fpectl enable SIGFPE catching
878 --with-libm=STRING math library
879 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881Some influential environment variables:
882 CC C compiler command
883 CFLAGS C compiler flags
884 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
885 nonstandard directory <lib dir>
886 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
887 headers in a nonstandard directory <include dir>
888 CPP C preprocessor
889
890Use these variables to override the choices made by `configure' or to help
891it to find libraries and programs with nonstandard names/locations.
892
Martin v. Löwis1d459062005-03-14 21:23:33 +0000893Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000894_ACEOF
895fi
896
897if test "$ac_init_help" = "recursive"; then
898 # If there are subdirs, report their specific --help.
899 ac_popdir=`pwd`
900 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
901 test -d $ac_dir || continue
902 ac_builddir=.
903
904if test "$ac_dir" != .; then
905 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
906 # A "../" for each directory in $ac_dir_suffix.
907 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
908else
909 ac_dir_suffix= ac_top_builddir=
910fi
911
912case $srcdir in
913 .) # No --srcdir option. We are building in place.
914 ac_srcdir=.
915 if test -z "$ac_top_builddir"; then
916 ac_top_srcdir=.
917 else
918 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
919 fi ;;
920 [\\/]* | ?:[\\/]* ) # Absolute path.
921 ac_srcdir=$srcdir$ac_dir_suffix;
922 ac_top_srcdir=$srcdir ;;
923 *) # Relative path.
924 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
925 ac_top_srcdir=$ac_top_builddir$srcdir ;;
926esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000927
928# Do not use `cd foo && pwd` to compute absolute paths, because
929# the directories may not exist.
930case `pwd` in
931.) ac_abs_builddir="$ac_dir";;
932*)
933 case "$ac_dir" in
934 .) ac_abs_builddir=`pwd`;;
935 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
936 *) ac_abs_builddir=`pwd`/"$ac_dir";;
937 esac;;
938esac
939case $ac_abs_builddir in
940.) ac_abs_top_builddir=${ac_top_builddir}.;;
941*)
942 case ${ac_top_builddir}. in
943 .) ac_abs_top_builddir=$ac_abs_builddir;;
944 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
945 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
946 esac;;
947esac
948case $ac_abs_builddir in
949.) ac_abs_srcdir=$ac_srcdir;;
950*)
951 case $ac_srcdir in
952 .) ac_abs_srcdir=$ac_abs_builddir;;
953 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
954 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
955 esac;;
956esac
957case $ac_abs_builddir in
958.) ac_abs_top_srcdir=$ac_top_srcdir;;
959*)
960 case $ac_top_srcdir in
961 .) ac_abs_top_srcdir=$ac_abs_builddir;;
962 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
963 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
964 esac;;
965esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000966
967 cd $ac_dir
968 # Check for guested configure; otherwise get Cygnus style configure.
969 if test -f $ac_srcdir/configure.gnu; then
970 echo
971 $SHELL $ac_srcdir/configure.gnu --help=recursive
972 elif test -f $ac_srcdir/configure; then
973 echo
974 $SHELL $ac_srcdir/configure --help=recursive
975 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000976 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 echo
978 $ac_configure --help
979 else
980 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
981 fi
Brett Cannon43802422005-02-10 20:48:03 +0000982 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 done
984fi
985
986test -n "$ac_init_help" && exit 0
987if $ac_init_version; then
988 cat <<\_ACEOF
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +0000989python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000990generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000991
Skip Montanarof0d5f792004-08-15 14:08:23 +0000992Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000993This configure script is free software; the Free Software Foundation
994gives unlimited permission to copy, distribute and modify it.
995_ACEOF
996 exit 0
997fi
998exec 5>config.log
999cat >&5 <<_ACEOF
1000This file contains any messages produced by compilers while
1001running configure, to aid debugging if configure makes a mistake.
1002
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001003It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001004generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001005
1006 $ $0 $@
1007
1008_ACEOF
1009{
1010cat <<_ASUNAME
1011## --------- ##
1012## Platform. ##
1013## --------- ##
1014
1015hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1016uname -m = `(uname -m) 2>/dev/null || echo unknown`
1017uname -r = `(uname -r) 2>/dev/null || echo unknown`
1018uname -s = `(uname -s) 2>/dev/null || echo unknown`
1019uname -v = `(uname -v) 2>/dev/null || echo unknown`
1020
1021/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1022/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1023
1024/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1025/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1026/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1027hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1028/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1029/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1030/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1031
1032_ASUNAME
1033
1034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1035for as_dir in $PATH
1036do
1037 IFS=$as_save_IFS
1038 test -z "$as_dir" && as_dir=.
1039 echo "PATH: $as_dir"
1040done
1041
1042} >&5
1043
1044cat >&5 <<_ACEOF
1045
1046
1047## ----------- ##
1048## Core tests. ##
1049## ----------- ##
1050
1051_ACEOF
1052
1053
1054# Keep a trace of the command line.
1055# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001056# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001057# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001058# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_configure_args0=
1061ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001062ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001063ac_must_keep_next=false
1064for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001065do
Skip Montanaro6dead952003-09-25 14:50:04 +00001066 for ac_arg
1067 do
1068 case $ac_arg in
1069 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 continue ;;
1073 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1074 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1075 esac
1076 case $ac_pass in
1077 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1078 2)
1079 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1080 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001081 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001082 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001083 case $ac_arg in
1084 *=* | --config-cache | -C | -disable-* | --disable-* \
1085 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1086 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1087 | -with-* | --with-* | -without-* | --without-* | --x)
1088 case "$ac_configure_args0 " in
1089 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1090 esac
1091 ;;
1092 -* ) ac_must_keep_next=true ;;
1093 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001094 fi
1095 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1096 # Get rid of the leading space.
1097 ac_sep=" "
1098 ;;
1099 esac
1100 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001101done
Skip Montanaro6dead952003-09-25 14:50:04 +00001102$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1103$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001104
1105# When interrupted or exit'd, cleanup temporary files, and complete
1106# config.log. We remove comments because anyway the quotes in there
1107# would cause problems or look ugly.
1108# WARNING: Be sure not to use single quotes in there, as some shells,
1109# such as our DU 5.0 friend, will then `close' the trap.
1110trap 'exit_status=$?
1111 # Save into config.log some information that might help in debugging.
1112 {
1113 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 cat <<\_ASBOX
1116## ---------------- ##
1117## Cache variables. ##
1118## ---------------- ##
1119_ASBOX
1120 echo
1121 # The following way of writing the cache mishandles newlines in values,
1122{
1123 (set) 2>&1 |
1124 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1125 *ac_space=\ *)
1126 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001127 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1128 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 ;;
1130 *)
1131 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001132 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ;;
1134 esac;
1135}
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137
1138 cat <<\_ASBOX
1139## ----------------- ##
1140## Output variables. ##
1141## ----------------- ##
1142_ASBOX
1143 echo
1144 for ac_var in $ac_subst_vars
1145 do
1146 eval ac_val=$`echo $ac_var`
1147 echo "$ac_var='"'"'$ac_val'"'"'"
1148 done | sort
1149 echo
1150
1151 if test -n "$ac_subst_files"; then
1152 cat <<\_ASBOX
1153## ------------- ##
1154## Output files. ##
1155## ------------- ##
1156_ASBOX
1157 echo
1158 for ac_var in $ac_subst_files
1159 do
1160 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001161 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001162 done | sort
1163 echo
1164 fi
1165
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 if test -s confdefs.h; then
1167 cat <<\_ASBOX
1168## ----------- ##
1169## confdefs.h. ##
1170## ----------- ##
1171_ASBOX
1172 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001173 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 echo
1175 fi
1176 test "$ac_signal" != 0 &&
1177 echo "$as_me: caught signal $ac_signal"
1178 echo "$as_me: exit $exit_status"
1179 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001180 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1182 exit $exit_status
1183 ' 0
1184for ac_signal in 1 2 13 15; do
1185 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1186done
1187ac_signal=0
1188
1189# confdefs.h avoids OS command line length limits that DEFS can exceed.
1190rm -rf conftest* confdefs.h
1191# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1192echo >confdefs.h
1193
1194# Predefined preprocessor variables.
1195
1196cat >>confdefs.h <<_ACEOF
1197#define PACKAGE_NAME "$PACKAGE_NAME"
1198_ACEOF
1199
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_VERSION "$PACKAGE_VERSION"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_STRING "$PACKAGE_STRING"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1218_ACEOF
1219
1220
1221# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222# Prefer explicitly selected file to automatically selected ones.
1223if test -z "$CONFIG_SITE"; then
1224 if test "x$prefix" != xNONE; then
1225 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1226 else
1227 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1228 fi
1229fi
1230for ac_site_file in $CONFIG_SITE; do
1231 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1233echo "$as_me: loading site script $ac_site_file" >&6;}
1234 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235 . "$ac_site_file"
1236 fi
1237done
1238
1239if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # Some versions of bash will fail to source /dev/null (special
1241 # files actually), so we avoid doing that.
1242 if test -f "$cache_file"; then
1243 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1244echo "$as_me: loading cache $cache_file" >&6;}
1245 case $cache_file in
1246 [\\/]* | ?:[\\/]* ) . $cache_file;;
1247 *) . ./$cache_file;;
1248 esac
1249 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001250else
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1252echo "$as_me: creating cache $cache_file" >&6;}
1253 >$cache_file
1254fi
1255
1256# Check that the precious variables saved in the cache have kept the same
1257# value.
1258ac_cache_corrupted=false
1259for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001260 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1262 eval ac_new_set=\$ac_env_${ac_var}_set
1263 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1264 eval ac_new_val="\$ac_env_${ac_var}_value"
1265 case $ac_old_set,$ac_new_set in
1266 set,)
1267 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1268echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1269 ac_cache_corrupted=: ;;
1270 ,set)
1271 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1272echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1273 ac_cache_corrupted=: ;;
1274 ,);;
1275 *)
1276 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001277 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001278echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001279 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001280echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001281 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001282echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001283 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 fi;;
1285 esac
1286 # Pass precious variables to config.status.
1287 if test "$ac_new_set" = set; then
1288 case $ac_new_val in
1289 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1290 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1291 *) ac_arg=$ac_var=$ac_new_val ;;
1292 esac
1293 case " $ac_configure_args " in
1294 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1295 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1296 esac
1297 fi
1298done
1299if $ac_cache_corrupted; then
1300 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1301echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1302 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1303echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1304 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305fi
1306
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001309ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1310ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1311ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Michael W. Hudson54241132001-12-07 15:38:26 +00001314
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
Martin v. Löwis88afe662002-10-26 13:47:44 +00001330
1331
1332
1333
1334
1335
1336
1337
1338
Skip Montanaro6dead952003-09-25 14:50:04 +00001339
1340 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343
1344
1345
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001346
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001347
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001348# We don't use PACKAGE_ variables, and they cause conflicts
1349# with other autoconf-based packages that include Python.h
1350grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1351rm confdefs.h
1352mv confdefs.h.new confdefs.h
1353
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001354
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00001355VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001356
Martin v. Löwis1142de32002-03-29 16:28:31 +00001357
1358SOVERSION=1.0
1359
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001360# The later defininition of _XOPEN_SOURCE disables certain features
1361# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1362
1363cat >>confdefs.h <<\_ACEOF
1364#define _GNU_SOURCE 1
1365_ACEOF
1366
1367
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001368# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1369# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1370# them.
1371
1372cat >>confdefs.h <<\_ACEOF
1373#define _NETBSD_SOURCE 1
1374_ACEOF
1375
1376
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001377# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1378# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1379# them.
1380
1381cat >>confdefs.h <<\_ACEOF
1382#define __BSD_VISIBLE 1
1383_ACEOF
1384
1385
Martin v. Löwisd6320502004-08-12 13:45:08 +00001386# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1387# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1388
1389cat >>confdefs.h <<\_ACEOF
1390#define _BSD_TYPES 1
1391_ACEOF
1392
1393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001394define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001395
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001396# Arguments passed to configure.
1397
1398CONFIG_ARGS="$ac_configure_args"
1399
Jack Jansene578a632001-08-15 01:27:14 +00001400# Check whether --enable-framework or --disable-framework was given.
1401if test "${enable_framework+set}" = set; then
1402 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
Jack Jansene578a632001-08-15 01:27:14 +00001404 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001406 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001407 esac
1408 case $enableval in
1409 no)
1410 PYTHONFRAMEWORK=
1411 PYTHONFRAMEWORKDIR=no-framework
1412 PYTHONFRAMEWORKPREFIX=
1413 PYTHONFRAMEWORKINSTALLDIR=
1414 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001415 ;;
1416 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORK=Python
1418 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001419 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001420 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1421 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001422 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
Guido van Rossum563e7081996-09-10 18:20:48 +00001424else
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
Jack Jansene578a632001-08-15 01:27:14 +00001426 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001427 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001428 PYTHONFRAMEWORKPREFIX=
1429 PYTHONFRAMEWORKINSTALLDIR=
1430 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431
Martin v. Löwis11437992002-04-12 09:54:03 +00001432fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001433
1434
1435
1436
Jack Jansene578a632001-08-15 01:27:14 +00001437
1438##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439## AC_HELP_STRING(--with-dyld,
1440## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001441##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001442# Set name for machine-dependent library files
1443
Martin v. Löwis11437992002-04-12 09:54:03 +00001444echo "$as_me:$LINENO: checking MACHDEP" >&5
1445echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001446if test -z "$MACHDEP"
1447then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001449 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1450 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001451 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001453 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001454 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001455 ac_md_system=`echo $ac_sys_system |
1456 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1457 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001458 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001459 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001460
Guido van Rossum07397971997-04-29 21:49:50 +00001461 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001462 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001463 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001464 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001465 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001466 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001467 esac
1468fi
Guido van Rossum91922671997-10-09 20:24:13 +00001469
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001470# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1471# disable features if it is defined, without any means to access these
1472# features as extensions. For these systems, we skip the definition of
1473# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1474# some feature, make sure there is no alternative way to access this
1475# feature. Also, when using wildcards, make sure you have verified the
1476# need for not defining _XOPEN_SOURCE on all systems matching the
1477# wildcard, and that the wildcard does not include future systems
1478# (which may remove their limitations).
1479case $ac_sys_system/$ac_sys_release in
1480 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1481 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001482 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis99968282004-09-15 06:02:54 +00001483 OpenBSD/2.* | OpenBSD/3.[0123456])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001484 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001485 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1486 # of union __?sigval. Reported by Stuart Bishop.
1487 SunOS/5.6)
1488 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001489 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1490 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001491 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001492 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 define_xopen_source=no;;
1494 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001495 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001496 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001497 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001498 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1499 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1500 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1501 # This should hopefully be fixed in FreeBSD 4.9
1502 FreeBSD/4.8* | Darwin/6* )
1503 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001504 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1505 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1506 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001507 AIX/4)
1508 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001509 AIX/5)
1510 if test `uname -r` -eq 1; then
1511 define_xopen_source=no
1512 fi
1513 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001514 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1515 # disables platform specific features beyond repair.
1516 Darwin/8.*)
1517 define_xopen_source=no
1518 ;;
1519
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001520esac
1521
1522if test $define_xopen_source = yes
1523then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1525 # defined precisely as g++ defines it
1526 case $ac_sys_system/$ac_sys_release in
1527 SunOS/5.8|SunOS/5.9)
1528
1529cat >>confdefs.h <<\_ACEOF
1530#define _XOPEN_SOURCE 500
1531_ACEOF
1532
1533 ;;
1534 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001535
1536cat >>confdefs.h <<\_ACEOF
1537#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001538_ACEOF
1539
Skip Montanarof0d5f792004-08-15 14:08:23 +00001540 ;;
1541 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001542
1543 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1544 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1545 # several APIs are not declared. Since this is also needed in some
1546 # cases for HP-UX, we define it globally.
1547
1548
1549cat >>confdefs.h <<\_ACEOF
1550#define _XOPEN_SOURCE_EXTENDED 1
1551_ACEOF
1552
1553
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001554
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001555cat >>confdefs.h <<\_ACEOF
1556#define _POSIX_C_SOURCE 200112L
1557_ACEOF
1558
1559
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001560fi
1561
Guido van Rossum91922671997-10-09 20:24:13 +00001562#
1563# SGI compilers allow the specification of the both the ABI and the
1564# ISA on the command line. Depending on the values of these switches,
1565# different and often incompatable code will be generated.
1566#
1567# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1568# thus supply support for various ABI/ISA combinations. The MACHDEP
1569# variable is also adjusted.
1570#
1571
1572if test ! -z "$SGI_ABI"
1573then
1574 CC="cc $SGI_ABI"
1575 LDFLAGS="$SGI_ABI $LDFLAGS"
1576 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001578echo "$as_me:$LINENO: result: $MACHDEP" >&5
1579echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001580
Jack Jansen83f898c2002-12-30 22:23:40 +00001581# And add extra plat-mac for darwin
1582
Jack Jansen7b59b422003-03-17 15:44:10 +00001583
Jack Jansen83f898c2002-12-30 22:23:40 +00001584echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1585echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1586if test -z "$EXTRAPLATDIR"
1587then
1588 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001589 darwin)
1590 EXTRAPLATDIR="\$(PLATMACDIRS)"
1591 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1592 ;;
1593 *)
1594 EXTRAPLATDIR=""
1595 EXTRAMACHDEPPATH=""
1596 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001597 esac
1598fi
1599echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1600echo "${ECHO_T}$EXTRAPLATDIR" >&6
1601
Jack Jansen6b08a402004-06-03 12:41:45 +00001602# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1603# it may influence the way we can build extensions, so distutils
1604# needs to check it
1605
1606CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1607
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001609
1610# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1611# for debug/optimization stuff. BASECFLAGS is for flags that are required
1612# just to get things to compile and link. Users are free to override OPT
1613# when running configure or make. The build should not break if they do.
1614# BASECFLAGS should generally not be messed with, however.
1615
1616# XXX shouldn't some/most/all of this code be merged with the stuff later
1617# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001618echo "$as_me:$LINENO: checking for --without-gcc" >&5
1619echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1620
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001622if test "${with_gcc+set}" = set; then
1623 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Guido van Rossum7f43da71994-08-01 12:15:30 +00001625 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001626 no) CC=cc
1627 without_gcc=yes;;
1628 yes) CC=gcc
1629 without_gcc=no;;
1630 *) CC=$withval
1631 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001632 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001633else
Martin v. Löwis11437992002-04-12 09:54:03 +00001634
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001635 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001636 AIX*) CC=cc_r
1637 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001638 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001639 case $BE_HOST_CPU in
1640 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001641 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001642 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001643 BASECFLAGS="$BASECFLAGS -export pragma"
1644 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001645 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001646 ;;
1647 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001648 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001649 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001650 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001651 ;;
1652 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1654echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1655 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001656 ;;
1657 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001658 AR="\$(srcdir)/Modules/ar_beos"
1659 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001660 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001661 Monterey*)
1662 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001663 without_gcc=;;
1664 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001665 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001666fi;
1667echo "$as_me:$LINENO: result: $without_gcc" >&5
1668echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001669
1670
Guido van Rossum95012191999-12-16 17:50:52 +00001671
Fred Drakea1a84e72001-03-06 05:52:16 +00001672MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001673echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1674echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1675
Guido van Rossum95012191999-12-16 17:50:52 +00001676# Check whether --with-cxx or --without-cxx was given.
1677if test "${with_cxx+set}" = set; then
1678 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001679
Martin v. Löwis22352952000-12-13 17:37:02 +00001680 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001681 case $withval in
1682 no) CXX=
1683 with_cxx=no;;
1684 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001685 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001686 with_cxx=$withval;;
1687 esac
1688else
Martin v. Löwis11437992002-04-12 09:54:03 +00001689
Guido van Rossum95012191999-12-16 17:50:52 +00001690 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001691 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001692
Martin v. Löwis11437992002-04-12 09:54:03 +00001693fi;
1694echo "$as_me:$LINENO: result: $with_cxx" >&5
1695echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001696
1697if test "$with_cxx" = "yes"
1698then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1700echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1701 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001702fi
1703
1704
1705
1706
Martin v. Löwis11437992002-04-12 09:54:03 +00001707if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001708then
1709 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1710do
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001712set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001713echo "$as_me:$LINENO: checking for $ac_word" >&5
1714echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1715if test "${ac_cv_prog_CXX+set}" = set; then
1716 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001717else
1718 if test -n "$CXX"; then
1719 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1720else
Martin v. Löwis11437992002-04-12 09:54:03 +00001721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1722for as_dir in $PATH
1723do
1724 IFS=$as_save_IFS
1725 test -z "$as_dir" && as_dir=.
1726 for ac_exec_ext in '' $ac_executable_extensions; do
1727 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1728 ac_cv_prog_CXX="$ac_prog"
1729 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1730 break 2
1731 fi
1732done
1733done
1734
Martin v. Löwis22352952000-12-13 17:37:02 +00001735fi
1736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001737CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001738if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 echo "$as_me:$LINENO: result: $CXX" >&5
1740echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001741else
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 echo "$as_me:$LINENO: result: no" >&5
1743echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001744fi
1745
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001747done
1748test -n "$CXX" || CXX="notfound"
1749
1750 if test "$CXX" = "notfound"
1751 then
1752 CXX=
1753 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001755ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001760/* confdefs.h. */
1761_ACEOF
1762cat confdefs.h >>conftest.$ac_ext
1763cat >>conftest.$ac_ext <<_ACEOF
1764/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001765
Martin v. Löwis11437992002-04-12 09:54:03 +00001766int
1767main ()
1768{
Michael W. Hudson54241132001-12-07 15:38:26 +00001769
Martin v. Löwis11437992002-04-12 09:54:03 +00001770 ;
1771 return 0;
1772}
1773_ACEOF
1774ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001775ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001776# Try to create an executable without -o first, disregard a.out.
1777# It will help us diagnose broken compilers, and finding out an intuition
1778# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001779echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1780echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001781ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1782if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1783 (eval $ac_link_default) 2>&5
1784 ac_status=$?
1785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1786 (exit $ac_status); }; then
1787 # Find the output, starting from the most likely. This scheme is
1788# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1789# resort.
1790
1791# Be careful to initialize this variable, since it used to be cached.
1792# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1793ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001794# b.out is created by i960 compilers.
1795for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1796do
1797 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001798 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001800 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001801 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001802 # This is the source file.
1803 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001804 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001805 # We found the default executable, but exeext='' is most
1806 # certainly right.
1807 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001808 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001809 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1810 # FIXME: I believe we export ac_cv_exeext for Libtool,
1811 # but it would be cool to find out if it's true. Does anybody
1812 # maintain Libtool? --akim.
1813 export ac_cv_exeext
1814 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001815 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001816 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 esac
1818done
1819else
1820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001821sed 's/^/| /' conftest.$ac_ext >&5
1822
1823{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1824See \`config.log' for more details." >&5
1825echo "$as_me: error: C++ compiler cannot create executables
1826See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001828fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001829
1830ac_exeext=$ac_cv_exeext
1831echo "$as_me:$LINENO: result: $ac_file" >&5
1832echo "${ECHO_T}$ac_file" >&6
1833
1834# Check the compiler produces executables we can run. If not, either
1835# the compiler is broken, or we cross compile.
1836echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1837echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1838# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1839# If not cross compiling, check that we can run a simple program.
1840if test "$cross_compiling" != yes; then
1841 if { ac_try='./$ac_file'
1842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1843 (eval $ac_try) 2>&5
1844 ac_status=$?
1845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1846 (exit $ac_status); }; }; then
1847 cross_compiling=no
1848 else
1849 if test "$cross_compiling" = maybe; then
1850 cross_compiling=yes
1851 else
1852 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001853If you meant to cross compile, use \`--host'.
1854See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001855echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001856If you meant to cross compile, use \`--host'.
1857See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001858 { (exit 1); exit 1; }; }
1859 fi
1860 fi
1861fi
1862echo "$as_me:$LINENO: result: yes" >&5
1863echo "${ECHO_T}yes" >&6
1864
Skip Montanaro6dead952003-09-25 14:50:04 +00001865rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001866ac_clean_files=$ac_clean_files_save
1867# Check the compiler produces executables we can run. If not, either
1868# the compiler is broken, or we cross compile.
1869echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1870echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1871echo "$as_me:$LINENO: result: $cross_compiling" >&5
1872echo "${ECHO_T}$cross_compiling" >&6
1873
1874echo "$as_me:$LINENO: checking for suffix of executables" >&5
1875echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1876if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1877 (eval $ac_link) 2>&5
1878 ac_status=$?
1879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1880 (exit $ac_status); }; then
1881 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1882# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1883# work properly (i.e., refer to `conftest.exe'), while it won't with
1884# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001885for ac_file in conftest.exe conftest conftest.*; do
1886 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001887 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001889 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001890 export ac_cv_exeext
1891 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001892 * ) break;;
1893 esac
1894done
1895else
Skip Montanaro6dead952003-09-25 14:50:04 +00001896 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1897See \`config.log' for more details." >&5
1898echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1899See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001900 { (exit 1); exit 1; }; }
1901fi
1902
1903rm -f conftest$ac_cv_exeext
1904echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1905echo "${ECHO_T}$ac_cv_exeext" >&6
1906
1907rm -f conftest.$ac_ext
1908EXEEXT=$ac_cv_exeext
1909ac_exeext=$EXEEXT
1910
1911 ac_ext=c
1912ac_cpp='$CPP $CPPFLAGS'
1913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1915ac_compiler_gnu=$ac_cv_c_compiler_gnu
1916
1917
Martin v. Löwis22352952000-12-13 17:37:02 +00001918
1919 fi
1920fi
1921
Guido van Rossum8b131c51995-03-09 14:10:13 +00001922# If the user switches compilers, we can't believe the cache
1923if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1924then
Martin v. Löwis11437992002-04-12 09:54:03 +00001925 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1926(it is also a good idea to do 'make clean' before compiling)" >&5
1927echo "$as_me: error: cached CC is different -- throw away $cache_file
1928(it is also a good idea to do 'make clean' before compiling)" >&2;}
1929 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001930fi
1931
Martin v. Löwis11437992002-04-12 09:54:03 +00001932ac_ext=c
1933ac_cpp='$CPP $CPPFLAGS'
1934ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1935ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1936ac_compiler_gnu=$ac_cv_c_compiler_gnu
1937if test -n "$ac_tool_prefix"; then
1938 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1939set dummy ${ac_tool_prefix}gcc; ac_word=$2
1940echo "$as_me:$LINENO: checking for $ac_word" >&5
1941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1942if test "${ac_cv_prog_CC+set}" = set; then
1943 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001944else
1945 if test -n "$CC"; then
1946 ac_cv_prog_CC="$CC" # Let the user override the test.
1947else
Martin v. Löwis11437992002-04-12 09:54:03 +00001948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1949for as_dir in $PATH
1950do
1951 IFS=$as_save_IFS
1952 test -z "$as_dir" && as_dir=.
1953 for ac_exec_ext in '' $ac_executable_extensions; do
1954 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1955 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1956 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1957 break 2
1958 fi
1959done
1960done
1961
Jack Jansendd19cf82001-12-06 22:36:17 +00001962fi
1963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001964CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001965if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001966 echo "$as_me:$LINENO: result: $CC" >&5
1967echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001968else
Martin v. Löwis11437992002-04-12 09:54:03 +00001969 echo "$as_me:$LINENO: result: no" >&5
1970echo "${ECHO_T}no" >&6
1971fi
1972
1973fi
1974if test -z "$ac_cv_prog_CC"; then
1975 ac_ct_CC=$CC
1976 # Extract the first word of "gcc", so it can be a program name with args.
1977set dummy gcc; ac_word=$2
1978echo "$as_me:$LINENO: checking for $ac_word" >&5
1979echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1980if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1981 echo $ECHO_N "(cached) $ECHO_C" >&6
1982else
1983 if test -n "$ac_ct_CC"; then
1984 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1985else
1986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1987for as_dir in $PATH
1988do
1989 IFS=$as_save_IFS
1990 test -z "$as_dir" && as_dir=.
1991 for ac_exec_ext in '' $ac_executable_extensions; do
1992 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1993 ac_cv_prog_ac_ct_CC="gcc"
1994 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1995 break 2
1996 fi
1997done
1998done
1999
2000fi
2001fi
2002ac_ct_CC=$ac_cv_prog_ac_ct_CC
2003if test -n "$ac_ct_CC"; then
2004 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2005echo "${ECHO_T}$ac_ct_CC" >&6
2006else
2007 echo "$as_me:$LINENO: result: no" >&5
2008echo "${ECHO_T}no" >&6
2009fi
2010
2011 CC=$ac_ct_CC
2012else
2013 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002014fi
2015
Jack Jansendd19cf82001-12-06 22:36:17 +00002016if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002017 if test -n "$ac_tool_prefix"; then
2018 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2019set dummy ${ac_tool_prefix}cc; ac_word=$2
2020echo "$as_me:$LINENO: checking for $ac_word" >&5
2021echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2022if test "${ac_cv_prog_CC+set}" = set; then
2023 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002024else
2025 if test -n "$CC"; then
2026 ac_cv_prog_CC="$CC" # Let the user override the test.
2027else
Martin v. Löwis11437992002-04-12 09:54:03 +00002028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2029for as_dir in $PATH
2030do
2031 IFS=$as_save_IFS
2032 test -z "$as_dir" && as_dir=.
2033 for ac_exec_ext in '' $ac_executable_extensions; do
2034 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2035 ac_cv_prog_CC="${ac_tool_prefix}cc"
2036 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2037 break 2
2038 fi
2039done
2040done
2041
2042fi
2043fi
2044CC=$ac_cv_prog_CC
2045if test -n "$CC"; then
2046 echo "$as_me:$LINENO: result: $CC" >&5
2047echo "${ECHO_T}$CC" >&6
2048else
2049 echo "$as_me:$LINENO: result: no" >&5
2050echo "${ECHO_T}no" >&6
2051fi
2052
2053fi
2054if test -z "$ac_cv_prog_CC"; then
2055 ac_ct_CC=$CC
2056 # Extract the first word of "cc", so it can be a program name with args.
2057set dummy cc; ac_word=$2
2058echo "$as_me:$LINENO: checking for $ac_word" >&5
2059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2060if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2061 echo $ECHO_N "(cached) $ECHO_C" >&6
2062else
2063 if test -n "$ac_ct_CC"; then
2064 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2065else
2066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2067for as_dir in $PATH
2068do
2069 IFS=$as_save_IFS
2070 test -z "$as_dir" && as_dir=.
2071 for ac_exec_ext in '' $ac_executable_extensions; do
2072 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2073 ac_cv_prog_ac_ct_CC="cc"
2074 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2075 break 2
2076 fi
2077done
2078done
2079
2080fi
2081fi
2082ac_ct_CC=$ac_cv_prog_ac_ct_CC
2083if test -n "$ac_ct_CC"; then
2084 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2085echo "${ECHO_T}$ac_ct_CC" >&6
2086else
2087 echo "$as_me:$LINENO: result: no" >&5
2088echo "${ECHO_T}no" >&6
2089fi
2090
2091 CC=$ac_ct_CC
2092else
2093 CC="$ac_cv_prog_CC"
2094fi
2095
2096fi
2097if test -z "$CC"; then
2098 # Extract the first word of "cc", so it can be a program name with args.
2099set dummy cc; ac_word=$2
2100echo "$as_me:$LINENO: checking for $ac_word" >&5
2101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2102if test "${ac_cv_prog_CC+set}" = set; then
2103 echo $ECHO_N "(cached) $ECHO_C" >&6
2104else
2105 if test -n "$CC"; then
2106 ac_cv_prog_CC="$CC" # Let the user override the test.
2107else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002108 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110for as_dir in $PATH
2111do
2112 IFS=$as_save_IFS
2113 test -z "$as_dir" && as_dir=.
2114 for ac_exec_ext in '' $ac_executable_extensions; do
2115 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2116 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2117 ac_prog_rejected=yes
2118 continue
2119 fi
2120 ac_cv_prog_CC="cc"
2121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2122 break 2
2123 fi
2124done
2125done
2126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002127if test $ac_prog_rejected = yes; then
2128 # We found a bogon in the path, so make sure we never use it.
2129 set dummy $ac_cv_prog_CC
2130 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002131 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002132 # We chose a different compiler from the bogus one.
2133 # However, it has the same basename, so the bogon will be chosen
2134 # first if we set CC to just the basename; use the full file name.
2135 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002136 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002137 fi
2138fi
2139fi
2140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002141CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002142if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002143 echo "$as_me:$LINENO: result: $CC" >&5
2144echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002145else
Martin v. Löwis11437992002-04-12 09:54:03 +00002146 echo "$as_me:$LINENO: result: no" >&5
2147echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002148fi
2149
Martin v. Löwis11437992002-04-12 09:54:03 +00002150fi
2151if test -z "$CC"; then
2152 if test -n "$ac_tool_prefix"; then
2153 for ac_prog in cl
2154 do
2155 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2157echo "$as_me:$LINENO: checking for $ac_word" >&5
2158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2159if test "${ac_cv_prog_CC+set}" = set; then
2160 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002161else
2162 if test -n "$CC"; then
2163 ac_cv_prog_CC="$CC" # Let the user override the test.
2164else
Martin v. Löwis11437992002-04-12 09:54:03 +00002165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2166for as_dir in $PATH
2167do
2168 IFS=$as_save_IFS
2169 test -z "$as_dir" && as_dir=.
2170 for ac_exec_ext in '' $ac_executable_extensions; do
2171 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2172 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2173 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2174 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002176done
2177done
2178
2179fi
2180fi
2181CC=$ac_cv_prog_CC
2182if test -n "$CC"; then
2183 echo "$as_me:$LINENO: result: $CC" >&5
2184echo "${ECHO_T}$CC" >&6
2185else
2186 echo "$as_me:$LINENO: result: no" >&5
2187echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002188fi
2189
Martin v. Löwis11437992002-04-12 09:54:03 +00002190 test -n "$CC" && break
2191 done
2192fi
2193if test -z "$CC"; then
2194 ac_ct_CC=$CC
2195 for ac_prog in cl
2196do
2197 # Extract the first word of "$ac_prog", so it can be a program name with args.
2198set dummy $ac_prog; ac_word=$2
2199echo "$as_me:$LINENO: checking for $ac_word" >&5
2200echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2201if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2202 echo $ECHO_N "(cached) $ECHO_C" >&6
2203else
2204 if test -n "$ac_ct_CC"; then
2205 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2206else
2207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2208for as_dir in $PATH
2209do
2210 IFS=$as_save_IFS
2211 test -z "$as_dir" && as_dir=.
2212 for ac_exec_ext in '' $ac_executable_extensions; do
2213 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2214 ac_cv_prog_ac_ct_CC="$ac_prog"
2215 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2216 break 2
2217 fi
2218done
2219done
Jack Jansendd19cf82001-12-06 22:36:17 +00002220
Martin v. Löwis11437992002-04-12 09:54:03 +00002221fi
2222fi
2223ac_ct_CC=$ac_cv_prog_ac_ct_CC
2224if test -n "$ac_ct_CC"; then
2225 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2226echo "${ECHO_T}$ac_ct_CC" >&6
2227else
2228 echo "$as_me:$LINENO: result: no" >&5
2229echo "${ECHO_T}no" >&6
2230fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002231
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 test -n "$ac_ct_CC" && break
2233done
Michael W. Hudson54241132001-12-07 15:38:26 +00002234
Martin v. Löwis11437992002-04-12 09:54:03 +00002235 CC=$ac_ct_CC
2236fi
2237
2238fi
2239
2240
Skip Montanaro6dead952003-09-25 14:50:04 +00002241test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2242See \`config.log' for more details." >&5
2243echo "$as_me: error: no acceptable C compiler found in \$PATH
2244See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002245 { (exit 1); exit 1; }; }
2246
2247# Provide some information about the compiler.
2248echo "$as_me:$LINENO:" \
2249 "checking for C compiler version" >&5
2250ac_compiler=`set X $ac_compile; echo $2`
2251{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2252 (eval $ac_compiler --version </dev/null >&5) 2>&5
2253 ac_status=$?
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); }
2256{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2257 (eval $ac_compiler -v </dev/null >&5) 2>&5
2258 ac_status=$?
2259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2260 (exit $ac_status); }
2261{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2262 (eval $ac_compiler -V </dev/null >&5) 2>&5
2263 ac_status=$?
2264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2265 (exit $ac_status); }
2266
2267cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002268/* confdefs.h. */
2269_ACEOF
2270cat confdefs.h >>conftest.$ac_ext
2271cat >>conftest.$ac_ext <<_ACEOF
2272/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002273
Martin v. Löwis11437992002-04-12 09:54:03 +00002274int
2275main ()
2276{
2277
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002283ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002284# Try to create an executable without -o first, disregard a.out.
2285# It will help us diagnose broken compilers, and finding out an intuition
2286# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002287echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2288echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002289ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2290if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2291 (eval $ac_link_default) 2>&5
2292 ac_status=$?
2293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294 (exit $ac_status); }; then
2295 # Find the output, starting from the most likely. This scheme is
2296# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2297# resort.
2298
2299# Be careful to initialize this variable, since it used to be cached.
2300# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2301ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002302# b.out is created by i960 compilers.
2303for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2304do
2305 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002306 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002307 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002308 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002309 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002310 # This is the source file.
2311 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002312 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002313 # We found the default executable, but exeext='' is most
2314 # certainly right.
2315 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002316 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2318 # FIXME: I believe we export ac_cv_exeext for Libtool,
2319 # but it would be cool to find out if it's true. Does anybody
2320 # maintain Libtool? --akim.
2321 export ac_cv_exeext
2322 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002323 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002324 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 esac
2326done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002327else
Martin v. Löwis11437992002-04-12 09:54:03 +00002328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002329sed 's/^/| /' conftest.$ac_ext >&5
2330
2331{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2332See \`config.log' for more details." >&5
2333echo "$as_me: error: C compiler cannot create executables
2334See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002335 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002336fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002337
Martin v. Löwis11437992002-04-12 09:54:03 +00002338ac_exeext=$ac_cv_exeext
2339echo "$as_me:$LINENO: result: $ac_file" >&5
2340echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002341
Martin v. Löwis11437992002-04-12 09:54:03 +00002342# Check the compiler produces executables we can run. If not, either
2343# the compiler is broken, or we cross compile.
2344echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2345echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2346# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2347# If not cross compiling, check that we can run a simple program.
2348if test "$cross_compiling" != yes; then
2349 if { ac_try='./$ac_file'
2350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2351 (eval $ac_try) 2>&5
2352 ac_status=$?
2353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354 (exit $ac_status); }; }; then
2355 cross_compiling=no
2356 else
2357 if test "$cross_compiling" = maybe; then
2358 cross_compiling=yes
2359 else
2360 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002361If you meant to cross compile, use \`--host'.
2362See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002363echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002364If you meant to cross compile, use \`--host'.
2365See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002366 { (exit 1); exit 1; }; }
2367 fi
2368 fi
2369fi
2370echo "$as_me:$LINENO: result: yes" >&5
2371echo "${ECHO_T}yes" >&6
2372
Skip Montanaro6dead952003-09-25 14:50:04 +00002373rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002374ac_clean_files=$ac_clean_files_save
2375# Check the compiler produces executables we can run. If not, either
2376# the compiler is broken, or we cross compile.
2377echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2378echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2379echo "$as_me:$LINENO: result: $cross_compiling" >&5
2380echo "${ECHO_T}$cross_compiling" >&6
2381
2382echo "$as_me:$LINENO: checking for suffix of executables" >&5
2383echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2384if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2385 (eval $ac_link) 2>&5
2386 ac_status=$?
2387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2388 (exit $ac_status); }; then
2389 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2390# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2391# work properly (i.e., refer to `conftest.exe'), while it won't with
2392# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393for ac_file in conftest.exe conftest conftest.*; do
2394 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002395 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002398 export ac_cv_exeext
2399 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 * ) break;;
2401 esac
2402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002403else
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2405See \`config.log' for more details." >&5
2406echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2407See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002409fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002410
Martin v. Löwis11437992002-04-12 09:54:03 +00002411rm -f conftest$ac_cv_exeext
2412echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2413echo "${ECHO_T}$ac_cv_exeext" >&6
2414
2415rm -f conftest.$ac_ext
2416EXEEXT=$ac_cv_exeext
2417ac_exeext=$EXEEXT
2418echo "$as_me:$LINENO: checking for suffix of object files" >&5
2419echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2420if test "${ac_cv_objext+set}" = set; then
2421 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002422else
Martin v. Löwis11437992002-04-12 09:54:03 +00002423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002424/* confdefs.h. */
2425_ACEOF
2426cat confdefs.h >>conftest.$ac_ext
2427cat >>conftest.$ac_ext <<_ACEOF
2428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002429
Martin v. Löwis11437992002-04-12 09:54:03 +00002430int
2431main ()
2432{
2433
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438rm -f conftest.o conftest.obj
2439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2440 (eval $ac_compile) 2>&5
2441 ac_status=$?
2442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2443 (exit $ac_status); }; then
2444 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2445 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2448 break;;
2449 esac
2450done
2451else
2452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2456See \`config.log' for more details." >&5
2457echo "$as_me: error: cannot compute suffix of object files: cannot compile
2458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 { (exit 1); exit 1; }; }
2460fi
2461
2462rm -f conftest.$ac_cv_objext conftest.$ac_ext
2463fi
2464echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2465echo "${ECHO_T}$ac_cv_objext" >&6
2466OBJEXT=$ac_cv_objext
2467ac_objext=$OBJEXT
2468echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2469echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2470if test "${ac_cv_c_compiler_gnu+set}" = set; then
2471 echo $ECHO_N "(cached) $ECHO_C" >&6
2472else
2473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002474/* confdefs.h. */
2475_ACEOF
2476cat confdefs.h >>conftest.$ac_ext
2477cat >>conftest.$ac_ext <<_ACEOF
2478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
Martin v. Löwis11437992002-04-12 09:54:03 +00002480int
2481main ()
2482{
2483#ifndef __GNUC__
2484 choke me
2485#endif
2486
2487 ;
2488 return 0;
2489}
2490_ACEOF
2491rm -f conftest.$ac_objext
2492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 grep -v '^ *+' conftest.er1 >conftest.err
2496 rm -f conftest.er1
2497 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2499 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002500 { ac_try='test -z "$ac_c_werror_flag"
2501 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2503 (eval $ac_try) 2>&5
2504 ac_status=$?
2505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506 (exit $ac_status); }; } &&
2507 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2509 (eval $ac_try) 2>&5
2510 ac_status=$?
2511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2512 (exit $ac_status); }; }; then
2513 ac_compiler_gnu=yes
2514else
2515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002516sed 's/^/| /' conftest.$ac_ext >&5
2517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518ac_compiler_gnu=no
2519fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_cv_c_compiler_gnu=$ac_compiler_gnu
2522
2523fi
2524echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2525echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2526GCC=`test $ac_compiler_gnu = yes && echo yes`
2527ac_test_CFLAGS=${CFLAGS+set}
2528ac_save_CFLAGS=$CFLAGS
2529CFLAGS="-g"
2530echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2531echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2532if test "${ac_cv_prog_cc_g+set}" = set; then
2533 echo $ECHO_N "(cached) $ECHO_C" >&6
2534else
2535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002536/* confdefs.h. */
2537_ACEOF
2538cat confdefs.h >>conftest.$ac_ext
2539cat >>conftest.$ac_ext <<_ACEOF
2540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542int
2543main ()
2544{
2545
2546 ;
2547 return 0;
2548}
2549_ACEOF
2550rm -f conftest.$ac_objext
2551if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002552 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002554 grep -v '^ *+' conftest.er1 >conftest.err
2555 rm -f conftest.er1
2556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002559 { ac_try='test -z "$ac_c_werror_flag"
2560 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2562 (eval $ac_try) 2>&5
2563 ac_status=$?
2564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565 (exit $ac_status); }; } &&
2566 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568 (eval $ac_try) 2>&5
2569 ac_status=$?
2570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002572 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573else
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002575sed 's/^/| /' conftest.$ac_ext >&5
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002578fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002579rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002581echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2582echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002583if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002585elif test $ac_cv_prog_cc_g = yes; then
2586 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002587 CFLAGS="-g -O2"
2588 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002589 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590 fi
2591else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002592 if test "$GCC" = yes; then
2593 CFLAGS="-O2"
2594 else
2595 CFLAGS=
2596 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002598echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2599echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2600if test "${ac_cv_prog_cc_stdc+set}" = set; then
2601 echo $ECHO_N "(cached) $ECHO_C" >&6
2602else
2603 ac_cv_prog_cc_stdc=no
2604ac_save_CC=$CC
2605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002606/* confdefs.h. */
2607_ACEOF
2608cat confdefs.h >>conftest.$ac_ext
2609cat >>conftest.$ac_ext <<_ACEOF
2610/* end confdefs.h. */
2611#include <stdarg.h>
2612#include <stdio.h>
2613#include <sys/types.h>
2614#include <sys/stat.h>
2615/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2616struct buf { int x; };
2617FILE * (*rcsopen) (struct buf *, struct stat *, int);
2618static char *e (p, i)
2619 char **p;
2620 int i;
2621{
2622 return p[i];
2623}
2624static char *f (char * (*g) (char **, int), char **p, ...)
2625{
2626 char *s;
2627 va_list v;
2628 va_start (v,p);
2629 s = g (p, va_arg (v,int));
2630 va_end (v);
2631 return s;
2632}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002633
2634/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2635 function prototypes and stuff, but not '\xHH' hex character constants.
2636 These don't provoke an error unfortunately, instead are silently treated
2637 as 'x'. The following induces an error, until -std1 is added to get
2638 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2639 array size at least. It's necessary to write '\x00'==0 to get something
2640 that's true only with -std1. */
2641int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2642
Skip Montanaro6dead952003-09-25 14:50:04 +00002643int test (int i, double x);
2644struct s1 {int (*f) (int a);};
2645struct s2 {int (*f) (double a);};
2646int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2647int argc;
2648char **argv;
2649int
2650main ()
2651{
2652return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2653 ;
2654 return 0;
2655}
2656_ACEOF
2657# Don't try gcc -ansi; that turns off useful extensions and
2658# breaks some systems' header files.
2659# AIX -qlanglvl=ansi
2660# Ultrix and OSF/1 -std1
2661# HP-UX 10.20 and later -Ae
2662# HP-UX older versions -Aa -D_HPUX_SOURCE
2663# SVR4 -Xc -D__EXTENSIONS__
2664for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2665do
2666 CC="$ac_save_CC $ac_arg"
2667 rm -f conftest.$ac_objext
2668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002669 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002671 grep -v '^ *+' conftest.er1 >conftest.err
2672 rm -f conftest.er1
2673 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002676 { ac_try='test -z "$ac_c_werror_flag"
2677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2679 (eval $ac_try) 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; } &&
2683 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2685 (eval $ac_try) 2>&5
2686 ac_status=$?
2687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2688 (exit $ac_status); }; }; then
2689 ac_cv_prog_cc_stdc=$ac_arg
2690break
2691else
2692 echo "$as_me: failed program was:" >&5
2693sed 's/^/| /' conftest.$ac_ext >&5
2694
2695fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002696rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002697done
2698rm -f conftest.$ac_ext conftest.$ac_objext
2699CC=$ac_save_CC
2700
2701fi
2702
2703case "x$ac_cv_prog_cc_stdc" in
2704 x|xno)
2705 echo "$as_me:$LINENO: result: none needed" >&5
2706echo "${ECHO_T}none needed" >&6 ;;
2707 *)
2708 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2709echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2710 CC="$CC $ac_cv_prog_cc_stdc" ;;
2711esac
2712
Martin v. Löwis11437992002-04-12 09:54:03 +00002713# Some people use a C++ compiler to compile C. Since we use `exit',
2714# in C++ we need to declare it. In case someone uses the same compiler
2715# for both compiling C and C++ we need to have the C++ compiler decide
2716# the declaration of exit, since it's the most demanding environment.
2717cat >conftest.$ac_ext <<_ACEOF
2718#ifndef __cplusplus
2719 choke me
2720#endif
2721_ACEOF
2722rm -f conftest.$ac_objext
2723if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002724 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002726 grep -v '^ *+' conftest.er1 >conftest.err
2727 rm -f conftest.er1
2728 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2730 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002731 { ac_try='test -z "$ac_c_werror_flag"
2732 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2734 (eval $ac_try) 2>&5
2735 ac_status=$?
2736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2737 (exit $ac_status); }; } &&
2738 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2740 (eval $ac_try) 2>&5
2741 ac_status=$?
2742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2743 (exit $ac_status); }; }; then
2744 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002745 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 'extern "C" void std::exit (int) throw (); using std::exit;' \
2747 'extern "C" void std::exit (int); using std::exit;' \
2748 'extern "C" void exit (int) throw ();' \
2749 'extern "C" void exit (int);' \
2750 'void exit (int);'
2751do
2752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002753/* confdefs.h. */
2754_ACEOF
2755cat confdefs.h >>conftest.$ac_ext
2756cat >>conftest.$ac_ext <<_ACEOF
2757/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002758$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002759#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002760int
2761main ()
2762{
2763exit (42);
2764 ;
2765 return 0;
2766}
2767_ACEOF
2768rm -f conftest.$ac_objext
2769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002770 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002772 grep -v '^ *+' conftest.er1 >conftest.err
2773 rm -f conftest.er1
2774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002777 { ac_try='test -z "$ac_c_werror_flag"
2778 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2780 (eval $ac_try) 2>&5
2781 ac_status=$?
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); }; } &&
2784 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2786 (eval $ac_try) 2>&5
2787 ac_status=$?
2788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789 (exit $ac_status); }; }; then
2790 :
2791else
2792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002793sed 's/^/| /' conftest.$ac_ext >&5
2794
Martin v. Löwis11437992002-04-12 09:54:03 +00002795continue
2796fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002799/* confdefs.h. */
2800_ACEOF
2801cat confdefs.h >>conftest.$ac_ext
2802cat >>conftest.$ac_ext <<_ACEOF
2803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002804$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002805int
2806main ()
2807{
2808exit (42);
2809 ;
2810 return 0;
2811}
2812_ACEOF
2813rm -f conftest.$ac_objext
2814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002815 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002817 grep -v '^ *+' conftest.er1 >conftest.err
2818 rm -f conftest.er1
2819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002822 { ac_try='test -z "$ac_c_werror_flag"
2823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2825 (eval $ac_try) 2>&5
2826 ac_status=$?
2827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2828 (exit $ac_status); }; } &&
2829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2831 (eval $ac_try) 2>&5
2832 ac_status=$?
2833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2834 (exit $ac_status); }; }; then
2835 break
2836else
2837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002838sed 's/^/| /' conftest.$ac_ext >&5
2839
Martin v. Löwis11437992002-04-12 09:54:03 +00002840fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002842done
2843rm -f conftest*
2844if test -n "$ac_declaration"; then
2845 echo '#ifdef __cplusplus' >>confdefs.h
2846 echo $ac_declaration >>confdefs.h
2847 echo '#endif' >>confdefs.h
2848fi
2849
2850else
2851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002852sed 's/^/| /' conftest.$ac_ext >&5
2853
Martin v. Löwis11437992002-04-12 09:54:03 +00002854fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002855rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002856ac_ext=c
2857ac_cpp='$CPP $CPPFLAGS'
2858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2860ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002861
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002862
2863# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865ac_ext=c
2866ac_cpp='$CPP $CPPFLAGS'
2867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869ac_compiler_gnu=$ac_cv_c_compiler_gnu
2870echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2871echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002872# On Suns, sometimes $CPP names a directory.
2873if test -n "$CPP" && test -d "$CPP"; then
2874 CPP=
2875fi
2876if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 if test "${ac_cv_prog_CPP+set}" = set; then
2878 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002879else
Martin v. Löwis11437992002-04-12 09:54:03 +00002880 # Double quotes because CPP needs to be expanded
2881 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2882 do
2883 ac_preproc_ok=false
2884for ac_c_preproc_warn_flag in '' yes
2885do
2886 # Use a header file that comes with gcc, so configuring glibc
2887 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002888 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2889 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002890 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 # not just through cpp. "Syntax error" is here to catch this case.
2892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002893/* confdefs.h. */
2894_ACEOF
2895cat confdefs.h >>conftest.$ac_ext
2896cat >>conftest.$ac_ext <<_ACEOF
2897/* end confdefs.h. */
2898#ifdef __STDC__
2899# include <limits.h>
2900#else
2901# include <assert.h>
2902#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002903 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002904_ACEOF
2905if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2906 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2907 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002908 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 rm -f conftest.er1
2910 cat conftest.err >&5
2911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2912 (exit $ac_status); } >/dev/null; then
2913 if test -s conftest.err; then
2914 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002915 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 else
2917 ac_cpp_err=
2918 fi
2919else
2920 ac_cpp_err=yes
2921fi
2922if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002923 :
2924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002926sed 's/^/| /' conftest.$ac_ext >&5
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928 # Broken: fails on valid input.
2929continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002930fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002931rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 # OK, works on sane cases. Now check whether non-existent headers
2934 # can be detected and how.
2935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002936/* confdefs.h. */
2937_ACEOF
2938cat confdefs.h >>conftest.$ac_ext
2939cat >>conftest.$ac_ext <<_ACEOF
2940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002941#include <ac_nonexistent.h>
2942_ACEOF
2943if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2944 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2945 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002946 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002947 rm -f conftest.er1
2948 cat conftest.err >&5
2949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2950 (exit $ac_status); } >/dev/null; then
2951 if test -s conftest.err; then
2952 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002953 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 else
2955 ac_cpp_err=
2956 fi
2957else
2958 ac_cpp_err=yes
2959fi
2960if test -z "$ac_cpp_err"; then
2961 # Broken: success on invalid input.
2962continue
2963else
2964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002965sed 's/^/| /' conftest.$ac_ext >&5
2966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967 # Passes both tests.
2968ac_preproc_ok=:
2969break
2970fi
2971rm -f conftest.err conftest.$ac_ext
2972
2973done
2974# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2975rm -f conftest.err conftest.$ac_ext
2976if $ac_preproc_ok; then
2977 break
2978fi
2979
2980 done
2981 ac_cv_prog_CPP=$CPP
2982
2983fi
2984 CPP=$ac_cv_prog_CPP
2985else
2986 ac_cv_prog_CPP=$CPP
2987fi
2988echo "$as_me:$LINENO: result: $CPP" >&5
2989echo "${ECHO_T}$CPP" >&6
2990ac_preproc_ok=false
2991for ac_c_preproc_warn_flag in '' yes
2992do
2993 # Use a header file that comes with gcc, so configuring glibc
2994 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002995 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 # On the NeXT, cc -E runs the code through the compiler's parser,
2998 # not just through cpp. "Syntax error" is here to catch this case.
2999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003000/* confdefs.h. */
3001_ACEOF
3002cat confdefs.h >>conftest.$ac_ext
3003cat >>conftest.$ac_ext <<_ACEOF
3004/* end confdefs.h. */
3005#ifdef __STDC__
3006# include <limits.h>
3007#else
3008# include <assert.h>
3009#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003010 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003011_ACEOF
3012if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3013 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3014 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003015 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003016 rm -f conftest.er1
3017 cat conftest.err >&5
3018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3019 (exit $ac_status); } >/dev/null; then
3020 if test -s conftest.err; then
3021 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003022 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003023 else
3024 ac_cpp_err=
3025 fi
3026else
3027 ac_cpp_err=yes
3028fi
3029if test -z "$ac_cpp_err"; then
3030 :
3031else
3032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003033sed 's/^/| /' conftest.$ac_ext >&5
3034
Martin v. Löwis11437992002-04-12 09:54:03 +00003035 # Broken: fails on valid input.
3036continue
3037fi
3038rm -f conftest.err conftest.$ac_ext
3039
3040 # OK, works on sane cases. Now check whether non-existent headers
3041 # can be detected and how.
3042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003043/* confdefs.h. */
3044_ACEOF
3045cat confdefs.h >>conftest.$ac_ext
3046cat >>conftest.$ac_ext <<_ACEOF
3047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003048#include <ac_nonexistent.h>
3049_ACEOF
3050if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3051 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3052 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003053 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 rm -f conftest.er1
3055 cat conftest.err >&5
3056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3057 (exit $ac_status); } >/dev/null; then
3058 if test -s conftest.err; then
3059 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003060 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003061 else
3062 ac_cpp_err=
3063 fi
3064else
3065 ac_cpp_err=yes
3066fi
3067if test -z "$ac_cpp_err"; then
3068 # Broken: success on invalid input.
3069continue
3070else
3071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003072sed 's/^/| /' conftest.$ac_ext >&5
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074 # Passes both tests.
3075ac_preproc_ok=:
3076break
3077fi
3078rm -f conftest.err conftest.$ac_ext
3079
3080done
3081# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3082rm -f conftest.err conftest.$ac_ext
3083if $ac_preproc_ok; then
3084 :
3085else
Skip Montanaro6dead952003-09-25 14:50:04 +00003086 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3087See \`config.log' for more details." >&5
3088echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3089See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003090 { (exit 1); exit 1; }; }
3091fi
3092
3093ac_ext=c
3094ac_cpp='$CPP $CPPFLAGS'
3095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3097ac_compiler_gnu=$ac_cv_c_compiler_gnu
3098
3099
Skip Montanaro6dead952003-09-25 14:50:04 +00003100echo "$as_me:$LINENO: checking for egrep" >&5
3101echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3102if test "${ac_cv_prog_egrep+set}" = set; then
3103 echo $ECHO_N "(cached) $ECHO_C" >&6
3104else
3105 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3106 then ac_cv_prog_egrep='grep -E'
3107 else ac_cv_prog_egrep='egrep'
3108 fi
3109fi
3110echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3111echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3112 EGREP=$ac_cv_prog_egrep
3113
3114
Martin v. Löwis11437992002-04-12 09:54:03 +00003115
3116echo "$as_me:$LINENO: checking for AIX" >&5
3117echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003119/* confdefs.h. */
3120_ACEOF
3121cat confdefs.h >>conftest.$ac_ext
3122cat >>conftest.$ac_ext <<_ACEOF
3123/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003124#ifdef _AIX
3125 yes
3126#endif
3127
Martin v. Löwis11437992002-04-12 09:54:03 +00003128_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003130 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003131 echo "$as_me:$LINENO: result: yes" >&5
3132echo "${ECHO_T}yes" >&6
3133cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003134#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003135_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003136
3137else
Martin v. Löwis11437992002-04-12 09:54:03 +00003138 echo "$as_me:$LINENO: result: no" >&5
3139echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003140fi
3141rm -f conftest*
3142
Michael W. Hudson54241132001-12-07 15:38:26 +00003143
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003144
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003145# Check for unsupported systems
3146case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003147Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003148 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3149 echo See README for details.
3150 exit 1;;
3151esac
3152
Michael W. Hudson54241132001-12-07 15:38:26 +00003153
Martin v. Löwis11437992002-04-12 09:54:03 +00003154echo "$as_me:$LINENO: checking for --with-suffix" >&5
3155echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003156
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003157# Check whether --with-suffix or --without-suffix was given.
3158if test "${with_suffix+set}" = set; then
3159 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003161 case $withval in
3162 no) EXEEXT=;;
3163 yes) EXEEXT=.exe;;
3164 *) EXEEXT=$withval;;
3165 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003166fi;
3167echo "$as_me:$LINENO: result: $EXEEXT" >&5
3168echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003169
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003170# Test whether we're running on a non-case-sensitive system, in which
3171# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003172
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3174echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003175if test ! -d CaseSensitiveTestDir; then
3176mkdir CaseSensitiveTestDir
3177fi
3178
3179if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003180then
Martin v. Löwis11437992002-04-12 09:54:03 +00003181 echo "$as_me:$LINENO: result: yes" >&5
3182echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003183 BUILDEXEEXT=.exe
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185 echo "$as_me:$LINENO: result: no" >&5
3186echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003187 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003188fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003189rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003190
Guido van Rossumdd997f71998-10-07 19:58:26 +00003191case $MACHDEP in
3192bsdos*)
3193 case $CC in
3194 gcc) CC="$CC -D_HAVE_BSDI";;
3195 esac;;
3196esac
3197
Guido van Rossum24b1e751997-08-21 02:29:16 +00003198case $ac_sys_system in
3199hp*|HP*)
3200 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003201 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003202 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003203Monterey*)
3204 case $CC in
3205 cc) CC="$CC -Wl,-Bexport";;
3206 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003207SunOS*)
3208 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
3210cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003211#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003212_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003213
3214 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003215esac
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219echo "$as_me:$LINENO: checking LIBRARY" >&5
3220echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003221if test -z "$LIBRARY"
3222then
3223 LIBRARY='libpython$(VERSION).a'
3224fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003225echo "$as_me:$LINENO: result: $LIBRARY" >&5
3226echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003227
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003228# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003229# name of the library into which to insert object files). BLDLIBRARY is also
3230# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3231# is blank as the main program is not linked directly against LDLIBRARY.
3232# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3233# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3234# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3235# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003236#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237# RUNSHARED is used to run shared python without installed libraries
3238#
3239# INSTSONAME is the name of the shared library that will be use to install
3240# on the system - some systems like version suffix, others don't
3241
3242
Michael W. Hudson54241132001-12-07 15:38:26 +00003243
3244
3245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003246
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003247LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003248BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003249INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003250DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003251LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003252RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003253
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003254# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003255# If CXX is set, and if it is needed to link a main function that was
3256# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3257# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003258# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003259# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003260
Martin v. Löwis11437992002-04-12 09:54:03 +00003261echo "$as_me:$LINENO: checking LINKCC" >&5
3262echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003263if test -z "$LINKCC"
3264then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003265 if test -z "$CXX"; then
3266 LINKCC="\$(PURIFY) \$(CC)"
3267 else
Martin v. Löwis147fbe52005-08-07 21:09:30 +00003268 echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
3269 $CXX -c conftest_a.cc # 2>&5
3270 echo 'void foo(){}' > conftest_b.$ac_ext
3271 $CC -c conftest_b.$ac_ext # 2>&5
3272 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 +00003273 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3274 then
3275 LINKCC="\$(PURIFY) \$(CC)"
3276 else
3277 LINKCC="\$(PURIFY) \$(CXX)"
3278 fi
3279 rm -fr conftest*
3280 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003281 case $ac_sys_system in
3282 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003283 exp_extra="\"\""
3284 if test $ac_sys_release -ge 5 -o \
3285 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3286 exp_extra="."
3287 fi
3288 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003289 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003290 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003291 esac
3292fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003293echo "$as_me:$LINENO: result: $LINKCC" >&5
3294echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003295
Martin v. Löwis11437992002-04-12 09:54:03 +00003296echo "$as_me:$LINENO: checking for --enable-shared" >&5
3297echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003298# Check whether --enable-shared or --disable-shared was given.
3299if test "${enable_shared+set}" = set; then
3300 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003301
Martin v. Löwis11437992002-04-12 09:54:03 +00003302fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003303
3304if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003305then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003306 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003307 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003308 enable_shared="yes";;
3309 *)
3310 enable_shared="no";;
3311 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003313echo "$as_me:$LINENO: result: $enable_shared" >&5
3314echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003315
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003316echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3317echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3318# Check whether --enable-profiling or --disable-profiling was given.
3319if test "${enable_profiling+set}" = set; then
3320 enableval="$enable_profiling"
3321 ac_save_cc="$CC"
3322 CC="$CC -pg"
3323 if test "$cross_compiling" = yes; then
3324 ac_enable_profiling="no"
3325else
3326 cat >conftest.$ac_ext <<_ACEOF
3327/* confdefs.h. */
3328_ACEOF
3329cat confdefs.h >>conftest.$ac_ext
3330cat >>conftest.$ac_ext <<_ACEOF
3331/* end confdefs.h. */
3332int main() { return 0; }
3333_ACEOF
3334rm -f conftest$ac_exeext
3335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3336 (eval $ac_link) 2>&5
3337 ac_status=$?
3338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3341 (eval $ac_try) 2>&5
3342 ac_status=$?
3343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3344 (exit $ac_status); }; }; then
3345 ac_enable_profiling="yes"
3346else
3347 echo "$as_me: program exited with status $ac_status" >&5
3348echo "$as_me: failed program was:" >&5
3349sed 's/^/| /' conftest.$ac_ext >&5
3350
3351( exit $ac_status )
3352ac_enable_profiling="no"
3353fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003354rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003355fi
3356 CC="$ac_save_cc"
3357fi;
3358echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3359echo "${ECHO_T}$ac_enable_profiling" >&6
3360
3361case "$ac_enable_profiling" in
3362 "yes")
3363 BASECFLAGS="-pg $BASECFLAGS"
3364 LDFLAGS="-pg $LDFLAGS"
3365 ;;
3366esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3369echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003370
Guido van Rossumb8552162001-09-05 14:58:11 +00003371# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3372# library that we build, but we do not want to link against it (we
3373# will find it with a -framework option). For this reason there is an
3374# extra variable BLDLIBRARY against which Python and the extension
3375# modules are linked, BLDLIBRARY. This is normally the same as
3376# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003377if test "$enable_framework"
3378then
3379 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003380 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003381 BLDLIBRARY=''
3382else
3383 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003384fi
Jack Jansene578a632001-08-15 01:27:14 +00003385
Martin v. Löwis1142de32002-03-29 16:28:31 +00003386# Other platforms follow
3387if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003388
3389cat >>confdefs.h <<\_ACEOF
3390#define Py_ENABLE_SHARED 1
3391_ACEOF
3392
Martin v. Löwis1142de32002-03-29 16:28:31 +00003393 case $ac_sys_system in
3394 BeOS*)
3395 LDLIBRARY='libpython$(VERSION).so'
3396 ;;
3397 CYGWIN*)
3398 LDLIBRARY='libpython$(VERSION).dll.a'
3399 DLLLIBRARY='libpython$(VERSION).dll'
3400 ;;
3401 SunOS*)
3402 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003403 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003404 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003405 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003406 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003407 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003408 LDLIBRARY='libpython$(VERSION).so'
3409 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003410 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003411 case $ac_sys_system in
3412 FreeBSD*)
3413 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3414 ;;
3415 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003416 INSTSONAME="$LDLIBRARY".$SOVERSION
3417 ;;
3418 hp*|HP*)
3419 LDLIBRARY='libpython$(VERSION).sl'
3420 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003421 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003422 ;;
3423 OSF*)
3424 LDLIBRARY='libpython$(VERSION).so'
3425 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003426 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003427 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003428 atheos*)
3429 LDLIBRARY='libpython$(VERSION).so'
3430 BLDLIBRARY='-L. -lpython$(VERSION)'
3431 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3432 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003433 esac
Jason Tishler30765592003-09-04 11:04:06 +00003434else # shared is disabled
3435 case $ac_sys_system in
3436 CYGWIN*)
3437 BLDLIBRARY='$(LIBRARY)'
3438 LDLIBRARY='libpython$(VERSION).dll.a'
3439 ;;
3440 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003441fi
3442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3444echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446if test -n "$ac_tool_prefix"; then
3447 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3448set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3449echo "$as_me:$LINENO: checking for $ac_word" >&5
3450echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3451if test "${ac_cv_prog_RANLIB+set}" = set; then
3452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003453else
3454 if test -n "$RANLIB"; then
3455 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3456else
Martin v. Löwis11437992002-04-12 09:54:03 +00003457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458for as_dir in $PATH
3459do
3460 IFS=$as_save_IFS
3461 test -z "$as_dir" && as_dir=.
3462 for ac_exec_ext in '' $ac_executable_extensions; do
3463 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3464 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3465 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3466 break 2
3467 fi
3468done
3469done
3470
Guido van Rossum627b2d71993-12-24 10:39:16 +00003471fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003472fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003473RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 echo "$as_me:$LINENO: result: $RANLIB" >&5
3476echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 echo "$as_me:$LINENO: result: no" >&5
3479echo "${ECHO_T}no" >&6
3480fi
3481
3482fi
3483if test -z "$ac_cv_prog_RANLIB"; then
3484 ac_ct_RANLIB=$RANLIB
3485 # Extract the first word of "ranlib", so it can be a program name with args.
3486set dummy ranlib; ac_word=$2
3487echo "$as_me:$LINENO: checking for $ac_word" >&5
3488echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3489if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3490 echo $ECHO_N "(cached) $ECHO_C" >&6
3491else
3492 if test -n "$ac_ct_RANLIB"; then
3493 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3494else
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498 IFS=$as_save_IFS
3499 test -z "$as_dir" && as_dir=.
3500 for ac_exec_ext in '' $ac_executable_extensions; do
3501 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3502 ac_cv_prog_ac_ct_RANLIB="ranlib"
3503 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3504 break 2
3505 fi
3506done
3507done
3508
3509 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3510fi
3511fi
3512ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3513if test -n "$ac_ct_RANLIB"; then
3514 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3515echo "${ECHO_T}$ac_ct_RANLIB" >&6
3516else
3517 echo "$as_me:$LINENO: result: no" >&5
3518echo "${ECHO_T}no" >&6
3519fi
3520
3521 RANLIB=$ac_ct_RANLIB
3522else
3523 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003524fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003525
3526
Guido van Rossum7f43da71994-08-01 12:15:30 +00003527for ac_prog in ar aal
3528do
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003531echo "$as_me:$LINENO: checking for $ac_word" >&5
3532echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3533if test "${ac_cv_prog_AR+set}" = set; then
3534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003535else
3536 if test -n "$AR"; then
3537 ac_cv_prog_AR="$AR" # Let the user override the test.
3538else
Martin v. Löwis11437992002-04-12 09:54:03 +00003539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542 IFS=$as_save_IFS
3543 test -z "$as_dir" && as_dir=.
3544 for ac_exec_ext in '' $ac_executable_extensions; do
3545 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3546 ac_cv_prog_AR="$ac_prog"
3547 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3548 break 2
3549 fi
3550done
3551done
3552
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003555AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003556if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 echo "$as_me:$LINENO: result: $AR" >&5
3558echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559else
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 echo "$as_me:$LINENO: result: no" >&5
3561echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003562fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003563
Martin v. Löwis11437992002-04-12 09:54:03 +00003564 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003565done
3566test -n "$AR" || AR="ar"
3567
Michael W. Hudson54241132001-12-07 15:38:26 +00003568
Neil Schemenauera42c8272001-03-31 00:01:55 +00003569case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003570bsdos*|hp*|HP*)
3571 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003572 if test -z "$INSTALL"
3573 then
3574 INSTALL="${srcdir}/install-sh -c"
3575 fi
3576esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003577ac_aux_dir=
3578for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3579 if test -f $ac_dir/install-sh; then
3580 ac_aux_dir=$ac_dir
3581 ac_install_sh="$ac_aux_dir/install-sh -c"
3582 break
3583 elif test -f $ac_dir/install.sh; then
3584 ac_aux_dir=$ac_dir
3585 ac_install_sh="$ac_aux_dir/install.sh -c"
3586 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 elif test -f $ac_dir/shtool; then
3588 ac_aux_dir=$ac_dir
3589 ac_install_sh="$ac_aux_dir/shtool install -c"
3590 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003591 fi
3592done
3593if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3595echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3596 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003598ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3599ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3600ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003601
3602# Find a good install program. We prefer a C program (faster),
3603# so one script is as good as another. But avoid the broken or
3604# incompatible versions:
3605# SysV /etc/install, /usr/sbin/install
3606# SunOS /usr/etc/install
3607# IRIX /sbin/install
3608# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003609# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003610# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3611# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3612# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003613# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003614# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003615echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3616echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003617if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618if test "${ac_cv_path_install+set}" = set; then
3619 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003620else
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622for as_dir in $PATH
3623do
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
3626 # Account for people who put trailing slashes in PATH elements.
3627case $as_dir/ in
3628 ./ | .// | /cC/* | \
3629 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003630 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 /usr/ucb/* ) ;;
3632 *)
3633 # OSF1 and SCO ODT 3.0 have their own names for install.
3634 # Don't use installbsd from OSF since it installs stuff as root
3635 # by default.
3636 for ac_prog in ginstall scoinst install; do
3637 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003638 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3639 if test $ac_prog = install &&
3640 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3641 # AIX install. It has an incompatible calling convention.
3642 :
3643 elif test $ac_prog = install &&
3644 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3645 # program-specific install script used by HP pwplus--don't use.
3646 :
3647 else
3648 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3649 break 3
3650 fi
3651 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003652 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 done
3654 ;;
3655esac
3656done
3657
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003658
3659fi
3660 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003661 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003662 else
3663 # As a last resort, use the slow shell script. We don't cache a
3664 # path for INSTALL within a source directory, because that will
3665 # break other packages using the cache if that directory is
3666 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003668 fi
3669fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670echo "$as_me:$LINENO: result: $INSTALL" >&5
3671echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003672
3673# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3674# It thinks the first close brace ends the variable substitution.
3675test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3676
Martin v. Löwis11437992002-04-12 09:54:03 +00003677test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003678
3679test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3680
Michael W. Hudson54241132001-12-07 15:38:26 +00003681
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003682# Not every filesystem supports hard links
3683
3684if test -z "$LN" ; then
3685 case $ac_sys_system in
3686 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003687 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003688 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003689 *) LN=ln;;
3690 esac
3691fi
3692
Fred Drake109d9862001-07-11 06:27:56 +00003693# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003694echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3695echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3696
Fred Drake109d9862001-07-11 06:27:56 +00003697# Check whether --with-pydebug or --without-pydebug was given.
3698if test "${with_pydebug+set}" = set; then
3699 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003700
Fred Drake109d9862001-07-11 06:27:56 +00003701if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003702then
3703
3704cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003705#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003706_ACEOF
3707
3708 echo "$as_me:$LINENO: result: yes" >&5
3709echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003710 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003711else echo "$as_me:$LINENO: result: no" >&5
3712echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003713fi
3714else
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 echo "$as_me:$LINENO: result: no" >&5
3716echo "${ECHO_T}no" >&6
3717fi;
Fred Drake109d9862001-07-11 06:27:56 +00003718
Skip Montanarodecc6a42003-01-01 20:07:49 +00003719# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3720# merged with this chunk of code?
3721
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003722# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003723# ------------------------
3724# (The following bit of code is complicated enough - please keep things
3725# indented properly. Just pretend you're editing Python code. ;-)
3726
3727# There are two parallel sets of case statements below, one that checks to
3728# see if OPT was set and one that does BASECFLAGS setting based upon
3729# compiler and platform. BASECFLAGS tweaks need to be made even if the
3730# user set OPT.
3731
3732# tweak OPT based on compiler and platform, only if the user didn't set
3733# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003734
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003735if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003736then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003737 case $GCC in
3738 yes)
3739 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003740 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003741 if test "$Py_DEBUG" = 'true' ; then
3742 # Optimization messes up debuggers, so turn it off for
3743 # debug builds.
3744 OPT="-g -Wall -Wstrict-prototypes"
3745 else
3746 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003747 fi
3748 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003749 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003750 OPT="-O3 -Wall -Wstrict-prototypes"
3751 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003752 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003753 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003754 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3755 ;;
3756 esac
Fred Drake109d9862001-07-11 06:27:56 +00003757 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003758
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003759 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003760 OPT="-O"
3761 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003762 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003763
3764 # The current (beta) Monterey compiler dies with optimizations
3765 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003766 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003767 Monterey*)
3768 OPT=""
3769 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003770 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003771
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003772fi
3773
Skip Montanarodecc6a42003-01-01 20:07:49 +00003774
3775# tweak BASECFLAGS based on compiler and platform
3776case $GCC in
3777yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003778 # Python violates C99 rules, by casting between incompatible
3779 # pointer types. GCC may generate bad code as a result of that,
3780 # so use -fno-strict-aliasing if supported.
3781 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3782echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3783 ac_save_cc="$CC"
3784 CC="$CC -fno-strict-aliasing"
3785 if test "$cross_compiling" = yes; then
3786 ac_cv_no_strict_aliasing_ok=no
3787else
3788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003789/* confdefs.h. */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003794int main() { return 0; }
3795_ACEOF
3796rm -f conftest$ac_exeext
3797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3798 (eval $ac_link) 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3803 (eval $ac_try) 2>&5
3804 ac_status=$?
3805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3806 (exit $ac_status); }; }; then
3807 ac_cv_no_strict_aliasing_ok=yes
3808else
3809 echo "$as_me: program exited with status $ac_status" >&5
3810echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003811sed 's/^/| /' conftest.$ac_ext >&5
3812
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003813( exit $ac_status )
3814ac_cv_no_strict_aliasing_ok=no
3815fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003816rm -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 +00003817fi
3818 CC="$ac_save_cc"
3819 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3820echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3821 if test $ac_cv_no_strict_aliasing_ok = yes
3822 then
3823 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3824 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003825 case $ac_sys_system in
3826 SCO_SV*)
3827 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3828 ;;
3829 # is there any other compiler on Darwin besides gcc?
3830 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003831 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003832 ;;
3833 esac
3834 ;;
3835
3836*)
3837 case $ac_sys_system in
3838 OpenUNIX*|UnixWare*)
3839 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3840 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003841 OSF*)
3842 BASECFLAGS="$BASECFLAGS -ieee -std"
3843 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003844 SCO_SV*)
3845 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3846 ;;
3847 esac
3848 ;;
3849esac
3850
Fred Drakee1ceaa02001-12-04 20:55:47 +00003851if test "$Py_DEBUG" = 'true'; then
3852 :
3853else
3854 OPT="-DNDEBUG $OPT"
3855fi
3856
Guido van Rossum563e7081996-09-10 18:20:48 +00003857if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003858then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003859 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003860fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3863echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3864if test "${ac_cv_opt_olimit_ok+set}" = set; then
3865 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003866else
3867 ac_save_cc="$CC"
3868CC="$CC -OPT:Olimit=0"
3869if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003870 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003871else
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003873/* confdefs.h. */
3874_ACEOF
3875cat confdefs.h >>conftest.$ac_ext
3876cat >>conftest.$ac_ext <<_ACEOF
3877/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003878int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879_ACEOF
3880rm -f conftest$ac_exeext
3881if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3882 (eval $ac_link) 2>&5
3883 ac_status=$?
3884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3885 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3887 (eval $ac_try) 2>&5
3888 ac_status=$?
3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3890 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003891 ac_cv_opt_olimit_ok=yes
3892else
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 echo "$as_me: program exited with status $ac_status" >&5
3894echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003895sed 's/^/| /' conftest.$ac_ext >&5
3896
Martin v. Löwis11437992002-04-12 09:54:03 +00003897( exit $ac_status )
3898ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003899fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003901fi
Guido van Rossum91922671997-10-09 20:24:13 +00003902CC="$ac_save_cc"
3903fi
3904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3906echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003907if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003908 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003909 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3910 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3911 # environment?
3912 Darwin*)
3913 ;;
3914 *)
3915 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3916 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003917 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003918else
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3920echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3921 if test "${ac_cv_olimit_ok+set}" = set; then
3922 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003923else
3924 ac_save_cc="$CC"
3925 CC="$CC -Olimit 1500"
3926 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003927 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003928else
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003930/* confdefs.h. */
3931_ACEOF
3932cat confdefs.h >>conftest.$ac_ext
3933cat >>conftest.$ac_ext <<_ACEOF
3934/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003935int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003936_ACEOF
3937rm -f conftest$ac_exeext
3938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3939 (eval $ac_link) 2>&5
3940 ac_status=$?
3941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3943 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3944 (eval $ac_try) 2>&5
3945 ac_status=$?
3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003948 ac_cv_olimit_ok=yes
3949else
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 echo "$as_me: program exited with status $ac_status" >&5
3951echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003952sed 's/^/| /' conftest.$ac_ext >&5
3953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954( exit $ac_status )
3955ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003956fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003957rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003958fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003959 CC="$ac_save_cc"
3960fi
3961
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3963echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003964 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003965 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003966 fi
3967fi
3968
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003969# On some compilers, pthreads are available without further options
3970# (e.g. MacOS X). On some of these systems, the compiler will not
3971# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3972# So we have to see first whether pthreads are available without
3973# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003974echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3975echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3976if test "${ac_cv_pthread_is_default+set}" = set; then
3977 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003978else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003979 if test "$cross_compiling" = yes; then
3980 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003981else
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003983/* confdefs.h. */
3984_ACEOF
3985cat confdefs.h >>conftest.$ac_ext
3986cat >>conftest.$ac_ext <<_ACEOF
3987/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003988
Martin v. Löwis130fb172001-07-19 11:00:41 +00003989#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003990
3991void* routine(void* p){return NULL;}
3992
3993int main(){
3994 pthread_t p;
3995 if(pthread_create(&p,NULL,routine,NULL)!=0)
3996 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003997 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003998 return 0;
3999}
4000
Martin v. Löwis11437992002-04-12 09:54:03 +00004001_ACEOF
4002rm -f conftest$ac_exeext
4003if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4004 (eval $ac_link) 2>&5
4005 ac_status=$?
4006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4009 (eval $ac_try) 2>&5
4010 ac_status=$?
4011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4012 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004013
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004014 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004015 ac_cv_kthread=no
4016 ac_cv_pthread=no
4017
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004018else
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 echo "$as_me: program exited with status $ac_status" >&5
4020echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004021sed 's/^/| /' conftest.$ac_ext >&5
4022
Martin v. Löwis11437992002-04-12 09:54:03 +00004023( exit $ac_status )
4024ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004025fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004026rm -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 +00004027fi
4028
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004029fi
4030
Martin v. Löwis11437992002-04-12 09:54:03 +00004031echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4032echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004033
Michael W. Hudson54241132001-12-07 15:38:26 +00004034
Martin v. Löwis11437992002-04-12 09:54:03 +00004035if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004036then
4037 ac_cv_kpthread=no
4038else
4039# -Kpthread, if available, provides the right #defines
4040# and linker options to make pthread_create available
4041# Some compilers won't report that they do not support -Kpthread,
4042# so we need to run a program to see whether it really made the
4043# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004044echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4045echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4046if test "${ac_cv_kpthread+set}" = set; then
4047 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004048else
4049 ac_save_cc="$CC"
4050CC="$CC -Kpthread"
4051if test "$cross_compiling" = yes; then
4052 ac_cv_kpthread=no
4053else
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004055/* confdefs.h. */
4056_ACEOF
4057cat confdefs.h >>conftest.$ac_ext
4058cat >>conftest.$ac_ext <<_ACEOF
4059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004060
4061#include <pthread.h>
4062
4063void* routine(void* p){return NULL;}
4064
4065int main(){
4066 pthread_t p;
4067 if(pthread_create(&p,NULL,routine,NULL)!=0)
4068 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004069 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004070 return 0;
4071}
4072
Martin v. Löwis11437992002-04-12 09:54:03 +00004073_ACEOF
4074rm -f conftest$ac_exeext
4075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4076 (eval $ac_link) 2>&5
4077 ac_status=$?
4078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4081 (eval $ac_try) 2>&5
4082 ac_status=$?
4083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004085 ac_cv_kpthread=yes
4086else
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 echo "$as_me: program exited with status $ac_status" >&5
4088echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004089sed 's/^/| /' conftest.$ac_ext >&5
4090
Martin v. Löwis11437992002-04-12 09:54:03 +00004091( exit $ac_status )
4092ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004093fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004094rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004095fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004096CC="$ac_save_cc"
4097fi
4098
Martin v. Löwis11437992002-04-12 09:54:03 +00004099echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4100echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004101fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004102
Skip Montanarod8d39a02003-07-10 20:44:10 +00004103if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004104then
4105# -Kthread, if available, provides the right #defines
4106# and linker options to make pthread_create available
4107# Some compilers won't report that they do not support -Kthread,
4108# so we need to run a program to see whether it really made the
4109# function available.
4110echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4111echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4112if test "${ac_cv_kthread+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 ac_save_cc="$CC"
4116CC="$CC -Kthread"
4117if test "$cross_compiling" = yes; then
4118 ac_cv_kthread=no
4119else
4120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004121/* confdefs.h. */
4122_ACEOF
4123cat confdefs.h >>conftest.$ac_ext
4124cat >>conftest.$ac_ext <<_ACEOF
4125/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004126
4127#include <pthread.h>
4128
4129void* routine(void* p){return NULL;}
4130
4131int main(){
4132 pthread_t p;
4133 if(pthread_create(&p,NULL,routine,NULL)!=0)
4134 return 1;
4135 (void)pthread_detach(p);
4136 return 0;
4137}
4138
4139_ACEOF
4140rm -f conftest$ac_exeext
4141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4142 (eval $ac_link) 2>&5
4143 ac_status=$?
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4147 (eval $ac_try) 2>&5
4148 ac_status=$?
4149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4150 (exit $ac_status); }; }; then
4151 ac_cv_kthread=yes
4152else
4153 echo "$as_me: program exited with status $ac_status" >&5
4154echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004157( exit $ac_status )
4158ac_cv_kthread=no
4159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004160rm -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 +00004161fi
4162CC="$ac_save_cc"
4163fi
4164
4165echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4166echo "${ECHO_T}$ac_cv_kthread" >&6
4167fi
4168
Skip Montanarod8d39a02003-07-10 20:44:10 +00004169if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004170then
4171# -pthread, if available, provides the right #defines
4172# and linker options to make pthread_create available
4173# Some compilers won't report that they do not support -pthread,
4174# so we need to run a program to see whether it really made the
4175# function available.
4176echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4177echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4178if test "${ac_cv_thread+set}" = set; then
4179 echo $ECHO_N "(cached) $ECHO_C" >&6
4180else
4181 ac_save_cc="$CC"
4182CC="$CC -pthread"
4183if test "$cross_compiling" = yes; then
4184 ac_cv_pthread=no
4185else
4186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* confdefs.h. */
4188_ACEOF
4189cat confdefs.h >>conftest.$ac_ext
4190cat >>conftest.$ac_ext <<_ACEOF
4191/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004192
4193#include <pthread.h>
4194
4195void* routine(void* p){return NULL;}
4196
4197int main(){
4198 pthread_t p;
4199 if(pthread_create(&p,NULL,routine,NULL)!=0)
4200 return 1;
4201 (void)pthread_detach(p);
4202 return 0;
4203}
4204
4205_ACEOF
4206rm -f conftest$ac_exeext
4207if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4208 (eval $ac_link) 2>&5
4209 ac_status=$?
4210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4211 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4213 (eval $ac_try) 2>&5
4214 ac_status=$?
4215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216 (exit $ac_status); }; }; then
4217 ac_cv_pthread=yes
4218else
4219 echo "$as_me: program exited with status $ac_status" >&5
4220echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004221sed 's/^/| /' conftest.$ac_ext >&5
4222
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004223( exit $ac_status )
4224ac_cv_pthread=no
4225fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004226rm -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 +00004227fi
4228CC="$ac_save_cc"
4229fi
4230
4231echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4232echo "${ECHO_T}$ac_cv_pthread" >&6
4233fi
4234
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004235# If we have set a CC compiler flag for thread support then
4236# check if it works for CXX, too.
4237ac_cv_cxx_thread=no
4238if test ! -z "$CXX"
4239then
4240echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4241echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4242ac_save_cxx="$CXX"
4243
4244if test "$ac_cv_kpthread" = "yes"
4245then
4246 CXX="$CXX -Kpthread"
4247 ac_cv_cxx_thread=yes
4248elif test "$ac_cv_kthread" = "yes"
4249then
4250 CXX="$CXX -Kthread"
4251 ac_cv_cxx_thread=yes
4252elif test "$ac_cv_pthread" = "yes"
4253then
4254 CXX="$CXX -pthread"
4255 ac_cv_cxx_thread=yes
4256fi
4257
4258if test $ac_cv_cxx_thread = yes
4259then
4260 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4261 $CXX -c conftest.$ac_ext 2>&5
4262 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4263 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4264 then
4265 ac_cv_cxx_thread=yes
4266 else
4267 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004268 fi
4269 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004270fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004271echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4272echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004273fi
4274CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004275
Michael W. Hudson54241132001-12-07 15:38:26 +00004276
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004277# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004278echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4279echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4280if test "${ac_cv_header_stdc+set}" = set; then
4281 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* confdefs.h. */
4285_ACEOF
4286cat confdefs.h >>conftest.$ac_ext
4287cat >>conftest.$ac_ext <<_ACEOF
4288/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004289#include <stdlib.h>
4290#include <stdarg.h>
4291#include <string.h>
4292#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int
4295main ()
4296{
4297
4298 ;
4299 return 0;
4300}
Martin v. Löwis11437992002-04-12 09:54:03 +00004301_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004302rm -f conftest.$ac_objext
4303if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306 grep -v '^ *+' conftest.er1 >conftest.err
4307 rm -f conftest.er1
4308 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004310 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004311 { ac_try='test -z "$ac_c_werror_flag"
4312 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4314 (eval $ac_try) 2>&5
4315 ac_status=$?
4316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4317 (exit $ac_status); }; } &&
4318 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4320 (eval $ac_try) 2>&5
4321 ac_status=$?
4322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4323 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324 ac_cv_header_stdc=yes
4325else
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004327sed 's/^/| /' conftest.$ac_ext >&5
4328
4329ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332
4333if test $ac_cv_header_stdc = yes; then
4334 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004336/* confdefs.h. */
4337_ACEOF
4338cat confdefs.h >>conftest.$ac_ext
4339cat >>conftest.$ac_ext <<_ACEOF
4340/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004342
4343_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004345 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346 :
4347else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004348 ac_cv_header_stdc=no
4349fi
4350rm -f conftest*
4351
4352fi
4353
4354if test $ac_cv_header_stdc = yes; then
4355 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004357/* confdefs.h. */
4358_ACEOF
4359cat confdefs.h >>conftest.$ac_ext
4360cat >>conftest.$ac_ext <<_ACEOF
4361/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004363
4364_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004366 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367 :
4368else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369 ac_cv_header_stdc=no
4370fi
4371rm -f conftest*
4372
4373fi
4374
4375if test $ac_cv_header_stdc = yes; then
4376 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004377 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004378 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379else
Martin v. Löwis11437992002-04-12 09:54:03 +00004380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004381/* confdefs.h. */
4382_ACEOF
4383cat confdefs.h >>conftest.$ac_ext
4384cat >>conftest.$ac_ext <<_ACEOF
4385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004386#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004387#if ((' ' & 0x0FF) == 0x020)
4388# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4389# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4390#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004391# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004392 (('a' <= (c) && (c) <= 'i') \
4393 || ('j' <= (c) && (c) <= 'r') \
4394 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004395# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4396#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004397
Martin v. Löwis11437992002-04-12 09:54:03 +00004398#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4399int
4400main ()
4401{
4402 int i;
4403 for (i = 0; i < 256; i++)
4404 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004405 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004406 exit(2);
4407 exit (0);
4408}
4409_ACEOF
4410rm -f conftest$ac_exeext
4411if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4412 (eval $ac_link) 2>&5
4413 ac_status=$?
4414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4417 (eval $ac_try) 2>&5
4418 ac_status=$?
4419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4420 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421 :
4422else
Martin v. Löwis11437992002-04-12 09:54:03 +00004423 echo "$as_me: program exited with status $ac_status" >&5
4424echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004425sed 's/^/| /' conftest.$ac_ext >&5
4426
Martin v. Löwis11437992002-04-12 09:54:03 +00004427( exit $ac_status )
4428ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004429fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004430rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004431fi
4432fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004433fi
4434echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4435echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004436if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004437
4438cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004439#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004440_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004441
4442fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004443
Skip Montanarob9820a32004-01-17 00:16:12 +00004444# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004455 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004456do
4457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4458echo "$as_me:$LINENO: checking for $ac_header" >&5
4459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4460if eval "test \"\${$as_ac_Header+set}\" = set"; then
4461 echo $ECHO_N "(cached) $ECHO_C" >&6
4462else
4463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004464/* confdefs.h. */
4465_ACEOF
4466cat confdefs.h >>conftest.$ac_ext
4467cat >>conftest.$ac_ext <<_ACEOF
4468/* end confdefs.h. */
4469$ac_includes_default
4470
4471#include <$ac_header>
4472_ACEOF
4473rm -f conftest.$ac_objext
4474if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004475 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004477 grep -v '^ *+' conftest.er1 >conftest.err
4478 rm -f conftest.er1
4479 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4481 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004482 { ac_try='test -z "$ac_c_werror_flag"
4483 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4485 (eval $ac_try) 2>&5
4486 ac_status=$?
4487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4488 (exit $ac_status); }; } &&
4489 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4491 (eval $ac_try) 2>&5
4492 ac_status=$?
4493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4494 (exit $ac_status); }; }; then
4495 eval "$as_ac_Header=yes"
4496else
4497 echo "$as_me: failed program was:" >&5
4498sed 's/^/| /' conftest.$ac_ext >&5
4499
4500eval "$as_ac_Header=no"
4501fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004502rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004503fi
4504echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4505echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4506if test `eval echo '${'$as_ac_Header'}'` = yes; then
4507 cat >>confdefs.h <<_ACEOF
4508#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4509_ACEOF
4510
4511fi
4512
4513done
4514
4515
Martin v. Löwis11437992002-04-12 09:54:03 +00004516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
Anthony Baxter8a560de2004-10-13 15:30:56 +00004552
Martin v. Löwisc3001752005-01-23 09:27:24 +00004553
4554for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004555libintl.h ncurses.h poll.h pthread.h \
4556stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004557unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004558sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4559sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004560sys/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 +00004561sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004562sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4563bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564do
Martin v. Löwis11437992002-04-12 09:54:03 +00004565as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4566if eval "test \"\${$as_ac_Header+set}\" = set"; then
4567 echo "$as_me:$LINENO: checking for $ac_header" >&5
4568echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4569if eval "test \"\${$as_ac_Header+set}\" = set"; then
4570 echo $ECHO_N "(cached) $ECHO_C" >&6
4571fi
4572echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4573echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574else
Martin v. Löwis11437992002-04-12 09:54:03 +00004575 # Is the header compilable?
4576echo "$as_me:$LINENO: checking $ac_header usability" >&5
4577echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004584$ac_includes_default
4585#include <$ac_header>
4586_ACEOF
4587rm -f conftest.$ac_objext
4588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004591 grep -v '^ *+' conftest.er1 >conftest.err
4592 rm -f conftest.er1
4593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004596 { ac_try='test -z "$ac_c_werror_flag"
4597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4599 (eval $ac_try) 2>&5
4600 ac_status=$?
4601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; } &&
4603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4605 (eval $ac_try) 2>&5
4606 ac_status=$?
4607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4608 (exit $ac_status); }; }; then
4609 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004610else
Martin v. Löwis11437992002-04-12 09:54:03 +00004611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004612sed 's/^/| /' conftest.$ac_ext >&5
4613
Martin v. Löwis11437992002-04-12 09:54:03 +00004614ac_header_compiler=no
4615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004617echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4618echo "${ECHO_T}$ac_header_compiler" >&6
4619
4620# Is the header present?
4621echo "$as_me:$LINENO: checking $ac_header presence" >&5
4622echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004624/* confdefs.h. */
4625_ACEOF
4626cat confdefs.h >>conftest.$ac_ext
4627cat >>conftest.$ac_ext <<_ACEOF
4628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004629#include <$ac_header>
4630_ACEOF
4631if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4632 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4633 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004634 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004635 rm -f conftest.er1
4636 cat conftest.err >&5
4637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4638 (exit $ac_status); } >/dev/null; then
4639 if test -s conftest.err; then
4640 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004641 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 else
4643 ac_cpp_err=
4644 fi
4645else
4646 ac_cpp_err=yes
4647fi
4648if test -z "$ac_cpp_err"; then
4649 ac_header_preproc=yes
4650else
4651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004652sed 's/^/| /' conftest.$ac_ext >&5
4653
Martin v. Löwis11437992002-04-12 09:54:03 +00004654 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004655fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004656rm -f conftest.err conftest.$ac_ext
4657echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4658echo "${ECHO_T}$ac_header_preproc" >&6
4659
4660# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004661case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4662 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4664echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004665 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4666echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4667 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004668 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004669 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004670 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4671echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004672 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4673echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4674 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4675echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4676 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4677echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004678 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4679echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004680 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4681echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004682 (
4683 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004684## ------------------------------------------------ ##
4685## Report this to http://www.python.org/python-bugs ##
4686## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004687_ASBOX
4688 ) |
4689 sed "s/^/$as_me: WARNING: /" >&2
4690 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004691esac
4692echo "$as_me:$LINENO: checking for $ac_header" >&5
4693echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4694if eval "test \"\${$as_ac_Header+set}\" = set"; then
4695 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004696else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004697 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004698fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004699echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4700echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4701
4702fi
4703if test `eval echo '${'$as_ac_Header'}'` = yes; then
4704 cat >>confdefs.h <<_ACEOF
4705#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4706_ACEOF
4707
4708fi
4709
Guido van Rossum627b2d71993-12-24 10:39:16 +00004710done
4711
Martin v. Löwis11437992002-04-12 09:54:03 +00004712
4713
4714
4715
4716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004718for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4719 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4720echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4721echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4722if eval "test \"\${$as_ac_Header+set}\" = set"; then
4723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004724else
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004726/* confdefs.h. */
4727_ACEOF
4728cat confdefs.h >>conftest.$ac_ext
4729cat >>conftest.$ac_ext <<_ACEOF
4730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004731#include <sys/types.h>
4732#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004733
Martin v. Löwis11437992002-04-12 09:54:03 +00004734int
4735main ()
4736{
4737if ((DIR *) 0)
4738return 0;
4739 ;
4740 return 0;
4741}
4742_ACEOF
4743rm -f conftest.$ac_objext
4744if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004745 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004747 grep -v '^ *+' conftest.er1 >conftest.err
4748 rm -f conftest.er1
4749 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4751 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004752 { ac_try='test -z "$ac_c_werror_flag"
4753 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4755 (eval $ac_try) 2>&5
4756 ac_status=$?
4757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4758 (exit $ac_status); }; } &&
4759 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761 (eval $ac_try) 2>&5
4762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); }; }; then
4765 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004766else
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004768sed 's/^/| /' conftest.$ac_ext >&5
4769
Martin v. Löwis11437992002-04-12 09:54:03 +00004770eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004773fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004774echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4775echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4776if test `eval echo '${'$as_ac_Header'}'` = yes; then
4777 cat >>confdefs.h <<_ACEOF
4778#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4779_ACEOF
4780
4781ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004784done
4785# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4786if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004787 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4788echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4789if test "${ac_cv_search_opendir+set}" = set; then
4790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004791else
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 ac_func_search_save_LIBS=$LIBS
4793ac_cv_search_opendir=no
4794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004795/* confdefs.h. */
4796_ACEOF
4797cat confdefs.h >>conftest.$ac_ext
4798cat >>conftest.$ac_ext <<_ACEOF
4799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004800
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004801/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004802#ifdef __cplusplus
4803extern "C"
4804#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004805/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 builtin and then its argument prototype would still apply. */
4807char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004808int
4809main ()
4810{
4811opendir ();
4812 ;
4813 return 0;
4814}
4815_ACEOF
4816rm -f conftest.$ac_objext conftest$ac_exeext
4817if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004818 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004820 grep -v '^ *+' conftest.er1 >conftest.err
4821 rm -f conftest.er1
4822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4824 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004825 { ac_try='test -z "$ac_c_werror_flag"
4826 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4828 (eval $ac_try) 2>&5
4829 ac_status=$?
4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831 (exit $ac_status); }; } &&
4832 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4834 (eval $ac_try) 2>&5
4835 ac_status=$?
4836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837 (exit $ac_status); }; }; then
4838 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004839else
Martin v. Löwis11437992002-04-12 09:54:03 +00004840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004841sed 's/^/| /' conftest.$ac_ext >&5
4842
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004844rm -f conftest.err conftest.$ac_objext \
4845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004846if test "$ac_cv_search_opendir" = no; then
4847 for ac_lib in dir; do
4848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004850/* confdefs.h. */
4851_ACEOF
4852cat confdefs.h >>conftest.$ac_ext
4853cat >>conftest.$ac_ext <<_ACEOF
4854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004855
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004856/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004857#ifdef __cplusplus
4858extern "C"
4859#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004860/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004861 builtin and then its argument prototype would still apply. */
4862char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004863int
4864main ()
4865{
4866opendir ();
4867 ;
4868 return 0;
4869}
4870_ACEOF
4871rm -f conftest.$ac_objext conftest$ac_exeext
4872if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004873 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004875 grep -v '^ *+' conftest.er1 >conftest.err
4876 rm -f conftest.er1
4877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4879 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004880 { ac_try='test -z "$ac_c_werror_flag"
4881 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4883 (eval $ac_try) 2>&5
4884 ac_status=$?
4885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4886 (exit $ac_status); }; } &&
4887 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4889 (eval $ac_try) 2>&5
4890 ac_status=$?
4891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4892 (exit $ac_status); }; }; then
4893 ac_cv_search_opendir="-l$ac_lib"
4894break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895else
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004897sed 's/^/| /' conftest.$ac_ext >&5
4898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004900rm -f conftest.err conftest.$ac_objext \
4901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 done
4903fi
4904LIBS=$ac_func_search_save_LIBS
4905fi
4906echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4907echo "${ECHO_T}$ac_cv_search_opendir" >&6
4908if test "$ac_cv_search_opendir" != no; then
4909 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004912
Michael W. Hudson54241132001-12-07 15:38:26 +00004913else
Martin v. Löwis11437992002-04-12 09:54:03 +00004914 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4915echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4916if test "${ac_cv_search_opendir+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
4918else
4919 ac_func_search_save_LIBS=$LIBS
4920ac_cv_search_opendir=no
4921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004922/* confdefs.h. */
4923_ACEOF
4924cat confdefs.h >>conftest.$ac_ext
4925cat >>conftest.$ac_ext <<_ACEOF
4926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004927
4928/* Override any gcc2 internal prototype to avoid an error. */
4929#ifdef __cplusplus
4930extern "C"
4931#endif
4932/* We use char because int might match the return type of a gcc2
4933 builtin and then its argument prototype would still apply. */
4934char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004935int
4936main ()
4937{
4938opendir ();
4939 ;
4940 return 0;
4941}
4942_ACEOF
4943rm -f conftest.$ac_objext conftest$ac_exeext
4944if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004945 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004947 grep -v '^ *+' conftest.er1 >conftest.err
4948 rm -f conftest.er1
4949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4951 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004952 { ac_try='test -z "$ac_c_werror_flag"
4953 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4955 (eval $ac_try) 2>&5
4956 ac_status=$?
4957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958 (exit $ac_status); }; } &&
4959 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961 (eval $ac_try) 2>&5
4962 ac_status=$?
4963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964 (exit $ac_status); }; }; then
4965 ac_cv_search_opendir="none required"
4966else
4967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004968sed 's/^/| /' conftest.$ac_ext >&5
4969
Martin v. Löwis11437992002-04-12 09:54:03 +00004970fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004971rm -f conftest.err conftest.$ac_objext \
4972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004973if test "$ac_cv_search_opendir" = no; then
4974 for ac_lib in x; do
4975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4976 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004977/* confdefs.h. */
4978_ACEOF
4979cat confdefs.h >>conftest.$ac_ext
4980cat >>conftest.$ac_ext <<_ACEOF
4981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004982
4983/* Override any gcc2 internal prototype to avoid an error. */
4984#ifdef __cplusplus
4985extern "C"
4986#endif
4987/* We use char because int might match the return type of a gcc2
4988 builtin and then its argument prototype would still apply. */
4989char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004990int
4991main ()
4992{
4993opendir ();
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest.$ac_objext conftest$ac_exeext
4999if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005000 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005002 grep -v '^ *+' conftest.er1 >conftest.err
5003 rm -f conftest.er1
5004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5006 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005007 { ac_try='test -z "$ac_c_werror_flag"
5008 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5010 (eval $ac_try) 2>&5
5011 ac_status=$?
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); }; } &&
5014 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5016 (eval $ac_try) 2>&5
5017 ac_status=$?
5018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019 (exit $ac_status); }; }; then
5020 ac_cv_search_opendir="-l$ac_lib"
5021break
5022else
5023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005024sed 's/^/| /' conftest.$ac_ext >&5
5025
Martin v. Löwis11437992002-04-12 09:54:03 +00005026fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005027rm -f conftest.err conftest.$ac_objext \
5028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005029 done
5030fi
5031LIBS=$ac_func_search_save_LIBS
5032fi
5033echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5034echo "${ECHO_T}$ac_cv_search_opendir" >&6
5035if test "$ac_cv_search_opendir" != no; then
5036 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038fi
5039
5040fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005041
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005042echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5043echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5044if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5045 echo $ECHO_N "(cached) $ECHO_C" >&6
5046else
5047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005048/* confdefs.h. */
5049_ACEOF
5050cat confdefs.h >>conftest.$ac_ext
5051cat >>conftest.$ac_ext <<_ACEOF
5052/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005053#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005054int
5055main ()
5056{
5057return makedev(0, 0);
5058 ;
5059 return 0;
5060}
5061_ACEOF
5062rm -f conftest.$ac_objext conftest$ac_exeext
5063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005064 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005066 grep -v '^ *+' conftest.er1 >conftest.err
5067 rm -f conftest.er1
5068 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005071 { ac_try='test -z "$ac_c_werror_flag"
5072 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5074 (eval $ac_try) 2>&5
5075 ac_status=$?
5076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077 (exit $ac_status); }; } &&
5078 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080 (eval $ac_try) 2>&5
5081 ac_status=$?
5082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083 (exit $ac_status); }; }; then
5084 ac_cv_header_sys_types_h_makedev=yes
5085else
5086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005087sed 's/^/| /' conftest.$ac_ext >&5
5088
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005089ac_cv_header_sys_types_h_makedev=no
5090fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005091rm -f conftest.err conftest.$ac_objext \
5092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005093
5094fi
5095echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5096echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5097
5098if test $ac_cv_header_sys_types_h_makedev = no; then
5099if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5100 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5101echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5102if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5103 echo $ECHO_N "(cached) $ECHO_C" >&6
5104fi
5105echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5106echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5107else
5108 # Is the header compilable?
5109echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5110echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005112/* confdefs.h. */
5113_ACEOF
5114cat confdefs.h >>conftest.$ac_ext
5115cat >>conftest.$ac_ext <<_ACEOF
5116/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005117$ac_includes_default
5118#include <sys/mkdev.h>
5119_ACEOF
5120rm -f conftest.$ac_objext
5121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005122 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005124 grep -v '^ *+' conftest.er1 >conftest.err
5125 rm -f conftest.er1
5126 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5128 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005129 { ac_try='test -z "$ac_c_werror_flag"
5130 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132 (eval $ac_try) 2>&5
5133 ac_status=$?
5134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135 (exit $ac_status); }; } &&
5136 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5138 (eval $ac_try) 2>&5
5139 ac_status=$?
5140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5141 (exit $ac_status); }; }; then
5142 ac_header_compiler=yes
5143else
5144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005145sed 's/^/| /' conftest.$ac_ext >&5
5146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005147ac_header_compiler=no
5148fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005150echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5151echo "${ECHO_T}$ac_header_compiler" >&6
5152
5153# Is the header present?
5154echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5155echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5156cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005157/* confdefs.h. */
5158_ACEOF
5159cat confdefs.h >>conftest.$ac_ext
5160cat >>conftest.$ac_ext <<_ACEOF
5161/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005162#include <sys/mkdev.h>
5163_ACEOF
5164if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5165 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5166 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005167 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005168 rm -f conftest.er1
5169 cat conftest.err >&5
5170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); } >/dev/null; then
5172 if test -s conftest.err; then
5173 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005174 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005175 else
5176 ac_cpp_err=
5177 fi
5178else
5179 ac_cpp_err=yes
5180fi
5181if test -z "$ac_cpp_err"; then
5182 ac_header_preproc=yes
5183else
5184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005185sed 's/^/| /' conftest.$ac_ext >&5
5186
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005187 ac_header_preproc=no
5188fi
5189rm -f conftest.err conftest.$ac_ext
5190echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5191echo "${ECHO_T}$ac_header_preproc" >&6
5192
5193# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005194case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5195 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5197echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5199echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5200 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005201 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005202 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5204echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005205 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5206echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5207 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5208echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5209 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5210echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005211 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5212echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005213 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5214echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005215 (
5216 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005217## ------------------------------------------------ ##
5218## Report this to http://www.python.org/python-bugs ##
5219## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005220_ASBOX
5221 ) |
5222 sed "s/^/$as_me: WARNING: /" >&2
5223 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005224esac
5225echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5226echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5227if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5228 echo $ECHO_N "(cached) $ECHO_C" >&6
5229else
5230 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5231fi
5232echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5233echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5234
5235fi
5236if test $ac_cv_header_sys_mkdev_h = yes; then
5237
5238cat >>confdefs.h <<\_ACEOF
5239#define MAJOR_IN_MKDEV 1
5240_ACEOF
5241
5242fi
5243
5244
5245
5246 if test $ac_cv_header_sys_mkdev_h = no; then
5247 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5248 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5249echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5250if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5251 echo $ECHO_N "(cached) $ECHO_C" >&6
5252fi
5253echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5254echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5255else
5256 # Is the header compilable?
5257echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5258echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005260/* confdefs.h. */
5261_ACEOF
5262cat confdefs.h >>conftest.$ac_ext
5263cat >>conftest.$ac_ext <<_ACEOF
5264/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005265$ac_includes_default
5266#include <sys/sysmacros.h>
5267_ACEOF
5268rm -f conftest.$ac_objext
5269if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005270 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005272 grep -v '^ *+' conftest.er1 >conftest.err
5273 rm -f conftest.er1
5274 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005277 { ac_try='test -z "$ac_c_werror_flag"
5278 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5280 (eval $ac_try) 2>&5
5281 ac_status=$?
5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5283 (exit $ac_status); }; } &&
5284 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5286 (eval $ac_try) 2>&5
5287 ac_status=$?
5288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5289 (exit $ac_status); }; }; then
5290 ac_header_compiler=yes
5291else
5292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005293sed 's/^/| /' conftest.$ac_ext >&5
5294
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005295ac_header_compiler=no
5296fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005297rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005298echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5299echo "${ECHO_T}$ac_header_compiler" >&6
5300
5301# Is the header present?
5302echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5303echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005305/* confdefs.h. */
5306_ACEOF
5307cat confdefs.h >>conftest.$ac_ext
5308cat >>conftest.$ac_ext <<_ACEOF
5309/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005310#include <sys/sysmacros.h>
5311_ACEOF
5312if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5313 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5314 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005315 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005316 rm -f conftest.er1
5317 cat conftest.err >&5
5318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5319 (exit $ac_status); } >/dev/null; then
5320 if test -s conftest.err; then
5321 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005322 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323 else
5324 ac_cpp_err=
5325 fi
5326else
5327 ac_cpp_err=yes
5328fi
5329if test -z "$ac_cpp_err"; then
5330 ac_header_preproc=yes
5331else
5332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005333sed 's/^/| /' conftest.$ac_ext >&5
5334
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005335 ac_header_preproc=no
5336fi
5337rm -f conftest.err conftest.$ac_ext
5338echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5339echo "${ECHO_T}$ac_header_preproc" >&6
5340
5341# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005342case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5343 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5345echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005346 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5347echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5348 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005349 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005350 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005351 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5352echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005353 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5354echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5355 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5356echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5357 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5358echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005359 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5360echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005361 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5362echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005363 (
5364 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005365## ------------------------------------------------ ##
5366## Report this to http://www.python.org/python-bugs ##
5367## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005368_ASBOX
5369 ) |
5370 sed "s/^/$as_me: WARNING: /" >&2
5371 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005372esac
5373echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5374echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5375if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5379fi
5380echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5381echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5382
5383fi
5384if test $ac_cv_header_sys_sysmacros_h = yes; then
5385
5386cat >>confdefs.h <<\_ACEOF
5387#define MAJOR_IN_SYSMACROS 1
5388_ACEOF
5389
5390fi
5391
5392
5393 fi
5394fi
5395
Michael W. Hudson54241132001-12-07 15:38:26 +00005396
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005397# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005398
5399for ac_header in term.h
5400do
5401as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5402echo "$as_me:$LINENO: checking for $ac_header" >&5
5403echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5404if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005405 echo $ECHO_N "(cached) $ECHO_C" >&6
5406else
5407 cat >conftest.$ac_ext <<_ACEOF
5408/* confdefs.h. */
5409_ACEOF
5410cat confdefs.h >>conftest.$ac_ext
5411cat >>conftest.$ac_ext <<_ACEOF
5412/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005413
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005414#ifdef HAVE_CURSES_H
5415#include <curses.h>
5416#endif
5417
5418
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005419#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005420_ACEOF
5421rm -f conftest.$ac_objext
5422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>conftest.er1
5424 ac_status=$?
5425 grep -v '^ *+' conftest.er1 >conftest.err
5426 rm -f conftest.er1
5427 cat conftest.err >&5
5428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5429 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005430 { ac_try='test -z "$ac_c_werror_flag"
5431 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5433 (eval $ac_try) 2>&5
5434 ac_status=$?
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); }; } &&
5437 { ac_try='test -s conftest.$ac_objext'
5438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5439 (eval $ac_try) 2>&5
5440 ac_status=$?
5441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5442 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005443 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005444else
5445 echo "$as_me: failed program was:" >&5
5446sed 's/^/| /' conftest.$ac_ext >&5
5447
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005448eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005449fi
5450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5451fi
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005452echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5453echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5454if test `eval echo '${'$as_ac_Header'}'` = yes; then
5455 cat >>confdefs.h <<_ACEOF
5456#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5457_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005458
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005459fi
5460
5461done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005462
5463
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005465was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005466echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5467echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005469/* confdefs.h. */
5470_ACEOF
5471cat confdefs.h >>conftest.$ac_ext
5472cat >>conftest.$ac_ext <<_ACEOF
5473/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005475
5476_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005478 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005479 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005480else
Martin v. Löwis11437992002-04-12 09:54:03 +00005481
5482
5483cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005486
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005487
Guido van Rossum627b2d71993-12-24 10:39:16 +00005488fi
5489rm -f conftest*
5490
Martin v. Löwis11437992002-04-12 09:54:03 +00005491echo "$as_me:$LINENO: result: $was_it_defined" >&5
5492echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005493
Neal Norwitz11690112002-07-30 01:08:28 +00005494# Check whether using makedev requires defining _OSF_SOURCE
5495echo "$as_me:$LINENO: checking for makedev" >&5
5496echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005498/* confdefs.h. */
5499_ACEOF
5500cat confdefs.h >>conftest.$ac_ext
5501cat >>conftest.$ac_ext <<_ACEOF
5502/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005503#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005504int
5505main ()
5506{
5507 makedev(0, 0)
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512rm -f conftest.$ac_objext conftest$ac_exeext
5513if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005514 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005516 grep -v '^ *+' conftest.er1 >conftest.err
5517 rm -f conftest.er1
5518 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5520 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005521 { ac_try='test -z "$ac_c_werror_flag"
5522 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5524 (eval $ac_try) 2>&5
5525 ac_status=$?
5526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5527 (exit $ac_status); }; } &&
5528 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5530 (eval $ac_try) 2>&5
5531 ac_status=$?
5532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); }; }; then
5534 ac_cv_has_makedev=yes
5535else
5536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005537sed 's/^/| /' conftest.$ac_ext >&5
5538
Neal Norwitz11690112002-07-30 01:08:28 +00005539ac_cv_has_makedev=no
5540fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005541rm -f conftest.err conftest.$ac_objext \
5542 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005543if test "$ac_cv_has_makedev" = "no"; then
5544 # we didn't link, try if _OSF_SOURCE will allow us to link
5545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005546/* confdefs.h. */
5547_ACEOF
5548cat confdefs.h >>conftest.$ac_ext
5549cat >>conftest.$ac_ext <<_ACEOF
5550/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005551
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005552#define _OSF_SOURCE 1
5553#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005554
Neal Norwitz11690112002-07-30 01:08:28 +00005555int
5556main ()
5557{
5558 makedev(0, 0)
5559 ;
5560 return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext conftest$ac_exeext
5564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005565 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005567 grep -v '^ *+' conftest.er1 >conftest.err
5568 rm -f conftest.er1
5569 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005572 { ac_try='test -z "$ac_c_werror_flag"
5573 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575 (eval $ac_try) 2>&5
5576 ac_status=$?
5577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578 (exit $ac_status); }; } &&
5579 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581 (eval $ac_try) 2>&5
5582 ac_status=$?
5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584 (exit $ac_status); }; }; then
5585 ac_cv_has_makedev=yes
5586else
5587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005588sed 's/^/| /' conftest.$ac_ext >&5
5589
Neal Norwitz11690112002-07-30 01:08:28 +00005590ac_cv_has_makedev=no
5591fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005592rm -f conftest.err conftest.$ac_objext \
5593 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005594 if test "$ac_cv_has_makedev" = "yes"; then
5595
5596cat >>confdefs.h <<\_ACEOF
5597#define _OSF_SOURCE 1
5598_ACEOF
5599
5600 fi
5601fi
5602echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5603echo "${ECHO_T}$ac_cv_has_makedev" >&6
5604if test "$ac_cv_has_makedev" = "yes"; then
5605
5606cat >>confdefs.h <<\_ACEOF
5607#define HAVE_MAKEDEV 1
5608_ACEOF
5609
5610fi
5611
Martin v. Löwis399a6892002-10-04 10:22:02 +00005612# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5613# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5614# defined, but the compiler does not support pragma redefine_extname,
5615# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5616# structures (such as rlimit64) without declaring them. As a
5617# work-around, disable LFS on such configurations
5618
5619use_lfs=yes
5620echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5621echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5622cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005623/* confdefs.h. */
5624_ACEOF
5625cat confdefs.h >>conftest.$ac_ext
5626cat >>conftest.$ac_ext <<_ACEOF
5627/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005628
5629#define _LARGEFILE_SOURCE 1
5630#define _FILE_OFFSET_BITS 64
5631#include <sys/resource.h>
5632
Martin v. Löwis399a6892002-10-04 10:22:02 +00005633int
5634main ()
5635{
5636struct rlimit foo;
5637 ;
5638 return 0;
5639}
5640_ACEOF
5641rm -f conftest.$ac_objext
5642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005643 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005645 grep -v '^ *+' conftest.er1 >conftest.err
5646 rm -f conftest.er1
5647 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5649 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005650 { ac_try='test -z "$ac_c_werror_flag"
5651 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5653 (eval $ac_try) 2>&5
5654 ac_status=$?
5655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5656 (exit $ac_status); }; } &&
5657 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5659 (eval $ac_try) 2>&5
5660 ac_status=$?
5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5662 (exit $ac_status); }; }; then
5663 sol_lfs_bug=no
5664else
5665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005666sed 's/^/| /' conftest.$ac_ext >&5
5667
Martin v. Löwis399a6892002-10-04 10:22:02 +00005668sol_lfs_bug=yes
5669fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005671echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5672echo "${ECHO_T}$sol_lfs_bug" >&6
5673if test "$sol_lfs_bug" = "yes"; then
5674 use_lfs=no
5675fi
5676
5677if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005678# Two defines needed to enable largefile support on various platforms
5679# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005680
Martin v. Löwis11437992002-04-12 09:54:03 +00005681cat >>confdefs.h <<\_ACEOF
5682#define _LARGEFILE_SOURCE 1
5683_ACEOF
5684
5685
5686cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005687#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005688_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005689
Martin v. Löwis399a6892002-10-04 10:22:02 +00005690fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005691
Guido van Rossum84e7b241996-08-19 21:59:00 +00005692# Add some code to confdefs.h so that the test for off_t works on SCO
5693cat >> confdefs.h <<\EOF
5694#if defined(SCO_DS)
5695#undef _OFF_T
5696#endif
5697EOF
5698
Guido van Rossumef2255b2000-03-10 22:30:29 +00005699# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005700echo "$as_me:$LINENO: checking for mode_t" >&5
5701echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5702if test "${ac_cv_type_mode_t+set}" = set; then
5703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704else
Martin v. Löwis11437992002-04-12 09:54:03 +00005705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005706/* confdefs.h. */
5707_ACEOF
5708cat confdefs.h >>conftest.$ac_ext
5709cat >>conftest.$ac_ext <<_ACEOF
5710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005712int
5713main ()
5714{
5715if ((mode_t *) 0)
5716 return 0;
5717if (sizeof (mode_t))
5718 return 0;
5719 ;
5720 return 0;
5721}
5722_ACEOF
5723rm -f conftest.$ac_objext
5724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005725 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005727 grep -v '^ *+' conftest.er1 >conftest.err
5728 rm -f conftest.er1
5729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005732 { ac_try='test -z "$ac_c_werror_flag"
5733 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735 (eval $ac_try) 2>&5
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); }; } &&
5739 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741 (eval $ac_try) 2>&5
5742 ac_status=$?
5743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005745 ac_cv_type_mode_t=yes
5746else
Martin v. Löwis11437992002-04-12 09:54:03 +00005747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005748sed 's/^/| /' conftest.$ac_ext >&5
5749
Martin v. Löwis11437992002-04-12 09:54:03 +00005750ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005751fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005754echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5755echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5756if test $ac_cv_type_mode_t = yes; then
5757 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005758else
Martin v. Löwis11437992002-04-12 09:54:03 +00005759
5760cat >>confdefs.h <<_ACEOF
5761#define mode_t int
5762_ACEOF
5763
5764fi
5765
5766echo "$as_me:$LINENO: checking for off_t" >&5
5767echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5768if test "${ac_cv_type_off_t+set}" = set; then
5769 echo $ECHO_N "(cached) $ECHO_C" >&6
5770else
5771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005772/* confdefs.h. */
5773_ACEOF
5774cat confdefs.h >>conftest.$ac_ext
5775cat >>conftest.$ac_ext <<_ACEOF
5776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005777$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005778int
5779main ()
5780{
5781if ((off_t *) 0)
5782 return 0;
5783if (sizeof (off_t))
5784 return 0;
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789rm -f conftest.$ac_objext
5790if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005791 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005793 grep -v '^ *+' conftest.er1 >conftest.err
5794 rm -f conftest.er1
5795 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5797 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005798 { ac_try='test -z "$ac_c_werror_flag"
5799 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801 (eval $ac_try) 2>&5
5802 ac_status=$?
5803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804 (exit $ac_status); }; } &&
5805 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5807 (eval $ac_try) 2>&5
5808 ac_status=$?
5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005811 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005814sed 's/^/| /' conftest.$ac_ext >&5
5815
Martin v. Löwis11437992002-04-12 09:54:03 +00005816ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005817fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005818rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005819fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005820echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5821echo "${ECHO_T}$ac_cv_type_off_t" >&6
5822if test $ac_cv_type_off_t = yes; then
5823 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005824else
Martin v. Löwis11437992002-04-12 09:54:03 +00005825
5826cat >>confdefs.h <<_ACEOF
5827#define off_t long
5828_ACEOF
5829
5830fi
5831
5832echo "$as_me:$LINENO: checking for pid_t" >&5
5833echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5834if test "${ac_cv_type_pid_t+set}" = set; then
5835 echo $ECHO_N "(cached) $ECHO_C" >&6
5836else
5837 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 ((pid_t *) 0)
5848 return 0;
5849if (sizeof (pid_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
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005877 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005878else
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_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +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_pid_t" >&5
5887echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5888if test $ac_cv_type_pid_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 pid_t int
5894_ACEOF
5895
5896fi
5897
5898echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5899echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5900if test "${ac_cv_type_signal+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. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005909#include <sys/types.h>
5910#include <signal.h>
5911#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005912# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005913#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005914#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005915extern "C" void (*signal (int, void (*)(int)))(int);
5916#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005917void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005918#endif
5919
Martin v. Löwis11437992002-04-12 09:54:03 +00005920int
5921main ()
5922{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005924 ;
5925 return 0;
5926}
5927_ACEOF
5928rm -f conftest.$ac_objext
5929if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005930 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005932 grep -v '^ *+' conftest.er1 >conftest.err
5933 rm -f conftest.er1
5934 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5936 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005937 { ac_try='test -z "$ac_c_werror_flag"
5938 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5940 (eval $ac_try) 2>&5
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); }; } &&
5944 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5946 (eval $ac_try) 2>&5
5947 ac_status=$?
5948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5949 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005951else
Martin v. Löwis11437992002-04-12 09:54:03 +00005952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005953sed 's/^/| /' conftest.$ac_ext >&5
5954
Martin v. Löwis11437992002-04-12 09:54:03 +00005955ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005956fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005959echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5960echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005961
Martin v. Löwis11437992002-04-12 09:54:03 +00005962cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005964_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005965
Michael W. Hudson54241132001-12-07 15:38:26 +00005966
Martin v. Löwis11437992002-04-12 09:54:03 +00005967echo "$as_me:$LINENO: checking for size_t" >&5
5968echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5969if test "${ac_cv_type_size_t+set}" = set; then
5970 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971else
Martin v. Löwis11437992002-04-12 09:54:03 +00005972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005973/* confdefs.h. */
5974_ACEOF
5975cat confdefs.h >>conftest.$ac_ext
5976cat >>conftest.$ac_ext <<_ACEOF
5977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005978$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005979int
5980main ()
5981{
5982if ((size_t *) 0)
5983 return 0;
5984if (sizeof (size_t))
5985 return 0;
5986 ;
5987 return 0;
5988}
5989_ACEOF
5990rm -f conftest.$ac_objext
5991if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005992 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005994 grep -v '^ *+' conftest.er1 >conftest.err
5995 rm -f conftest.er1
5996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005999 { ac_try='test -z "$ac_c_werror_flag"
6000 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6002 (eval $ac_try) 2>&5
6003 ac_status=$?
6004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005 (exit $ac_status); }; } &&
6006 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6008 (eval $ac_try) 2>&5
6009 ac_status=$?
6010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6011 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006012 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006013else
Martin v. Löwis11437992002-04-12 09:54:03 +00006014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006015sed 's/^/| /' conftest.$ac_ext >&5
6016
Martin v. Löwis11437992002-04-12 09:54:03 +00006017ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006019rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006020fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006021echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6022echo "${ECHO_T}$ac_cv_type_size_t" >&6
6023if test $ac_cv_type_size_t = yes; then
6024 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025else
Martin v. Löwis11437992002-04-12 09:54:03 +00006026
6027cat >>confdefs.h <<_ACEOF
6028#define size_t unsigned
6029_ACEOF
6030
6031fi
6032
6033echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6034echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6035if test "${ac_cv_type_uid_t+set}" = set; then
6036 echo $ECHO_N "(cached) $ECHO_C" >&6
6037else
6038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006039/* confdefs.h. */
6040_ACEOF
6041cat confdefs.h >>conftest.$ac_ext
6042cat >>conftest.$ac_ext <<_ACEOF
6043/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006045
6046_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006048 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006049 ac_cv_type_uid_t=yes
6050else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006051 ac_cv_type_uid_t=no
6052fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006053rm -f conftest*
6054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006056echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6057echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006058if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006059
Martin v. Löwis11437992002-04-12 09:54:03 +00006060cat >>confdefs.h <<\_ACEOF
6061#define uid_t int
6062_ACEOF
6063
6064
6065cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006067_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006068
6069fi
6070
Jack Jansendd19cf82001-12-06 22:36:17 +00006071
Michael W. Hudson54241132001-12-07 15:38:26 +00006072# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006073# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006074echo "$as_me:$LINENO: checking for int" >&5
6075echo $ECHO_N "checking for int... $ECHO_C" >&6
6076if test "${ac_cv_type_int+set}" = set; then
6077 echo $ECHO_N "(cached) $ECHO_C" >&6
6078else
6079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006085$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006086int
6087main ()
6088{
6089if ((int *) 0)
6090 return 0;
6091if (sizeof (int))
6092 return 0;
6093 ;
6094 return 0;
6095}
6096_ACEOF
6097rm -f conftest.$ac_objext
6098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006099 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006101 grep -v '^ *+' conftest.er1 >conftest.err
6102 rm -f conftest.er1
6103 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006106 { ac_try='test -z "$ac_c_werror_flag"
6107 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6109 (eval $ac_try) 2>&5
6110 ac_status=$?
6111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6112 (exit $ac_status); }; } &&
6113 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6115 (eval $ac_try) 2>&5
6116 ac_status=$?
6117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6118 (exit $ac_status); }; }; then
6119 ac_cv_type_int=yes
6120else
6121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006122sed 's/^/| /' conftest.$ac_ext >&5
6123
Martin v. Löwis11437992002-04-12 09:54:03 +00006124ac_cv_type_int=no
6125fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006127fi
6128echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6129echo "${ECHO_T}$ac_cv_type_int" >&6
6130
6131echo "$as_me:$LINENO: checking size of int" >&5
6132echo $ECHO_N "checking size of int... $ECHO_C" >&6
6133if test "${ac_cv_sizeof_int+set}" = set; then
6134 echo $ECHO_N "(cached) $ECHO_C" >&6
6135else
6136 if test "$ac_cv_type_int" = yes; then
6137 # The cast to unsigned long works around a bug in the HP C Compiler
6138 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6139 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6140 # This bug is HP SR number 8606223364.
6141 if test "$cross_compiling" = yes; then
6142 # Depending upon the size, compute the lo and hi bounds.
6143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006149$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006150int
6151main ()
6152{
6153static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6154test_array [0] = 0
6155
6156 ;
6157 return 0;
6158}
6159_ACEOF
6160rm -f conftest.$ac_objext
6161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006162 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
6165 rm -f conftest.er1
6166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6168 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006169 { ac_try='test -z "$ac_c_werror_flag"
6170 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6172 (eval $ac_try) 2>&5
6173 ac_status=$?
6174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6175 (exit $ac_status); }; } &&
6176 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6178 (eval $ac_try) 2>&5
6179 ac_status=$?
6180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6181 (exit $ac_status); }; }; then
6182 ac_lo=0 ac_mid=0
6183 while :; do
6184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006185/* confdefs.h. */
6186_ACEOF
6187cat confdefs.h >>conftest.$ac_ext
6188cat >>conftest.$ac_ext <<_ACEOF
6189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006191int
6192main ()
6193{
6194static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6195test_array [0] = 0
6196
6197 ;
6198 return 0;
6199}
6200_ACEOF
6201rm -f conftest.$ac_objext
6202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006203 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006205 grep -v '^ *+' conftest.er1 >conftest.err
6206 rm -f conftest.er1
6207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006210 { ac_try='test -z "$ac_c_werror_flag"
6211 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6213 (eval $ac_try) 2>&5
6214 ac_status=$?
6215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6216 (exit $ac_status); }; } &&
6217 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6219 (eval $ac_try) 2>&5
6220 ac_status=$?
6221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6222 (exit $ac_status); }; }; then
6223 ac_hi=$ac_mid; break
6224else
6225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006226sed 's/^/| /' conftest.$ac_ext >&5
6227
Martin v. Löwis11437992002-04-12 09:54:03 +00006228ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 if test $ac_lo -le $ac_mid; then
6230 ac_lo= ac_hi=
6231 break
6232 fi
6233 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006234fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006235rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006236 done
6237else
6238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006239sed 's/^/| /' conftest.$ac_ext >&5
6240
Martin v. Löwis11437992002-04-12 09:54:03 +00006241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006248int
6249main ()
6250{
6251static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6252test_array [0] = 0
6253
6254 ;
6255 return 0;
6256}
6257_ACEOF
6258rm -f conftest.$ac_objext
6259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006262 grep -v '^ *+' conftest.er1 >conftest.err
6263 rm -f conftest.er1
6264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006267 { ac_try='test -z "$ac_c_werror_flag"
6268 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6270 (eval $ac_try) 2>&5
6271 ac_status=$?
6272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6273 (exit $ac_status); }; } &&
6274 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6276 (eval $ac_try) 2>&5
6277 ac_status=$?
6278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6279 (exit $ac_status); }; }; then
6280 ac_hi=-1 ac_mid=-1
6281 while :; do
6282 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006283/* confdefs.h. */
6284_ACEOF
6285cat confdefs.h >>conftest.$ac_ext
6286cat >>conftest.$ac_ext <<_ACEOF
6287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006288$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006289int
6290main ()
6291{
6292static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6293test_array [0] = 0
6294
6295 ;
6296 return 0;
6297}
6298_ACEOF
6299rm -f conftest.$ac_objext
6300if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006301 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006303 grep -v '^ *+' conftest.er1 >conftest.err
6304 rm -f conftest.er1
6305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006308 { ac_try='test -z "$ac_c_werror_flag"
6309 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
6315 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6317 (eval $ac_try) 2>&5
6318 ac_status=$?
6319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320 (exit $ac_status); }; }; then
6321 ac_lo=$ac_mid; break
6322else
6323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006324sed 's/^/| /' conftest.$ac_ext >&5
6325
Martin v. Löwis11437992002-04-12 09:54:03 +00006326ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 if test $ac_mid -le $ac_hi; then
6328 ac_lo= ac_hi=
6329 break
6330 fi
6331 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006332fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006333rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006334 done
6335else
6336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006337sed 's/^/| /' conftest.$ac_ext >&5
6338
Martin v. Löwis11437992002-04-12 09:54:03 +00006339ac_lo= ac_hi=
6340fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006341rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006342fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006343rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006344# Binary search between lo and hi bounds.
6345while test "x$ac_lo" != "x$ac_hi"; do
6346 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006348/* confdefs.h. */
6349_ACEOF
6350cat confdefs.h >>conftest.$ac_ext
6351cat >>conftest.$ac_ext <<_ACEOF
6352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006353$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006354int
6355main ()
6356{
6357static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6358test_array [0] = 0
6359
6360 ;
6361 return 0;
6362}
6363_ACEOF
6364rm -f conftest.$ac_objext
6365if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006366 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006368 grep -v '^ *+' conftest.er1 >conftest.err
6369 rm -f conftest.er1
6370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006373 { ac_try='test -z "$ac_c_werror_flag"
6374 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6376 (eval $ac_try) 2>&5
6377 ac_status=$?
6378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6379 (exit $ac_status); }; } &&
6380 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6382 (eval $ac_try) 2>&5
6383 ac_status=$?
6384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6385 (exit $ac_status); }; }; then
6386 ac_hi=$ac_mid
6387else
6388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006389sed 's/^/| /' conftest.$ac_ext >&5
6390
Martin v. Löwis11437992002-04-12 09:54:03 +00006391ac_lo=`expr '(' $ac_mid ')' + 1`
6392fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006393rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006394done
6395case $ac_lo in
6396?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006397'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6398See \`config.log' for more details." >&5
6399echo "$as_me: error: cannot compute sizeof (int), 77
6400See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006401 { (exit 1); exit 1; }; } ;;
6402esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006403else
6404 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006405 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6406See \`config.log' for more details." >&5
6407echo "$as_me: error: cannot run test program while cross compiling
6408See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006409 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006410else
Martin v. Löwis11437992002-04-12 09:54:03 +00006411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006412/* confdefs.h. */
6413_ACEOF
6414cat confdefs.h >>conftest.$ac_ext
6415cat >>conftest.$ac_ext <<_ACEOF
6416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006417$ac_includes_default
6418long longval () { return (long) (sizeof (int)); }
6419unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006420#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006421#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006422int
6423main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006424{
Martin v. Löwis11437992002-04-12 09:54:03 +00006425
6426 FILE *f = fopen ("conftest.val", "w");
6427 if (! f)
6428 exit (1);
6429 if (((long) (sizeof (int))) < 0)
6430 {
6431 long i = longval ();
6432 if (i != ((long) (sizeof (int))))
6433 exit (1);
6434 fprintf (f, "%ld\n", i);
6435 }
6436 else
6437 {
6438 unsigned long i = ulongval ();
6439 if (i != ((long) (sizeof (int))))
6440 exit (1);
6441 fprintf (f, "%lu\n", i);
6442 }
6443 exit (ferror (f) || fclose (f) != 0);
6444
6445 ;
6446 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006447}
Martin v. Löwis11437992002-04-12 09:54:03 +00006448_ACEOF
6449rm -f conftest$ac_exeext
6450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6451 (eval $ac_link) 2>&5
6452 ac_status=$?
6453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6456 (eval $ac_try) 2>&5
6457 ac_status=$?
6458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6459 (exit $ac_status); }; }; then
6460 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006461else
Martin v. Löwis11437992002-04-12 09:54:03 +00006462 echo "$as_me: program exited with status $ac_status" >&5
6463echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006464sed 's/^/| /' conftest.$ac_ext >&5
6465
Martin v. Löwis11437992002-04-12 09:54:03 +00006466( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006467{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6468See \`config.log' for more details." >&5
6469echo "$as_me: error: cannot compute sizeof (int), 77
6470See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006471 { (exit 1); exit 1; }; }
6472fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006473rm -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 +00006474fi
6475fi
6476rm -f conftest.val
6477else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006478 ac_cv_sizeof_int=0
6479fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006480fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006481echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6482echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6483cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006484#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006485_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006486
6487
Martin v. Löwis11437992002-04-12 09:54:03 +00006488echo "$as_me:$LINENO: checking for long" >&5
6489echo $ECHO_N "checking for long... $ECHO_C" >&6
6490if test "${ac_cv_type_long+set}" = set; then
6491 echo $ECHO_N "(cached) $ECHO_C" >&6
6492else
6493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006494/* confdefs.h. */
6495_ACEOF
6496cat confdefs.h >>conftest.$ac_ext
6497cat >>conftest.$ac_ext <<_ACEOF
6498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006499$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006500int
6501main ()
6502{
6503if ((long *) 0)
6504 return 0;
6505if (sizeof (long))
6506 return 0;
6507 ;
6508 return 0;
6509}
6510_ACEOF
6511rm -f conftest.$ac_objext
6512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006513 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006515 grep -v '^ *+' conftest.er1 >conftest.err
6516 rm -f conftest.er1
6517 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6519 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006520 { ac_try='test -z "$ac_c_werror_flag"
6521 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6523 (eval $ac_try) 2>&5
6524 ac_status=$?
6525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); }; } &&
6527 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6529 (eval $ac_try) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); }; }; then
6533 ac_cv_type_long=yes
6534else
6535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006536sed 's/^/| /' conftest.$ac_ext >&5
6537
Martin v. Löwis11437992002-04-12 09:54:03 +00006538ac_cv_type_long=no
6539fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006540rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006541fi
6542echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6543echo "${ECHO_T}$ac_cv_type_long" >&6
6544
6545echo "$as_me:$LINENO: checking size of long" >&5
6546echo $ECHO_N "checking size of long... $ECHO_C" >&6
6547if test "${ac_cv_sizeof_long+set}" = set; then
6548 echo $ECHO_N "(cached) $ECHO_C" >&6
6549else
6550 if test "$ac_cv_type_long" = yes; then
6551 # The cast to unsigned long works around a bug in the HP C Compiler
6552 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6553 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6554 # This bug is HP SR number 8606223364.
6555 if test "$cross_compiling" = yes; then
6556 # Depending upon the size, compute the lo and hi bounds.
6557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006558/* confdefs.h. */
6559_ACEOF
6560cat confdefs.h >>conftest.$ac_ext
6561cat >>conftest.$ac_ext <<_ACEOF
6562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006563$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006564int
6565main ()
6566{
6567static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6568test_array [0] = 0
6569
6570 ;
6571 return 0;
6572}
6573_ACEOF
6574rm -f conftest.$ac_objext
6575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006578 grep -v '^ *+' conftest.er1 >conftest.err
6579 rm -f conftest.er1
6580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006583 { ac_try='test -z "$ac_c_werror_flag"
6584 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586 (eval $ac_try) 2>&5
6587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); }; } &&
6590 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 ac_lo=0 ac_mid=0
6597 while :; do
6598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006599/* confdefs.h. */
6600_ACEOF
6601cat confdefs.h >>conftest.$ac_ext
6602cat >>conftest.$ac_ext <<_ACEOF
6603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006604$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006605int
6606main ()
6607{
6608static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6609test_array [0] = 0
6610
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext
6616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006617 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006619 grep -v '^ *+' conftest.er1 >conftest.err
6620 rm -f conftest.er1
6621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006624 { ac_try='test -z "$ac_c_werror_flag"
6625 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627 (eval $ac_try) 2>&5
6628 ac_status=$?
6629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630 (exit $ac_status); }; } &&
6631 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633 (eval $ac_try) 2>&5
6634 ac_status=$?
6635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636 (exit $ac_status); }; }; then
6637 ac_hi=$ac_mid; break
6638else
6639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006640sed 's/^/| /' conftest.$ac_ext >&5
6641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006643 if test $ac_lo -le $ac_mid; then
6644 ac_lo= ac_hi=
6645 break
6646 fi
6647 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006648fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006649rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006650 done
6651else
6652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006653sed 's/^/| /' conftest.$ac_ext >&5
6654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006662int
6663main ()
6664{
6665static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6666test_array [0] = 0
6667
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
6673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006676 grep -v '^ *+' conftest.er1 >conftest.err
6677 rm -f conftest.er1
6678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006681 { ac_try='test -z "$ac_c_werror_flag"
6682 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6684 (eval $ac_try) 2>&5
6685 ac_status=$?
6686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6687 (exit $ac_status); }; } &&
6688 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6690 (eval $ac_try) 2>&5
6691 ac_status=$?
6692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6693 (exit $ac_status); }; }; then
6694 ac_hi=-1 ac_mid=-1
6695 while :; do
6696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006697/* confdefs.h. */
6698_ACEOF
6699cat confdefs.h >>conftest.$ac_ext
6700cat >>conftest.$ac_ext <<_ACEOF
6701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006703int
6704main ()
6705{
6706static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6707test_array [0] = 0
6708
6709 ;
6710 return 0;
6711}
6712_ACEOF
6713rm -f conftest.$ac_objext
6714if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006715 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006717 grep -v '^ *+' conftest.er1 >conftest.err
6718 rm -f conftest.er1
6719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6721 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006722 { ac_try='test -z "$ac_c_werror_flag"
6723 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
6729 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6731 (eval $ac_try) 2>&5
6732 ac_status=$?
6733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6734 (exit $ac_status); }; }; then
6735 ac_lo=$ac_mid; break
6736else
6737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006738sed 's/^/| /' conftest.$ac_ext >&5
6739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006741 if test $ac_mid -le $ac_hi; then
6742 ac_lo= ac_hi=
6743 break
6744 fi
6745 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006746fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006748 done
6749else
6750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006751sed 's/^/| /' conftest.$ac_ext >&5
6752
Martin v. Löwis11437992002-04-12 09:54:03 +00006753ac_lo= ac_hi=
6754fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006755rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006756fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006757rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006758# Binary search between lo and hi bounds.
6759while test "x$ac_lo" != "x$ac_hi"; do
6760 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006762/* confdefs.h. */
6763_ACEOF
6764cat confdefs.h >>conftest.$ac_ext
6765cat >>conftest.$ac_ext <<_ACEOF
6766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006768int
6769main ()
6770{
6771static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6772test_array [0] = 0
6773
6774 ;
6775 return 0;
6776}
6777_ACEOF
6778rm -f conftest.$ac_objext
6779if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006780 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006782 grep -v '^ *+' conftest.er1 >conftest.err
6783 rm -f conftest.er1
6784 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006787 { ac_try='test -z "$ac_c_werror_flag"
6788 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6790 (eval $ac_try) 2>&5
6791 ac_status=$?
6792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6793 (exit $ac_status); }; } &&
6794 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6796 (eval $ac_try) 2>&5
6797 ac_status=$?
6798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799 (exit $ac_status); }; }; then
6800 ac_hi=$ac_mid
6801else
6802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006803sed 's/^/| /' conftest.$ac_ext >&5
6804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805ac_lo=`expr '(' $ac_mid ')' + 1`
6806fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006807rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006808done
6809case $ac_lo in
6810?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006811'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6812See \`config.log' for more details." >&5
6813echo "$as_me: error: cannot compute sizeof (long), 77
6814See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006815 { (exit 1); exit 1; }; } ;;
6816esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006817else
6818 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006819 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6820See \`config.log' for more details." >&5
6821echo "$as_me: error: cannot run test program while cross compiling
6822See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006824else
Martin v. Löwis11437992002-04-12 09:54:03 +00006825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* confdefs.h. */
6827_ACEOF
6828cat confdefs.h >>conftest.$ac_ext
6829cat >>conftest.$ac_ext <<_ACEOF
6830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006831$ac_includes_default
6832long longval () { return (long) (sizeof (long)); }
6833unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006834#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006835#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006836int
6837main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006838{
Martin v. Löwis11437992002-04-12 09:54:03 +00006839
6840 FILE *f = fopen ("conftest.val", "w");
6841 if (! f)
6842 exit (1);
6843 if (((long) (sizeof (long))) < 0)
6844 {
6845 long i = longval ();
6846 if (i != ((long) (sizeof (long))))
6847 exit (1);
6848 fprintf (f, "%ld\n", i);
6849 }
6850 else
6851 {
6852 unsigned long i = ulongval ();
6853 if (i != ((long) (sizeof (long))))
6854 exit (1);
6855 fprintf (f, "%lu\n", i);
6856 }
6857 exit (ferror (f) || fclose (f) != 0);
6858
6859 ;
6860 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006861}
Martin v. Löwis11437992002-04-12 09:54:03 +00006862_ACEOF
6863rm -f conftest$ac_exeext
6864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6865 (eval $ac_link) 2>&5
6866 ac_status=$?
6867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6870 (eval $ac_try) 2>&5
6871 ac_status=$?
6872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873 (exit $ac_status); }; }; then
6874 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006875else
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 echo "$as_me: program exited with status $ac_status" >&5
6877echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006878sed 's/^/| /' conftest.$ac_ext >&5
6879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006881{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6882See \`config.log' for more details." >&5
6883echo "$as_me: error: cannot compute sizeof (long), 77
6884See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 { (exit 1); exit 1; }; }
6886fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006887rm -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 +00006888fi
6889fi
6890rm -f conftest.val
6891else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006892 ac_cv_sizeof_long=0
6893fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006894fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006895echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6896echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6897cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006898#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006899_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006900
6901
Martin v. Löwis11437992002-04-12 09:54:03 +00006902echo "$as_me:$LINENO: checking for void *" >&5
6903echo $ECHO_N "checking for void *... $ECHO_C" >&6
6904if test "${ac_cv_type_void_p+set}" = set; then
6905 echo $ECHO_N "(cached) $ECHO_C" >&6
6906else
6907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
6916{
6917if ((void * *) 0)
6918 return 0;
6919if (sizeof (void *))
6920 return 0;
6921 ;
6922 return 0;
6923}
6924_ACEOF
6925rm -f conftest.$ac_objext
6926if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006927 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006929 grep -v '^ *+' conftest.er1 >conftest.err
6930 rm -f conftest.er1
6931 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006934 { ac_try='test -z "$ac_c_werror_flag"
6935 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6937 (eval $ac_try) 2>&5
6938 ac_status=$?
6939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6940 (exit $ac_status); }; } &&
6941 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6943 (eval $ac_try) 2>&5
6944 ac_status=$?
6945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6946 (exit $ac_status); }; }; then
6947 ac_cv_type_void_p=yes
6948else
6949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006950sed 's/^/| /' conftest.$ac_ext >&5
6951
Martin v. Löwis11437992002-04-12 09:54:03 +00006952ac_cv_type_void_p=no
6953fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006954rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006955fi
6956echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6957echo "${ECHO_T}$ac_cv_type_void_p" >&6
6958
6959echo "$as_me:$LINENO: checking size of void *" >&5
6960echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6961if test "${ac_cv_sizeof_void_p+set}" = set; then
6962 echo $ECHO_N "(cached) $ECHO_C" >&6
6963else
6964 if test "$ac_cv_type_void_p" = yes; then
6965 # The cast to unsigned long works around a bug in the HP C Compiler
6966 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6967 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6968 # This bug is HP SR number 8606223364.
6969 if test "$cross_compiling" = yes; then
6970 # Depending upon the size, compute the lo and hi bounds.
6971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006972/* confdefs.h. */
6973_ACEOF
6974cat confdefs.h >>conftest.$ac_ext
6975cat >>conftest.$ac_ext <<_ACEOF
6976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006978int
6979main ()
6980{
6981static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6982test_array [0] = 0
6983
6984 ;
6985 return 0;
6986}
6987_ACEOF
6988rm -f conftest.$ac_objext
6989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006990 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006992 grep -v '^ *+' conftest.er1 >conftest.err
6993 rm -f conftest.er1
6994 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006997 { ac_try='test -z "$ac_c_werror_flag"
6998 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7000 (eval $ac_try) 2>&5
7001 ac_status=$?
7002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7003 (exit $ac_status); }; } &&
7004 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7006 (eval $ac_try) 2>&5
7007 ac_status=$?
7008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7009 (exit $ac_status); }; }; then
7010 ac_lo=0 ac_mid=0
7011 while :; do
7012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007013/* confdefs.h. */
7014_ACEOF
7015cat confdefs.h >>conftest.$ac_ext
7016cat >>conftest.$ac_ext <<_ACEOF
7017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007019int
7020main ()
7021{
7022static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7023test_array [0] = 0
7024
7025 ;
7026 return 0;
7027}
7028_ACEOF
7029rm -f conftest.$ac_objext
7030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007031 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007033 grep -v '^ *+' conftest.er1 >conftest.err
7034 rm -f conftest.er1
7035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7037 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007038 { ac_try='test -z "$ac_c_werror_flag"
7039 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7041 (eval $ac_try) 2>&5
7042 ac_status=$?
7043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044 (exit $ac_status); }; } &&
7045 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047 (eval $ac_try) 2>&5
7048 ac_status=$?
7049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); }; }; then
7051 ac_hi=$ac_mid; break
7052else
7053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007054sed 's/^/| /' conftest.$ac_ext >&5
7055
Martin v. Löwis11437992002-04-12 09:54:03 +00007056ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007057 if test $ac_lo -le $ac_mid; then
7058 ac_lo= ac_hi=
7059 break
7060 fi
7061 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007062fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007063rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007064 done
7065else
7066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007067sed 's/^/| /' conftest.$ac_ext >&5
7068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007070/* confdefs.h. */
7071_ACEOF
7072cat confdefs.h >>conftest.$ac_ext
7073cat >>conftest.$ac_ext <<_ACEOF
7074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007075$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007076int
7077main ()
7078{
7079static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7080test_array [0] = 0
7081
7082 ;
7083 return 0;
7084}
7085_ACEOF
7086rm -f conftest.$ac_objext
7087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007088 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007090 grep -v '^ *+' conftest.er1 >conftest.err
7091 rm -f conftest.er1
7092 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7094 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007095 { ac_try='test -z "$ac_c_werror_flag"
7096 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7098 (eval $ac_try) 2>&5
7099 ac_status=$?
7100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7101 (exit $ac_status); }; } &&
7102 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7104 (eval $ac_try) 2>&5
7105 ac_status=$?
7106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7107 (exit $ac_status); }; }; then
7108 ac_hi=-1 ac_mid=-1
7109 while :; do
7110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* confdefs.h. */
7112_ACEOF
7113cat confdefs.h >>conftest.$ac_ext
7114cat >>conftest.$ac_ext <<_ACEOF
7115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007117int
7118main ()
7119{
7120static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7121test_array [0] = 0
7122
7123 ;
7124 return 0;
7125}
7126_ACEOF
7127rm -f conftest.$ac_objext
7128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007129 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7135 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007136 { ac_try='test -z "$ac_c_werror_flag"
7137 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7143 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7145 (eval $ac_try) 2>&5
7146 ac_status=$?
7147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7148 (exit $ac_status); }; }; then
7149 ac_lo=$ac_mid; break
7150else
7151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007152sed 's/^/| /' conftest.$ac_ext >&5
7153
Martin v. Löwis11437992002-04-12 09:54:03 +00007154ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007155 if test $ac_mid -le $ac_hi; then
7156 ac_lo= ac_hi=
7157 break
7158 fi
7159 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007160fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007162 done
7163else
7164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007165sed 's/^/| /' conftest.$ac_ext >&5
7166
Martin v. Löwis11437992002-04-12 09:54:03 +00007167ac_lo= ac_hi=
7168fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007169rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007170fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007172# Binary search between lo and hi bounds.
7173while test "x$ac_lo" != "x$ac_hi"; do
7174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007176/* confdefs.h. */
7177_ACEOF
7178cat confdefs.h >>conftest.$ac_ext
7179cat >>conftest.$ac_ext <<_ACEOF
7180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007182int
7183main ()
7184{
7185static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7186test_array [0] = 0
7187
7188 ;
7189 return 0;
7190}
7191_ACEOF
7192rm -f conftest.$ac_objext
7193if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007194 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007196 grep -v '^ *+' conftest.er1 >conftest.err
7197 rm -f conftest.er1
7198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007201 { ac_try='test -z "$ac_c_werror_flag"
7202 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7204 (eval $ac_try) 2>&5
7205 ac_status=$?
7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7207 (exit $ac_status); }; } &&
7208 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7210 (eval $ac_try) 2>&5
7211 ac_status=$?
7212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7213 (exit $ac_status); }; }; then
7214 ac_hi=$ac_mid
7215else
7216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007217sed 's/^/| /' conftest.$ac_ext >&5
7218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219ac_lo=`expr '(' $ac_mid ')' + 1`
7220fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007221rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007222done
7223case $ac_lo in
7224?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007225'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7226See \`config.log' for more details." >&5
7227echo "$as_me: error: cannot compute sizeof (void *), 77
7228See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 { (exit 1); exit 1; }; } ;;
7230esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007231else
7232 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007233 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7234See \`config.log' for more details." >&5
7235echo "$as_me: error: cannot run test program while cross compiling
7236See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007238else
Martin v. Löwis11437992002-04-12 09:54:03 +00007239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007245$ac_includes_default
7246long longval () { return (long) (sizeof (void *)); }
7247unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007248#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007249#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250int
7251main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007252{
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254 FILE *f = fopen ("conftest.val", "w");
7255 if (! f)
7256 exit (1);
7257 if (((long) (sizeof (void *))) < 0)
7258 {
7259 long i = longval ();
7260 if (i != ((long) (sizeof (void *))))
7261 exit (1);
7262 fprintf (f, "%ld\n", i);
7263 }
7264 else
7265 {
7266 unsigned long i = ulongval ();
7267 if (i != ((long) (sizeof (void *))))
7268 exit (1);
7269 fprintf (f, "%lu\n", i);
7270 }
7271 exit (ferror (f) || fclose (f) != 0);
7272
7273 ;
7274 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007275}
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
7277rm -f conftest$ac_exeext
7278if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7279 (eval $ac_link) 2>&5
7280 ac_status=$?
7281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7284 (eval $ac_try) 2>&5
7285 ac_status=$?
7286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287 (exit $ac_status); }; }; then
7288 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007289else
Martin v. Löwis11437992002-04-12 09:54:03 +00007290 echo "$as_me: program exited with status $ac_status" >&5
7291echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007292sed 's/^/| /' conftest.$ac_ext >&5
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007295{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7296See \`config.log' for more details." >&5
7297echo "$as_me: error: cannot compute sizeof (void *), 77
7298See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007299 { (exit 1); exit 1; }; }
7300fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007301rm -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 +00007302fi
7303fi
7304rm -f conftest.val
7305else
Guido van Rossumad678af1998-10-02 14:42:15 +00007306 ac_cv_sizeof_void_p=0
7307fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007308fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007309echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7310echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7311cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007312#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007313_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007314
7315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316echo "$as_me:$LINENO: checking for short" >&5
7317echo $ECHO_N "checking for short... $ECHO_C" >&6
7318if test "${ac_cv_type_short+set}" = set; then
7319 echo $ECHO_N "(cached) $ECHO_C" >&6
7320else
7321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007328int
7329main ()
7330{
7331if ((short *) 0)
7332 return 0;
7333if (sizeof (short))
7334 return 0;
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext
7340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007341 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007343 grep -v '^ *+' conftest.er1 >conftest.err
7344 rm -f conftest.er1
7345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7347 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007348 { ac_try='test -z "$ac_c_werror_flag"
7349 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7351 (eval $ac_try) 2>&5
7352 ac_status=$?
7353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7354 (exit $ac_status); }; } &&
7355 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7357 (eval $ac_try) 2>&5
7358 ac_status=$?
7359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360 (exit $ac_status); }; }; then
7361 ac_cv_type_short=yes
7362else
7363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007364sed 's/^/| /' conftest.$ac_ext >&5
7365
Martin v. Löwis11437992002-04-12 09:54:03 +00007366ac_cv_type_short=no
7367fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007368rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007369fi
7370echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7371echo "${ECHO_T}$ac_cv_type_short" >&6
7372
7373echo "$as_me:$LINENO: checking size of short" >&5
7374echo $ECHO_N "checking size of short... $ECHO_C" >&6
7375if test "${ac_cv_sizeof_short+set}" = set; then
7376 echo $ECHO_N "(cached) $ECHO_C" >&6
7377else
7378 if test "$ac_cv_type_short" = yes; then
7379 # The cast to unsigned long works around a bug in the HP C Compiler
7380 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7381 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7382 # This bug is HP SR number 8606223364.
7383 if test "$cross_compiling" = yes; then
7384 # Depending upon the size, compute the lo and hi bounds.
7385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007391$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007392int
7393main ()
7394{
7395static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7396test_array [0] = 0
7397
7398 ;
7399 return 0;
7400}
7401_ACEOF
7402rm -f conftest.$ac_objext
7403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007404 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007406 grep -v '^ *+' conftest.er1 >conftest.err
7407 rm -f conftest.er1
7408 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007411 { ac_try='test -z "$ac_c_werror_flag"
7412 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7414 (eval $ac_try) 2>&5
7415 ac_status=$?
7416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7417 (exit $ac_status); }; } &&
7418 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7420 (eval $ac_try) 2>&5
7421 ac_status=$?
7422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7423 (exit $ac_status); }; }; then
7424 ac_lo=0 ac_mid=0
7425 while :; do
7426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007427/* confdefs.h. */
7428_ACEOF
7429cat confdefs.h >>conftest.$ac_ext
7430cat >>conftest.$ac_ext <<_ACEOF
7431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007432$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007433int
7434main ()
7435{
7436static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7437test_array [0] = 0
7438
7439 ;
7440 return 0;
7441}
7442_ACEOF
7443rm -f conftest.$ac_objext
7444if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007445 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007447 grep -v '^ *+' conftest.er1 >conftest.err
7448 rm -f conftest.er1
7449 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007452 { ac_try='test -z "$ac_c_werror_flag"
7453 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7455 (eval $ac_try) 2>&5
7456 ac_status=$?
7457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7458 (exit $ac_status); }; } &&
7459 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7461 (eval $ac_try) 2>&5
7462 ac_status=$?
7463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464 (exit $ac_status); }; }; then
7465 ac_hi=$ac_mid; break
7466else
7467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007468sed 's/^/| /' conftest.$ac_ext >&5
7469
Martin v. Löwis11437992002-04-12 09:54:03 +00007470ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007471 if test $ac_lo -le $ac_mid; then
7472 ac_lo= ac_hi=
7473 break
7474 fi
7475 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007476fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007477rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 done
7479else
7480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007481sed 's/^/| /' conftest.$ac_ext >&5
7482
Martin v. Löwis11437992002-04-12 09:54:03 +00007483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007489$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007490int
7491main ()
7492{
7493static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7494test_array [0] = 0
7495
7496 ;
7497 return 0;
7498}
7499_ACEOF
7500rm -f conftest.$ac_objext
7501if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007502 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007504 grep -v '^ *+' conftest.er1 >conftest.err
7505 rm -f conftest.er1
7506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007509 { ac_try='test -z "$ac_c_werror_flag"
7510 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7512 (eval $ac_try) 2>&5
7513 ac_status=$?
7514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7515 (exit $ac_status); }; } &&
7516 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7518 (eval $ac_try) 2>&5
7519 ac_status=$?
7520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7521 (exit $ac_status); }; }; then
7522 ac_hi=-1 ac_mid=-1
7523 while :; do
7524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007525/* confdefs.h. */
7526_ACEOF
7527cat confdefs.h >>conftest.$ac_ext
7528cat >>conftest.$ac_ext <<_ACEOF
7529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007530$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007531int
7532main ()
7533{
7534static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7535test_array [0] = 0
7536
7537 ;
7538 return 0;
7539}
7540_ACEOF
7541rm -f conftest.$ac_objext
7542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007550 { ac_try='test -z "$ac_c_werror_flag"
7551 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7557 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7559 (eval $ac_try) 2>&5
7560 ac_status=$?
7561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7562 (exit $ac_status); }; }; then
7563 ac_lo=$ac_mid; break
7564else
7565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007566sed 's/^/| /' conftest.$ac_ext >&5
7567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007569 if test $ac_mid -le $ac_hi; then
7570 ac_lo= ac_hi=
7571 break
7572 fi
7573 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007574fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007575rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 done
7577else
7578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007579sed 's/^/| /' conftest.$ac_ext >&5
7580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581ac_lo= ac_hi=
7582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007585rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007586# Binary search between lo and hi bounds.
7587while test "x$ac_lo" != "x$ac_hi"; do
7588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
7599static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
7607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007608 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007610 grep -v '^ *+' conftest.er1 >conftest.err
7611 rm -f conftest.er1
7612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007615 { ac_try='test -z "$ac_c_werror_flag"
7616 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7618 (eval $ac_try) 2>&5
7619 ac_status=$?
7620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7621 (exit $ac_status); }; } &&
7622 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7624 (eval $ac_try) 2>&5
7625 ac_status=$?
7626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7627 (exit $ac_status); }; }; then
7628 ac_hi=$ac_mid
7629else
7630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007631sed 's/^/| /' conftest.$ac_ext >&5
7632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633ac_lo=`expr '(' $ac_mid ')' + 1`
7634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007636done
7637case $ac_lo in
7638?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007639'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7640See \`config.log' for more details." >&5
7641echo "$as_me: error: cannot compute sizeof (short), 77
7642See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007643 { (exit 1); exit 1; }; } ;;
7644esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007645else
7646 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007647 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7648See \`config.log' for more details." >&5
7649echo "$as_me: error: cannot run test program while cross compiling
7650See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007652else
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007654/* confdefs.h. */
7655_ACEOF
7656cat confdefs.h >>conftest.$ac_ext
7657cat >>conftest.$ac_ext <<_ACEOF
7658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659$ac_includes_default
7660long longval () { return (long) (sizeof (short)); }
7661unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007663#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007664int
7665main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007666{
Martin v. Löwis11437992002-04-12 09:54:03 +00007667
7668 FILE *f = fopen ("conftest.val", "w");
7669 if (! f)
7670 exit (1);
7671 if (((long) (sizeof (short))) < 0)
7672 {
7673 long i = longval ();
7674 if (i != ((long) (sizeof (short))))
7675 exit (1);
7676 fprintf (f, "%ld\n", i);
7677 }
7678 else
7679 {
7680 unsigned long i = ulongval ();
7681 if (i != ((long) (sizeof (short))))
7682 exit (1);
7683 fprintf (f, "%lu\n", i);
7684 }
7685 exit (ferror (f) || fclose (f) != 0);
7686
7687 ;
7688 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007689}
Martin v. Löwis11437992002-04-12 09:54:03 +00007690_ACEOF
7691rm -f conftest$ac_exeext
7692if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7693 (eval $ac_link) 2>&5
7694 ac_status=$?
7695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7697 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7698 (eval $ac_try) 2>&5
7699 ac_status=$?
7700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7701 (exit $ac_status); }; }; then
7702 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007703else
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 echo "$as_me: program exited with status $ac_status" >&5
7705echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007706sed 's/^/| /' conftest.$ac_ext >&5
7707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007709{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7710See \`config.log' for more details." >&5
7711echo "$as_me: error: cannot compute sizeof (short), 77
7712See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 { (exit 1); exit 1; }; }
7714fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007715rm -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 +00007716fi
7717fi
7718rm -f conftest.val
7719else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007720 ac_cv_sizeof_short=0
7721fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007723echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7724echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7725cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007726#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007727_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007728
7729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730echo "$as_me:$LINENO: checking for float" >&5
7731echo $ECHO_N "checking for float... $ECHO_C" >&6
7732if test "${ac_cv_type_float+set}" = set; then
7733 echo $ECHO_N "(cached) $ECHO_C" >&6
7734else
7735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007736/* confdefs.h. */
7737_ACEOF
7738cat confdefs.h >>conftest.$ac_ext
7739cat >>conftest.$ac_ext <<_ACEOF
7740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007742int
7743main ()
7744{
7745if ((float *) 0)
7746 return 0;
7747if (sizeof (float))
7748 return 0;
7749 ;
7750 return 0;
7751}
7752_ACEOF
7753rm -f conftest.$ac_objext
7754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007755 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007757 grep -v '^ *+' conftest.er1 >conftest.err
7758 rm -f conftest.er1
7759 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007762 { ac_try='test -z "$ac_c_werror_flag"
7763 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7765 (eval $ac_try) 2>&5
7766 ac_status=$?
7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768 (exit $ac_status); }; } &&
7769 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7771 (eval $ac_try) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); }; }; then
7775 ac_cv_type_float=yes
7776else
7777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007778sed 's/^/| /' conftest.$ac_ext >&5
7779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780ac_cv_type_float=no
7781fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783fi
7784echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7785echo "${ECHO_T}$ac_cv_type_float" >&6
7786
7787echo "$as_me:$LINENO: checking size of float" >&5
7788echo $ECHO_N "checking size of float... $ECHO_C" >&6
7789if test "${ac_cv_sizeof_float+set}" = set; then
7790 echo $ECHO_N "(cached) $ECHO_C" >&6
7791else
7792 if test "$ac_cv_type_float" = yes; then
7793 # The cast to unsigned long works around a bug in the HP C Compiler
7794 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7795 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7796 # This bug is HP SR number 8606223364.
7797 if test "$cross_compiling" = yes; then
7798 # Depending upon the size, compute the lo and hi bounds.
7799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* confdefs.h. */
7801_ACEOF
7802cat confdefs.h >>conftest.$ac_ext
7803cat >>conftest.$ac_ext <<_ACEOF
7804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007806int
7807main ()
7808{
7809static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7810test_array [0] = 0
7811
7812 ;
7813 return 0;
7814}
7815_ACEOF
7816rm -f conftest.$ac_objext
7817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007818 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007825 { ac_try='test -z "$ac_c_werror_flag"
7826 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007827 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7828 (eval $ac_try) 2>&5
7829 ac_status=$?
7830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7831 (exit $ac_status); }; } &&
7832 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7834 (eval $ac_try) 2>&5
7835 ac_status=$?
7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7837 (exit $ac_status); }; }; then
7838 ac_lo=0 ac_mid=0
7839 while :; do
7840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* confdefs.h. */
7842_ACEOF
7843cat confdefs.h >>conftest.$ac_ext
7844cat >>conftest.$ac_ext <<_ACEOF
7845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007846$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007847int
7848main ()
7849{
7850static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7851test_array [0] = 0
7852
7853 ;
7854 return 0;
7855}
7856_ACEOF
7857rm -f conftest.$ac_objext
7858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007859 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007861 grep -v '^ *+' conftest.er1 >conftest.err
7862 rm -f conftest.er1
7863 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007866 { ac_try='test -z "$ac_c_werror_flag"
7867 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7869 (eval $ac_try) 2>&5
7870 ac_status=$?
7871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7872 (exit $ac_status); }; } &&
7873 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7875 (eval $ac_try) 2>&5
7876 ac_status=$?
7877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7878 (exit $ac_status); }; }; then
7879 ac_hi=$ac_mid; break
7880else
7881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007882sed 's/^/| /' conftest.$ac_ext >&5
7883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007885 if test $ac_lo -le $ac_mid; then
7886 ac_lo= ac_hi=
7887 break
7888 fi
7889 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007890fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007891rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 done
7893else
7894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007895sed 's/^/| /' conftest.$ac_ext >&5
7896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007898/* confdefs.h. */
7899_ACEOF
7900cat confdefs.h >>conftest.$ac_ext
7901cat >>conftest.$ac_ext <<_ACEOF
7902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007903$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007904int
7905main ()
7906{
7907static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7908test_array [0] = 0
7909
7910 ;
7911 return 0;
7912}
7913_ACEOF
7914rm -f conftest.$ac_objext
7915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007916 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007918 grep -v '^ *+' conftest.er1 >conftest.err
7919 rm -f conftest.er1
7920 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007923 { ac_try='test -z "$ac_c_werror_flag"
7924 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7929 (exit $ac_status); }; } &&
7930 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7932 (eval $ac_try) 2>&5
7933 ac_status=$?
7934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7935 (exit $ac_status); }; }; then
7936 ac_hi=-1 ac_mid=-1
7937 while :; do
7938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* confdefs.h. */
7940_ACEOF
7941cat confdefs.h >>conftest.$ac_ext
7942cat >>conftest.$ac_ext <<_ACEOF
7943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007944$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007945int
7946main ()
7947{
7948static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7949test_array [0] = 0
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955rm -f conftest.$ac_objext
7956if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007959 grep -v '^ *+' conftest.er1 >conftest.err
7960 rm -f conftest.er1
7961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7963 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007964 { ac_try='test -z "$ac_c_werror_flag"
7965 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
7971 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7973 (eval $ac_try) 2>&5
7974 ac_status=$?
7975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7976 (exit $ac_status); }; }; then
7977 ac_lo=$ac_mid; break
7978else
7979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007980sed 's/^/| /' conftest.$ac_ext >&5
7981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007983 if test $ac_mid -le $ac_hi; then
7984 ac_lo= ac_hi=
7985 break
7986 fi
7987 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007988fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007989rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 done
7991else
7992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007993sed 's/^/| /' conftest.$ac_ext >&5
7994
Martin v. Löwis11437992002-04-12 09:54:03 +00007995ac_lo= ac_hi=
7996fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007999rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008000# Binary search between lo and hi bounds.
8001while test "x$ac_lo" != "x$ac_hi"; do
8002 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008004/* confdefs.h. */
8005_ACEOF
8006cat confdefs.h >>conftest.$ac_ext
8007cat >>conftest.$ac_ext <<_ACEOF
8008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008009$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
8013static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8014test_array [0] = 0
8015
8016 ;
8017 return 0;
8018}
8019_ACEOF
8020rm -f conftest.$ac_objext
8021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008022 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008029 { ac_try='test -z "$ac_c_werror_flag"
8030 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8032 (eval $ac_try) 2>&5
8033 ac_status=$?
8034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035 (exit $ac_status); }; } &&
8036 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8038 (eval $ac_try) 2>&5
8039 ac_status=$?
8040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041 (exit $ac_status); }; }; then
8042 ac_hi=$ac_mid
8043else
8044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008045sed 's/^/| /' conftest.$ac_ext >&5
8046
Martin v. Löwis11437992002-04-12 09:54:03 +00008047ac_lo=`expr '(' $ac_mid ')' + 1`
8048fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008050done
8051case $ac_lo in
8052?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008053'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8054See \`config.log' for more details." >&5
8055echo "$as_me: error: cannot compute sizeof (float), 77
8056See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 { (exit 1); exit 1; }; } ;;
8058esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008059else
8060 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008061 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8062See \`config.log' for more details." >&5
8063echo "$as_me: error: cannot run test program while cross compiling
8064See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008066else
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008068/* confdefs.h. */
8069_ACEOF
8070cat confdefs.h >>conftest.$ac_ext
8071cat >>conftest.$ac_ext <<_ACEOF
8072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008073$ac_includes_default
8074long longval () { return (long) (sizeof (float)); }
8075unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008076#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008078int
8079main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008080{
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082 FILE *f = fopen ("conftest.val", "w");
8083 if (! f)
8084 exit (1);
8085 if (((long) (sizeof (float))) < 0)
8086 {
8087 long i = longval ();
8088 if (i != ((long) (sizeof (float))))
8089 exit (1);
8090 fprintf (f, "%ld\n", i);
8091 }
8092 else
8093 {
8094 unsigned long i = ulongval ();
8095 if (i != ((long) (sizeof (float))))
8096 exit (1);
8097 fprintf (f, "%lu\n", i);
8098 }
8099 exit (ferror (f) || fclose (f) != 0);
8100
8101 ;
8102 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008103}
Martin v. Löwis11437992002-04-12 09:54:03 +00008104_ACEOF
8105rm -f conftest$ac_exeext
8106if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8107 (eval $ac_link) 2>&5
8108 ac_status=$?
8109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8112 (eval $ac_try) 2>&5
8113 ac_status=$?
8114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8115 (exit $ac_status); }; }; then
8116 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008117else
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 echo "$as_me: program exited with status $ac_status" >&5
8119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
Martin v. Löwis11437992002-04-12 09:54:03 +00008122( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008123{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8124See \`config.log' for more details." >&5
8125echo "$as_me: error: cannot compute sizeof (float), 77
8126See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 { (exit 1); exit 1; }; }
8128fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008129rm -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 +00008130fi
8131fi
8132rm -f conftest.val
8133else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008134 ac_cv_sizeof_float=0
8135fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008136fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008137echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8138echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8139cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008140#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008141_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008142
8143
Martin v. Löwis11437992002-04-12 09:54:03 +00008144echo "$as_me:$LINENO: checking for double" >&5
8145echo $ECHO_N "checking for double... $ECHO_C" >&6
8146if test "${ac_cv_type_double+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8148else
8149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008150/* confdefs.h. */
8151_ACEOF
8152cat confdefs.h >>conftest.$ac_ext
8153cat >>conftest.$ac_ext <<_ACEOF
8154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008155$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008156int
8157main ()
8158{
8159if ((double *) 0)
8160 return 0;
8161if (sizeof (double))
8162 return 0;
8163 ;
8164 return 0;
8165}
8166_ACEOF
8167rm -f conftest.$ac_objext
8168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008169 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008171 grep -v '^ *+' conftest.er1 >conftest.err
8172 rm -f conftest.er1
8173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8175 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008176 { ac_try='test -z "$ac_c_werror_flag"
8177 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8179 (eval $ac_try) 2>&5
8180 ac_status=$?
8181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8182 (exit $ac_status); }; } &&
8183 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8185 (eval $ac_try) 2>&5
8186 ac_status=$?
8187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8188 (exit $ac_status); }; }; then
8189 ac_cv_type_double=yes
8190else
8191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008192sed 's/^/| /' conftest.$ac_ext >&5
8193
Martin v. Löwis11437992002-04-12 09:54:03 +00008194ac_cv_type_double=no
8195fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008196rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008197fi
8198echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8199echo "${ECHO_T}$ac_cv_type_double" >&6
8200
8201echo "$as_me:$LINENO: checking size of double" >&5
8202echo $ECHO_N "checking size of double... $ECHO_C" >&6
8203if test "${ac_cv_sizeof_double+set}" = set; then
8204 echo $ECHO_N "(cached) $ECHO_C" >&6
8205else
8206 if test "$ac_cv_type_double" = yes; then
8207 # The cast to unsigned long works around a bug in the HP C Compiler
8208 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8209 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8210 # This bug is HP SR number 8606223364.
8211 if test "$cross_compiling" = yes; then
8212 # Depending upon the size, compute the lo and hi bounds.
8213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008214/* confdefs.h. */
8215_ACEOF
8216cat confdefs.h >>conftest.$ac_ext
8217cat >>conftest.$ac_ext <<_ACEOF
8218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008219$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008220int
8221main ()
8222{
8223static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8224test_array [0] = 0
8225
8226 ;
8227 return 0;
8228}
8229_ACEOF
8230rm -f conftest.$ac_objext
8231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008232 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008234 grep -v '^ *+' conftest.er1 >conftest.err
8235 rm -f conftest.er1
8236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008239 { ac_try='test -z "$ac_c_werror_flag"
8240 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8242 (eval $ac_try) 2>&5
8243 ac_status=$?
8244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8245 (exit $ac_status); }; } &&
8246 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8248 (eval $ac_try) 2>&5
8249 ac_status=$?
8250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8251 (exit $ac_status); }; }; then
8252 ac_lo=0 ac_mid=0
8253 while :; do
8254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008255/* confdefs.h. */
8256_ACEOF
8257cat confdefs.h >>conftest.$ac_ext
8258cat >>conftest.$ac_ext <<_ACEOF
8259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008260$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008261int
8262main ()
8263{
8264static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8265test_array [0] = 0
8266
8267 ;
8268 return 0;
8269}
8270_ACEOF
8271rm -f conftest.$ac_objext
8272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008273 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008275 grep -v '^ *+' conftest.er1 >conftest.err
8276 rm -f conftest.er1
8277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8279 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008280 { ac_try='test -z "$ac_c_werror_flag"
8281 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8283 (eval $ac_try) 2>&5
8284 ac_status=$?
8285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8286 (exit $ac_status); }; } &&
8287 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8289 (eval $ac_try) 2>&5
8290 ac_status=$?
8291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8292 (exit $ac_status); }; }; then
8293 ac_hi=$ac_mid; break
8294else
8295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008296sed 's/^/| /' conftest.$ac_ext >&5
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008299 if test $ac_lo -le $ac_mid; then
8300 ac_lo= ac_hi=
8301 break
8302 fi
8303 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008304fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 done
8307else
8308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008309sed 's/^/| /' conftest.$ac_ext >&5
8310
Martin v. Löwis11437992002-04-12 09:54:03 +00008311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008312/* confdefs.h. */
8313_ACEOF
8314cat confdefs.h >>conftest.$ac_ext
8315cat >>conftest.$ac_ext <<_ACEOF
8316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008318int
8319main ()
8320{
8321static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8322test_array [0] = 0
8323
8324 ;
8325 return 0;
8326}
8327_ACEOF
8328rm -f conftest.$ac_objext
8329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008330 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008332 grep -v '^ *+' conftest.er1 >conftest.err
8333 rm -f conftest.er1
8334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008337 { ac_try='test -z "$ac_c_werror_flag"
8338 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8340 (eval $ac_try) 2>&5
8341 ac_status=$?
8342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8343 (exit $ac_status); }; } &&
8344 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8346 (eval $ac_try) 2>&5
8347 ac_status=$?
8348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8349 (exit $ac_status); }; }; then
8350 ac_hi=-1 ac_mid=-1
8351 while :; do
8352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008353/* confdefs.h. */
8354_ACEOF
8355cat confdefs.h >>conftest.$ac_ext
8356cat >>conftest.$ac_ext <<_ACEOF
8357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008358$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008359int
8360main ()
8361{
8362static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8363test_array [0] = 0
8364
8365 ;
8366 return 0;
8367}
8368_ACEOF
8369rm -f conftest.$ac_objext
8370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008371 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008373 grep -v '^ *+' conftest.er1 >conftest.err
8374 rm -f conftest.er1
8375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008378 { ac_try='test -z "$ac_c_werror_flag"
8379 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
8385 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8387 (eval $ac_try) 2>&5
8388 ac_status=$?
8389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390 (exit $ac_status); }; }; then
8391 ac_lo=$ac_mid; break
8392else
8393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008394sed 's/^/| /' conftest.$ac_ext >&5
8395
Martin v. Löwis11437992002-04-12 09:54:03 +00008396ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008397 if test $ac_mid -le $ac_hi; then
8398 ac_lo= ac_hi=
8399 break
8400 fi
8401 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008402fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008403rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 done
8405else
8406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008407sed 's/^/| /' conftest.$ac_ext >&5
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409ac_lo= ac_hi=
8410fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008411rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008414# Binary search between lo and hi bounds.
8415while test "x$ac_lo" != "x$ac_hi"; do
8416 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008424int
8425main ()
8426{
8427static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8428test_array [0] = 0
8429
8430 ;
8431 return 0;
8432}
8433_ACEOF
8434rm -f conftest.$ac_objext
8435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008436 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008443 { ac_try='test -z "$ac_c_werror_flag"
8444 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8446 (eval $ac_try) 2>&5
8447 ac_status=$?
8448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); }; } &&
8450 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8452 (eval $ac_try) 2>&5
8453 ac_status=$?
8454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8455 (exit $ac_status); }; }; then
8456 ac_hi=$ac_mid
8457else
8458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008459sed 's/^/| /' conftest.$ac_ext >&5
8460
Martin v. Löwis11437992002-04-12 09:54:03 +00008461ac_lo=`expr '(' $ac_mid ')' + 1`
8462fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008463rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008464done
8465case $ac_lo in
8466?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008467'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8468See \`config.log' for more details." >&5
8469echo "$as_me: error: cannot compute sizeof (double), 77
8470See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 { (exit 1); exit 1; }; } ;;
8472esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008473else
8474 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008475 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8476See \`config.log' for more details." >&5
8477echo "$as_me: error: cannot run test program while cross compiling
8478See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008480else
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008482/* confdefs.h. */
8483_ACEOF
8484cat confdefs.h >>conftest.$ac_ext
8485cat >>conftest.$ac_ext <<_ACEOF
8486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008487$ac_includes_default
8488long longval () { return (long) (sizeof (double)); }
8489unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008490#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008491#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008492int
8493main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008494{
Martin v. Löwis11437992002-04-12 09:54:03 +00008495
8496 FILE *f = fopen ("conftest.val", "w");
8497 if (! f)
8498 exit (1);
8499 if (((long) (sizeof (double))) < 0)
8500 {
8501 long i = longval ();
8502 if (i != ((long) (sizeof (double))))
8503 exit (1);
8504 fprintf (f, "%ld\n", i);
8505 }
8506 else
8507 {
8508 unsigned long i = ulongval ();
8509 if (i != ((long) (sizeof (double))))
8510 exit (1);
8511 fprintf (f, "%lu\n", i);
8512 }
8513 exit (ferror (f) || fclose (f) != 0);
8514
8515 ;
8516 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008517}
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
8519rm -f conftest$ac_exeext
8520if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8521 (eval $ac_link) 2>&5
8522 ac_status=$?
8523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8526 (eval $ac_try) 2>&5
8527 ac_status=$?
8528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8529 (exit $ac_status); }; }; then
8530 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008531else
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 echo "$as_me: program exited with status $ac_status" >&5
8533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008534sed 's/^/| /' conftest.$ac_ext >&5
8535
Martin v. Löwis11437992002-04-12 09:54:03 +00008536( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008537{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8538See \`config.log' for more details." >&5
8539echo "$as_me: error: cannot compute sizeof (double), 77
8540See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 { (exit 1); exit 1; }; }
8542fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008543rm -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 +00008544fi
8545fi
8546rm -f conftest.val
8547else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008548 ac_cv_sizeof_double=0
8549fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008551echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8552echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8553cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008555_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556
8557
Martin v. Löwis11437992002-04-12 09:54:03 +00008558echo "$as_me:$LINENO: checking for fpos_t" >&5
8559echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8560if test "${ac_cv_type_fpos_t+set}" = set; then
8561 echo $ECHO_N "(cached) $ECHO_C" >&6
8562else
8563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008564/* confdefs.h. */
8565_ACEOF
8566cat confdefs.h >>conftest.$ac_ext
8567cat >>conftest.$ac_ext <<_ACEOF
8568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008569$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
8573if ((fpos_t *) 0)
8574 return 0;
8575if (sizeof (fpos_t))
8576 return 0;
8577 ;
8578 return 0;
8579}
8580_ACEOF
8581rm -f conftest.$ac_objext
8582if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008583 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008585 grep -v '^ *+' conftest.er1 >conftest.err
8586 rm -f conftest.er1
8587 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8589 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008590 { ac_try='test -z "$ac_c_werror_flag"
8591 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8593 (eval $ac_try) 2>&5
8594 ac_status=$?
8595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8596 (exit $ac_status); }; } &&
8597 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8599 (eval $ac_try) 2>&5
8600 ac_status=$?
8601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8602 (exit $ac_status); }; }; then
8603 ac_cv_type_fpos_t=yes
8604else
8605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008606sed 's/^/| /' conftest.$ac_ext >&5
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608ac_cv_type_fpos_t=no
8609fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008610rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
8612echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8613echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8614
8615echo "$as_me:$LINENO: checking size of fpos_t" >&5
8616echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8617if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8618 echo $ECHO_N "(cached) $ECHO_C" >&6
8619else
8620 if test "$ac_cv_type_fpos_t" = yes; then
8621 # The cast to unsigned long works around a bug in the HP C Compiler
8622 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8623 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8624 # This bug is HP SR number 8606223364.
8625 if test "$cross_compiling" = yes; then
8626 # Depending upon the size, compute the lo and hi bounds.
8627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008628/* confdefs.h. */
8629_ACEOF
8630cat confdefs.h >>conftest.$ac_ext
8631cat >>conftest.$ac_ext <<_ACEOF
8632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008633$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008634int
8635main ()
8636{
8637static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8638test_array [0] = 0
8639
8640 ;
8641 return 0;
8642}
8643_ACEOF
8644rm -f conftest.$ac_objext
8645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008646 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008648 grep -v '^ *+' conftest.er1 >conftest.err
8649 rm -f conftest.er1
8650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008653 { ac_try='test -z "$ac_c_werror_flag"
8654 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8656 (eval $ac_try) 2>&5
8657 ac_status=$?
8658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8659 (exit $ac_status); }; } &&
8660 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8662 (eval $ac_try) 2>&5
8663 ac_status=$?
8664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8665 (exit $ac_status); }; }; then
8666 ac_lo=0 ac_mid=0
8667 while :; do
8668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008674$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008675int
8676main ()
8677{
8678static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8679test_array [0] = 0
8680
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685rm -f conftest.$ac_objext
8686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008687 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008689 grep -v '^ *+' conftest.er1 >conftest.err
8690 rm -f conftest.er1
8691 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008694 { ac_try='test -z "$ac_c_werror_flag"
8695 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8697 (eval $ac_try) 2>&5
8698 ac_status=$?
8699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8700 (exit $ac_status); }; } &&
8701 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8703 (eval $ac_try) 2>&5
8704 ac_status=$?
8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8706 (exit $ac_status); }; }; then
8707 ac_hi=$ac_mid; break
8708else
8709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008713 if test $ac_lo -le $ac_mid; then
8714 ac_lo= ac_hi=
8715 break
8716 fi
8717 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008718fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008719rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008720 done
8721else
8722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008723sed 's/^/| /' conftest.$ac_ext >&5
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008726/* confdefs.h. */
8727_ACEOF
8728cat confdefs.h >>conftest.$ac_ext
8729cat >>conftest.$ac_ext <<_ACEOF
8730/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008731$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008732int
8733main ()
8734{
8735static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8736test_array [0] = 0
8737
8738 ;
8739 return 0;
8740}
8741_ACEOF
8742rm -f conftest.$ac_objext
8743if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008744 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008746 grep -v '^ *+' conftest.er1 >conftest.err
8747 rm -f conftest.er1
8748 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008751 { ac_try='test -z "$ac_c_werror_flag"
8752 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8754 (eval $ac_try) 2>&5
8755 ac_status=$?
8756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8757 (exit $ac_status); }; } &&
8758 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8760 (eval $ac_try) 2>&5
8761 ac_status=$?
8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8763 (exit $ac_status); }; }; then
8764 ac_hi=-1 ac_mid=-1
8765 while :; do
8766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008767/* confdefs.h. */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
8776static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8777test_array [0] = 0
8778
8779 ;
8780 return 0;
8781}
8782_ACEOF
8783rm -f conftest.$ac_objext
8784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008785 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008787 grep -v '^ *+' conftest.er1 >conftest.err
8788 rm -f conftest.er1
8789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8791 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008792 { ac_try='test -z "$ac_c_werror_flag"
8793 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
8799 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8801 (eval $ac_try) 2>&5
8802 ac_status=$?
8803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8805 ac_lo=$ac_mid; break
8806else
8807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008808sed 's/^/| /' conftest.$ac_ext >&5
8809
Martin v. Löwis11437992002-04-12 09:54:03 +00008810ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008811 if test $ac_mid -le $ac_hi; then
8812 ac_lo= ac_hi=
8813 break
8814 fi
8815 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 done
8819else
8820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008821sed 's/^/| /' conftest.$ac_ext >&5
8822
Martin v. Löwis11437992002-04-12 09:54:03 +00008823ac_lo= ac_hi=
8824fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008825rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008826fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008828# Binary search between lo and hi bounds.
8829while test "x$ac_lo" != "x$ac_hi"; do
8830 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* confdefs.h. */
8833_ACEOF
8834cat confdefs.h >>conftest.$ac_ext
8835cat >>conftest.$ac_ext <<_ACEOF
8836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008838int
8839main ()
8840{
8841static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8842test_array [0] = 0
8843
8844 ;
8845 return 0;
8846}
8847_ACEOF
8848rm -f conftest.$ac_objext
8849if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008850 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 grep -v '^ *+' conftest.er1 >conftest.err
8853 rm -f conftest.er1
8854 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008857 { ac_try='test -z "$ac_c_werror_flag"
8858 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8860 (eval $ac_try) 2>&5
8861 ac_status=$?
8862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8863 (exit $ac_status); }; } &&
8864 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8866 (eval $ac_try) 2>&5
8867 ac_status=$?
8868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8869 (exit $ac_status); }; }; then
8870 ac_hi=$ac_mid
8871else
8872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008873sed 's/^/| /' conftest.$ac_ext >&5
8874
Martin v. Löwis11437992002-04-12 09:54:03 +00008875ac_lo=`expr '(' $ac_mid ')' + 1`
8876fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008877rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008878done
8879case $ac_lo in
8880?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008881'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8882See \`config.log' for more details." >&5
8883echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8884See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 { (exit 1); exit 1; }; } ;;
8886esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008887else
8888 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008889 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8890See \`config.log' for more details." >&5
8891echo "$as_me: error: cannot run test program while cross compiling
8892See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008894else
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* confdefs.h. */
8897_ACEOF
8898cat confdefs.h >>conftest.$ac_ext
8899cat >>conftest.$ac_ext <<_ACEOF
8900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901$ac_includes_default
8902long longval () { return (long) (sizeof (fpos_t)); }
8903unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008904#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008905#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008908{
Martin v. Löwis11437992002-04-12 09:54:03 +00008909
8910 FILE *f = fopen ("conftest.val", "w");
8911 if (! f)
8912 exit (1);
8913 if (((long) (sizeof (fpos_t))) < 0)
8914 {
8915 long i = longval ();
8916 if (i != ((long) (sizeof (fpos_t))))
8917 exit (1);
8918 fprintf (f, "%ld\n", i);
8919 }
8920 else
8921 {
8922 unsigned long i = ulongval ();
8923 if (i != ((long) (sizeof (fpos_t))))
8924 exit (1);
8925 fprintf (f, "%lu\n", i);
8926 }
8927 exit (ferror (f) || fclose (f) != 0);
8928
8929 ;
8930 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008931}
Martin v. Löwis11437992002-04-12 09:54:03 +00008932_ACEOF
8933rm -f conftest$ac_exeext
8934if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8935 (eval $ac_link) 2>&5
8936 ac_status=$?
8937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8940 (eval $ac_try) 2>&5
8941 ac_status=$?
8942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8943 (exit $ac_status); }; }; then
8944 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008945else
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 echo "$as_me: program exited with status $ac_status" >&5
8947echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008948sed 's/^/| /' conftest.$ac_ext >&5
8949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008951{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8952See \`config.log' for more details." >&5
8953echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8954See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 { (exit 1); exit 1; }; }
8956fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957rm -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 +00008958fi
8959fi
8960rm -f conftest.val
8961else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008962 ac_cv_sizeof_fpos_t=0
8963fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008964fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008965echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8966echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8967cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008968#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008969_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008970
Michael W. Hudson54241132001-12-07 15:38:26 +00008971
8972
Martin v. Löwis11437992002-04-12 09:54:03 +00008973echo "$as_me:$LINENO: checking for long long support" >&5
8974echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008975have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* confdefs.h. */
8978_ACEOF
8979cat confdefs.h >>conftest.$ac_ext
8980cat >>conftest.$ac_ext <<_ACEOF
8981/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008982
Martin v. Löwis11437992002-04-12 09:54:03 +00008983int
8984main ()
8985{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008986long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 ;
8988 return 0;
8989}
8990_ACEOF
8991rm -f conftest.$ac_objext
8992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008993 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008995 grep -v '^ *+' conftest.er1 >conftest.err
8996 rm -f conftest.er1
8997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8999 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009000 { ac_try='test -z "$ac_c_werror_flag"
9001 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9003 (eval $ac_try) 2>&5
9004 ac_status=$?
9005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9006 (exit $ac_status); }; } &&
9007 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9009 (eval $ac_try) 2>&5
9010 ac_status=$?
9011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9012 (exit $ac_status); }; }; then
9013
9014
9015cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009016#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009017_ACEOF
9018
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009019 have_long_long=yes
9020
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009023sed 's/^/| /' conftest.$ac_ext >&5
9024
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009025fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009026rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009027echo "$as_me:$LINENO: result: $have_long_long" >&5
9028echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009029if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009030echo "$as_me:$LINENO: checking for long long" >&5
9031echo $ECHO_N "checking for long long... $ECHO_C" >&6
9032if test "${ac_cv_type_long_long+set}" = set; then
9033 echo $ECHO_N "(cached) $ECHO_C" >&6
9034else
9035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009036/* confdefs.h. */
9037_ACEOF
9038cat confdefs.h >>conftest.$ac_ext
9039cat >>conftest.$ac_ext <<_ACEOF
9040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009041$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009042int
9043main ()
9044{
9045if ((long long *) 0)
9046 return 0;
9047if (sizeof (long long))
9048 return 0;
9049 ;
9050 return 0;
9051}
9052_ACEOF
9053rm -f conftest.$ac_objext
9054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009055 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009057 grep -v '^ *+' conftest.er1 >conftest.err
9058 rm -f conftest.er1
9059 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9061 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009062 { ac_try='test -z "$ac_c_werror_flag"
9063 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9065 (eval $ac_try) 2>&5
9066 ac_status=$?
9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9068 (exit $ac_status); }; } &&
9069 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9071 (eval $ac_try) 2>&5
9072 ac_status=$?
9073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9074 (exit $ac_status); }; }; then
9075 ac_cv_type_long_long=yes
9076else
9077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009078sed 's/^/| /' conftest.$ac_ext >&5
9079
Martin v. Löwis11437992002-04-12 09:54:03 +00009080ac_cv_type_long_long=no
9081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009083fi
9084echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9085echo "${ECHO_T}$ac_cv_type_long_long" >&6
9086
9087echo "$as_me:$LINENO: checking size of long long" >&5
9088echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9089if test "${ac_cv_sizeof_long_long+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9091else
9092 if test "$ac_cv_type_long_long" = yes; then
9093 # The cast to unsigned long works around a bug in the HP C Compiler
9094 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9095 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9096 # This bug is HP SR number 8606223364.
9097 if test "$cross_compiling" = yes; then
9098 # Depending upon the size, compute the lo and hi bounds.
9099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009106int
9107main ()
9108{
9109static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9110test_array [0] = 0
9111
9112 ;
9113 return 0;
9114}
9115_ACEOF
9116rm -f conftest.$ac_objext
9117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009118 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009125 { ac_try='test -z "$ac_c_werror_flag"
9126 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9128 (eval $ac_try) 2>&5
9129 ac_status=$?
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); }; } &&
9132 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134 (eval $ac_try) 2>&5
9135 ac_status=$?
9136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137 (exit $ac_status); }; }; then
9138 ac_lo=0 ac_mid=0
9139 while :; do
9140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* confdefs.h. */
9142_ACEOF
9143cat confdefs.h >>conftest.$ac_ext
9144cat >>conftest.$ac_ext <<_ACEOF
9145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009146$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009147int
9148main ()
9149{
9150static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9151test_array [0] = 0
9152
9153 ;
9154 return 0;
9155}
9156_ACEOF
9157rm -f conftest.$ac_objext
9158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009159 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009161 grep -v '^ *+' conftest.er1 >conftest.err
9162 rm -f conftest.er1
9163 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009166 { ac_try='test -z "$ac_c_werror_flag"
9167 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9169 (eval $ac_try) 2>&5
9170 ac_status=$?
9171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9172 (exit $ac_status); }; } &&
9173 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9175 (eval $ac_try) 2>&5
9176 ac_status=$?
9177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9178 (exit $ac_status); }; }; then
9179 ac_hi=$ac_mid; break
9180else
9181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009182sed 's/^/| /' conftest.$ac_ext >&5
9183
Martin v. Löwis11437992002-04-12 09:54:03 +00009184ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009185 if test $ac_lo -le $ac_mid; then
9186 ac_lo= ac_hi=
9187 break
9188 fi
9189 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009190fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009191rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 done
9193else
9194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009195sed 's/^/| /' conftest.$ac_ext >&5
9196
Martin v. Löwis11437992002-04-12 09:54:03 +00009197cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009198/* confdefs.h. */
9199_ACEOF
9200cat confdefs.h >>conftest.$ac_ext
9201cat >>conftest.$ac_ext <<_ACEOF
9202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009203$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009204int
9205main ()
9206{
9207static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9208test_array [0] = 0
9209
9210 ;
9211 return 0;
9212}
9213_ACEOF
9214rm -f conftest.$ac_objext
9215if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009216 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009218 grep -v '^ *+' conftest.er1 >conftest.err
9219 rm -f conftest.er1
9220 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9222 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009223 { ac_try='test -z "$ac_c_werror_flag"
9224 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9226 (eval $ac_try) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); }; } &&
9230 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9232 (eval $ac_try) 2>&5
9233 ac_status=$?
9234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9235 (exit $ac_status); }; }; then
9236 ac_hi=-1 ac_mid=-1
9237 while :; do
9238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009239/* confdefs.h. */
9240_ACEOF
9241cat confdefs.h >>conftest.$ac_ext
9242cat >>conftest.$ac_ext <<_ACEOF
9243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009244$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009245int
9246main ()
9247{
9248static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9249test_array [0] = 0
9250
9251 ;
9252 return 0;
9253}
9254_ACEOF
9255rm -f conftest.$ac_objext
9256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009257 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009259 grep -v '^ *+' conftest.er1 >conftest.err
9260 rm -f conftest.er1
9261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9263 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009264 { ac_try='test -z "$ac_c_werror_flag"
9265 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9267 (eval $ac_try) 2>&5
9268 ac_status=$?
9269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9270 (exit $ac_status); }; } &&
9271 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9273 (eval $ac_try) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); }; }; then
9277 ac_lo=$ac_mid; break
9278else
9279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009280sed 's/^/| /' conftest.$ac_ext >&5
9281
Martin v. Löwis11437992002-04-12 09:54:03 +00009282ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009283 if test $ac_mid -le $ac_hi; then
9284 ac_lo= ac_hi=
9285 break
9286 fi
9287 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009288fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 done
9291else
9292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009293sed 's/^/| /' conftest.$ac_ext >&5
9294
Martin v. Löwis11437992002-04-12 09:54:03 +00009295ac_lo= ac_hi=
9296fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009297rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009298fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009299rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009300# Binary search between lo and hi bounds.
9301while test "x$ac_lo" != "x$ac_hi"; do
9302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009309$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009310int
9311main ()
9312{
9313static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9314test_array [0] = 0
9315
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320rm -f conftest.$ac_objext
9321if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009322 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009324 grep -v '^ *+' conftest.er1 >conftest.err
9325 rm -f conftest.er1
9326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009329 { ac_try='test -z "$ac_c_werror_flag"
9330 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9332 (eval $ac_try) 2>&5
9333 ac_status=$?
9334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9335 (exit $ac_status); }; } &&
9336 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9338 (eval $ac_try) 2>&5
9339 ac_status=$?
9340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9341 (exit $ac_status); }; }; then
9342 ac_hi=$ac_mid
9343else
9344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009345sed 's/^/| /' conftest.$ac_ext >&5
9346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347ac_lo=`expr '(' $ac_mid ')' + 1`
9348fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009349rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009350done
9351case $ac_lo in
9352?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009353'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9354See \`config.log' for more details." >&5
9355echo "$as_me: error: cannot compute sizeof (long long), 77
9356See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 { (exit 1); exit 1; }; } ;;
9358esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009359else
9360 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009361 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9362See \`config.log' for more details." >&5
9363echo "$as_me: error: cannot run test program while cross compiling
9364See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009366else
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009368/* confdefs.h. */
9369_ACEOF
9370cat confdefs.h >>conftest.$ac_ext
9371cat >>conftest.$ac_ext <<_ACEOF
9372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009373$ac_includes_default
9374long longval () { return (long) (sizeof (long long)); }
9375unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009376#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009377#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009378int
9379main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009380{
Martin v. Löwis11437992002-04-12 09:54:03 +00009381
9382 FILE *f = fopen ("conftest.val", "w");
9383 if (! f)
9384 exit (1);
9385 if (((long) (sizeof (long long))) < 0)
9386 {
9387 long i = longval ();
9388 if (i != ((long) (sizeof (long long))))
9389 exit (1);
9390 fprintf (f, "%ld\n", i);
9391 }
9392 else
9393 {
9394 unsigned long i = ulongval ();
9395 if (i != ((long) (sizeof (long long))))
9396 exit (1);
9397 fprintf (f, "%lu\n", i);
9398 }
9399 exit (ferror (f) || fclose (f) != 0);
9400
9401 ;
9402 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009403}
Martin v. Löwis11437992002-04-12 09:54:03 +00009404_ACEOF
9405rm -f conftest$ac_exeext
9406if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9407 (eval $ac_link) 2>&5
9408 ac_status=$?
9409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
9416 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009417else
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 echo "$as_me: program exited with status $ac_status" >&5
9419echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009420sed 's/^/| /' conftest.$ac_ext >&5
9421
Martin v. Löwis11437992002-04-12 09:54:03 +00009422( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009423{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9424See \`config.log' for more details." >&5
9425echo "$as_me: error: cannot compute sizeof (long long), 77
9426See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 { (exit 1); exit 1; }; }
9428fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009429rm -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 +00009430fi
9431fi
9432rm -f conftest.val
9433else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009434 ac_cv_sizeof_long_long=0
9435fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009436fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009437echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9438echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9439cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009440#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009441_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009442
Michael W. Hudson54241132001-12-07 15:38:26 +00009443
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009444fi
9445
Martin v. Löwis11437992002-04-12 09:54:03 +00009446echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9447echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009448have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009450/* confdefs.h. */
9451_ACEOF
9452cat confdefs.h >>conftest.$ac_ext
9453cat >>conftest.$ac_ext <<_ACEOF
9454/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009455
Martin v. Löwis11437992002-04-12 09:54:03 +00009456int
9457main ()
9458{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009459uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ;
9461 return 0;
9462}
9463_ACEOF
9464rm -f conftest.$ac_objext
9465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009466 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009468 grep -v '^ *+' conftest.er1 >conftest.err
9469 rm -f conftest.er1
9470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009473 { ac_try='test -z "$ac_c_werror_flag"
9474 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009475 { (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); }; } &&
9480 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9482 (eval $ac_try) 2>&5
9483 ac_status=$?
9484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9486
9487
9488cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009489#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009490_ACEOF
9491
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009492 have_uintptr_t=yes
9493
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009494else
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009496sed 's/^/| /' conftest.$ac_ext >&5
9497
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009498fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009499rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009500echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9501echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009502if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009503echo "$as_me:$LINENO: checking for uintptr_t" >&5
9504echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9505if test "${ac_cv_type_uintptr_t+set}" = set; then
9506 echo $ECHO_N "(cached) $ECHO_C" >&6
9507else
9508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009509/* confdefs.h. */
9510_ACEOF
9511cat confdefs.h >>conftest.$ac_ext
9512cat >>conftest.$ac_ext <<_ACEOF
9513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009515int
9516main ()
9517{
9518if ((uintptr_t *) 0)
9519 return 0;
9520if (sizeof (uintptr_t))
9521 return 0;
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext
9527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009528 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009530 grep -v '^ *+' conftest.er1 >conftest.err
9531 rm -f conftest.er1
9532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9534 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009535 { ac_try='test -z "$ac_c_werror_flag"
9536 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9538 (eval $ac_try) 2>&5
9539 ac_status=$?
9540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9541 (exit $ac_status); }; } &&
9542 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9544 (eval $ac_try) 2>&5
9545 ac_status=$?
9546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9547 (exit $ac_status); }; }; then
9548 ac_cv_type_uintptr_t=yes
9549else
9550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009551sed 's/^/| /' conftest.$ac_ext >&5
9552
Martin v. Löwis11437992002-04-12 09:54:03 +00009553ac_cv_type_uintptr_t=no
9554fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009556fi
9557echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9558echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9559
9560echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9561echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9562if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9563 echo $ECHO_N "(cached) $ECHO_C" >&6
9564else
9565 if test "$ac_cv_type_uintptr_t" = yes; then
9566 # The cast to unsigned long works around a bug in the HP C Compiler
9567 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9568 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9569 # This bug is HP SR number 8606223364.
9570 if test "$cross_compiling" = yes; then
9571 # Depending upon the size, compute the lo and hi bounds.
9572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009573/* confdefs.h. */
9574_ACEOF
9575cat confdefs.h >>conftest.$ac_ext
9576cat >>conftest.$ac_ext <<_ACEOF
9577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009578$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009579int
9580main ()
9581{
9582static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9583test_array [0] = 0
9584
9585 ;
9586 return 0;
9587}
9588_ACEOF
9589rm -f conftest.$ac_objext
9590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009591 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009593 grep -v '^ *+' conftest.er1 >conftest.err
9594 rm -f conftest.er1
9595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9597 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009598 { ac_try='test -z "$ac_c_werror_flag"
9599 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9601 (eval $ac_try) 2>&5
9602 ac_status=$?
9603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9604 (exit $ac_status); }; } &&
9605 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9607 (eval $ac_try) 2>&5
9608 ac_status=$?
9609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9610 (exit $ac_status); }; }; then
9611 ac_lo=0 ac_mid=0
9612 while :; do
9613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
9623static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
9631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009632 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009634 grep -v '^ *+' conftest.er1 >conftest.err
9635 rm -f conftest.er1
9636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9638 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009639 { ac_try='test -z "$ac_c_werror_flag"
9640 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
9644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9645 (exit $ac_status); }; } &&
9646 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9648 (eval $ac_try) 2>&5
9649 ac_status=$?
9650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651 (exit $ac_status); }; }; then
9652 ac_hi=$ac_mid; break
9653else
9654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009655sed 's/^/| /' conftest.$ac_ext >&5
9656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009658 if test $ac_lo -le $ac_mid; then
9659 ac_lo= ac_hi=
9660 break
9661 fi
9662 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009663fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009664rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 done
9666else
9667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009668sed 's/^/| /' conftest.$ac_ext >&5
9669
Martin v. Löwis11437992002-04-12 09:54:03 +00009670cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
9680static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9681test_array [0] = 0
9682
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
9688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009689 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009691 grep -v '^ *+' conftest.er1 >conftest.err
9692 rm -f conftest.er1
9693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9695 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009696 { ac_try='test -z "$ac_c_werror_flag"
9697 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9699 (eval $ac_try) 2>&5
9700 ac_status=$?
9701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9702 (exit $ac_status); }; } &&
9703 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9705 (eval $ac_try) 2>&5
9706 ac_status=$?
9707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708 (exit $ac_status); }; }; then
9709 ac_hi=-1 ac_mid=-1
9710 while :; do
9711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009712/* confdefs.h. */
9713_ACEOF
9714cat confdefs.h >>conftest.$ac_ext
9715cat >>conftest.$ac_ext <<_ACEOF
9716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009718int
9719main ()
9720{
9721static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9722test_array [0] = 0
9723
9724 ;
9725 return 0;
9726}
9727_ACEOF
9728rm -f conftest.$ac_objext
9729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009732 grep -v '^ *+' conftest.er1 >conftest.err
9733 rm -f conftest.er1
9734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9736 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009737 { ac_try='test -z "$ac_c_werror_flag"
9738 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9740 (eval $ac_try) 2>&5
9741 ac_status=$?
9742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743 (exit $ac_status); }; } &&
9744 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9746 (eval $ac_try) 2>&5
9747 ac_status=$?
9748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9749 (exit $ac_status); }; }; then
9750 ac_lo=$ac_mid; break
9751else
9752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009753sed 's/^/| /' conftest.$ac_ext >&5
9754
Martin v. Löwis11437992002-04-12 09:54:03 +00009755ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009756 if test $ac_mid -le $ac_hi; then
9757 ac_lo= ac_hi=
9758 break
9759 fi
9760 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009761fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009762rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 done
9764else
9765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009766sed 's/^/| /' conftest.$ac_ext >&5
9767
Martin v. Löwis11437992002-04-12 09:54:03 +00009768ac_lo= ac_hi=
9769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009771fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009773# Binary search between lo and hi bounds.
9774while test "x$ac_lo" != "x$ac_hi"; do
9775 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009777/* confdefs.h. */
9778_ACEOF
9779cat confdefs.h >>conftest.$ac_ext
9780cat >>conftest.$ac_ext <<_ACEOF
9781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009783int
9784main ()
9785{
9786static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9787test_array [0] = 0
9788
9789 ;
9790 return 0;
9791}
9792_ACEOF
9793rm -f conftest.$ac_objext
9794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009795 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009797 grep -v '^ *+' conftest.er1 >conftest.err
9798 rm -f conftest.er1
9799 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009802 { ac_try='test -z "$ac_c_werror_flag"
9803 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9808 (exit $ac_status); }; } &&
9809 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9811 (eval $ac_try) 2>&5
9812 ac_status=$?
9813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814 (exit $ac_status); }; }; then
9815 ac_hi=$ac_mid
9816else
9817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009818sed 's/^/| /' conftest.$ac_ext >&5
9819
Martin v. Löwis11437992002-04-12 09:54:03 +00009820ac_lo=`expr '(' $ac_mid ')' + 1`
9821fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009822rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009823done
9824case $ac_lo in
9825?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009826'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9827See \`config.log' for more details." >&5
9828echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9829See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 { (exit 1); exit 1; }; } ;;
9831esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009832else
9833 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009834 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9835See \`config.log' for more details." >&5
9836echo "$as_me: error: cannot run test program while cross compiling
9837See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009839else
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* confdefs.h. */
9842_ACEOF
9843cat confdefs.h >>conftest.$ac_ext
9844cat >>conftest.$ac_ext <<_ACEOF
9845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009846$ac_includes_default
9847long longval () { return (long) (sizeof (uintptr_t)); }
9848unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009850#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009851int
9852main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009853{
Martin v. Löwis11437992002-04-12 09:54:03 +00009854
9855 FILE *f = fopen ("conftest.val", "w");
9856 if (! f)
9857 exit (1);
9858 if (((long) (sizeof (uintptr_t))) < 0)
9859 {
9860 long i = longval ();
9861 if (i != ((long) (sizeof (uintptr_t))))
9862 exit (1);
9863 fprintf (f, "%ld\n", i);
9864 }
9865 else
9866 {
9867 unsigned long i = ulongval ();
9868 if (i != ((long) (sizeof (uintptr_t))))
9869 exit (1);
9870 fprintf (f, "%lu\n", i);
9871 }
9872 exit (ferror (f) || fclose (f) != 0);
9873
9874 ;
9875 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009876}
Martin v. Löwis11437992002-04-12 09:54:03 +00009877_ACEOF
9878rm -f conftest$ac_exeext
9879if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9880 (eval $ac_link) 2>&5
9881 ac_status=$?
9882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9885 (eval $ac_try) 2>&5
9886 ac_status=$?
9887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9888 (exit $ac_status); }; }; then
9889 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009890else
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 echo "$as_me: program exited with status $ac_status" >&5
9892echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009893sed 's/^/| /' conftest.$ac_ext >&5
9894
Martin v. Löwis11437992002-04-12 09:54:03 +00009895( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009896{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9897See \`config.log' for more details." >&5
9898echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9899See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 { (exit 1); exit 1; }; }
9901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009902rm -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 +00009903fi
9904fi
9905rm -f conftest.val
9906else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009907 ac_cv_sizeof_uintptr_t=0
9908fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009910echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9911echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9912cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009913#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009915
Michael W. Hudson54241132001-12-07 15:38:26 +00009916
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009917fi
9918
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009919# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009920echo "$as_me:$LINENO: checking size of off_t" >&5
9921echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9922if test "${ac_cv_sizeof_off_t+set}" = set; then
9923 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009924else
9925 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009926 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009927else
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* confdefs.h. */
9930_ACEOF
9931cat confdefs.h >>conftest.$ac_ext
9932cat >>conftest.$ac_ext <<_ACEOF
9933/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009934#include <stdio.h>
9935#include <sys/types.h>
9936main()
9937{
9938 FILE *f=fopen("conftestval", "w");
9939 if (!f) exit(1);
9940 fprintf(f, "%d\n", sizeof(off_t));
9941 exit(0);
9942}
Martin v. Löwis11437992002-04-12 09:54:03 +00009943_ACEOF
9944rm -f conftest$ac_exeext
9945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9946 (eval $ac_link) 2>&5
9947 ac_status=$?
9948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9949 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9951 (eval $ac_try) 2>&5
9952 ac_status=$?
9953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9954 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009955 ac_cv_sizeof_off_t=`cat conftestval`
9956else
Martin v. Löwis11437992002-04-12 09:54:03 +00009957 echo "$as_me: program exited with status $ac_status" >&5
9958echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009959sed 's/^/| /' conftest.$ac_ext >&5
9960
Martin v. Löwis11437992002-04-12 09:54:03 +00009961( exit $ac_status )
9962ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009963fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009964rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009965fi
9966
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009967fi
9968
Martin v. Löwis11437992002-04-12 09:54:03 +00009969echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9970echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9971
9972cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009973#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009974_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009975
Michael W. Hudson54241132001-12-07 15:38:26 +00009976
Martin v. Löwis11437992002-04-12 09:54:03 +00009977echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9978echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009979if test "$have_long_long" = yes -a \
9980 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9981 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009982
Martin v. Löwis11437992002-04-12 09:54:03 +00009983cat >>confdefs.h <<\_ACEOF
9984#define HAVE_LARGEFILE_SUPPORT 1
9985_ACEOF
9986
9987 echo "$as_me:$LINENO: result: yes" >&5
9988echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009989else
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 echo "$as_me:$LINENO: result: no" >&5
9991echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009992fi
9993
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009994# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009995echo "$as_me:$LINENO: checking size of time_t" >&5
9996echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9997if test "${ac_cv_sizeof_time_t+set}" = set; then
9998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009999else
10000 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010001 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010004/* confdefs.h. */
10005_ACEOF
10006cat confdefs.h >>conftest.$ac_ext
10007cat >>conftest.$ac_ext <<_ACEOF
10008/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010009#include <stdio.h>
10010#include <time.h>
10011main()
10012{
10013 FILE *f=fopen("conftestval", "w");
10014 if (!f) exit(1);
10015 fprintf(f, "%d\n", sizeof(time_t));
10016 exit(0);
10017}
Martin v. Löwis11437992002-04-12 09:54:03 +000010018_ACEOF
10019rm -f conftest$ac_exeext
10020if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10021 (eval $ac_link) 2>&5
10022 ac_status=$?
10023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10026 (eval $ac_try) 2>&5
10027 ac_status=$?
10028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10029 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010030 ac_cv_sizeof_time_t=`cat conftestval`
10031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 echo "$as_me: program exited with status $ac_status" >&5
10033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010034sed 's/^/| /' conftest.$ac_ext >&5
10035
Martin v. Löwis11437992002-04-12 09:54:03 +000010036( exit $ac_status )
10037ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010038fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010039rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010040fi
10041
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010042fi
10043
Martin v. Löwis11437992002-04-12 09:54:03 +000010044echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10045echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10046
10047cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010048#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010049_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010050
Michael W. Hudson54241132001-12-07 15:38:26 +000010051
10052
Trent Mick635f6fb2000-08-23 21:33:05 +000010053# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010054ac_save_cc="$CC"
10055if test "$ac_cv_kpthread" = "yes"
10056then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010057elif test "$ac_cv_kthread" = "yes"
10058then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010059elif test "$ac_cv_pthread" = "yes"
10060then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010062echo "$as_me:$LINENO: checking for pthread_t" >&5
10063echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010064have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* confdefs.h. */
10067_ACEOF
10068cat confdefs.h >>conftest.$ac_ext
10069cat >>conftest.$ac_ext <<_ACEOF
10070/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010071#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010072int
10073main ()
10074{
Guido van Rossum12580492000-09-24 16:47:19 +000010075pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ;
10077 return 0;
10078}
10079_ACEOF
10080rm -f conftest.$ac_objext
10081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010084 grep -v '^ *+' conftest.er1 >conftest.err
10085 rm -f conftest.er1
10086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10088 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010089 { ac_try='test -z "$ac_c_werror_flag"
10090 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
10096 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10098 (eval $ac_try) 2>&5
10099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010102 have_pthread_t=yes
10103else
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010105sed 's/^/| /' conftest.$ac_ext >&5
10106
Trent Mick635f6fb2000-08-23 21:33:05 +000010107fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010108rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010109echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10110echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010111if test "$have_pthread_t" = yes ; then
10112 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10114echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10115 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10116 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010117else
10118 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010119 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* confdefs.h. */
10123_ACEOF
10124cat confdefs.h >>conftest.$ac_ext
10125cat >>conftest.$ac_ext <<_ACEOF
10126/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010127#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010128#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010129 main()
10130 {
10131 FILE *f=fopen("conftestval", "w");
10132 if (!f) exit(1);
10133 fprintf(f, "%d\n", sizeof(pthread_t));
10134 exit(0);
10135 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
10137rm -f conftest$ac_exeext
10138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10139 (eval $ac_link) 2>&5
10140 ac_status=$?
10141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144 (eval $ac_try) 2>&5
10145 ac_status=$?
10146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010148 ac_cv_sizeof_pthread_t=`cat conftestval`
10149else
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 echo "$as_me: program exited with status $ac_status" >&5
10151echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010152sed 's/^/| /' conftest.$ac_ext >&5
10153
Martin v. Löwis11437992002-04-12 09:54:03 +000010154( exit $ac_status )
10155ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010157rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010158fi
10159
Trent Mick635f6fb2000-08-23 21:33:05 +000010160fi
10161
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10163echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10164
10165cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010166#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010168
10169fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010170CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010171
Martin v. Löwis11437992002-04-12 09:54:03 +000010172echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10173echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010174# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10175if test "${enable_toolbox_glue+set}" = set; then
10176 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010177
Martin v. Löwis11437992002-04-12 09:54:03 +000010178fi;
Jack Jansene578a632001-08-15 01:27:14 +000010179
10180if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010181then
Jack Jansene578a632001-08-15 01:27:14 +000010182 case $ac_sys_system/$ac_sys_release in
10183 Darwin/*)
10184 enable_toolbox_glue="yes";;
10185 *)
10186 enable_toolbox_glue="no";;
10187 esac
10188fi
10189case "$enable_toolbox_glue" in
10190yes)
Jack Jansene578a632001-08-15 01:27:14 +000010191 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010192 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
10194cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010195#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010196_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010197
10198 ;;
10199*)
Jack Jansene578a632001-08-15 01:27:14 +000010200 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010201 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010202 ;;
10203esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010204echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10205echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010206
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010207
10208case $ac_sys_system/$ac_sys_release in
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010209 Darwin/[01234567].*)
10210 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
10211 ;;
10212 Darwin/*)
10213 OTHER_LIBTOOL_OPT=""
10214 ;;
10215esac
10216
10217
10218case $ac_sys_system/$ac_sys_release in
10219 Darwin/[01234567].*)
10220 LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010223 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000010224 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
10225 if test ${gcc_version} '<' 4.0
10226 then
10227 LIBTOOL_CRUFT="-lcc_dynamic"
10228 else
10229 LIBTOOL_CRUFT=""
10230 fi
10231 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
Jack Jansenb36687a2004-07-16 08:43:47 +000010232 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010233 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010234esac
10235
Martin v. Löwis11437992002-04-12 09:54:03 +000010236echo "$as_me:$LINENO: checking for --enable-framework" >&5
10237echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010238if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010239then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010240 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010242 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010243
Martin v. Löwis11437992002-04-12 09:54:03 +000010244cat >>confdefs.h <<\_ACEOF
10245#define WITH_NEXT_FRAMEWORK 1
10246_ACEOF
10247
10248 echo "$as_me:$LINENO: result: yes" >&5
10249echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010250else
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 echo "$as_me:$LINENO: result: no" >&5
10252echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010253fi
10254
Martin v. Löwis11437992002-04-12 09:54:03 +000010255echo "$as_me:$LINENO: checking for dyld" >&5
10256echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010257case $ac_sys_system/$ac_sys_release in
10258 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010259
Martin v. Löwis11437992002-04-12 09:54:03 +000010260cat >>confdefs.h <<\_ACEOF
10261#define WITH_DYLD 1
10262_ACEOF
10263
10264 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10265echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010266 ;;
10267 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 echo "$as_me:$LINENO: result: no" >&5
10269echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010270 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010271esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010272
Guido van Rossum0a516c91994-09-12 10:58:40 +000010273# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010274
Michael W. Hudson54241132001-12-07 15:38:26 +000010275
10276
10277
10278
Guido van Rossum0a516c91994-09-12 10:58:40 +000010279# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010280# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010281echo "$as_me:$LINENO: checking SO" >&5
10282echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010283if test -z "$SO"
10284then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010285 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010286 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010287 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010288 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010289 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010290else
10291 # this might also be a termcap variable, see #610332
10292 echo
10293 echo '====================================================================='
10294 echo '+ +'
10295 echo '+ WARNING: You have set SO in your environment. +'
10296 echo '+ Do you really mean to change the extension for shared libraries? +'
10297 echo '+ Continuing in 10 seconds to let you to ponder. +'
10298 echo '+ +'
10299 echo '====================================================================='
10300 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010301fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010302echo "$as_me:$LINENO: result: $SO" >&5
10303echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010304# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010305# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010306# (Shared libraries in this instance are shared modules to be loaded into
10307# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010308echo "$as_me:$LINENO: checking LDSHARED" >&5
10309echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010310if test -z "$LDSHARED"
10311then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010312 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010313 AIX*)
10314 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010315 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010316 ;;
10317 BeOS*)
10318 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010319 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010320 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010321 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010322 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010324 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010325 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010326 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010327 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010328 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010329 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010330 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010331 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10332 if test "$enable_framework" ; then
10333 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010334 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10335 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010336 else
10337 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010338 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010339 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010340 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010341 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10342 if test "$enable_framework" ; then
10343 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010344 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10345 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010346 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010347 # No framework, use the Python app as bundle-loader
10348 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010349 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010350 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010351 Darwin/*)
10352 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10353 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010354 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010355 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010356 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010357 then
10358 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10359 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010360 else
10361 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10362 if test "$enable_framework" ; then
10363 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010364 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10365 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010366 else
10367 # No framework, use the Python app as bundle-loader
10368 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10369 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10370 fi
10371 fi
10372 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010373 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010374 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010375 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010376 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010377 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010378 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010379 else
10380 LDSHARED="ld -Bshareable ${LDFLAGS}"
10381 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010382 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010383 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010384 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010385 then LDSHARED='$(CC) -shared'
10386 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010387 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010388 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010389 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010390 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010391 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010392 *) LDSHARED="ld";;
10393 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010395echo "$as_me:$LINENO: result: $LDSHARED" >&5
10396echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010397BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010398# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010399# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010400echo "$as_me:$LINENO: checking CCSHARED" >&5
10401echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010402if test -z "$CCSHARED"
10403then
Guido van Rossum07397971997-04-29 21:49:50 +000010404 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010405 SunOS*) if test "$GCC" = yes;
10406 then CCSHARED="-fPIC";
10407 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010408 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010409 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010410 else CCSHARED="+z";
10411 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010412 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010413 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010414 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010415 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010416 if test "$GCC" = "yes"
10417 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010418 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010419 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010420 SCO_SV*)
10421 if test "$GCC" = "yes"
10422 then CCSHARED="-fPIC"
10423 else CCSHARED="-Kpic -belf"
10424 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010425 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010426 IRIX*/6*) case $CC in
10427 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010428 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010429 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010430 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010431 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010432fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010433echo "$as_me:$LINENO: result: $CCSHARED" >&5
10434echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010435# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010436# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010437echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10438echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010439if test -z "$LINKFORSHARED"
10440then
Guido van Rossum07397971997-04-29 21:49:50 +000010441 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010442 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010443 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010444 LINKFORSHARED="-Wl,-E -Wl,+s";;
10445# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010446 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010447 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010448 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010450 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10451 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010452 # not used by the core itself but which needs to be in the core so
10453 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010454 # -prebind is no longer used, because it actually seems to give a
10455 # slowdown in stead of a speedup, maybe due to the large number of
10456 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010457
10458 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010459 if test "$enable_framework"
10460 then
Jack Jansenda49e192005-01-07 13:08:22 +000010461 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010462 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010463 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010464 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010465 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010466 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010468 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10469 then
10470 LINKFORSHARED="-Wl,--export-dynamic"
10471 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010472 SunOS/5*) case $CC in
10473 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010474 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010475 then
10476 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010477 fi;;
10478 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010479 CYGWIN*)
10480 if test $enable_shared = "no"
10481 then
10482 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10483 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010484 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010486echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10487echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010488
Michael W. Hudson54241132001-12-07 15:38:26 +000010489
Martin v. Löwis11437992002-04-12 09:54:03 +000010490echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10491echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010492if test ! "$LIBRARY" = "$LDLIBRARY"
10493then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010494 case $ac_sys_system in
10495 CYGWIN*)
10496 # Cygwin needs CCSHARED when building extension DLLs
10497 # but not when building the interpreter DLL.
10498 CFLAGSFORSHARED='';;
10499 *)
10500 CFLAGSFORSHARED='$(CCSHARED)'
10501 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010502fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010503echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10504echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010505
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010506# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10507# library (with --enable-shared).
10508# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010509# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10510# if it is not required, since it creates a dependency of the shared library
10511# to LIBS. This, in turn, means that applications linking the shared libpython
10512# don't need to link LIBS explicitly. The default should be only changed
10513# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010514
10515echo "$as_me:$LINENO: checking SHLIBS" >&5
10516echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10517case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010518 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010519 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010520esac
10521echo "$as_me:$LINENO: result: $SHLIBS" >&5
10522echo "${ECHO_T}$SHLIBS" >&6
10523
10524
Guido van Rossum627b2d71993-12-24 10:39:16 +000010525# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010526
10527echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10528echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10529if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010533LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* confdefs.h. */
10536_ACEOF
10537cat confdefs.h >>conftest.$ac_ext
10538cat >>conftest.$ac_ext <<_ACEOF
10539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010541/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010542#ifdef __cplusplus
10543extern "C"
10544#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010545/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 builtin and then its argument prototype would still apply. */
10547char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010548int
10549main ()
10550{
10551dlopen ();
10552 ;
10553 return 0;
10554}
10555_ACEOF
10556rm -f conftest.$ac_objext conftest$ac_exeext
10557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010558 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010560 grep -v '^ *+' conftest.er1 >conftest.err
10561 rm -f conftest.er1
10562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10564 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010565 { ac_try='test -z "$ac_c_werror_flag"
10566 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10568 (eval $ac_try) 2>&5
10569 ac_status=$?
10570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10571 (exit $ac_status); }; } &&
10572 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10574 (eval $ac_try) 2>&5
10575 ac_status=$?
10576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10577 (exit $ac_status); }; }; then
10578 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010581sed 's/^/| /' conftest.$ac_ext >&5
10582
Martin v. Löwis11437992002-04-12 09:54:03 +000010583ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010585rm -f conftest.err conftest.$ac_objext \
10586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010587LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010589echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10590echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10591if test $ac_cv_lib_dl_dlopen = yes; then
10592 cat >>confdefs.h <<_ACEOF
10593#define HAVE_LIBDL 1
10594_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010595
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010596 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010598fi
10599 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010600
10601echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10602echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10603if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010605else
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010607LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* confdefs.h. */
10610_ACEOF
10611cat confdefs.h >>conftest.$ac_ext
10612cat >>conftest.$ac_ext <<_ACEOF
10613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010614
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010615/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010616#ifdef __cplusplus
10617extern "C"
10618#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010619/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010620 builtin and then its argument prototype would still apply. */
10621char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
10625shl_load ();
10626 ;
10627 return 0;
10628}
10629_ACEOF
10630rm -f conftest.$ac_objext conftest$ac_exeext
10631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010632 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010634 grep -v '^ *+' conftest.er1 >conftest.err
10635 rm -f conftest.er1
10636 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10638 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010639 { ac_try='test -z "$ac_c_werror_flag"
10640 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10642 (eval $ac_try) 2>&5
10643 ac_status=$?
10644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10645 (exit $ac_status); }; } &&
10646 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10648 (eval $ac_try) 2>&5
10649 ac_status=$?
10650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10651 (exit $ac_status); }; }; then
10652 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653else
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010655sed 's/^/| /' conftest.$ac_ext >&5
10656
Martin v. Löwis11437992002-04-12 09:54:03 +000010657ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010658fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010659rm -f conftest.err conftest.$ac_objext \
10660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010661LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010662fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010663echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10664echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10665if test $ac_cv_lib_dld_shl_load = yes; then
10666 cat >>confdefs.h <<_ACEOF
10667#define HAVE_LIBDLD 1
10668_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010670 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672fi
10673 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010674
10675# only check for sem_ini if thread support is requested
10676if test "$with_threads" = "yes" -o -z "$with_threads"; then
10677 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010678echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10679if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010681else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010682 ac_func_search_save_LIBS=$LIBS
10683ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* confdefs.h. */
10686_ACEOF
10687cat confdefs.h >>conftest.$ac_ext
10688cat >>conftest.$ac_ext <<_ACEOF
10689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010691/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010692#ifdef __cplusplus
10693extern "C"
10694#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010695/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 builtin and then its argument prototype would still apply. */
10697char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010698int
10699main ()
10700{
10701sem_init ();
10702 ;
10703 return 0;
10704}
10705_ACEOF
10706rm -f conftest.$ac_objext conftest$ac_exeext
10707if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010708 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010710 grep -v '^ *+' conftest.er1 >conftest.err
10711 rm -f conftest.er1
10712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010715 { ac_try='test -z "$ac_c_werror_flag"
10716 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10718 (eval $ac_try) 2>&5
10719 ac_status=$?
10720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10721 (exit $ac_status); }; } &&
10722 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010728 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010729else
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010731sed 's/^/| /' conftest.$ac_ext >&5
10732
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010733fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010734rm -f conftest.err conftest.$ac_objext \
10735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010736if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010737 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010738 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* confdefs.h. */
10741_ACEOF
10742cat confdefs.h >>conftest.$ac_ext
10743cat >>conftest.$ac_ext <<_ACEOF
10744/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010745
10746/* Override any gcc2 internal prototype to avoid an error. */
10747#ifdef __cplusplus
10748extern "C"
10749#endif
10750/* We use char because int might match the return type of a gcc2
10751 builtin and then its argument prototype would still apply. */
10752char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010753int
10754main ()
10755{
10756sem_init ();
10757 ;
10758 return 0;
10759}
Martin v. Löwis11437992002-04-12 09:54:03 +000010760_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010761rm -f conftest.$ac_objext conftest$ac_exeext
10762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010763 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010765 grep -v '^ *+' conftest.er1 >conftest.err
10766 rm -f conftest.er1
10767 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10769 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010770 { ac_try='test -z "$ac_c_werror_flag"
10771 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10773 (eval $ac_try) 2>&5
10774 ac_status=$?
10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776 (exit $ac_status); }; } &&
10777 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10780 ac_status=$?
10781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 ac_cv_search_sem_init="-l$ac_lib"
10784break
10785else
10786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010787sed 's/^/| /' conftest.$ac_ext >&5
10788
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010789fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010790rm -f conftest.err conftest.$ac_objext \
10791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010792 done
10793fi
10794LIBS=$ac_func_search_save_LIBS
10795fi
10796echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10797echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10798if test "$ac_cv_search_sem_init" != no; then
10799 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010800
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010801fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010802 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010803 # posix4 on Solaris 2.6
10804 # pthread (first!) on Linux
10805fi
10806
Martin v. Löwis19d17342003-06-14 21:03:05 +000010807# check if we need libintl for locale functions
10808echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10809echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10810if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10811 echo $ECHO_N "(cached) $ECHO_C" >&6
10812else
10813 ac_check_lib_save_LIBS=$LIBS
10814LIBS="-lintl $LIBS"
10815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010816/* confdefs.h. */
10817_ACEOF
10818cat confdefs.h >>conftest.$ac_ext
10819cat >>conftest.$ac_ext <<_ACEOF
10820/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010821
10822/* Override any gcc2 internal prototype to avoid an error. */
10823#ifdef __cplusplus
10824extern "C"
10825#endif
10826/* We use char because int might match the return type of a gcc2
10827 builtin and then its argument prototype would still apply. */
10828char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010829int
10830main ()
10831{
10832textdomain ();
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext conftest$ac_exeext
10838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010839 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010841 grep -v '^ *+' conftest.er1 >conftest.err
10842 rm -f conftest.er1
10843 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10845 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010846 { ac_try='test -z "$ac_c_werror_flag"
10847 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10849 (eval $ac_try) 2>&5
10850 ac_status=$?
10851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10852 (exit $ac_status); }; } &&
10853 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10856 ac_status=$?
10857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858 (exit $ac_status); }; }; then
10859 ac_cv_lib_intl_textdomain=yes
10860else
10861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010862sed 's/^/| /' conftest.$ac_ext >&5
10863
Martin v. Löwis19d17342003-06-14 21:03:05 +000010864ac_cv_lib_intl_textdomain=no
10865fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010866rm -f conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010868LIBS=$ac_check_lib_save_LIBS
10869fi
10870echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10871echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10872if test $ac_cv_lib_intl_textdomain = yes; then
10873
10874cat >>confdefs.h <<\_ACEOF
10875#define WITH_LIBINTL 1
10876_ACEOF
10877
10878fi
10879
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010880
10881# checks for system dependent C++ extensions support
10882case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010883 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10884echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* confdefs.h. */
10887_ACEOF
10888cat confdefs.h >>conftest.$ac_ext
10889cat >>conftest.$ac_ext <<_ACEOF
10890/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010891#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010895loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ;
10897 return 0;
10898}
10899_ACEOF
10900rm -f conftest.$ac_objext conftest$ac_exeext
10901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010902 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010904 grep -v '^ *+' conftest.er1 >conftest.err
10905 rm -f conftest.er1
10906 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10908 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010909 { ac_try='test -z "$ac_c_werror_flag"
10910 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10912 (eval $ac_try) 2>&5
10913 ac_status=$?
10914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915 (exit $ac_status); }; } &&
10916 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10918 (eval $ac_try) 2>&5
10919 ac_status=$?
10920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10921 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010922
Martin v. Löwis11437992002-04-12 09:54:03 +000010923cat >>confdefs.h <<\_ACEOF
10924#define AIX_GENUINE_CPLUSPLUS 1
10925_ACEOF
10926
10927 echo "$as_me:$LINENO: result: yes" >&5
10928echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010929else
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010931sed 's/^/| /' conftest.$ac_ext >&5
10932
Martin v. Löwis11437992002-04-12 09:54:03 +000010933echo "$as_me:$LINENO: result: no" >&5
10934echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010935fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010936rm -f conftest.err conftest.$ac_objext \
10937 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010938 *) ;;
10939esac
10940
Guido van Rossum70c7f481998-03-26 18:44:10 +000010941# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010942# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010943echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10944echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10945if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10946 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010947else
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010949LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010951/* confdefs.h. */
10952_ACEOF
10953cat confdefs.h >>conftest.$ac_ext
10954cat >>conftest.$ac_ext <<_ACEOF
10955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010956
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010957/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010958#ifdef __cplusplus
10959extern "C"
10960#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010961/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 builtin and then its argument prototype would still apply. */
10963char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010964int
10965main ()
10966{
10967t_open ();
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972rm -f conftest.$ac_objext conftest$ac_exeext
10973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010974 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010976 grep -v '^ *+' conftest.er1 >conftest.err
10977 rm -f conftest.er1
10978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10980 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010981 { ac_try='test -z "$ac_c_werror_flag"
10982 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10984 (eval $ac_try) 2>&5
10985 ac_status=$?
10986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10987 (exit $ac_status); }; } &&
10988 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10990 (eval $ac_try) 2>&5
10991 ac_status=$?
10992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10993 (exit $ac_status); }; }; then
10994 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010995else
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010997sed 's/^/| /' conftest.$ac_ext >&5
10998
Martin v. Löwis11437992002-04-12 09:54:03 +000010999ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011000fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011001rm -f conftest.err conftest.$ac_objext \
11002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011004fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011005echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
11006echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
11007if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011008 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000011009fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000011010 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000011011echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
11012echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
11013if test "${ac_cv_lib_socket_socket+set}" = set; then
11014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011015else
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011017LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* confdefs.h. */
11020_ACEOF
11021cat confdefs.h >>conftest.$ac_ext
11022cat >>conftest.$ac_ext <<_ACEOF
11023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011024
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011025/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011026#ifdef __cplusplus
11027extern "C"
11028#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 builtin and then its argument prototype would still apply. */
11031char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011032int
11033main ()
11034{
11035socket ();
11036 ;
11037 return 0;
11038}
11039_ACEOF
11040rm -f conftest.$ac_objext conftest$ac_exeext
11041if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011042 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011044 grep -v '^ *+' conftest.er1 >conftest.err
11045 rm -f conftest.er1
11046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11048 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011049 { ac_try='test -z "$ac_c_werror_flag"
11050 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11052 (eval $ac_try) 2>&5
11053 ac_status=$?
11054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11055 (exit $ac_status); }; } &&
11056 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11058 (eval $ac_try) 2>&5
11059 ac_status=$?
11060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11061 (exit $ac_status); }; }; then
11062 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011063else
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011065sed 's/^/| /' conftest.$ac_ext >&5
11066
Martin v. Löwis11437992002-04-12 09:54:03 +000011067ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011068fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011069rm -f conftest.err conftest.$ac_objext \
11070 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011071LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011072fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011073echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11074echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11075if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011076 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011077fi
11078 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011079
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011080case "$ac_sys_system" in
11081BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011082echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11083echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11084if test "${ac_cv_lib_net_socket+set}" = set; then
11085 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011086else
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011088LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* confdefs.h. */
11091_ACEOF
11092cat confdefs.h >>conftest.$ac_ext
11093cat >>conftest.$ac_ext <<_ACEOF
11094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011095
Guido van Rossumad678af1998-10-02 14:42:15 +000011096/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011097#ifdef __cplusplus
11098extern "C"
11099#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011100/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 builtin and then its argument prototype would still apply. */
11102char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011103int
11104main ()
11105{
11106socket ();
11107 ;
11108 return 0;
11109}
11110_ACEOF
11111rm -f conftest.$ac_objext conftest$ac_exeext
11112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011113 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011115 grep -v '^ *+' conftest.er1 >conftest.err
11116 rm -f conftest.er1
11117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011120 { ac_try='test -z "$ac_c_werror_flag"
11121 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11123 (eval $ac_try) 2>&5
11124 ac_status=$?
11125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11126 (exit $ac_status); }; } &&
11127 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11129 (eval $ac_try) 2>&5
11130 ac_status=$?
11131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132 (exit $ac_status); }; }; then
11133 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011134else
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011136sed 's/^/| /' conftest.$ac_ext >&5
11137
Martin v. Löwis11437992002-04-12 09:54:03 +000011138ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011139fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011140rm -f conftest.err conftest.$ac_objext \
11141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011142LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011144echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11145echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11146if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011147 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011148fi
11149 # BeOS
11150;;
11151esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153echo "$as_me:$LINENO: checking for --with-libs" >&5
11154echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11155
Guido van Rossuma68acba1996-07-31 17:36:39 +000011156# Check whether --with-libs or --without-libs was given.
11157if test "${with_libs+set}" = set; then
11158 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011159
11160echo "$as_me:$LINENO: result: $withval" >&5
11161echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011162LIBS="$withval $LIBS"
11163
11164else
Martin v. Löwis11437992002-04-12 09:54:03 +000011165 echo "$as_me:$LINENO: result: no" >&5
11166echo "${ECHO_T}no" >&6
11167fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011168
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011169# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011170
11171
Martin v. Löwis11437992002-04-12 09:54:03 +000011172echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11173echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11174
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011175# Check whether --with-signal-module or --without-signal-module was given.
11176if test "${with_signal_module+set}" = set; then
11177 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011178
Martin v. Löwis11437992002-04-12 09:54:03 +000011179fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011180
11181if test -z "$with_signal_module"
11182then with_signal_module="yes"
11183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011184echo "$as_me:$LINENO: result: $with_signal_module" >&5
11185echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011186
11187if test "${with_signal_module}" = "yes"; then
11188 USE_SIGNAL_MODULE=""
11189 SIGNAL_OBJS=""
11190else
11191 USE_SIGNAL_MODULE="#"
11192 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11193fi
11194
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011195# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011196
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011197USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011198
Martin v. Löwis11437992002-04-12 09:54:03 +000011199echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11200echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11201
Guido van Rossumec2f0731997-01-22 20:54:01 +000011202
11203# Check whether --with-dec-threads or --without-dec-threads was given.
11204if test "${with_dec_threads+set}" = set; then
11205 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011206
11207echo "$as_me:$LINENO: result: $withval" >&5
11208echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011209LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011210if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011211 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011212fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 echo "$as_me:$LINENO: result: no" >&5
11215echo "${ECHO_T}no" >&6
11216fi;
11217
11218# Templates for things AC_DEFINEd more than once.
11219# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011220
11221
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
11223
11224
11225
11226
11227echo "$as_me:$LINENO: checking for --with-threads" >&5
11228echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11229
Guido van Rossumec2f0731997-01-22 20:54:01 +000011230# Check whether --with-threads or --without-threads was given.
11231if test "${with_threads+set}" = set; then
11232 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011233
Martin v. Löwis11437992002-04-12 09:54:03 +000011234fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011235
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011236# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011237
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011238# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011239if test "${with_thread+set}" = set; then
11240 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011241 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011242fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011243
11244if test -z "$with_threads"
11245then with_threads="yes"
11246fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011247echo "$as_me:$LINENO: result: $with_threads" >&5
11248echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011249
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011251if test "$with_threads" = "no"
11252then
11253 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011254elif test "$ac_cv_pthread_is_default" = yes
11255then
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011257#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011259
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011260 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011262#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011263_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011264
11265 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011267elif test "$ac_cv_kpthread" = "yes"
11268then
11269 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011270 if test "$ac_cv_cxx_thread" = "yes"; then
11271 CXX="$CXX -Kpthread"
11272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011274#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011277 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011278 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011279elif test "$ac_cv_kthread" = "yes"
11280then
11281 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011282 if test "$ac_cv_cxx_thread" = "yes"; then
11283 CXX="$CXX -Kthread"
11284 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011285 cat >>confdefs.h <<\_ACEOF
11286#define WITH_THREAD 1
11287_ACEOF
11288
11289 posix_threads=yes
11290 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011291elif test "$ac_cv_pthread" = "yes"
11292then
11293 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011294 if test "$ac_cv_cxx_thread" = "yes"; then
11295 CXX="$CXX -pthread"
11296 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011297 cat >>confdefs.h <<\_ACEOF
11298#define WITH_THREAD 1
11299_ACEOF
11300
11301 posix_threads=yes
11302 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011303else
11304 if test ! -z "$with_threads" -a -d "$with_threads"
11305 then LDFLAGS="$LDFLAGS -L$with_threads"
11306 fi
11307 if test ! -z "$withval" -a -d "$withval"
11308 then LDFLAGS="$LDFLAGS -L$withval"
11309 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011310
11311 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011312 # define _POSIX_THREADS in unistd.h. Some apparently don't
11313 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11315echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* confdefs.h. */
11318_ACEOF
11319cat confdefs.h >>conftest.$ac_ext
11320cat >>conftest.$ac_ext <<_ACEOF
11321/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011322
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011323#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011324#ifdef _POSIX_THREADS
11325yes
11326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011327
11328_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011330 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011331 unistd_defines_pthreads=yes
11332else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011333 unistd_defines_pthreads=no
11334fi
11335rm -f conftest*
11336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11338echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011341#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011342_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 if test "${ac_cv_header_cthreads_h+set}" = set; then
11345 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11346echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11347if test "${ac_cv_header_cthreads_h+set}" = set; then
11348 echo $ECHO_N "(cached) $ECHO_C" >&6
11349fi
11350echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11351echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011352else
Martin v. Löwis11437992002-04-12 09:54:03 +000011353 # Is the header compilable?
11354echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11355echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* confdefs.h. */
11358_ACEOF
11359cat confdefs.h >>conftest.$ac_ext
11360cat >>conftest.$ac_ext <<_ACEOF
11361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011362$ac_includes_default
11363#include <cthreads.h>
11364_ACEOF
11365rm -f conftest.$ac_objext
11366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011367 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011369 grep -v '^ *+' conftest.er1 >conftest.err
11370 rm -f conftest.er1
11371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11373 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011374 { ac_try='test -z "$ac_c_werror_flag"
11375 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11377 (eval $ac_try) 2>&5
11378 ac_status=$?
11379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11380 (exit $ac_status); }; } &&
11381 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11383 (eval $ac_try) 2>&5
11384 ac_status=$?
11385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386 (exit $ac_status); }; }; then
11387 ac_header_compiler=yes
11388else
11389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011390sed 's/^/| /' conftest.$ac_ext >&5
11391
Martin v. Löwis11437992002-04-12 09:54:03 +000011392ac_header_compiler=no
11393fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11396echo "${ECHO_T}$ac_header_compiler" >&6
11397
11398# Is the header present?
11399echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11400echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* confdefs.h. */
11403_ACEOF
11404cat confdefs.h >>conftest.$ac_ext
11405cat >>conftest.$ac_ext <<_ACEOF
11406/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011407#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011408_ACEOF
11409if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11410 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11411 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011412 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 rm -f conftest.er1
11414 cat conftest.err >&5
11415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416 (exit $ac_status); } >/dev/null; then
11417 if test -s conftest.err; then
11418 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011419 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 else
11421 ac_cpp_err=
11422 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011423else
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_cpp_err=yes
11425fi
11426if test -z "$ac_cpp_err"; then
11427 ac_header_preproc=yes
11428else
11429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011430sed 's/^/| /' conftest.$ac_ext >&5
11431
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011434rm -f conftest.err conftest.$ac_ext
11435echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11436echo "${ECHO_T}$ac_header_preproc" >&6
11437
11438# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011439case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11440 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11442echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011443 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11444echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11445 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011446 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011448 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11449echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011450 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11451echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11452 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11453echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11454 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11455echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011456 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11457echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011458 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11459echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011460 (
11461 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011462## ------------------------------------------------ ##
11463## Report this to http://www.python.org/python-bugs ##
11464## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011465_ASBOX
11466 ) |
11467 sed "s/^/$as_me: WARNING: /" >&2
11468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011469esac
11470echo "$as_me:$LINENO: checking for cthreads.h" >&5
11471echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11472if test "${ac_cv_header_cthreads_h+set}" = set; then
11473 echo $ECHO_N "(cached) $ECHO_C" >&6
11474else
11475 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011477echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11478echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11479
11480fi
11481if test $ac_cv_header_cthreads_h = yes; then
11482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011483#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011484_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011485
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011487#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011488_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011489
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
11491cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011492#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011493_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011494
11495 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011496 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011497else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011498
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11500 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11501echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11502if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11503 echo $ECHO_N "(cached) $ECHO_C" >&6
11504fi
11505echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11506echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011507else
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 # Is the header compilable?
11509echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11510echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011512/* confdefs.h. */
11513_ACEOF
11514cat confdefs.h >>conftest.$ac_ext
11515cat >>conftest.$ac_ext <<_ACEOF
11516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011517$ac_includes_default
11518#include <mach/cthreads.h>
11519_ACEOF
11520rm -f conftest.$ac_objext
11521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011522 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011524 grep -v '^ *+' conftest.er1 >conftest.err
11525 rm -f conftest.er1
11526 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11528 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011529 { ac_try='test -z "$ac_c_werror_flag"
11530 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11532 (eval $ac_try) 2>&5
11533 ac_status=$?
11534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11535 (exit $ac_status); }; } &&
11536 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11538 (eval $ac_try) 2>&5
11539 ac_status=$?
11540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11541 (exit $ac_status); }; }; then
11542 ac_header_compiler=yes
11543else
11544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011545sed 's/^/| /' conftest.$ac_ext >&5
11546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547ac_header_compiler=no
11548fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011550echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11551echo "${ECHO_T}$ac_header_compiler" >&6
11552
11553# Is the header present?
11554echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11555echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* confdefs.h. */
11558_ACEOF
11559cat confdefs.h >>conftest.$ac_ext
11560cat >>conftest.$ac_ext <<_ACEOF
11561/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011562#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011563_ACEOF
11564if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11565 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11566 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011567 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 rm -f conftest.er1
11569 cat conftest.err >&5
11570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11571 (exit $ac_status); } >/dev/null; then
11572 if test -s conftest.err; then
11573 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011574 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 else
11576 ac_cpp_err=
11577 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011578else
Martin v. Löwis11437992002-04-12 09:54:03 +000011579 ac_cpp_err=yes
11580fi
11581if test -z "$ac_cpp_err"; then
11582 ac_header_preproc=yes
11583else
11584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011585sed 's/^/| /' conftest.$ac_ext >&5
11586
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011588fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011589rm -f conftest.err conftest.$ac_ext
11590echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11591echo "${ECHO_T}$ac_header_preproc" >&6
11592
11593# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011594case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11595 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11597echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011598 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11599echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11600 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011601 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011602 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011603 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11604echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011605 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11606echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11607 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11608echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11609 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11610echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011611 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11612echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011613 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11614echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011615 (
11616 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011617## ------------------------------------------------ ##
11618## Report this to http://www.python.org/python-bugs ##
11619## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011620_ASBOX
11621 ) |
11622 sed "s/^/$as_me: WARNING: /" >&2
11623 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011624esac
11625echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11626echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11627if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11628 echo $ECHO_N "(cached) $ECHO_C" >&6
11629else
11630 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011631fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011632echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11633echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11634
11635fi
11636if test $ac_cv_header_mach_cthreads_h = yes; then
11637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011638#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011639_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011640
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011642#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011643_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011644
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
11646cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011647#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011648_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011649
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011650 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011651else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011652
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me:$LINENO: checking for --with-pth" >&5
11654echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11655
11656# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011657if test "${with_pth+set}" = set; then
11658 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011659 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011660echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011661 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011662#define WITH_THREAD 1
11663_ACEOF
11664
11665
11666cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011667#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011668_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011669
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011670 LIBS="-lpth $LIBS"
11671 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011672else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011673 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011674echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011675
11676 # Just looking for pthread_create in libpthread is not enough:
11677 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11678 # So we really have to include pthread.h, and then link.
11679 _libs=$LIBS
11680 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11682echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* confdefs.h. */
11685_ACEOF
11686cat confdefs.h >>conftest.$ac_ext
11687cat >>conftest.$ac_ext <<_ACEOF
11688/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011689#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011690
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011691void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011692int
11693main ()
11694{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011695
11696pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 ;
11698 return 0;
11699}
11700_ACEOF
11701rm -f conftest.$ac_objext conftest$ac_exeext
11702if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011703 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011705 grep -v '^ *+' conftest.er1 >conftest.err
11706 rm -f conftest.er1
11707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11709 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011710 { ac_try='test -z "$ac_c_werror_flag"
11711 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11713 (eval $ac_try) 2>&5
11714 ac_status=$?
11715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716 (exit $ac_status); }; } &&
11717 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11719 (eval $ac_try) 2>&5
11720 ac_status=$?
11721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722 (exit $ac_status); }; }; then
11723
11724 echo "$as_me:$LINENO: result: yes" >&5
11725echo "${ECHO_T}yes" >&6
11726 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011727#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011728_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011729
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011730 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011731 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011732else
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011734sed 's/^/| /' conftest.$ac_ext >&5
11735
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011737 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11739echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11740if test "${ac_cv_func_pthread_detach+set}" = set; then
11741 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011742else
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011744/* confdefs.h. */
11745_ACEOF
11746cat confdefs.h >>conftest.$ac_ext
11747cat >>conftest.$ac_ext <<_ACEOF
11748/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011749/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011750 which can conflict with char pthread_detach (); below.
11751 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011752 <limits.h> exists even on freestanding compilers. Under hpux,
11753 including <limits.h> includes <sys/time.h> and causes problems
11754 checking for functions defined therein. */
11755#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011756# include <limits.h>
11757#else
11758# include <assert.h>
11759#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011760/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011761#ifdef __cplusplus
11762extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011763{
Martin v. Löwis11437992002-04-12 09:54:03 +000011764#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011765/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 builtin and then its argument prototype would still apply. */
11767char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011768/* The GNU C library defines this for functions which it implements
11769 to always fail with ENOSYS. Some functions are actually named
11770 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011771#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011772choke me
11773#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011774char (*f) () = pthread_detach;
11775#endif
11776#ifdef __cplusplus
11777}
Guido van Rossumad678af1998-10-02 14:42:15 +000011778#endif
11779
Skip Montanaro6dead952003-09-25 14:50:04 +000011780int
11781main ()
11782{
11783return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ;
11785 return 0;
11786}
11787_ACEOF
11788rm -f conftest.$ac_objext conftest$ac_exeext
11789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011790 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011792 grep -v '^ *+' conftest.er1 >conftest.err
11793 rm -f conftest.er1
11794 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11796 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011797 { ac_try='test -z "$ac_c_werror_flag"
11798 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11800 (eval $ac_try) 2>&5
11801 ac_status=$?
11802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11803 (exit $ac_status); }; } &&
11804 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11806 (eval $ac_try) 2>&5
11807 ac_status=$?
11808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11809 (exit $ac_status); }; }; then
11810 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011811else
Martin v. Löwis11437992002-04-12 09:54:03 +000011812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011813sed 's/^/| /' conftest.$ac_ext >&5
11814
Martin v. Löwis11437992002-04-12 09:54:03 +000011815ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011816fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011817rm -f conftest.err conftest.$ac_objext \
11818 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011820echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11821echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11822if test $ac_cv_func_pthread_detach = yes; then
11823 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011824#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011825_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011826
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011827 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011828 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011829else
Guido van Rossumad678af1998-10-02 14:42:15 +000011830
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011831 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11832 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11833echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11834if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11835 echo $ECHO_N "(cached) $ECHO_C" >&6
11836fi
11837echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11838echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11839else
11840 # Is the header compilable?
11841echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11842echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011844/* confdefs.h. */
11845_ACEOF
11846cat confdefs.h >>conftest.$ac_ext
11847cat >>conftest.$ac_ext <<_ACEOF
11848/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011849$ac_includes_default
11850#include <atheos/threads.h>
11851_ACEOF
11852rm -f conftest.$ac_objext
11853if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011854 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011856 grep -v '^ *+' conftest.er1 >conftest.err
11857 rm -f conftest.er1
11858 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11860 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011861 { ac_try='test -z "$ac_c_werror_flag"
11862 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864 (eval $ac_try) 2>&5
11865 ac_status=$?
11866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867 (exit $ac_status); }; } &&
11868 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11870 (eval $ac_try) 2>&5
11871 ac_status=$?
11872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); }; }; then
11874 ac_header_compiler=yes
11875else
11876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011877sed 's/^/| /' conftest.$ac_ext >&5
11878
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011879ac_header_compiler=no
11880fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011881rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011882echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11883echo "${ECHO_T}$ac_header_compiler" >&6
11884
11885# Is the header present?
11886echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11887echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011889/* confdefs.h. */
11890_ACEOF
11891cat confdefs.h >>conftest.$ac_ext
11892cat >>conftest.$ac_ext <<_ACEOF
11893/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011894#include <atheos/threads.h>
11895_ACEOF
11896if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11897 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11898 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011899 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011900 rm -f conftest.er1
11901 cat conftest.err >&5
11902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11903 (exit $ac_status); } >/dev/null; then
11904 if test -s conftest.err; then
11905 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011906 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011907 else
11908 ac_cpp_err=
11909 fi
11910else
11911 ac_cpp_err=yes
11912fi
11913if test -z "$ac_cpp_err"; then
11914 ac_header_preproc=yes
11915else
11916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011917sed 's/^/| /' conftest.$ac_ext >&5
11918
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011919 ac_header_preproc=no
11920fi
11921rm -f conftest.err conftest.$ac_ext
11922echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11923echo "${ECHO_T}$ac_header_preproc" >&6
11924
11925# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011926case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11927 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011928 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11929echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011930 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11931echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11932 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011933 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011934 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011935 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11936echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011937 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11938echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11939 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11940echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11941 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11942echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011943 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11944echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011945 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11946echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011947 (
11948 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000011949## ------------------------------------------------ ##
11950## Report this to http://www.python.org/python-bugs ##
11951## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011952_ASBOX
11953 ) |
11954 sed "s/^/$as_me: WARNING: /" >&2
11955 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011956esac
11957echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11958echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11959if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11960 echo $ECHO_N "(cached) $ECHO_C" >&6
11961else
11962 ac_cv_header_atheos_threads_h=$ac_header_preproc
11963fi
11964echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11965echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11966
11967fi
11968if test $ac_cv_header_atheos_threads_h = yes; then
11969 cat >>confdefs.h <<\_ACEOF
11970#define WITH_THREAD 1
11971_ACEOF
11972
11973
11974cat >>confdefs.h <<\_ACEOF
11975#define ATHEOS_THREADS 1
11976_ACEOF
11977
11978 THREADOBJ="Python/thread.o"
11979else
11980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11982 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11983echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11984if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11985 echo $ECHO_N "(cached) $ECHO_C" >&6
11986fi
11987echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11988echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011989else
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 # Is the header compilable?
11991echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11992echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011994/* confdefs.h. */
11995_ACEOF
11996cat confdefs.h >>conftest.$ac_ext
11997cat >>conftest.$ac_ext <<_ACEOF
11998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011999$ac_includes_default
12000#include <kernel/OS.h>
12001_ACEOF
12002rm -f conftest.$ac_objext
12003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012004 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012006 grep -v '^ *+' conftest.er1 >conftest.err
12007 rm -f conftest.er1
12008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12010 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012011 { ac_try='test -z "$ac_c_werror_flag"
12012 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12014 (eval $ac_try) 2>&5
12015 ac_status=$?
12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12017 (exit $ac_status); }; } &&
12018 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12020 (eval $ac_try) 2>&5
12021 ac_status=$?
12022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12023 (exit $ac_status); }; }; then
12024 ac_header_compiler=yes
12025else
12026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012027sed 's/^/| /' conftest.$ac_ext >&5
12028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029ac_header_compiler=no
12030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012032echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12033echo "${ECHO_T}$ac_header_compiler" >&6
12034
12035# Is the header present?
12036echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12037echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* confdefs.h. */
12040_ACEOF
12041cat confdefs.h >>conftest.$ac_ext
12042cat >>conftest.$ac_ext <<_ACEOF
12043/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012044#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012045_ACEOF
12046if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12047 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12048 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012049 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 rm -f conftest.er1
12051 cat conftest.err >&5
12052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053 (exit $ac_status); } >/dev/null; then
12054 if test -s conftest.err; then
12055 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012056 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 else
12058 ac_cpp_err=
12059 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012060else
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 ac_cpp_err=yes
12062fi
12063if test -z "$ac_cpp_err"; then
12064 ac_header_preproc=yes
12065else
12066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012067sed 's/^/| /' conftest.$ac_ext >&5
12068
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012070fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012071rm -f conftest.err conftest.$ac_ext
12072echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12073echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012076case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12077 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12079echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012080 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12081echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12082 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012083 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012084 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012085 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12086echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012087 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12088echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12089 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12090echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12091 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12092echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012093 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12094echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012095 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12096echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012097 (
12098 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012099## ------------------------------------------------ ##
12100## Report this to http://www.python.org/python-bugs ##
12101## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012102_ASBOX
12103 ) |
12104 sed "s/^/$as_me: WARNING: /" >&2
12105 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012106esac
12107echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12108echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12109if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12110 echo $ECHO_N "(cached) $ECHO_C" >&6
12111else
12112 ac_cv_header_kernel_OS_h=$ac_header_preproc
12113fi
12114echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12115echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12116
12117fi
12118if test $ac_cv_header_kernel_OS_h = yes; then
12119 cat >>confdefs.h <<\_ACEOF
12120#define WITH_THREAD 1
12121_ACEOF
12122
12123
12124cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012125#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012126_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012127
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012128 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012129else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12132echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12133if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12134 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012135else
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012137LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012138cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012139/* confdefs.h. */
12140_ACEOF
12141cat confdefs.h >>conftest.$ac_ext
12142cat >>conftest.$ac_ext <<_ACEOF
12143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012144
Greg Steinadf63d62000-07-05 10:38:09 +000012145/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012146#ifdef __cplusplus
12147extern "C"
12148#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012149/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 builtin and then its argument prototype would still apply. */
12151char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012152int
12153main ()
12154{
12155pthread_create ();
12156 ;
12157 return 0;
12158}
12159_ACEOF
12160rm -f conftest.$ac_objext conftest$ac_exeext
12161if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012162 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012164 grep -v '^ *+' conftest.er1 >conftest.err
12165 rm -f conftest.er1
12166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12168 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012169 { ac_try='test -z "$ac_c_werror_flag"
12170 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12172 (eval $ac_try) 2>&5
12173 ac_status=$?
12174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12175 (exit $ac_status); }; } &&
12176 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12178 (eval $ac_try) 2>&5
12179 ac_status=$?
12180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12181 (exit $ac_status); }; }; then
12182 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012183else
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012185sed 's/^/| /' conftest.$ac_ext >&5
12186
Martin v. Löwis11437992002-04-12 09:54:03 +000012187ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012188fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012189rm -f conftest.err conftest.$ac_objext \
12190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012191LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012193echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12194echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12195if test $ac_cv_lib_pthreads_pthread_create = yes; then
12196 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012197#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012200 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012201 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012202 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012203else
Greg Steinadf63d62000-07-05 10:38:09 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12206echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12207if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12208 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012209else
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012211LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* confdefs.h. */
12214_ACEOF
12215cat confdefs.h >>conftest.$ac_ext
12216cat >>conftest.$ac_ext <<_ACEOF
12217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
Guido van Rossum49545951997-12-02 19:28:29 +000012219/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012220#ifdef __cplusplus
12221extern "C"
12222#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012223/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 builtin and then its argument prototype would still apply. */
12225char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
12229pthread_create ();
12230 ;
12231 return 0;
12232}
12233_ACEOF
12234rm -f conftest.$ac_objext conftest$ac_exeext
12235if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012236 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012238 grep -v '^ *+' conftest.er1 >conftest.err
12239 rm -f conftest.er1
12240 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012243 { ac_try='test -z "$ac_c_werror_flag"
12244 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012245 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12246 (eval $ac_try) 2>&5
12247 ac_status=$?
12248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12249 (exit $ac_status); }; } &&
12250 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12252 (eval $ac_try) 2>&5
12253 ac_status=$?
12254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12255 (exit $ac_status); }; }; then
12256 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012257else
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012259sed 's/^/| /' conftest.$ac_ext >&5
12260
Martin v. Löwis11437992002-04-12 09:54:03 +000012261ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012262fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012263rm -f conftest.err conftest.$ac_objext \
12264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012265LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012266fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012267echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12268echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12269if test $ac_cv_lib_c_r_pthread_create = yes; then
12270 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012271#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012274 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012275 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012276 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012277else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12280echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12281if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12282 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012283else
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012285LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012287/* confdefs.h. */
12288_ACEOF
12289cat confdefs.h >>conftest.$ac_ext
12290cat >>conftest.$ac_ext <<_ACEOF
12291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012293/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012294#ifdef __cplusplus
12295extern "C"
12296#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012297/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 builtin and then its argument prototype would still apply. */
12299char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012300int
12301main ()
12302{
12303__pthread_create_system ();
12304 ;
12305 return 0;
12306}
12307_ACEOF
12308rm -f conftest.$ac_objext conftest$ac_exeext
12309if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012310 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012312 grep -v '^ *+' conftest.er1 >conftest.err
12313 rm -f conftest.er1
12314 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12316 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012317 { ac_try='test -z "$ac_c_werror_flag"
12318 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12321 ac_status=$?
12322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12323 (exit $ac_status); }; } &&
12324 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12326 (eval $ac_try) 2>&5
12327 ac_status=$?
12328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12329 (exit $ac_status); }; }; then
12330 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012331else
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012333sed 's/^/| /' conftest.$ac_ext >&5
12334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012336fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012337rm -f conftest.err conftest.$ac_objext \
12338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012339LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012340fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012341echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12342echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12343if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12344 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012345#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012346_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012347
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012348 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012349 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012350 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012351else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012352
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12354echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12355if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12356 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012357else
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012359LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012361/* confdefs.h. */
12362_ACEOF
12363cat confdefs.h >>conftest.$ac_ext
12364cat >>conftest.$ac_ext <<_ACEOF
12365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
Guido van Rossumb93a8621998-05-07 13:27:32 +000012367/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012368#ifdef __cplusplus
12369extern "C"
12370#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012371/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 builtin and then its argument prototype would still apply. */
12373char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012374int
12375main ()
12376{
12377pthread_create ();
12378 ;
12379 return 0;
12380}
12381_ACEOF
12382rm -f conftest.$ac_objext conftest$ac_exeext
12383if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012384 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012386 grep -v '^ *+' conftest.er1 >conftest.err
12387 rm -f conftest.er1
12388 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12390 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012391 { ac_try='test -z "$ac_c_werror_flag"
12392 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12394 (eval $ac_try) 2>&5
12395 ac_status=$?
12396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12397 (exit $ac_status); }; } &&
12398 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12400 (eval $ac_try) 2>&5
12401 ac_status=$?
12402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12403 (exit $ac_status); }; }; then
12404 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012405else
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012407sed 's/^/| /' conftest.$ac_ext >&5
12408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012410fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012411rm -f conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012413LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012414fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012415echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12416echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12417if test $ac_cv_lib_cma_pthread_create = yes; then
12418 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012419#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012420_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012421
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012422 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012423 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012424 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012425else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012426
Martin v. Löwis130fb172001-07-19 11:00:41 +000012427 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012428fi
12429
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012431fi
12432
Guido van Rossum0be3e491997-05-22 20:33:33 +000012433fi
12434
Guido van Rossum49545951997-12-02 19:28:29 +000012435fi
12436
Guido van Rossumb93a8621998-05-07 13:27:32 +000012437fi
12438
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012439
Michael W. Hudson54241132001-12-07 15:38:26 +000012440fi
12441
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012442
12443fi
12444
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012445fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012446rm -f conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012448fi;
12449fi
12450
12451
12452fi
12453
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012454
Michael W. Hudson54241132001-12-07 15:38:26 +000012455
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12457echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12458if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12459 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460else
Martin v. Löwis11437992002-04-12 09:54:03 +000012461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012462LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* confdefs.h. */
12465_ACEOF
12466cat confdefs.h >>conftest.$ac_ext
12467cat >>conftest.$ac_ext <<_ACEOF
12468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012470/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012471#ifdef __cplusplus
12472extern "C"
12473#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012474/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 builtin and then its argument prototype would still apply. */
12476char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
12480usconfig ();
12481 ;
12482 return 0;
12483}
12484_ACEOF
12485rm -f conftest.$ac_objext conftest$ac_exeext
12486if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012487 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012489 grep -v '^ *+' conftest.er1 >conftest.err
12490 rm -f conftest.er1
12491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12493 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012494 { ac_try='test -z "$ac_c_werror_flag"
12495 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12497 (eval $ac_try) 2>&5
12498 ac_status=$?
12499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12500 (exit $ac_status); }; } &&
12501 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12503 (eval $ac_try) 2>&5
12504 ac_status=$?
12505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12506 (exit $ac_status); }; }; then
12507 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508else
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012510sed 's/^/| /' conftest.$ac_ext >&5
12511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012513fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012514rm -f conftest.err conftest.$ac_objext \
12515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012516LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012517fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012518echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12519echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12520if test $ac_cv_lib_mpc_usconfig = yes; then
12521 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012523_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012524
Martin v. Löwis130fb172001-07-19 11:00:41 +000012525 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012526 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012527 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012528fi
12529
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012530
Neal Norwitza978ab02002-11-02 16:58:05 +000012531 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012532 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12533echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12534if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012536else
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012538LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* confdefs.h. */
12541_ACEOF
12542cat confdefs.h >>conftest.$ac_ext
12543cat >>conftest.$ac_ext <<_ACEOF
12544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012546/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012547#ifdef __cplusplus
12548extern "C"
12549#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012550/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 builtin and then its argument prototype would still apply. */
12552char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012553int
12554main ()
12555{
12556thr_create ();
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext conftest$ac_exeext
12562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012563 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012565 grep -v '^ *+' conftest.er1 >conftest.err
12566 rm -f conftest.er1
12567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12569 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012570 { ac_try='test -z "$ac_c_werror_flag"
12571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12573 (eval $ac_try) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); }; } &&
12577 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12579 (eval $ac_try) 2>&5
12580 ac_status=$?
12581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12582 (exit $ac_status); }; }; then
12583 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584else
Martin v. Löwis11437992002-04-12 09:54:03 +000012585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012586sed 's/^/| /' conftest.$ac_ext >&5
12587
Martin v. Löwis11437992002-04-12 09:54:03 +000012588ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012590rm -f conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012594echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12595echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12596if test $ac_cv_lib_thread_thr_create = yes; then
12597 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012599_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012601 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012602 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012603 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012604fi
12605
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012606 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012607
Martin v. Löwis130fb172001-07-19 11:00:41 +000012608 if test "$USE_THREAD_MODULE" != "#"
12609 then
12610 # If the above checks didn't disable threads, (at least) OSF1
12611 # needs this '-threads' argument during linking.
12612 case $ac_sys_system in
12613 OSF1) LDLAST=-threads;;
12614 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012615 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012616fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012617
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012618if test "$posix_threads" = "yes"; then
12619 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012620
12621cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012622#define _POSIX_THREADS 1
12623_ACEOF
12624
12625 fi
12626
12627 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12628 case $ac_sys_system/$ac_sys_release in
12629 SunOS/5.6)
12630cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012631#define HAVE_PTHREAD_DESTRUCTOR 1
12632_ACEOF
12633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012634 ;;
12635 SunOS/5.8)
12636cat >>confdefs.h <<\_ACEOF
12637#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12638_ACEOF
12639
12640 ;;
12641 esac
12642
12643 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12644echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12645 if test "${ac_cv_pthread_system_supported+set}" = set; then
12646 echo $ECHO_N "(cached) $ECHO_C" >&6
12647else
12648 if test "$cross_compiling" = yes; then
12649 ac_cv_pthread_system_supported=no
12650else
12651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* confdefs.h. */
12653_ACEOF
12654cat confdefs.h >>conftest.$ac_ext
12655cat >>conftest.$ac_ext <<_ACEOF
12656/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012657#include <pthread.h>
12658 void *foo(void *parm) {
12659 return NULL;
12660 }
12661 main() {
12662 pthread_attr_t attr;
12663 pthread_t id;
12664 if (pthread_attr_init(&attr)) exit(-1);
12665 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12666 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12667 exit(0);
12668 }
12669_ACEOF
12670rm -f conftest$ac_exeext
12671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12672 (eval $ac_link) 2>&5
12673 ac_status=$?
12674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677 (eval $ac_try) 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); }; }; then
12681 ac_cv_pthread_system_supported=yes
12682else
12683 echo "$as_me: program exited with status $ac_status" >&5
12684echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012685sed 's/^/| /' conftest.$ac_ext >&5
12686
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012687( exit $ac_status )
12688ac_cv_pthread_system_supported=no
12689fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012690rm -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 +000012691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012692
Guido van Rossum627b2d71993-12-24 10:39:16 +000012693fi
12694
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012695 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12696echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12697 if test "$ac_cv_pthread_system_supported" = "yes"; then
12698
12699cat >>confdefs.h <<\_ACEOF
12700#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12701_ACEOF
12702
12703 fi
12704
12705for ac_func in pthread_sigmask
12706do
12707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12708echo "$as_me:$LINENO: checking for $ac_func" >&5
12709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12710if eval "test \"\${$as_ac_var+set}\" = set"; then
12711 echo $ECHO_N "(cached) $ECHO_C" >&6
12712else
12713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* confdefs.h. */
12715_ACEOF
12716cat confdefs.h >>conftest.$ac_ext
12717cat >>conftest.$ac_ext <<_ACEOF
12718/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012719/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012720 which can conflict with char $ac_func (); below.
12721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012722 <limits.h> exists even on freestanding compilers. Under hpux,
12723 including <limits.h> includes <sys/time.h> and causes problems
12724 checking for functions defined therein. */
12725#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012726# include <limits.h>
12727#else
12728# include <assert.h>
12729#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012730/* Override any gcc2 internal prototype to avoid an error. */
12731#ifdef __cplusplus
12732extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012733{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012734#endif
12735/* We use char because int might match the return type of a gcc2
12736 builtin and then its argument prototype would still apply. */
12737char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012738/* The GNU C library defines this for functions which it implements
12739 to always fail with ENOSYS. Some functions are actually named
12740 something starting with __ and the normal name is an alias. */
12741#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12742choke me
12743#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012744char (*f) () = $ac_func;
12745#endif
12746#ifdef __cplusplus
12747}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012748#endif
12749
Skip Montanaro6dead952003-09-25 14:50:04 +000012750int
12751main ()
12752{
12753return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
12758rm -f conftest.$ac_objext conftest$ac_exeext
12759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012760 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012762 grep -v '^ *+' conftest.er1 >conftest.err
12763 rm -f conftest.er1
12764 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012767 { ac_try='test -z "$ac_c_werror_flag"
12768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12770 (eval $ac_try) 2>&5
12771 ac_status=$?
12772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12773 (exit $ac_status); }; } &&
12774 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12777 ac_status=$?
12778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12779 (exit $ac_status); }; }; then
12780 eval "$as_ac_var=yes"
12781else
12782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012783sed 's/^/| /' conftest.$ac_ext >&5
12784
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012785eval "$as_ac_var=no"
12786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012787rm -f conftest.err conftest.$ac_objext \
12788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012789fi
12790echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12791echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12792if test `eval echo '${'$as_ac_var'}'` = yes; then
12793 cat >>confdefs.h <<_ACEOF
12794#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12795_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012796 case $ac_sys_system in
12797 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012798
Jason Tishlerfac083d2003-07-22 15:20:49 +000012799cat >>confdefs.h <<\_ACEOF
12800#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12801_ACEOF
12802
12803 ;;
12804 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012805fi
12806done
12807
12808fi
12809
12810
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012811# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
12813
12814echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12815echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012816# Check whether --enable-ipv6 or --disable-ipv6 was given.
12817if test "${enable_ipv6+set}" = set; then
12818 enableval="$enable_ipv6"
12819 case "$enableval" in
12820 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012821 echo "$as_me:$LINENO: result: no" >&5
12822echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012823 ipv6=no
12824 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 *) echo "$as_me:$LINENO: result: yes" >&5
12826echo "${ECHO_T}yes" >&6
12827 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012828#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012830
12831 ipv6=yes
12832 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012836 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 echo "$as_me:$LINENO: result: no" >&5
12838echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012839 ipv6=no
12840
12841else
Martin v. Löwis11437992002-04-12 09:54:03 +000012842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012843/* confdefs.h. */
12844_ACEOF
12845cat confdefs.h >>conftest.$ac_ext
12846cat >>conftest.$ac_ext <<_ACEOF
12847/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012848 /* AF_INET6 available check */
12849#include <sys/types.h>
12850#include <sys/socket.h>
12851main()
12852{
12853 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12854 exit(1);
12855 else
12856 exit(0);
12857}
12858
Martin v. Löwis11437992002-04-12 09:54:03 +000012859_ACEOF
12860rm -f conftest$ac_exeext
12861if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12862 (eval $ac_link) 2>&5
12863 ac_status=$?
12864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12865 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12867 (eval $ac_try) 2>&5
12868 ac_status=$?
12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870 (exit $ac_status); }; }; then
12871 echo "$as_me:$LINENO: result: yes" >&5
12872echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012873 ipv6=yes
12874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 echo "$as_me: program exited with status $ac_status" >&5
12876echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012877sed 's/^/| /' conftest.$ac_ext >&5
12878
Martin v. Löwis11437992002-04-12 09:54:03 +000012879( exit $ac_status )
12880echo "$as_me:$LINENO: result: no" >&5
12881echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012882 ipv6=no
12883fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012884rm -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 +000012885fi
12886
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012887if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12889echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* confdefs.h. */
12892_ACEOF
12893cat confdefs.h >>conftest.$ac_ext
12894cat >>conftest.$ac_ext <<_ACEOF
12895/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012896#include <sys/types.h>
12897#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012898int
12899main ()
12900{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012901struct sockaddr_in6 x;
12902x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ;
12904 return 0;
12905}
12906_ACEOF
12907rm -f conftest.$ac_objext
12908if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012909 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012911 grep -v '^ *+' conftest.er1 >conftest.err
12912 rm -f conftest.er1
12913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012916 { ac_try='test -z "$ac_c_werror_flag"
12917 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12919 (eval $ac_try) 2>&5
12920 ac_status=$?
12921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12922 (exit $ac_status); }; } &&
12923 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12925 (eval $ac_try) 2>&5
12926 ac_status=$?
12927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12928 (exit $ac_status); }; }; then
12929 echo "$as_me:$LINENO: result: yes" >&5
12930echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012931 ipv6=yes
12932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012934sed 's/^/| /' conftest.$ac_ext >&5
12935
Martin v. Löwis11437992002-04-12 09:54:03 +000012936echo "$as_me:$LINENO: result: no" >&5
12937echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012938 ipv6=no
12939fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012940rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012941fi
12942
12943if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012945#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012947
12948fi
12949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012951
12952ipv6type=unknown
12953ipv6lib=none
12954ipv6trylibc=no
12955
12956if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12958echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012959 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12960 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012961 case $i in
12962 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012964/* confdefs.h. */
12965_ACEOF
12966cat confdefs.h >>conftest.$ac_ext
12967cat >>conftest.$ac_ext <<_ACEOF
12968/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012969
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012970#include <netinet/in.h>
12971#ifdef IPV6_INRIA_VERSION
12972yes
12973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012974_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012976 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012977 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012978fi
12979rm -f conftest*
12980
12981 ;;
12982 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* confdefs.h. */
12985_ACEOF
12986cat confdefs.h >>conftest.$ac_ext
12987cat >>conftest.$ac_ext <<_ACEOF
12988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012990#include <netinet/in.h>
12991#ifdef __KAME__
12992yes
12993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012996 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012997 ipv6type=$i;
12998 ipv6lib=inet6
12999 ipv6libdir=/usr/local/v6/lib
13000 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013001fi
13002rm -f conftest*
13003
13004 ;;
13005 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013007/* confdefs.h. */
13008_ACEOF
13009cat confdefs.h >>conftest.$ac_ext
13010cat >>conftest.$ac_ext <<_ACEOF
13011/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013013#include <features.h>
13014#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
13015yes
13016#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013017_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013019 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013020 ipv6type=$i;
13021 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013022fi
13023rm -f conftest*
13024
13025 ;;
13026 linux-inet6)
13027 if test -d /usr/inet6; then
13028 ipv6type=$i
13029 ipv6lib=inet6
13030 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013031 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013032 fi
13033 ;;
13034 solaris)
13035 if test -f /etc/netconfig; then
13036 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13037 ipv6type=$i
13038 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013039 fi
13040 fi
13041 ;;
13042 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013044/* confdefs.h. */
13045_ACEOF
13046cat confdefs.h >>conftest.$ac_ext
13047cat >>conftest.$ac_ext <<_ACEOF
13048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013050#include <sys/param.h>
13051#ifdef _TOSHIBA_INET6
13052yes
13053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013056 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013057 ipv6type=$i;
13058 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013059 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013060fi
13061rm -f conftest*
13062
13063 ;;
13064 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013071
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013072#include </usr/local/v6/include/sys/v6config.h>
13073#ifdef __V6D__
13074yes
13075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013076_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013078 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013079 ipv6type=$i;
13080 ipv6lib=v6;
13081 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013082 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013083fi
13084rm -f conftest*
13085
13086 ;;
13087 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013089/* confdefs.h. */
13090_ACEOF
13091cat confdefs.h >>conftest.$ac_ext
13092cat >>conftest.$ac_ext <<_ACEOF
13093/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013095#include <sys/param.h>
13096#ifdef _ZETA_MINAMI_INET6
13097yes
13098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013099_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013101 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013102 ipv6type=$i;
13103 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013104 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013105fi
13106rm -f conftest*
13107
13108 ;;
13109 esac
13110 if test "$ipv6type" != "unknown"; then
13111 break
13112 fi
13113 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 echo "$as_me:$LINENO: result: $ipv6type" >&5
13115echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013116fi
13117
13118if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13119 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13120 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13121 echo "using lib$ipv6lib"
13122 else
13123 if test $ipv6trylibc = "yes"; then
13124 echo "using libc"
13125 else
13126 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13127 echo "You need to fetch lib$ipv6lib.a from appropriate"
13128 echo 'ipv6 kit and compile beforehand.'
13129 exit 1
13130 fi
13131 fi
13132fi
13133
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013134# Check for --with-doc-strings
13135echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13136echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13137
13138# Check whether --with-doc-strings or --without-doc-strings was given.
13139if test "${with_doc_strings+set}" = set; then
13140 withval="$with_doc_strings"
13141
13142fi;
13143
13144if test -z "$with_doc_strings"
13145then with_doc_strings="yes"
13146fi
13147if test "$with_doc_strings" != "no"
13148then
13149
13150cat >>confdefs.h <<\_ACEOF
13151#define WITH_DOC_STRINGS 1
13152_ACEOF
13153
13154fi
13155echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13156echo "${ECHO_T}$with_doc_strings" >&6
13157
Neil Schemenauera35c6882001-02-27 04:45:05 +000013158# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013159echo "$as_me:$LINENO: checking for --with-tsc" >&5
13160echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13161
13162# Check whether --with-tsc or --without-tsc was given.
13163if test "${with_tsc+set}" = set; then
13164 withval="$with_tsc"
13165
13166if test "$withval" != no
13167then
13168
13169cat >>confdefs.h <<\_ACEOF
13170#define WITH_TSC 1
13171_ACEOF
13172
13173 echo "$as_me:$LINENO: result: yes" >&5
13174echo "${ECHO_T}yes" >&6
13175else echo "$as_me:$LINENO: result: no" >&5
13176echo "${ECHO_T}no" >&6
13177fi
13178else
13179 echo "$as_me:$LINENO: result: no" >&5
13180echo "${ECHO_T}no" >&6
13181fi;
13182
13183# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013184echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13185echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13186
Neil Schemenauera35c6882001-02-27 04:45:05 +000013187# Check whether --with-pymalloc or --without-pymalloc was given.
13188if test "${with_pymalloc+set}" = set; then
13189 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013190
Martin v. Löwis11437992002-04-12 09:54:03 +000013191fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013192
Neil Schemenauer16c22972002-03-22 15:34:49 +000013193if test -z "$with_pymalloc"
13194then with_pymalloc="yes"
13195fi
13196if test "$with_pymalloc" != "no"
13197then
Martin v. Löwis11437992002-04-12 09:54:03 +000013198
13199cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013200#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013201_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013202
13203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013204echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13205echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013206
Barry Warsawef82cd72000-06-30 16:21:01 +000013207# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013208echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13209echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13210
Barry Warsawef82cd72000-06-30 16:21:01 +000013211# Check whether --with-wctype-functions or --without-wctype-functions was given.
13212if test "${with_wctype_functions+set}" = set; then
13213 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Barry Warsawef82cd72000-06-30 16:21:01 +000013215if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013216then
13217
13218cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013219#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013220_ACEOF
13221
13222 echo "$as_me:$LINENO: result: yes" >&5
13223echo "${ECHO_T}yes" >&6
13224else echo "$as_me:$LINENO: result: no" >&5
13225echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013226fi
13227else
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 echo "$as_me:$LINENO: result: no" >&5
13229echo "${ECHO_T}no" >&6
13230fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013232# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013233
Guido van Rossum98935bf2001-09-05 19:13:16 +000013234DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013235
Guido van Rossume97ee181999-12-20 21:27:22 +000013236# the dlopen() function means we might want to use dynload_shlib.o. some
13237# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
Thomas Wouters3a584202000-08-05 23:28:51 +000013239for ac_func in dlopen
13240do
Martin v. Löwis11437992002-04-12 09:54:03 +000013241as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13242echo "$as_me:$LINENO: checking for $ac_func" >&5
13243echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13244if eval "test \"\${$as_ac_var+set}\" = set"; then
13245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013246else
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013248/* confdefs.h. */
13249_ACEOF
13250cat confdefs.h >>conftest.$ac_ext
13251cat >>conftest.$ac_ext <<_ACEOF
13252/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013253/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013254 which can conflict with char $ac_func (); below.
13255 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013256 <limits.h> exists even on freestanding compilers. Under hpux,
13257 including <limits.h> includes <sys/time.h> and causes problems
13258 checking for functions defined therein. */
13259#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013260# include <limits.h>
13261#else
13262# include <assert.h>
13263#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013264/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013265#ifdef __cplusplus
13266extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013267{
Martin v. Löwis11437992002-04-12 09:54:03 +000013268#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 builtin and then its argument prototype would still apply. */
13271char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013272/* The GNU C library defines this for functions which it implements
13273 to always fail with ENOSYS. Some functions are actually named
13274 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013275#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013276choke me
13277#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013278char (*f) () = $ac_func;
13279#endif
13280#ifdef __cplusplus
13281}
Guido van Rossume97ee181999-12-20 21:27:22 +000013282#endif
13283
Skip Montanaro6dead952003-09-25 14:50:04 +000013284int
13285main ()
13286{
13287return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013288 ;
13289 return 0;
13290}
13291_ACEOF
13292rm -f conftest.$ac_objext conftest$ac_exeext
13293if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013294 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013296 grep -v '^ *+' conftest.er1 >conftest.err
13297 rm -f conftest.er1
13298 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013301 { ac_try='test -z "$ac_c_werror_flag"
13302 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013303 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13304 (eval $ac_try) 2>&5
13305 ac_status=$?
13306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307 (exit $ac_status); }; } &&
13308 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13310 (eval $ac_try) 2>&5
13311 ac_status=$?
13312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13313 (exit $ac_status); }; }; then
13314 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013315else
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013317sed 's/^/| /' conftest.$ac_ext >&5
13318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013320fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013321rm -f conftest.err conftest.$ac_objext \
13322 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013324echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13325echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13326if test `eval echo '${'$as_ac_var'}'` = yes; then
13327 cat >>confdefs.h <<_ACEOF
13328#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13329_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013330
Guido van Rossume97ee181999-12-20 21:27:22 +000013331fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013332done
Guido van Rossume97ee181999-12-20 21:27:22 +000013333
Michael W. Hudson54241132001-12-07 15:38:26 +000013334
Guido van Rossume97ee181999-12-20 21:27:22 +000013335# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13336# loading of modules.
13337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13339echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013340if test -z "$DYNLOADFILE"
13341then
13342 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013343 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13344 if test "$ac_cv_func_dlopen" = yes
13345 then DYNLOADFILE="dynload_shlib.o"
13346 else DYNLOADFILE="dynload_aix.o"
13347 fi
13348 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013349 BeOS*) DYNLOADFILE="dynload_beos.o";;
13350 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013351 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013352 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013353 *)
13354 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13355 # out any dynamic loading
13356 if test "$ac_cv_func_dlopen" = yes
13357 then DYNLOADFILE="dynload_shlib.o"
13358 else DYNLOADFILE="dynload_stub.o"
13359 fi
13360 ;;
13361 esac
13362fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013363echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13364echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013365if test "$DYNLOADFILE" != "dynload_stub.o"
13366then
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
13368cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013369#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013370_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013371
13372fi
13373
Neil Schemenauer4e425612001-06-19 15:44:15 +000013374# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13375
Michael W. Hudson54241132001-12-07 15:38:26 +000013376
Martin v. Löwis11437992002-04-12 09:54:03 +000013377echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13378echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013379if test -z "$MACHDEP_OBJS"
13380then
Jack Jansene578a632001-08-15 01:27:14 +000013381 MACHDEP_OBJS=$extra_machdep_objs
13382else
13383 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013384fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013385echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13386echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013387
Guido van Rossum627b2d71993-12-24 10:39:16 +000013388# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
Martin v. Löwisd6320502004-08-12 13:45:08 +000013460
Martin v. Löwisc3001752005-01-23 09:27:24 +000013461
13462
Martin v. Löwisd6320502004-08-12 13:45:08 +000013463for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13464 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013465 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013466 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013467 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013468 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013469 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013470 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013471 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013472 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013473 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013474 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013475do
Martin v. Löwis11437992002-04-12 09:54:03 +000013476as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13477echo "$as_me:$LINENO: checking for $ac_func" >&5
13478echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13479if eval "test \"\${$as_ac_var+set}\" = set"; then
13480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481else
Martin v. Löwis11437992002-04-12 09:54:03 +000013482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013483/* confdefs.h. */
13484_ACEOF
13485cat confdefs.h >>conftest.$ac_ext
13486cat >>conftest.$ac_ext <<_ACEOF
13487/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013488/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013489 which can conflict with char $ac_func (); below.
13490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013491 <limits.h> exists even on freestanding compilers. Under hpux,
13492 including <limits.h> includes <sys/time.h> and causes problems
13493 checking for functions defined therein. */
13494#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013495# include <limits.h>
13496#else
13497# include <assert.h>
13498#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013499/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013500#ifdef __cplusplus
13501extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013502{
Martin v. Löwis11437992002-04-12 09:54:03 +000013503#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013504/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 builtin and then its argument prototype would still apply. */
13506char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013507/* The GNU C library defines this for functions which it implements
13508 to always fail with ENOSYS. Some functions are actually named
13509 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013510#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013511choke me
13512#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013513char (*f) () = $ac_func;
13514#endif
13515#ifdef __cplusplus
13516}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013517#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518
Skip Montanaro6dead952003-09-25 14:50:04 +000013519int
13520main ()
13521{
13522return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
13527rm -f conftest.$ac_objext conftest$ac_exeext
13528if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013529 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013531 grep -v '^ *+' conftest.er1 >conftest.err
13532 rm -f conftest.er1
13533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13535 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013536 { ac_try='test -z "$ac_c_werror_flag"
13537 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13539 (eval $ac_try) 2>&5
13540 ac_status=$?
13541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13542 (exit $ac_status); }; } &&
13543 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13545 (eval $ac_try) 2>&5
13546 ac_status=$?
13547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13548 (exit $ac_status); }; }; then
13549 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013550else
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013552sed 's/^/| /' conftest.$ac_ext >&5
13553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013555fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013556rm -f conftest.err conftest.$ac_objext \
13557 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013558fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013559echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13560echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13561if test `eval echo '${'$as_ac_var'}'` = yes; then
13562 cat >>confdefs.h <<_ACEOF
13563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13564_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013565
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013566fi
13567done
13568
Michael W. Hudson54241132001-12-07 15:38:26 +000013569
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013570# For some functions, having a definition is not sufficient, since
13571# we want to take their address.
13572echo "$as_me:$LINENO: checking for chroot" >&5
13573echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013575/* confdefs.h. */
13576_ACEOF
13577cat confdefs.h >>conftest.$ac_ext
13578cat >>conftest.$ac_ext <<_ACEOF
13579/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013580#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013581int
13582main ()
13583{
13584void *x=chroot
13585 ;
13586 return 0;
13587}
13588_ACEOF
13589rm -f conftest.$ac_objext
13590if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013591 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013593 grep -v '^ *+' conftest.er1 >conftest.err
13594 rm -f conftest.er1
13595 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013598 { ac_try='test -z "$ac_c_werror_flag"
13599 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13601 (eval $ac_try) 2>&5
13602 ac_status=$?
13603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13604 (exit $ac_status); }; } &&
13605 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13607 (eval $ac_try) 2>&5
13608 ac_status=$?
13609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13610 (exit $ac_status); }; }; then
13611
13612cat >>confdefs.h <<\_ACEOF
13613#define HAVE_CHROOT 1
13614_ACEOF
13615
13616 echo "$as_me:$LINENO: result: yes" >&5
13617echo "${ECHO_T}yes" >&6
13618else
13619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013620sed 's/^/| /' conftest.$ac_ext >&5
13621
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013622echo "$as_me:$LINENO: result: no" >&5
13623echo "${ECHO_T}no" >&6
13624
13625fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013627echo "$as_me:$LINENO: checking for link" >&5
13628echo $ECHO_N "checking for link... $ECHO_C" >&6
13629cat >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öwisc8ad7cc2002-11-11 13:23:45 +000013635#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013636int
13637main ()
13638{
13639void *x=link
13640 ;
13641 return 0;
13642}
13643_ACEOF
13644rm -f conftest.$ac_objext
13645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013646 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013648 grep -v '^ *+' conftest.er1 >conftest.err
13649 rm -f conftest.er1
13650 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013653 { ac_try='test -z "$ac_c_werror_flag"
13654 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13656 (eval $ac_try) 2>&5
13657 ac_status=$?
13658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659 (exit $ac_status); }; } &&
13660 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13662 (eval $ac_try) 2>&5
13663 ac_status=$?
13664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13665 (exit $ac_status); }; }; then
13666
13667cat >>confdefs.h <<\_ACEOF
13668#define HAVE_LINK 1
13669_ACEOF
13670
13671 echo "$as_me:$LINENO: result: yes" >&5
13672echo "${ECHO_T}yes" >&6
13673else
13674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013675sed 's/^/| /' conftest.$ac_ext >&5
13676
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013677echo "$as_me:$LINENO: result: no" >&5
13678echo "${ECHO_T}no" >&6
13679
13680fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013682echo "$as_me:$LINENO: checking for symlink" >&5
13683echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* confdefs.h. */
13686_ACEOF
13687cat confdefs.h >>conftest.$ac_ext
13688cat >>conftest.$ac_ext <<_ACEOF
13689/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013690#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013691int
13692main ()
13693{
13694void *x=symlink
13695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext
13700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013701 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013703 grep -v '^ *+' conftest.er1 >conftest.err
13704 rm -f conftest.er1
13705 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013708 { ac_try='test -z "$ac_c_werror_flag"
13709 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013710 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13711 (eval $ac_try) 2>&5
13712 ac_status=$?
13713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13714 (exit $ac_status); }; } &&
13715 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13717 (eval $ac_try) 2>&5
13718 ac_status=$?
13719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); }; }; then
13721
13722cat >>confdefs.h <<\_ACEOF
13723#define HAVE_SYMLINK 1
13724_ACEOF
13725
13726 echo "$as_me:$LINENO: result: yes" >&5
13727echo "${ECHO_T}yes" >&6
13728else
13729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013730sed 's/^/| /' conftest.$ac_ext >&5
13731
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013732echo "$as_me:$LINENO: result: no" >&5
13733echo "${ECHO_T}no" >&6
13734
13735fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013736rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013737echo "$as_me:$LINENO: checking for fchdir" >&5
13738echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013740/* confdefs.h. */
13741_ACEOF
13742cat confdefs.h >>conftest.$ac_ext
13743cat >>conftest.$ac_ext <<_ACEOF
13744/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013745#include <unistd.h>
13746int
13747main ()
13748{
13749void *x=fchdir
13750 ;
13751 return 0;
13752}
13753_ACEOF
13754rm -f conftest.$ac_objext
13755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013756 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013758 grep -v '^ *+' conftest.er1 >conftest.err
13759 rm -f conftest.er1
13760 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013763 { ac_try='test -z "$ac_c_werror_flag"
13764 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13766 (eval $ac_try) 2>&5
13767 ac_status=$?
13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13769 (exit $ac_status); }; } &&
13770 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13772 (eval $ac_try) 2>&5
13773 ac_status=$?
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); }; }; then
13776
13777cat >>confdefs.h <<\_ACEOF
13778#define HAVE_FCHDIR 1
13779_ACEOF
13780
13781 echo "$as_me:$LINENO: result: yes" >&5
13782echo "${ECHO_T}yes" >&6
13783else
13784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013785sed 's/^/| /' conftest.$ac_ext >&5
13786
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013787echo "$as_me:$LINENO: result: no" >&5
13788echo "${ECHO_T}no" >&6
13789
13790fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013791rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013792echo "$as_me:$LINENO: checking for fsync" >&5
13793echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013800#include <unistd.h>
13801int
13802main ()
13803{
13804void *x=fsync
13805 ;
13806 return 0;
13807}
13808_ACEOF
13809rm -f conftest.$ac_objext
13810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013813 grep -v '^ *+' conftest.er1 >conftest.err
13814 rm -f conftest.er1
13815 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013818 { ac_try='test -z "$ac_c_werror_flag"
13819 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13821 (eval $ac_try) 2>&5
13822 ac_status=$?
13823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13824 (exit $ac_status); }; } &&
13825 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13827 (eval $ac_try) 2>&5
13828 ac_status=$?
13829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13830 (exit $ac_status); }; }; then
13831
13832cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013833#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013834_ACEOF
13835
13836 echo "$as_me:$LINENO: result: yes" >&5
13837echo "${ECHO_T}yes" >&6
13838else
13839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013840sed 's/^/| /' conftest.$ac_ext >&5
13841
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013842echo "$as_me:$LINENO: result: no" >&5
13843echo "${ECHO_T}no" >&6
13844
13845fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013847echo "$as_me:$LINENO: checking for fdatasync" >&5
13848echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13849cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* confdefs.h. */
13851_ACEOF
13852cat confdefs.h >>conftest.$ac_ext
13853cat >>conftest.$ac_ext <<_ACEOF
13854/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013855#include <unistd.h>
13856int
13857main ()
13858{
13859void *x=fdatasync
13860 ;
13861 return 0;
13862}
13863_ACEOF
13864rm -f conftest.$ac_objext
13865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013868 grep -v '^ *+' conftest.er1 >conftest.err
13869 rm -f conftest.er1
13870 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13872 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013873 { ac_try='test -z "$ac_c_werror_flag"
13874 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13876 (eval $ac_try) 2>&5
13877 ac_status=$?
13878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13879 (exit $ac_status); }; } &&
13880 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13882 (eval $ac_try) 2>&5
13883 ac_status=$?
13884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13885 (exit $ac_status); }; }; then
13886
13887cat >>confdefs.h <<\_ACEOF
13888#define HAVE_FDATASYNC 1
13889_ACEOF
13890
13891 echo "$as_me:$LINENO: result: yes" >&5
13892echo "${ECHO_T}yes" >&6
13893else
13894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013895sed 's/^/| /' conftest.$ac_ext >&5
13896
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013897echo "$as_me:$LINENO: result: no" >&5
13898echo "${ECHO_T}no" >&6
13899
13900fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013902
Martin v. Löwisd5843682002-11-21 20:41:28 +000013903# On some systems (eg. FreeBSD 5), we would find a definition of the
13904# functions ctermid_r, setgroups in the library, but no prototype
13905# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13906# address to avoid compiler warnings and potential miscompilations
13907# because of the missing prototypes.
13908
13909echo "$as_me:$LINENO: checking for ctermid_r" >&5
13910echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013912/* confdefs.h. */
13913_ACEOF
13914cat confdefs.h >>conftest.$ac_ext
13915cat >>conftest.$ac_ext <<_ACEOF
13916/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013917
13918#include "confdefs.h"
13919#include <stdio.h>
13920
Martin v. Löwisd5843682002-11-21 20:41:28 +000013921int
13922main ()
13923{
13924void* p = ctermid_r
13925 ;
13926 return 0;
13927}
13928_ACEOF
13929rm -f conftest.$ac_objext
13930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013931 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013933 grep -v '^ *+' conftest.er1 >conftest.err
13934 rm -f conftest.er1
13935 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13937 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013938 { ac_try='test -z "$ac_c_werror_flag"
13939 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13941 (eval $ac_try) 2>&5
13942 ac_status=$?
13943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 (exit $ac_status); }; } &&
13945 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13947 (eval $ac_try) 2>&5
13948 ac_status=$?
13949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13950 (exit $ac_status); }; }; then
13951
13952cat >>confdefs.h <<\_ACEOF
13953#define HAVE_CTERMID_R 1
13954_ACEOF
13955
13956 echo "$as_me:$LINENO: result: yes" >&5
13957echo "${ECHO_T}yes" >&6
13958else
13959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013960sed 's/^/| /' conftest.$ac_ext >&5
13961
Martin v. Löwisd5843682002-11-21 20:41:28 +000013962echo "$as_me:$LINENO: result: no" >&5
13963echo "${ECHO_T}no" >&6
13964
13965fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013967
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013968echo "$as_me:$LINENO: checking for flock" >&5
13969echo $ECHO_N "checking for flock... $ECHO_C" >&6
13970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013976
13977#include "confdefs.h"
13978#include <sys/file.h>
13979
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013980int
13981main ()
13982{
13983void* p = flock
13984 ;
13985 return 0;
13986}
13987_ACEOF
13988rm -f conftest.$ac_objext
13989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013992 grep -v '^ *+' conftest.er1 >conftest.err
13993 rm -f conftest.er1
13994 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013997 { ac_try='test -z "$ac_c_werror_flag"
13998 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14000 (eval $ac_try) 2>&5
14001 ac_status=$?
14002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14003 (exit $ac_status); }; } &&
14004 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14006 (eval $ac_try) 2>&5
14007 ac_status=$?
14008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14009 (exit $ac_status); }; }; then
14010
14011cat >>confdefs.h <<\_ACEOF
14012#define HAVE_FLOCK 1
14013_ACEOF
14014
14015 echo "$as_me:$LINENO: result: yes" >&5
14016echo "${ECHO_T}yes" >&6
14017else
14018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014019sed 's/^/| /' conftest.$ac_ext >&5
14020
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014021echo "$as_me:$LINENO: result: no" >&5
14022echo "${ECHO_T}no" >&6
14023
14024fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014026
14027echo "$as_me:$LINENO: checking for getpagesize" >&5
14028echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* confdefs.h. */
14031_ACEOF
14032cat confdefs.h >>conftest.$ac_ext
14033cat >>conftest.$ac_ext <<_ACEOF
14034/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014035
14036#include "confdefs.h"
14037#include <unistd.h>
14038
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014039int
14040main ()
14041{
14042void* p = getpagesize
14043 ;
14044 return 0;
14045}
14046_ACEOF
14047rm -f conftest.$ac_objext
14048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014049 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014051 grep -v '^ *+' conftest.er1 >conftest.err
14052 rm -f conftest.er1
14053 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014056 { ac_try='test -z "$ac_c_werror_flag"
14057 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14060 ac_status=$?
14061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062 (exit $ac_status); }; } &&
14063 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065 (eval $ac_try) 2>&5
14066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); }; }; then
14069
14070cat >>confdefs.h <<\_ACEOF
14071#define HAVE_GETPAGESIZE 1
14072_ACEOF
14073
14074 echo "$as_me:$LINENO: result: yes" >&5
14075echo "${ECHO_T}yes" >&6
14076else
14077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014078sed 's/^/| /' conftest.$ac_ext >&5
14079
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014080echo "$as_me:$LINENO: result: no" >&5
14081echo "${ECHO_T}no" >&6
14082
14083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014086for ac_prog in true
14087do
14088 # Extract the first word of "$ac_prog", so it can be a program name with args.
14089set dummy $ac_prog; ac_word=$2
14090echo "$as_me:$LINENO: checking for $ac_word" >&5
14091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14092if test "${ac_cv_prog_TRUE+set}" = set; then
14093 echo $ECHO_N "(cached) $ECHO_C" >&6
14094else
14095 if test -n "$TRUE"; then
14096 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14097else
14098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14099for as_dir in $PATH
14100do
14101 IFS=$as_save_IFS
14102 test -z "$as_dir" && as_dir=.
14103 for ac_exec_ext in '' $ac_executable_extensions; do
14104 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14105 ac_cv_prog_TRUE="$ac_prog"
14106 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14107 break 2
14108 fi
14109done
14110done
14111
14112fi
14113fi
14114TRUE=$ac_cv_prog_TRUE
14115if test -n "$TRUE"; then
14116 echo "$as_me:$LINENO: result: $TRUE" >&5
14117echo "${ECHO_T}$TRUE" >&6
14118else
14119 echo "$as_me:$LINENO: result: no" >&5
14120echo "${ECHO_T}no" >&6
14121fi
14122
14123 test -n "$TRUE" && break
14124done
14125test -n "$TRUE" || TRUE="/bin/true"
14126
14127
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014128echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14129echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14130if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14131 echo $ECHO_N "(cached) $ECHO_C" >&6
14132else
14133 ac_check_lib_save_LIBS=$LIBS
14134LIBS="-lc $LIBS"
14135cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014136/* confdefs.h. */
14137_ACEOF
14138cat confdefs.h >>conftest.$ac_ext
14139cat >>conftest.$ac_ext <<_ACEOF
14140/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014141
14142/* Override any gcc2 internal prototype to avoid an error. */
14143#ifdef __cplusplus
14144extern "C"
14145#endif
14146/* We use char because int might match the return type of a gcc2
14147 builtin and then its argument prototype would still apply. */
14148char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014149int
14150main ()
14151{
14152inet_aton ();
14153 ;
14154 return 0;
14155}
14156_ACEOF
14157rm -f conftest.$ac_objext conftest$ac_exeext
14158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014159 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014161 grep -v '^ *+' conftest.er1 >conftest.err
14162 rm -f conftest.er1
14163 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014166 { ac_try='test -z "$ac_c_werror_flag"
14167 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14169 (eval $ac_try) 2>&5
14170 ac_status=$?
14171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14172 (exit $ac_status); }; } &&
14173 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14175 (eval $ac_try) 2>&5
14176 ac_status=$?
14177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14178 (exit $ac_status); }; }; then
14179 ac_cv_lib_c_inet_aton=yes
14180else
14181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014182sed 's/^/| /' conftest.$ac_ext >&5
14183
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014184ac_cv_lib_c_inet_aton=no
14185fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014186rm -f conftest.err conftest.$ac_objext \
14187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014188LIBS=$ac_check_lib_save_LIBS
14189fi
14190echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14191echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14192if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014193 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014194else
14195
14196echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14197echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14198if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14199 echo $ECHO_N "(cached) $ECHO_C" >&6
14200else
14201 ac_check_lib_save_LIBS=$LIBS
14202LIBS="-lresolv $LIBS"
14203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014204/* confdefs.h. */
14205_ACEOF
14206cat confdefs.h >>conftest.$ac_ext
14207cat >>conftest.$ac_ext <<_ACEOF
14208/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014209
14210/* Override any gcc2 internal prototype to avoid an error. */
14211#ifdef __cplusplus
14212extern "C"
14213#endif
14214/* We use char because int might match the return type of a gcc2
14215 builtin and then its argument prototype would still apply. */
14216char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014217int
14218main ()
14219{
14220inet_aton ();
14221 ;
14222 return 0;
14223}
14224_ACEOF
14225rm -f conftest.$ac_objext conftest$ac_exeext
14226if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014227 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014229 grep -v '^ *+' conftest.er1 >conftest.err
14230 rm -f conftest.er1
14231 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014234 { ac_try='test -z "$ac_c_werror_flag"
14235 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14237 (eval $ac_try) 2>&5
14238 ac_status=$?
14239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14240 (exit $ac_status); }; } &&
14241 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14243 (eval $ac_try) 2>&5
14244 ac_status=$?
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); }; }; then
14247 ac_cv_lib_resolv_inet_aton=yes
14248else
14249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014250sed 's/^/| /' conftest.$ac_ext >&5
14251
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014252ac_cv_lib_resolv_inet_aton=no
14253fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014254rm -f conftest.err conftest.$ac_objext \
14255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014256LIBS=$ac_check_lib_save_LIBS
14257fi
14258echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14259echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14260if test $ac_cv_lib_resolv_inet_aton = yes; then
14261 cat >>confdefs.h <<_ACEOF
14262#define HAVE_LIBRESOLV 1
14263_ACEOF
14264
14265 LIBS="-lresolv $LIBS"
14266
14267fi
14268
14269
14270fi
14271
14272
Martin v. Löwise9416172003-05-03 10:12:45 +000014273echo "$as_me:$LINENO: checking for hstrerror" >&5
14274echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014276/* confdefs.h. */
14277_ACEOF
14278cat confdefs.h >>conftest.$ac_ext
14279cat >>conftest.$ac_ext <<_ACEOF
14280/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014281
14282#include "confdefs.h"
14283#include <netdb.h>
14284
Martin v. Löwise9416172003-05-03 10:12:45 +000014285int
14286main ()
14287{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014288void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014289 ;
14290 return 0;
14291}
14292_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014293rm -f conftest.$ac_objext conftest$ac_exeext
14294if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014297 grep -v '^ *+' conftest.er1 >conftest.err
14298 rm -f conftest.er1
14299 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014302 { ac_try='test -z "$ac_c_werror_flag"
14303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14305 (eval $ac_try) 2>&5
14306 ac_status=$?
14307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14308 (exit $ac_status); }; } &&
14309 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14311 (eval $ac_try) 2>&5
14312 ac_status=$?
14313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14314 (exit $ac_status); }; }; then
14315
14316cat >>confdefs.h <<\_ACEOF
14317#define HAVE_HSTRERROR 1
14318_ACEOF
14319
14320 echo "$as_me:$LINENO: result: yes" >&5
14321echo "${ECHO_T}yes" >&6
14322else
14323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014324sed 's/^/| /' conftest.$ac_ext >&5
14325
Martin v. Löwise9416172003-05-03 10:12:45 +000014326echo "$as_me:$LINENO: result: no" >&5
14327echo "${ECHO_T}no" >&6
14328
14329fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014330rm -f conftest.err conftest.$ac_objext \
14331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014332
14333echo "$as_me:$LINENO: checking for inet_aton" >&5
14334echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014336/* confdefs.h. */
14337_ACEOF
14338cat confdefs.h >>conftest.$ac_ext
14339cat >>conftest.$ac_ext <<_ACEOF
14340/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014341
14342#include "confdefs.h"
14343#include <sys/socket.h>
14344#include <netinet/in.h>
14345#include <arpa/inet.h>
14346
Martin v. Löwise9416172003-05-03 10:12:45 +000014347int
14348main ()
14349{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014350void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014351 ;
14352 return 0;
14353}
14354_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014355rm -f conftest.$ac_objext conftest$ac_exeext
14356if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014357 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014359 grep -v '^ *+' conftest.er1 >conftest.err
14360 rm -f conftest.er1
14361 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014364 { ac_try='test -z "$ac_c_werror_flag"
14365 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014366 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14367 (eval $ac_try) 2>&5
14368 ac_status=$?
14369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370 (exit $ac_status); }; } &&
14371 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014372 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14373 (eval $ac_try) 2>&5
14374 ac_status=$?
14375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14376 (exit $ac_status); }; }; then
14377
14378cat >>confdefs.h <<\_ACEOF
14379#define HAVE_INET_ATON 1
14380_ACEOF
14381
14382 echo "$as_me:$LINENO: result: yes" >&5
14383echo "${ECHO_T}yes" >&6
14384else
14385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014386sed 's/^/| /' conftest.$ac_ext >&5
14387
Martin v. Löwise9416172003-05-03 10:12:45 +000014388echo "$as_me:$LINENO: result: no" >&5
14389echo "${ECHO_T}no" >&6
14390
14391fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014392rm -f conftest.err conftest.$ac_objext \
14393 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014394
14395echo "$as_me:$LINENO: checking for inet_pton" >&5
14396echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014398/* confdefs.h. */
14399_ACEOF
14400cat confdefs.h >>conftest.$ac_ext
14401cat >>conftest.$ac_ext <<_ACEOF
14402/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014403
14404#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014405#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014406#include <sys/socket.h>
14407#include <netinet/in.h>
14408#include <arpa/inet.h>
14409
Martin v. Löwise9416172003-05-03 10:12:45 +000014410int
14411main ()
14412{
14413void* p = inet_pton
14414 ;
14415 return 0;
14416}
14417_ACEOF
14418rm -f conftest.$ac_objext
14419if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014420 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014422 grep -v '^ *+' conftest.er1 >conftest.err
14423 rm -f conftest.er1
14424 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14426 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014427 { ac_try='test -z "$ac_c_werror_flag"
14428 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14430 (eval $ac_try) 2>&5
14431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); }; } &&
14434 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14436 (eval $ac_try) 2>&5
14437 ac_status=$?
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); }; }; then
14440
14441cat >>confdefs.h <<\_ACEOF
14442#define HAVE_INET_PTON 1
14443_ACEOF
14444
14445 echo "$as_me:$LINENO: result: yes" >&5
14446echo "${ECHO_T}yes" >&6
14447else
14448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014449sed 's/^/| /' conftest.$ac_ext >&5
14450
Martin v. Löwise9416172003-05-03 10:12:45 +000014451echo "$as_me:$LINENO: result: no" >&5
14452echo "${ECHO_T}no" >&6
14453
14454fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014455rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014456
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014457# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014458echo "$as_me:$LINENO: checking for setgroups" >&5
14459echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014461/* confdefs.h. */
14462_ACEOF
14463cat confdefs.h >>conftest.$ac_ext
14464cat >>conftest.$ac_ext <<_ACEOF
14465/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014466
14467#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014468#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014469#ifdef HAVE_GRP_H
14470#include <grp.h>
14471#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014472
Martin v. Löwisd5843682002-11-21 20:41:28 +000014473int
14474main ()
14475{
14476void* p = setgroups
14477 ;
14478 return 0;
14479}
14480_ACEOF
14481rm -f conftest.$ac_objext
14482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014483 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014485 grep -v '^ *+' conftest.er1 >conftest.err
14486 rm -f conftest.er1
14487 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14489 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014490 { ac_try='test -z "$ac_c_werror_flag"
14491 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14493 (eval $ac_try) 2>&5
14494 ac_status=$?
14495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14496 (exit $ac_status); }; } &&
14497 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14499 (eval $ac_try) 2>&5
14500 ac_status=$?
14501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14502 (exit $ac_status); }; }; then
14503
14504cat >>confdefs.h <<\_ACEOF
14505#define HAVE_SETGROUPS 1
14506_ACEOF
14507
14508 echo "$as_me:$LINENO: result: yes" >&5
14509echo "${ECHO_T}yes" >&6
14510else
14511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014512sed 's/^/| /' conftest.$ac_ext >&5
14513
Martin v. Löwisd5843682002-11-21 20:41:28 +000014514echo "$as_me:$LINENO: result: no" >&5
14515echo "${ECHO_T}no" >&6
14516
14517fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014518rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014520# check for openpty and forkpty
14521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014523for ac_func in openpty
14524do
Martin v. Löwis11437992002-04-12 09:54:03 +000014525as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14526echo "$as_me:$LINENO: checking for $ac_func" >&5
14527echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14528if eval "test \"\${$as_ac_var+set}\" = set"; then
14529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014532/* confdefs.h. */
14533_ACEOF
14534cat confdefs.h >>conftest.$ac_ext
14535cat >>conftest.$ac_ext <<_ACEOF
14536/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014537/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014538 which can conflict with char $ac_func (); below.
14539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014540 <limits.h> exists even on freestanding compilers. Under hpux,
14541 including <limits.h> includes <sys/time.h> and causes problems
14542 checking for functions defined therein. */
14543#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014544# include <limits.h>
14545#else
14546# include <assert.h>
14547#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014548/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014549#ifdef __cplusplus
14550extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014551{
Martin v. Löwis11437992002-04-12 09:54:03 +000014552#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014553/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 builtin and then its argument prototype would still apply. */
14555char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014556/* The GNU C library defines this for functions which it implements
14557 to always fail with ENOSYS. Some functions are actually named
14558 something starting with __ and the normal name is an alias. */
14559#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14560choke me
14561#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014562char (*f) () = $ac_func;
14563#endif
14564#ifdef __cplusplus
14565}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014566#endif
14567
Skip Montanaro6dead952003-09-25 14:50:04 +000014568int
14569main ()
14570{
14571return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 ;
14573 return 0;
14574}
14575_ACEOF
14576rm -f conftest.$ac_objext conftest$ac_exeext
14577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014578 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014580 grep -v '^ *+' conftest.er1 >conftest.err
14581 rm -f conftest.er1
14582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14584 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014585 { ac_try='test -z "$ac_c_werror_flag"
14586 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14588 (eval $ac_try) 2>&5
14589 ac_status=$?
14590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591 (exit $ac_status); }; } &&
14592 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14594 (eval $ac_try) 2>&5
14595 ac_status=$?
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); }; }; then
14598 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014599else
Martin v. Löwis11437992002-04-12 09:54:03 +000014600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014601sed 's/^/| /' conftest.$ac_ext >&5
14602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014604fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014605rm -f conftest.err conftest.$ac_objext \
14606 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014607fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014608echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14609echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14610if test `eval echo '${'$as_ac_var'}'` = yes; then
14611 cat >>confdefs.h <<_ACEOF
14612#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14613_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014614
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014615else
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14617echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14618if test "${ac_cv_lib_util_openpty+set}" = set; then
14619 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014620else
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014622LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014624/* confdefs.h. */
14625_ACEOF
14626cat confdefs.h >>conftest.$ac_ext
14627cat >>conftest.$ac_ext <<_ACEOF
14628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014629
Fred Drake8cef4cf2000-06-28 16:40:38 +000014630/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014631#ifdef __cplusplus
14632extern "C"
14633#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014634/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 builtin and then its argument prototype would still apply. */
14636char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014637int
14638main ()
14639{
14640openpty ();
14641 ;
14642 return 0;
14643}
14644_ACEOF
14645rm -f conftest.$ac_objext conftest$ac_exeext
14646if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014647 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014649 grep -v '^ *+' conftest.er1 >conftest.err
14650 rm -f conftest.er1
14651 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14653 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014654 { ac_try='test -z "$ac_c_werror_flag"
14655 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14657 (eval $ac_try) 2>&5
14658 ac_status=$?
14659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14660 (exit $ac_status); }; } &&
14661 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14663 (eval $ac_try) 2>&5
14664 ac_status=$?
14665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14666 (exit $ac_status); }; }; then
14667 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014668else
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014670sed 's/^/| /' conftest.$ac_ext >&5
14671
Martin v. Löwis11437992002-04-12 09:54:03 +000014672ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014673fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014674rm -f conftest.err conftest.$ac_objext \
14675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014676LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014677fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014678echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14679echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14680if test $ac_cv_lib_util_openpty = yes; then
14681 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014682#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014683_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014684 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014685fi
14686
14687fi
14688done
14689
Martin v. Löwis11437992002-04-12 09:54:03 +000014690
Fred Drake8cef4cf2000-06-28 16:40:38 +000014691for ac_func in forkpty
14692do
Martin v. Löwis11437992002-04-12 09:54:03 +000014693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14694echo "$as_me:$LINENO: checking for $ac_func" >&5
14695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14696if eval "test \"\${$as_ac_var+set}\" = set"; then
14697 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014700/* confdefs.h. */
14701_ACEOF
14702cat confdefs.h >>conftest.$ac_ext
14703cat >>conftest.$ac_ext <<_ACEOF
14704/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014705/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014706 which can conflict with char $ac_func (); below.
14707 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014708 <limits.h> exists even on freestanding compilers. Under hpux,
14709 including <limits.h> includes <sys/time.h> and causes problems
14710 checking for functions defined therein. */
14711#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014712# include <limits.h>
14713#else
14714# include <assert.h>
14715#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014716/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014717#ifdef __cplusplus
14718extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014719{
Martin v. Löwis11437992002-04-12 09:54:03 +000014720#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014721/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 builtin and then its argument prototype would still apply. */
14723char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014724/* The GNU C library defines this for functions which it implements
14725 to always fail with ENOSYS. Some functions are actually named
14726 something starting with __ and the normal name is an alias. */
14727#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14728choke me
14729#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014730char (*f) () = $ac_func;
14731#endif
14732#ifdef __cplusplus
14733}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014734#endif
14735
Skip Montanaro6dead952003-09-25 14:50:04 +000014736int
14737main ()
14738{
14739return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 ;
14741 return 0;
14742}
14743_ACEOF
14744rm -f conftest.$ac_objext conftest$ac_exeext
14745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014746 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014748 grep -v '^ *+' conftest.er1 >conftest.err
14749 rm -f conftest.er1
14750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14752 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014753 { ac_try='test -z "$ac_c_werror_flag"
14754 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14756 (eval $ac_try) 2>&5
14757 ac_status=$?
14758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759 (exit $ac_status); }; } &&
14760 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14762 (eval $ac_try) 2>&5
14763 ac_status=$?
14764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14765 (exit $ac_status); }; }; then
14766 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014767else
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014769sed 's/^/| /' conftest.$ac_ext >&5
14770
Martin v. Löwis11437992002-04-12 09:54:03 +000014771eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014772fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014773rm -f conftest.err conftest.$ac_objext \
14774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014775fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014776echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14777echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14778if test `eval echo '${'$as_ac_var'}'` = yes; then
14779 cat >>confdefs.h <<_ACEOF
14780#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14781_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014782
Fred Drake8cef4cf2000-06-28 16:40:38 +000014783else
Martin v. Löwis11437992002-04-12 09:54:03 +000014784 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14785echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14786if test "${ac_cv_lib_util_forkpty+set}" = set; then
14787 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014788else
Martin v. Löwis11437992002-04-12 09:54:03 +000014789 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014790LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014791cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014792/* confdefs.h. */
14793_ACEOF
14794cat confdefs.h >>conftest.$ac_ext
14795cat >>conftest.$ac_ext <<_ACEOF
14796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Fred Drake8cef4cf2000-06-28 16:40:38 +000014798/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014799#ifdef __cplusplus
14800extern "C"
14801#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014802/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 builtin and then its argument prototype would still apply. */
14804char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014805int
14806main ()
14807{
14808forkpty ();
14809 ;
14810 return 0;
14811}
14812_ACEOF
14813rm -f conftest.$ac_objext conftest$ac_exeext
14814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014815 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014817 grep -v '^ *+' conftest.er1 >conftest.err
14818 rm -f conftest.er1
14819 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14821 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014822 { ac_try='test -z "$ac_c_werror_flag"
14823 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014824 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14825 (eval $ac_try) 2>&5
14826 ac_status=$?
14827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14828 (exit $ac_status); }; } &&
14829 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14831 (eval $ac_try) 2>&5
14832 ac_status=$?
14833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14834 (exit $ac_status); }; }; then
14835 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014836else
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014838sed 's/^/| /' conftest.$ac_ext >&5
14839
Martin v. Löwis11437992002-04-12 09:54:03 +000014840ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014841fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014842rm -f conftest.err conftest.$ac_objext \
14843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014844LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014846echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14847echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14848if test $ac_cv_lib_util_forkpty = yes; then
14849 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014850#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014851_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014852 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014853fi
14854
14855fi
14856done
14857
Jack Jansendd19cf82001-12-06 22:36:17 +000014858
Michael W. Hudson54241132001-12-07 15:38:26 +000014859# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
14861
14862
14863
14864
14865
Fred Drake8cef4cf2000-06-28 16:40:38 +000014866for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14867do
Martin v. Löwis11437992002-04-12 09:54:03 +000014868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14869echo "$as_me:$LINENO: checking for $ac_func" >&5
14870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14871if eval "test \"\${$as_ac_var+set}\" = set"; then
14872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014881 which can conflict with char $ac_func (); below.
14882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014883 <limits.h> exists even on freestanding compilers. Under hpux,
14884 including <limits.h> includes <sys/time.h> and causes problems
14885 checking for functions defined therein. */
14886#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014887# include <limits.h>
14888#else
14889# include <assert.h>
14890#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014891/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014892#ifdef __cplusplus
14893extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014894{
Martin v. Löwis11437992002-04-12 09:54:03 +000014895#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 builtin and then its argument prototype would still apply. */
14898char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014899/* The GNU C library defines this for functions which it implements
14900 to always fail with ENOSYS. Some functions are actually named
14901 something starting with __ and the normal name is an alias. */
14902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14903choke me
14904#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014905char (*f) () = $ac_func;
14906#endif
14907#ifdef __cplusplus
14908}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014909#endif
14910
Skip Montanaro6dead952003-09-25 14:50:04 +000014911int
14912main ()
14913{
14914return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
14919rm -f conftest.$ac_objext conftest$ac_exeext
14920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014923 grep -v '^ *+' conftest.er1 >conftest.err
14924 rm -f conftest.er1
14925 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014928 { ac_try='test -z "$ac_c_werror_flag"
14929 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; } &&
14935 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
14941 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014944sed 's/^/| /' conftest.$ac_ext >&5
14945
Martin v. Löwis11437992002-04-12 09:54:03 +000014946eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014947fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014948rm -f conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14952echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14953if test `eval echo '${'$as_ac_var'}'` = yes; then
14954 cat >>confdefs.h <<_ACEOF
14955#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14956_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014957
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014959done
14960
Michael W. Hudson54241132001-12-07 15:38:26 +000014961
Martin v. Löwis11437992002-04-12 09:54:03 +000014962
14963
14964
14965
14966
Martin v. Löwis1142de32002-03-29 16:28:31 +000014967for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014968do
Martin v. Löwis11437992002-04-12 09:54:03 +000014969as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14970echo "$as_me:$LINENO: checking for $ac_func" >&5
14971echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14972if eval "test \"\${$as_ac_var+set}\" = set"; then
14973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014974else
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014976/* confdefs.h. */
14977_ACEOF
14978cat confdefs.h >>conftest.$ac_ext
14979cat >>conftest.$ac_ext <<_ACEOF
14980/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014981/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014982 which can conflict with char $ac_func (); below.
14983 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014984 <limits.h> exists even on freestanding compilers. Under hpux,
14985 including <limits.h> includes <sys/time.h> and causes problems
14986 checking for functions defined therein. */
14987#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014988# include <limits.h>
14989#else
14990# include <assert.h>
14991#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014992/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014993#ifdef __cplusplus
14994extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014995{
Martin v. Löwis11437992002-04-12 09:54:03 +000014996#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014997/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 builtin and then its argument prototype would still apply. */
14999char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015000/* The GNU C library defines this for functions which it implements
15001 to always fail with ENOSYS. Some functions are actually named
15002 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015003#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000015004choke me
15005#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015006char (*f) () = $ac_func;
15007#endif
15008#ifdef __cplusplus
15009}
Guido van Rossum627b2d71993-12-24 10:39:16 +000015010#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015011
Skip Montanaro6dead952003-09-25 14:50:04 +000015012int
15013main ()
15014{
15015return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ;
15017 return 0;
15018}
15019_ACEOF
15020rm -f conftest.$ac_objext conftest$ac_exeext
15021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024 grep -v '^ *+' conftest.er1 >conftest.err
15025 rm -f conftest.er1
15026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15028 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015029 { ac_try='test -z "$ac_c_werror_flag"
15030 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032 (eval $ac_try) 2>&5
15033 ac_status=$?
15034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035 (exit $ac_status); }; } &&
15036 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15038 (eval $ac_try) 2>&5
15039 ac_status=$?
15040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15041 (exit $ac_status); }; }; then
15042 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015043else
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015045sed 's/^/| /' conftest.$ac_ext >&5
15046
Martin v. Löwis11437992002-04-12 09:54:03 +000015047eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015048fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015049rm -f conftest.err conftest.$ac_objext \
15050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15053echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15054if test `eval echo '${'$as_ac_var'}'` = yes; then
15055 cat >>confdefs.h <<_ACEOF
15056#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15057_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015058
Martin v. Löwis1142de32002-03-29 16:28:31 +000015059else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015060 case $LIBOBJS in
15061 "$ac_func.$ac_objext" | \
15062 *" $ac_func.$ac_objext" | \
15063 "$ac_func.$ac_objext "* | \
15064 *" $ac_func.$ac_objext "* ) ;;
15065 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15066esac
15067
Martin v. Löwis1142de32002-03-29 16:28:31 +000015068fi
15069done
15070
15071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
Martin v. Löwis1142de32002-03-29 16:28:31 +000015073for ac_func in getpgrp
15074do
Martin v. Löwis11437992002-04-12 09:54:03 +000015075as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15076echo "$as_me:$LINENO: checking for $ac_func" >&5
15077echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15078if eval "test \"\${$as_ac_var+set}\" = set"; then
15079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015080else
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015082/* confdefs.h. */
15083_ACEOF
15084cat confdefs.h >>conftest.$ac_ext
15085cat >>conftest.$ac_ext <<_ACEOF
15086/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015088 which can conflict with char $ac_func (); below.
15089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015090 <limits.h> exists even on freestanding compilers. Under hpux,
15091 including <limits.h> includes <sys/time.h> and causes problems
15092 checking for functions defined therein. */
15093#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015094# include <limits.h>
15095#else
15096# include <assert.h>
15097#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015098/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015099#ifdef __cplusplus
15100extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015101{
Martin v. Löwis11437992002-04-12 09:54:03 +000015102#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015103/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 builtin and then its argument prototype would still apply. */
15105char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015106/* The GNU C library defines this for functions which it implements
15107 to always fail with ENOSYS. Some functions are actually named
15108 something starting with __ and the normal name is an alias. */
15109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15110choke me
15111#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015112char (*f) () = $ac_func;
15113#endif
15114#ifdef __cplusplus
15115}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015116#endif
15117
Skip Montanaro6dead952003-09-25 14:50:04 +000015118int
15119main ()
15120{
15121return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ;
15123 return 0;
15124}
15125_ACEOF
15126rm -f conftest.$ac_objext conftest$ac_exeext
15127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015130 grep -v '^ *+' conftest.er1 >conftest.err
15131 rm -f conftest.er1
15132 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15134 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015135 { ac_try='test -z "$ac_c_werror_flag"
15136 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15138 (eval $ac_try) 2>&5
15139 ac_status=$?
15140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15141 (exit $ac_status); }; } &&
15142 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15144 (eval $ac_try) 2>&5
15145 ac_status=$?
15146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15147 (exit $ac_status); }; }; then
15148 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015149else
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015151sed 's/^/| /' conftest.$ac_ext >&5
15152
Martin v. Löwis11437992002-04-12 09:54:03 +000015153eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015154fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155rm -f conftest.err conftest.$ac_objext \
15156 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015157fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015158echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15159echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15160if test `eval echo '${'$as_ac_var'}'` = yes; then
15161 cat >>confdefs.h <<_ACEOF
15162#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15163_ACEOF
15164 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015165/* confdefs.h. */
15166_ACEOF
15167cat confdefs.h >>conftest.$ac_ext
15168cat >>conftest.$ac_ext <<_ACEOF
15169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015170#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015171int
15172main ()
15173{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015174getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 ;
15176 return 0;
15177}
15178_ACEOF
15179rm -f conftest.$ac_objext
15180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015183 grep -v '^ *+' conftest.er1 >conftest.err
15184 rm -f conftest.er1
15185 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15187 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015188 { ac_try='test -z "$ac_c_werror_flag"
15189 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15191 (eval $ac_try) 2>&5
15192 ac_status=$?
15193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194 (exit $ac_status); }; } &&
15195 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15197 (eval $ac_try) 2>&5
15198 ac_status=$?
15199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15200 (exit $ac_status); }; }; then
15201
15202cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015203#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015204_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015205
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
Guido van Rossumf78abae1997-01-21 22:02:36 +000015207else
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015209sed 's/^/| /' conftest.$ac_ext >&5
15210
Guido van Rossum627b2d71993-12-24 10:39:16 +000015211fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015213
Guido van Rossum627b2d71993-12-24 10:39:16 +000015214fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015215done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015216
Jack Jansen150753c2003-03-29 22:07:47 +000015217
15218for ac_func in setpgrp
15219do
15220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15221echo "$as_me:$LINENO: checking for $ac_func" >&5
15222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15223if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225else
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015227/* confdefs.h. */
15228_ACEOF
15229cat confdefs.h >>conftest.$ac_ext
15230cat >>conftest.$ac_ext <<_ACEOF
15231/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015232/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015233 which can conflict with char $ac_func (); below.
15234 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015235 <limits.h> exists even on freestanding compilers. Under hpux,
15236 including <limits.h> includes <sys/time.h> and causes problems
15237 checking for functions defined therein. */
15238#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015239# include <limits.h>
15240#else
15241# include <assert.h>
15242#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015243/* Override any gcc2 internal prototype to avoid an error. */
15244#ifdef __cplusplus
15245extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015246{
Martin v. Löwis11437992002-04-12 09:54:03 +000015247#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015248/* We use char because int might match the return type of a gcc2
15249 builtin and then its argument prototype would still apply. */
15250char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015251/* The GNU C library defines this for functions which it implements
15252 to always fail with ENOSYS. Some functions are actually named
15253 something starting with __ and the normal name is an alias. */
15254#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15255choke me
15256#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015257char (*f) () = $ac_func;
15258#endif
15259#ifdef __cplusplus
15260}
Jack Jansen150753c2003-03-29 22:07:47 +000015261#endif
15262
Skip Montanaro6dead952003-09-25 14:50:04 +000015263int
15264main ()
15265{
15266return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015271rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015273 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015275 grep -v '^ *+' conftest.er1 >conftest.err
15276 rm -f conftest.er1
15277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015279 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015280 { ac_try='test -z "$ac_c_werror_flag"
15281 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15283 (eval $ac_try) 2>&5
15284 ac_status=$?
15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286 (exit $ac_status); }; } &&
15287 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289 (eval $ac_try) 2>&5
15290 ac_status=$?
15291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015293 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015294else
Jack Jansen150753c2003-03-29 22:07:47 +000015295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015296sed 's/^/| /' conftest.$ac_ext >&5
15297
Jack Jansen150753c2003-03-29 22:07:47 +000015298eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015299fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300rm -f conftest.err conftest.$ac_objext \
15301 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015302fi
Jack Jansen150753c2003-03-29 22:07:47 +000015303echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15304echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15305if test `eval echo '${'$as_ac_var'}'` = yes; then
15306 cat >>confdefs.h <<_ACEOF
15307#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15308_ACEOF
15309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* confdefs.h. */
15311_ACEOF
15312cat confdefs.h >>conftest.$ac_ext
15313cat >>conftest.$ac_ext <<_ACEOF
15314/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015315#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015316int
15317main ()
15318{
15319setpgrp(0,0);
15320 ;
15321 return 0;
15322}
15323_ACEOF
15324rm -f conftest.$ac_objext
15325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015326 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015328 grep -v '^ *+' conftest.er1 >conftest.err
15329 rm -f conftest.er1
15330 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15332 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015333 { ac_try='test -z "$ac_c_werror_flag"
15334 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15337 ac_status=$?
15338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15339 (exit $ac_status); }; } &&
15340 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15342 (eval $ac_try) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015346
15347cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015348#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015349_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015350
Jack Jansen150753c2003-03-29 22:07:47 +000015351
15352else
15353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015354sed 's/^/| /' conftest.$ac_ext >&5
15355
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015358
15359fi
15360done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015361
Martin v. Löwis11437992002-04-12 09:54:03 +000015362
Thomas Wouters3a584202000-08-05 23:28:51 +000015363for ac_func in gettimeofday
15364do
Martin v. Löwis11437992002-04-12 09:54:03 +000015365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15366echo "$as_me:$LINENO: checking for $ac_func" >&5
15367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15368if eval "test \"\${$as_ac_var+set}\" = set"; then
15369 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015370else
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015372/* confdefs.h. */
15373_ACEOF
15374cat confdefs.h >>conftest.$ac_ext
15375cat >>conftest.$ac_ext <<_ACEOF
15376/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015377/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015378 which can conflict with char $ac_func (); below.
15379 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015380 <limits.h> exists even on freestanding compilers. Under hpux,
15381 including <limits.h> includes <sys/time.h> and causes problems
15382 checking for functions defined therein. */
15383#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015384# include <limits.h>
15385#else
15386# include <assert.h>
15387#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015388/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015389#ifdef __cplusplus
15390extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015391{
Martin v. Löwis11437992002-04-12 09:54:03 +000015392#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015393/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 builtin and then its argument prototype would still apply. */
15395char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015396/* The GNU C library defines this for functions which it implements
15397 to always fail with ENOSYS. Some functions are actually named
15398 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015399#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015400choke me
15401#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015402char (*f) () = $ac_func;
15403#endif
15404#ifdef __cplusplus
15405}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015406#endif
15407
Skip Montanaro6dead952003-09-25 14:50:04 +000015408int
15409main ()
15410{
15411return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 ;
15413 return 0;
15414}
15415_ACEOF
15416rm -f conftest.$ac_objext conftest$ac_exeext
15417if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015418 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015420 grep -v '^ *+' conftest.er1 >conftest.err
15421 rm -f conftest.er1
15422 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15424 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015425 { ac_try='test -z "$ac_c_werror_flag"
15426 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15428 (eval $ac_try) 2>&5
15429 ac_status=$?
15430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15431 (exit $ac_status); }; } &&
15432 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15434 (eval $ac_try) 2>&5
15435 ac_status=$?
15436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15437 (exit $ac_status); }; }; then
15438 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015441sed 's/^/| /' conftest.$ac_ext >&5
15442
Martin v. Löwis11437992002-04-12 09:54:03 +000015443eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015444fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015445rm -f conftest.err conftest.$ac_objext \
15446 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015447fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015448echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15449echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15450if test `eval echo '${'$as_ac_var'}'` = yes; then
15451 cat >>confdefs.h <<_ACEOF
15452#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15453_ACEOF
15454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015455/* confdefs.h. */
15456_ACEOF
15457cat confdefs.h >>conftest.$ac_ext
15458cat >>conftest.$ac_ext <<_ACEOF
15459/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015460#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015461int
15462main ()
15463{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015464gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 ;
15466 return 0;
15467}
15468_ACEOF
15469rm -f conftest.$ac_objext
15470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015471 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473 grep -v '^ *+' conftest.er1 >conftest.err
15474 rm -f conftest.er1
15475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015478 { ac_try='test -z "$ac_c_werror_flag"
15479 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15481 (eval $ac_try) 2>&5
15482 ac_status=$?
15483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15484 (exit $ac_status); }; } &&
15485 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15487 (eval $ac_try) 2>&5
15488 ac_status=$?
15489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15490 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015491 :
15492else
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015494sed 's/^/| /' conftest.$ac_ext >&5
15495
Martin v. Löwis11437992002-04-12 09:54:03 +000015496
15497cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015498#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015500
Martin v. Löwis11437992002-04-12 09:54:03 +000015501
Guido van Rossum627b2d71993-12-24 10:39:16 +000015502fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015504
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015505fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015506done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015507
Michael W. Hudson54241132001-12-07 15:38:26 +000015508
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015509echo "$as_me:$LINENO: checking for major" >&5
15510echo $ECHO_N "checking for major... $ECHO_C" >&6
15511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015512/* confdefs.h. */
15513_ACEOF
15514cat confdefs.h >>conftest.$ac_ext
15515cat >>conftest.$ac_ext <<_ACEOF
15516/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015517
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015518#if defined(MAJOR_IN_MKDEV)
15519#include <sys/mkdev.h>
15520#elif defined(MAJOR_IN_SYSMACROS)
15521#include <sys/sysmacros.h>
15522#else
15523#include <sys/types.h>
15524#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015525
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015526int
15527main ()
15528{
15529
15530 makedev(major(0),minor(0));
15531
15532 ;
15533 return 0;
15534}
15535_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015536rm -f conftest.$ac_objext conftest$ac_exeext
15537if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015538 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015540 grep -v '^ *+' conftest.er1 >conftest.err
15541 rm -f conftest.er1
15542 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15544 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015545 { ac_try='test -z "$ac_c_werror_flag"
15546 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15548 (eval $ac_try) 2>&5
15549 ac_status=$?
15550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15551 (exit $ac_status); }; } &&
15552 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15554 (eval $ac_try) 2>&5
15555 ac_status=$?
15556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15557 (exit $ac_status); }; }; then
15558
15559
15560cat >>confdefs.h <<\_ACEOF
15561#define HAVE_DEVICE_MACROS 1
15562_ACEOF
15563
15564 echo "$as_me:$LINENO: result: yes" >&5
15565echo "${ECHO_T}yes" >&6
15566
15567else
15568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015569sed 's/^/| /' conftest.$ac_ext >&5
15570
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015571
15572 echo "$as_me:$LINENO: result: no" >&5
15573echo "${ECHO_T}no" >&6
15574
15575fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015576rm -f conftest.err conftest.$ac_objext \
15577 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015578
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015579# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015580# for [no]getaddrinfo in netdb.h.
15581echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15582echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015584/* confdefs.h. */
15585_ACEOF
15586cat confdefs.h >>conftest.$ac_ext
15587cat >>conftest.$ac_ext <<_ACEOF
15588/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015589
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015590#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015591#include <sys/socket.h>
15592#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015593#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015594
Martin v. Löwis11437992002-04-12 09:54:03 +000015595int
15596main ()
15597{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015598
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015599getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015600
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 ;
15602 return 0;
15603}
15604_ACEOF
15605rm -f conftest.$ac_objext conftest$ac_exeext
15606if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015607 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015609 grep -v '^ *+' conftest.er1 >conftest.err
15610 rm -f conftest.er1
15611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15613 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015614 { ac_try='test -z "$ac_c_werror_flag"
15615 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15617 (eval $ac_try) 2>&5
15618 ac_status=$?
15619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15620 (exit $ac_status); }; } &&
15621 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15623 (eval $ac_try) 2>&5
15624 ac_status=$?
15625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15626 (exit $ac_status); }; }; then
15627
15628echo "$as_me:$LINENO: result: yes" >&5
15629echo "${ECHO_T}yes" >&6
15630echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15631echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015632if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 echo "$as_me:$LINENO: result: buggy" >&5
15634echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015635buggygetaddrinfo=yes
15636else
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015638/* confdefs.h. */
15639_ACEOF
15640cat confdefs.h >>conftest.$ac_ext
15641cat >>conftest.$ac_ext <<_ACEOF
15642/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015643
15644#include <sys/types.h>
15645#include <netdb.h>
15646#include <string.h>
15647#include <sys/socket.h>
15648#include <netinet/in.h>
15649
15650main()
15651{
15652 int passive, gaierr, inet4 = 0, inet6 = 0;
15653 struct addrinfo hints, *ai, *aitop;
15654 char straddr[INET6_ADDRSTRLEN], strport[16];
15655
15656 for (passive = 0; passive <= 1; passive++) {
15657 memset(&hints, 0, sizeof(hints));
15658 hints.ai_family = AF_UNSPEC;
15659 hints.ai_flags = passive ? AI_PASSIVE : 0;
15660 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015661 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015662 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15663 (void)gai_strerror(gaierr);
15664 goto bad;
15665 }
15666 for (ai = aitop; ai; ai = ai->ai_next) {
15667 if (ai->ai_addr == NULL ||
15668 ai->ai_addrlen == 0 ||
15669 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15670 straddr, sizeof(straddr), strport, sizeof(strport),
15671 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15672 goto bad;
15673 }
15674 switch (ai->ai_family) {
15675 case AF_INET:
15676 if (strcmp(strport, "54321") != 0) {
15677 goto bad;
15678 }
15679 if (passive) {
15680 if (strcmp(straddr, "0.0.0.0") != 0) {
15681 goto bad;
15682 }
15683 } else {
15684 if (strcmp(straddr, "127.0.0.1") != 0) {
15685 goto bad;
15686 }
15687 }
15688 inet4++;
15689 break;
15690 case AF_INET6:
15691 if (strcmp(strport, "54321") != 0) {
15692 goto bad;
15693 }
15694 if (passive) {
15695 if (strcmp(straddr, "::") != 0) {
15696 goto bad;
15697 }
15698 } else {
15699 if (strcmp(straddr, "::1") != 0) {
15700 goto bad;
15701 }
15702 }
15703 inet6++;
15704 break;
15705 case AF_UNSPEC:
15706 goto bad;
15707 break;
15708 default:
15709 /* another family support? */
15710 break;
15711 }
15712 }
15713 }
15714
15715 if (!(inet4 == 0 || inet4 == 2))
15716 goto bad;
15717 if (!(inet6 == 0 || inet6 == 2))
15718 goto bad;
15719
15720 if (aitop)
15721 freeaddrinfo(aitop);
15722 exit(0);
15723
15724 bad:
15725 if (aitop)
15726 freeaddrinfo(aitop);
15727 exit(1);
15728}
15729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730_ACEOF
15731rm -f conftest$ac_exeext
15732if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15733 (eval $ac_link) 2>&5
15734 ac_status=$?
15735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15738 (eval $ac_try) 2>&5
15739 ac_status=$?
15740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15741 (exit $ac_status); }; }; then
15742 echo "$as_me:$LINENO: result: good" >&5
15743echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015744buggygetaddrinfo=no
15745else
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 echo "$as_me: program exited with status $ac_status" >&5
15747echo "$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 +000015750( exit $ac_status )
15751echo "$as_me:$LINENO: result: buggy" >&5
15752echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015753buggygetaddrinfo=yes
15754fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015755rm -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 +000015756fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015757else
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015759sed 's/^/| /' conftest.$ac_ext >&5
15760
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
15762echo "$as_me:$LINENO: result: no" >&5
15763echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015764buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015765
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767rm -f conftest.err conftest.$ac_objext \
15768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015769
15770if test "$buggygetaddrinfo" = "yes"; then
15771 if test "$ipv6" = "yes"; then
15772 echo 'Fatal: You must get working getaddrinfo() function.'
15773 echo ' or you can specify "--disable-ipv6"'.
15774 exit 1
15775 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015776else
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015779#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015781
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015782fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015784for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015785do
Martin v. Löwis11437992002-04-12 09:54:03 +000015786as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15787echo "$as_me:$LINENO: checking for $ac_func" >&5
15788echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15789if eval "test \"\${$as_ac_var+set}\" = set"; then
15790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015791else
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015793/* confdefs.h. */
15794_ACEOF
15795cat confdefs.h >>conftest.$ac_ext
15796cat >>conftest.$ac_ext <<_ACEOF
15797/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015798/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015799 which can conflict with char $ac_func (); below.
15800 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015801 <limits.h> exists even on freestanding compilers. Under hpux,
15802 including <limits.h> includes <sys/time.h> and causes problems
15803 checking for functions defined therein. */
15804#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015805# include <limits.h>
15806#else
15807# include <assert.h>
15808#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015809/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015810#ifdef __cplusplus
15811extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015812{
Martin v. Löwis11437992002-04-12 09:54:03 +000015813#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015814/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 builtin and then its argument prototype would still apply. */
15816char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015817/* The GNU C library defines this for functions which it implements
15818 to always fail with ENOSYS. Some functions are actually named
15819 something starting with __ and the normal name is an alias. */
15820#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15821choke me
15822#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015823char (*f) () = $ac_func;
15824#endif
15825#ifdef __cplusplus
15826}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015827#endif
15828
Skip Montanaro6dead952003-09-25 14:50:04 +000015829int
15830main ()
15831{
15832return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 ;
15834 return 0;
15835}
15836_ACEOF
15837rm -f conftest.$ac_objext conftest$ac_exeext
15838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015839 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841 grep -v '^ *+' conftest.er1 >conftest.err
15842 rm -f conftest.er1
15843 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15845 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015846 { ac_try='test -z "$ac_c_werror_flag"
15847 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015848 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15849 (eval $ac_try) 2>&5
15850 ac_status=$?
15851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15852 (exit $ac_status); }; } &&
15853 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15855 (eval $ac_try) 2>&5
15856 ac_status=$?
15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15858 (exit $ac_status); }; }; then
15859 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015860else
Martin v. Löwis11437992002-04-12 09:54:03 +000015861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015862sed 's/^/| /' conftest.$ac_ext >&5
15863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015865fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015866rm -f conftest.err conftest.$ac_objext \
15867 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015869echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15870echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15871if test `eval echo '${'$as_ac_var'}'` = yes; then
15872 cat >>confdefs.h <<_ACEOF
15873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15874_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015875
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015876fi
15877done
15878
Michael W. Hudson54241132001-12-07 15:38:26 +000015879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015880# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015881echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15882echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15883if test "${ac_cv_header_time+set}" = set; then
15884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015892#include <sys/types.h>
15893#include <sys/time.h>
15894#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015895
Martin v. Löwis11437992002-04-12 09:54:03 +000015896int
15897main ()
15898{
15899if ((struct tm *) 0)
15900return 0;
15901 ;
15902 return 0;
15903}
15904_ACEOF
15905rm -f conftest.$ac_objext
15906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015907 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015909 grep -v '^ *+' conftest.er1 >conftest.err
15910 rm -f conftest.er1
15911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15913 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015914 { ac_try='test -z "$ac_c_werror_flag"
15915 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15917 (eval $ac_try) 2>&5
15918 ac_status=$?
15919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15920 (exit $ac_status); }; } &&
15921 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15923 (eval $ac_try) 2>&5
15924 ac_status=$?
15925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15926 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015927 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015928else
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015930sed 's/^/| /' conftest.$ac_ext >&5
15931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015933fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015934rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015935fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015936echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15937echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015938if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015939
15940cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015941#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015943
15944fi
15945
Martin v. Löwis11437992002-04-12 09:54:03 +000015946echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15947echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15948if test "${ac_cv_struct_tm+set}" = set; then
15949 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015950else
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015952/* confdefs.h. */
15953_ACEOF
15954cat confdefs.h >>conftest.$ac_ext
15955cat >>conftest.$ac_ext <<_ACEOF
15956/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015957#include <sys/types.h>
15958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015959
Martin v. Löwis11437992002-04-12 09:54:03 +000015960int
15961main ()
15962{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015963struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ;
15965 return 0;
15966}
15967_ACEOF
15968rm -f conftest.$ac_objext
15969if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015970 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972 grep -v '^ *+' conftest.er1 >conftest.err
15973 rm -f conftest.er1
15974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15976 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015977 { ac_try='test -z "$ac_c_werror_flag"
15978 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15980 (eval $ac_try) 2>&5
15981 ac_status=$?
15982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15983 (exit $ac_status); }; } &&
15984 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15986 (eval $ac_try) 2>&5
15987 ac_status=$?
15988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15989 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015990 ac_cv_struct_tm=time.h
15991else
Martin v. Löwis11437992002-04-12 09:54:03 +000015992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015993sed 's/^/| /' conftest.$ac_ext >&5
15994
Martin v. Löwis11437992002-04-12 09:54:03 +000015995ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015996fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015998fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015999echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
16000echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016001if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016002
16003cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016004#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016005_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016006
16007fi
16008
Martin v. Löwis11437992002-04-12 09:54:03 +000016009echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
16010echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
16011if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
16012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016013else
Martin v. Löwis11437992002-04-12 09:54:03 +000016014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016015/* confdefs.h. */
16016_ACEOF
16017cat confdefs.h >>conftest.$ac_ext
16018cat >>conftest.$ac_ext <<_ACEOF
16019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016020#include <sys/types.h>
16021#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000016022
16023
Martin v. Löwis11437992002-04-12 09:54:03 +000016024int
16025main ()
16026{
16027static struct tm ac_aggr;
16028if (ac_aggr.tm_zone)
16029return 0;
16030 ;
16031 return 0;
16032}
16033_ACEOF
16034rm -f conftest.$ac_objext
16035if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016038 grep -v '^ *+' conftest.er1 >conftest.err
16039 rm -f conftest.er1
16040 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016043 { ac_try='test -z "$ac_c_werror_flag"
16044 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16046 (eval $ac_try) 2>&5
16047 ac_status=$?
16048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16049 (exit $ac_status); }; } &&
16050 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16052 (eval $ac_try) 2>&5
16053 ac_status=$?
16054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); }; }; then
16056 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016057else
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016059sed 's/^/| /' conftest.$ac_ext >&5
16060
16061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016062/* confdefs.h. */
16063_ACEOF
16064cat confdefs.h >>conftest.$ac_ext
16065cat >>conftest.$ac_ext <<_ACEOF
16066/* end confdefs.h. */
16067#include <sys/types.h>
16068#include <$ac_cv_struct_tm>
16069
16070
16071int
16072main ()
16073{
16074static struct tm ac_aggr;
16075if (sizeof ac_aggr.tm_zone)
16076return 0;
16077 ;
16078 return 0;
16079}
16080_ACEOF
16081rm -f conftest.$ac_objext
16082if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016083 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 grep -v '^ *+' conftest.er1 >conftest.err
16086 rm -f conftest.er1
16087 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16089 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016090 { ac_try='test -z "$ac_c_werror_flag"
16091 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16093 (eval $ac_try) 2>&5
16094 ac_status=$?
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); }; } &&
16097 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; }; then
16103 ac_cv_member_struct_tm_tm_zone=yes
16104else
16105 echo "$as_me: failed program was:" >&5
16106sed 's/^/| /' conftest.$ac_ext >&5
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016109fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016110rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016111fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016113fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016114echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16115echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16116if test $ac_cv_member_struct_tm_tm_zone = yes; then
16117
16118cat >>confdefs.h <<_ACEOF
16119#define HAVE_STRUCT_TM_TM_ZONE 1
16120_ACEOF
16121
16122
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016123fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016124
Martin v. Löwis11437992002-04-12 09:54:03 +000016125if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16126
16127cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016128#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016129_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016130
16131else
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 echo "$as_me:$LINENO: checking for tzname" >&5
16133echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16134if test "${ac_cv_var_tzname+set}" = set; then
16135 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016136else
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016138/* confdefs.h. */
16139_ACEOF
16140cat confdefs.h >>conftest.$ac_ext
16141cat >>conftest.$ac_ext <<_ACEOF
16142/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016143#include <time.h>
16144#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016145extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016147
Martin v. Löwis11437992002-04-12 09:54:03 +000016148int
16149main ()
16150{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016151atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 ;
16153 return 0;
16154}
16155_ACEOF
16156rm -f conftest.$ac_objext conftest$ac_exeext
16157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016158 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016160 grep -v '^ *+' conftest.er1 >conftest.err
16161 rm -f conftest.er1
16162 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16164 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016165 { ac_try='test -z "$ac_c_werror_flag"
16166 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16168 (eval $ac_try) 2>&5
16169 ac_status=$?
16170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16171 (exit $ac_status); }; } &&
16172 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16174 (eval $ac_try) 2>&5
16175 ac_status=$?
16176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16177 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016178 ac_cv_var_tzname=yes
16179else
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016181sed 's/^/| /' conftest.$ac_ext >&5
16182
Martin v. Löwis11437992002-04-12 09:54:03 +000016183ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016185rm -f conftest.err conftest.$ac_objext \
16186 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016187fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016188echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16189echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016190 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016191
16192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016193#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016194_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016196 fi
16197fi
16198
Martin v. Löwis11437992002-04-12 09:54:03 +000016199echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16200echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16201if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16202 echo $ECHO_N "(cached) $ECHO_C" >&6
16203else
16204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016205/* confdefs.h. */
16206_ACEOF
16207cat confdefs.h >>conftest.$ac_ext
16208cat >>conftest.$ac_ext <<_ACEOF
16209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016210$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016211int
16212main ()
16213{
16214static struct stat ac_aggr;
16215if (ac_aggr.st_rdev)
16216return 0;
16217 ;
16218 return 0;
16219}
16220_ACEOF
16221rm -f conftest.$ac_objext
16222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016223 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016225 grep -v '^ *+' conftest.er1 >conftest.err
16226 rm -f conftest.er1
16227 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16229 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016230 { ac_try='test -z "$ac_c_werror_flag"
16231 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16233 (eval $ac_try) 2>&5
16234 ac_status=$?
16235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16236 (exit $ac_status); }; } &&
16237 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16239 (eval $ac_try) 2>&5
16240 ac_status=$?
16241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16242 (exit $ac_status); }; }; then
16243 ac_cv_member_struct_stat_st_rdev=yes
16244else
16245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016246sed 's/^/| /' conftest.$ac_ext >&5
16247
16248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016249/* confdefs.h. */
16250_ACEOF
16251cat confdefs.h >>conftest.$ac_ext
16252cat >>conftest.$ac_ext <<_ACEOF
16253/* end confdefs.h. */
16254$ac_includes_default
16255int
16256main ()
16257{
16258static struct stat ac_aggr;
16259if (sizeof ac_aggr.st_rdev)
16260return 0;
16261 ;
16262 return 0;
16263}
16264_ACEOF
16265rm -f conftest.$ac_objext
16266if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016267 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016269 grep -v '^ *+' conftest.er1 >conftest.err
16270 rm -f conftest.er1
16271 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16273 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016274 { ac_try='test -z "$ac_c_werror_flag"
16275 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16277 (eval $ac_try) 2>&5
16278 ac_status=$?
16279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280 (exit $ac_status); }; } &&
16281 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16283 (eval $ac_try) 2>&5
16284 ac_status=$?
16285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286 (exit $ac_status); }; }; then
16287 ac_cv_member_struct_stat_st_rdev=yes
16288else
16289 echo "$as_me: failed program was:" >&5
16290sed 's/^/| /' conftest.$ac_ext >&5
16291
Martin v. Löwis11437992002-04-12 09:54:03 +000016292ac_cv_member_struct_stat_st_rdev=no
16293fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016295fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016298echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16299echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16300if test $ac_cv_member_struct_stat_st_rdev = yes; then
16301
16302cat >>confdefs.h <<_ACEOF
16303#define HAVE_STRUCT_STAT_ST_RDEV 1
16304_ACEOF
16305
16306
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016307fi
16308
Martin v. Löwis11437992002-04-12 09:54:03 +000016309echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16310echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16311if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016313else
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016315/* confdefs.h. */
16316_ACEOF
16317cat confdefs.h >>conftest.$ac_ext
16318cat >>conftest.$ac_ext <<_ACEOF
16319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016320$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016321int
16322main ()
16323{
16324static struct stat ac_aggr;
16325if (ac_aggr.st_blksize)
16326return 0;
16327 ;
16328 return 0;
16329}
16330_ACEOF
16331rm -f conftest.$ac_objext
16332if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016333 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016335 grep -v '^ *+' conftest.er1 >conftest.err
16336 rm -f conftest.er1
16337 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16339 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016340 { ac_try='test -z "$ac_c_werror_flag"
16341 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16343 (eval $ac_try) 2>&5
16344 ac_status=$?
16345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16346 (exit $ac_status); }; } &&
16347 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16349 (eval $ac_try) 2>&5
16350 ac_status=$?
16351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16352 (exit $ac_status); }; }; then
16353 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016354else
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016356sed 's/^/| /' conftest.$ac_ext >&5
16357
16358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016359/* confdefs.h. */
16360_ACEOF
16361cat confdefs.h >>conftest.$ac_ext
16362cat >>conftest.$ac_ext <<_ACEOF
16363/* end confdefs.h. */
16364$ac_includes_default
16365int
16366main ()
16367{
16368static struct stat ac_aggr;
16369if (sizeof ac_aggr.st_blksize)
16370return 0;
16371 ;
16372 return 0;
16373}
16374_ACEOF
16375rm -f conftest.$ac_objext
16376if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016377 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016379 grep -v '^ *+' conftest.er1 >conftest.err
16380 rm -f conftest.er1
16381 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16383 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016384 { ac_try='test -z "$ac_c_werror_flag"
16385 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16387 (eval $ac_try) 2>&5
16388 ac_status=$?
16389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16390 (exit $ac_status); }; } &&
16391 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16393 (eval $ac_try) 2>&5
16394 ac_status=$?
16395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16396 (exit $ac_status); }; }; then
16397 ac_cv_member_struct_stat_st_blksize=yes
16398else
16399 echo "$as_me: failed program was:" >&5
16400sed 's/^/| /' conftest.$ac_ext >&5
16401
Martin v. Löwis11437992002-04-12 09:54:03 +000016402ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016403fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016404rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016405fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016407fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016408echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16409echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16410if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016411
Martin v. Löwis11437992002-04-12 09:54:03 +000016412cat >>confdefs.h <<_ACEOF
16413#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16414_ACEOF
16415
16416
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016417fi
16418
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000016419echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
16420echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
16421if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
16422 echo $ECHO_N "(cached) $ECHO_C" >&6
16423else
16424 cat >conftest.$ac_ext <<_ACEOF
16425/* confdefs.h. */
16426_ACEOF
16427cat confdefs.h >>conftest.$ac_ext
16428cat >>conftest.$ac_ext <<_ACEOF
16429/* end confdefs.h. */
16430$ac_includes_default
16431int
16432main ()
16433{
16434static struct stat ac_aggr;
16435if (ac_aggr.st_flags)
16436return 0;
16437 ;
16438 return 0;
16439}
16440_ACEOF
16441rm -f conftest.$ac_objext
16442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16443 (eval $ac_compile) 2>conftest.er1
16444 ac_status=$?
16445 grep -v '^ *+' conftest.er1 >conftest.err
16446 rm -f conftest.er1
16447 cat conftest.err >&5
16448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); } &&
16450 { ac_try='test -z "$ac_c_werror_flag"
16451 || test ! -s conftest.err'
16452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16453 (eval $ac_try) 2>&5
16454 ac_status=$?
16455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16456 (exit $ac_status); }; } &&
16457 { ac_try='test -s conftest.$ac_objext'
16458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16459 (eval $ac_try) 2>&5
16460 ac_status=$?
16461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16462 (exit $ac_status); }; }; then
16463 ac_cv_member_struct_stat_st_flags=yes
16464else
16465 echo "$as_me: failed program was:" >&5
16466sed 's/^/| /' conftest.$ac_ext >&5
16467
16468cat >conftest.$ac_ext <<_ACEOF
16469/* confdefs.h. */
16470_ACEOF
16471cat confdefs.h >>conftest.$ac_ext
16472cat >>conftest.$ac_ext <<_ACEOF
16473/* end confdefs.h. */
16474$ac_includes_default
16475int
16476main ()
16477{
16478static struct stat ac_aggr;
16479if (sizeof ac_aggr.st_flags)
16480return 0;
16481 ;
16482 return 0;
16483}
16484_ACEOF
16485rm -f conftest.$ac_objext
16486if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16487 (eval $ac_compile) 2>conftest.er1
16488 ac_status=$?
16489 grep -v '^ *+' conftest.er1 >conftest.err
16490 rm -f conftest.er1
16491 cat conftest.err >&5
16492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493 (exit $ac_status); } &&
16494 { ac_try='test -z "$ac_c_werror_flag"
16495 || test ! -s conftest.err'
16496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16497 (eval $ac_try) 2>&5
16498 ac_status=$?
16499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16500 (exit $ac_status); }; } &&
16501 { ac_try='test -s conftest.$ac_objext'
16502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16503 (eval $ac_try) 2>&5
16504 ac_status=$?
16505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16506 (exit $ac_status); }; }; then
16507 ac_cv_member_struct_stat_st_flags=yes
16508else
16509 echo "$as_me: failed program was:" >&5
16510sed 's/^/| /' conftest.$ac_ext >&5
16511
16512ac_cv_member_struct_stat_st_flags=no
16513fi
16514rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16515fi
16516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16517fi
16518echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
16519echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
16520if test $ac_cv_member_struct_stat_st_flags = yes; then
16521
16522cat >>confdefs.h <<_ACEOF
16523#define HAVE_STRUCT_STAT_ST_FLAGS 1
16524_ACEOF
16525
16526
16527fi
16528
Martin v. Löwis11437992002-04-12 09:54:03 +000016529echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16530echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16531if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016533else
Martin v. Löwis11437992002-04-12 09:54:03 +000016534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016535/* confdefs.h. */
16536_ACEOF
16537cat confdefs.h >>conftest.$ac_ext
16538cat >>conftest.$ac_ext <<_ACEOF
16539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016540$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016541int
16542main ()
16543{
16544static struct stat ac_aggr;
16545if (ac_aggr.st_blocks)
16546return 0;
16547 ;
16548 return 0;
16549}
16550_ACEOF
16551rm -f conftest.$ac_objext
16552if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016553 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016555 grep -v '^ *+' conftest.er1 >conftest.err
16556 rm -f conftest.er1
16557 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016560 { ac_try='test -z "$ac_c_werror_flag"
16561 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16563 (eval $ac_try) 2>&5
16564 ac_status=$?
16565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16566 (exit $ac_status); }; } &&
16567 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16569 (eval $ac_try) 2>&5
16570 ac_status=$?
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16572 (exit $ac_status); }; }; then
16573 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016574else
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016576sed 's/^/| /' conftest.$ac_ext >&5
16577
16578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016579/* confdefs.h. */
16580_ACEOF
16581cat confdefs.h >>conftest.$ac_ext
16582cat >>conftest.$ac_ext <<_ACEOF
16583/* end confdefs.h. */
16584$ac_includes_default
16585int
16586main ()
16587{
16588static struct stat ac_aggr;
16589if (sizeof ac_aggr.st_blocks)
16590return 0;
16591 ;
16592 return 0;
16593}
16594_ACEOF
16595rm -f conftest.$ac_objext
16596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016597 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016599 grep -v '^ *+' conftest.er1 >conftest.err
16600 rm -f conftest.er1
16601 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16603 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016604 { ac_try='test -z "$ac_c_werror_flag"
16605 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16608 ac_status=$?
16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610 (exit $ac_status); }; } &&
16611 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016612 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16613 (eval $ac_try) 2>&5
16614 ac_status=$?
16615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16616 (exit $ac_status); }; }; then
16617 ac_cv_member_struct_stat_st_blocks=yes
16618else
16619 echo "$as_me: failed program was:" >&5
16620sed 's/^/| /' conftest.$ac_ext >&5
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016623fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016624rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016625fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016628echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16629echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16630if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016631
Martin v. Löwis11437992002-04-12 09:54:03 +000016632cat >>confdefs.h <<_ACEOF
16633#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16634_ACEOF
16635
16636
16637cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016638#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016639_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016640
16641else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016642 case $LIBOBJS in
16643 "fileblocks.$ac_objext" | \
16644 *" fileblocks.$ac_objext" | \
16645 "fileblocks.$ac_objext "* | \
16646 *" fileblocks.$ac_objext "* ) ;;
16647 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16648esac
16649
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016650fi
16651
Michael W. Hudson54241132001-12-07 15:38:26 +000016652
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
16654echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16655echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16656if test "${ac_cv_header_time_altzone+set}" = set; then
16657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658else
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016660/* confdefs.h. */
16661_ACEOF
16662cat confdefs.h >>conftest.$ac_ext
16663cat >>conftest.$ac_ext <<_ACEOF
16664/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016665#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016666int
16667main ()
16668{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016669return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 ;
16671 return 0;
16672}
16673_ACEOF
16674rm -f conftest.$ac_objext
16675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016676 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016678 grep -v '^ *+' conftest.er1 >conftest.err
16679 rm -f conftest.er1
16680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16682 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016683 { ac_try='test -z "$ac_c_werror_flag"
16684 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16686 (eval $ac_try) 2>&5
16687 ac_status=$?
16688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16689 (exit $ac_status); }; } &&
16690 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16692 (eval $ac_try) 2>&5
16693 ac_status=$?
16694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16695 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696 ac_cv_header_time_altzone=yes
16697else
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016699sed 's/^/| /' conftest.$ac_ext >&5
16700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016702fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016704fi
16705
Martin v. Löwis11437992002-04-12 09:54:03 +000016706echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16707echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016708if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016709
16710cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016711#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016712_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016713
16714fi
16715
Guido van Rossumda88dad1995-01-26 00:46:29 +000016716was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016717echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16718echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16719cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016720/* confdefs.h. */
16721_ACEOF
16722cat confdefs.h >>conftest.$ac_ext
16723cat >>conftest.$ac_ext <<_ACEOF
16724/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016725
16726#include <sys/types.h>
16727#include <sys/select.h>
16728#include <sys/time.h>
16729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730int
16731main ()
16732{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016733;
Martin v. Löwis11437992002-04-12 09:54:03 +000016734 ;
16735 return 0;
16736}
16737_ACEOF
16738rm -f conftest.$ac_objext
16739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016742 grep -v '^ *+' conftest.er1 >conftest.err
16743 rm -f conftest.er1
16744 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16746 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016747 { ac_try='test -z "$ac_c_werror_flag"
16748 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16750 (eval $ac_try) 2>&5
16751 ac_status=$?
16752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16753 (exit $ac_status); }; } &&
16754 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16756 (eval $ac_try) 2>&5
16757 ac_status=$?
16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16759 (exit $ac_status); }; }; then
16760
16761
16762cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016763#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016764_ACEOF
16765
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016766 was_it_defined=yes
16767
Guido van Rossumf78abae1997-01-21 22:02:36 +000016768else
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016770sed 's/^/| /' conftest.$ac_ext >&5
16771
Guido van Rossum7f43da71994-08-01 12:15:30 +000016772fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016774echo "$as_me:$LINENO: result: $was_it_defined" >&5
16775echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016776
Martin v. Löwis11437992002-04-12 09:54:03 +000016777echo "$as_me:$LINENO: checking for addrinfo" >&5
16778echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16779if test "${ac_cv_struct_addrinfo+set}" = set; then
16780 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016781else
Martin v. Löwis11437992002-04-12 09:54:03 +000016782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016783/* confdefs.h. */
16784_ACEOF
16785cat confdefs.h >>conftest.$ac_ext
16786cat >>conftest.$ac_ext <<_ACEOF
16787/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016788
16789# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016790int
16791main ()
16792{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016793struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 ;
16795 return 0;
16796}
16797_ACEOF
16798rm -f conftest.$ac_objext
16799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016802 grep -v '^ *+' conftest.er1 >conftest.err
16803 rm -f conftest.er1
16804 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16806 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016807 { ac_try='test -z "$ac_c_werror_flag"
16808 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16810 (eval $ac_try) 2>&5
16811 ac_status=$?
16812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16813 (exit $ac_status); }; } &&
16814 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16816 (eval $ac_try) 2>&5
16817 ac_status=$?
16818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16819 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016820 ac_cv_struct_addrinfo=yes
16821else
Martin v. Löwis11437992002-04-12 09:54:03 +000016822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016823sed 's/^/| /' conftest.$ac_ext >&5
16824
Martin v. Löwis11437992002-04-12 09:54:03 +000016825ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016826fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016828fi
16829
Martin v. Löwis11437992002-04-12 09:54:03 +000016830echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16831echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016832if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016833
16834cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016835#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016836_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016837
16838fi
16839
Martin v. Löwis11437992002-04-12 09:54:03 +000016840echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16841echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16842if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016844else
Martin v. Löwis11437992002-04-12 09:54:03 +000016845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016846/* confdefs.h. */
16847_ACEOF
16848cat confdefs.h >>conftest.$ac_ext
16849cat >>conftest.$ac_ext <<_ACEOF
16850/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016851
16852# include <sys/types.h>
16853# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016854int
16855main ()
16856{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016857struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016858 ;
16859 return 0;
16860}
16861_ACEOF
16862rm -f conftest.$ac_objext
16863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016866 grep -v '^ *+' conftest.er1 >conftest.err
16867 rm -f conftest.er1
16868 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16870 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016871 { ac_try='test -z "$ac_c_werror_flag"
16872 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16874 (eval $ac_try) 2>&5
16875 ac_status=$?
16876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16877 (exit $ac_status); }; } &&
16878 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016884 ac_cv_struct_sockaddr_storage=yes
16885else
Martin v. Löwis11437992002-04-12 09:54:03 +000016886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016887sed 's/^/| /' conftest.$ac_ext >&5
16888
Martin v. Löwis11437992002-04-12 09:54:03 +000016889ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016890fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016891rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016892fi
16893
Martin v. Löwis11437992002-04-12 09:54:03 +000016894echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16895echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016896if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016897
16898cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016899#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016900_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016901
16902fi
16903
Guido van Rossum627b2d71993-12-24 10:39:16 +000016904# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016905
Michael W. Hudson54241132001-12-07 15:38:26 +000016906
Martin v. Löwis11437992002-04-12 09:54:03 +000016907echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16908echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16909if test "${ac_cv_c_char_unsigned+set}" = set; then
16910 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016911else
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016913/* confdefs.h. */
16914_ACEOF
16915cat confdefs.h >>conftest.$ac_ext
16916cat >>conftest.$ac_ext <<_ACEOF
16917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016918$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016919int
16920main ()
16921{
16922static int test_array [1 - 2 * !(((char) -1) < 0)];
16923test_array [0] = 0
16924
16925 ;
16926 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016927}
Martin v. Löwis11437992002-04-12 09:54:03 +000016928_ACEOF
16929rm -f conftest.$ac_objext
16930if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016931 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016933 grep -v '^ *+' conftest.er1 >conftest.err
16934 rm -f conftest.er1
16935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16937 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016938 { ac_try='test -z "$ac_c_werror_flag"
16939 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16942 ac_status=$?
16943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16944 (exit $ac_status); }; } &&
16945 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16947 (eval $ac_try) 2>&5
16948 ac_status=$?
16949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16950 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016951 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016952else
16953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016954sed 's/^/| /' conftest.$ac_ext >&5
16955
Martin v. Löwis11437992002-04-12 09:54:03 +000016956ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016957fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016959fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016960echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16961echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016962if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016963 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016964#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016966
16967fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16970echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16971if test "${ac_cv_c_const+set}" = set; then
16972 echo $ECHO_N "(cached) $ECHO_C" >&6
16973else
16974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016975/* confdefs.h. */
16976_ACEOF
16977cat confdefs.h >>conftest.$ac_ext
16978cat >>conftest.$ac_ext <<_ACEOF
16979/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016980
Martin v. Löwis11437992002-04-12 09:54:03 +000016981int
16982main ()
16983{
16984/* FIXME: Include the comments suggested by Paul. */
16985#ifndef __cplusplus
16986 /* Ultrix mips cc rejects this. */
16987 typedef int charset[2];
16988 const charset x;
16989 /* SunOS 4.1.1 cc rejects this. */
16990 char const *const *ccp;
16991 char **p;
16992 /* NEC SVR4.0.2 mips cc rejects this. */
16993 struct point {int x, y;};
16994 static struct point const zero = {0,0};
16995 /* AIX XL C 1.02.0.0 rejects this.
16996 It does not let you subtract one const X* pointer from another in
16997 an arm of an if-expression whose if-part is not a constant
16998 expression */
16999 const char *g = "string";
17000 ccp = &g + (g ? g-g : 0);
17001 /* HPUX 7.0 cc rejects these. */
17002 ++ccp;
17003 p = (char**) ccp;
17004 ccp = (char const *const *) p;
17005 { /* SCO 3.2v4 cc rejects this. */
17006 char *t;
17007 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017008
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 *t++ = 0;
17010 }
17011 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17012 int x[] = {25, 17};
17013 const int *foo = &x[0];
17014 ++foo;
17015 }
17016 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17017 typedef const int *iptr;
17018 iptr p = 0;
17019 ++p;
17020 }
17021 { /* AIX XL C 1.02.0.0 rejects this saying
17022 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17023 struct s { int j; const int *ap[3]; };
17024 struct s *b; b->j = 5;
17025 }
17026 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17027 const int foo = 10;
17028 }
17029#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000017030
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 ;
17032 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000017033}
Martin v. Löwis11437992002-04-12 09:54:03 +000017034_ACEOF
17035rm -f conftest.$ac_objext
17036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017037 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017039 grep -v '^ *+' conftest.er1 >conftest.err
17040 rm -f conftest.er1
17041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17043 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017044 { ac_try='test -z "$ac_c_werror_flag"
17045 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17047 (eval $ac_try) 2>&5
17048 ac_status=$?
17049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17050 (exit $ac_status); }; } &&
17051 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17053 (eval $ac_try) 2>&5
17054 ac_status=$?
17055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17056 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017057 ac_cv_c_const=yes
17058else
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017060sed 's/^/| /' conftest.$ac_ext >&5
17061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017063fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017065fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017066echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17067echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017068if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017069
17070cat >>confdefs.h <<\_ACEOF
17071#define const
17072_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017073
17074fi
17075
Michael W. Hudson54241132001-12-07 15:38:26 +000017076
Guido van Rossumda88dad1995-01-26 00:46:29 +000017077works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017078echo "$as_me:$LINENO: checking for working volatile" >&5
17079echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
17080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017086
Martin v. Löwis11437992002-04-12 09:54:03 +000017087int
17088main ()
17089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017090volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017091 ;
17092 return 0;
17093}
17094_ACEOF
17095rm -f conftest.$ac_objext
17096if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017099 grep -v '^ *+' conftest.er1 >conftest.err
17100 rm -f conftest.er1
17101 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17103 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017104 { ac_try='test -z "$ac_c_werror_flag"
17105 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17107 (eval $ac_try) 2>&5
17108 ac_status=$?
17109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17110 (exit $ac_status); }; } &&
17111 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17114 ac_status=$?
17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17116 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017117 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017118else
Martin v. Löwis11437992002-04-12 09:54:03 +000017119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017120sed 's/^/| /' conftest.$ac_ext >&5
17121
Martin v. Löwis11437992002-04-12 09:54:03 +000017122
17123cat >>confdefs.h <<\_ACEOF
17124#define volatile
17125_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017126
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017127
Guido van Rossum627b2d71993-12-24 10:39:16 +000017128fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017130echo "$as_me:$LINENO: result: $works" >&5
17131echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017132
Guido van Rossumda88dad1995-01-26 00:46:29 +000017133works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017134echo "$as_me:$LINENO: checking for working signed char" >&5
17135echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
17136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017137/* confdefs.h. */
17138_ACEOF
17139cat confdefs.h >>conftest.$ac_ext
17140cat >>conftest.$ac_ext <<_ACEOF
17141/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017142
Martin v. Löwis11437992002-04-12 09:54:03 +000017143int
17144main ()
17145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017146signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 ;
17148 return 0;
17149}
17150_ACEOF
17151rm -f conftest.$ac_objext
17152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017155 grep -v '^ *+' conftest.er1 >conftest.err
17156 rm -f conftest.er1
17157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017160 { ac_try='test -z "$ac_c_werror_flag"
17161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17163 (eval $ac_try) 2>&5
17164 ac_status=$?
17165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17166 (exit $ac_status); }; } &&
17167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17169 (eval $ac_try) 2>&5
17170 ac_status=$?
17171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17172 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017173 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017174else
Martin v. Löwis11437992002-04-12 09:54:03 +000017175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017176sed 's/^/| /' conftest.$ac_ext >&5
17177
Martin v. Löwis11437992002-04-12 09:54:03 +000017178
17179cat >>confdefs.h <<\_ACEOF
17180#define signed
17181_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017182
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017183
Guido van Rossum7f43da71994-08-01 12:15:30 +000017184fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017185rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017186echo "$as_me:$LINENO: result: $works" >&5
17187echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017188
Guido van Rossumda88dad1995-01-26 00:46:29 +000017189have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017190echo "$as_me:$LINENO: checking for prototypes" >&5
17191echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017198int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017199int
17200main ()
17201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017202return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 ;
17204 return 0;
17205}
17206_ACEOF
17207rm -f conftest.$ac_objext
17208if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017209 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017211 grep -v '^ *+' conftest.er1 >conftest.err
17212 rm -f conftest.er1
17213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17215 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017216 { ac_try='test -z "$ac_c_werror_flag"
17217 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17219 (eval $ac_try) 2>&5
17220 ac_status=$?
17221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17222 (exit $ac_status); }; } &&
17223 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17225 (eval $ac_try) 2>&5
17226 ac_status=$?
17227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17228 (exit $ac_status); }; }; then
17229
17230
17231cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017232#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017233_ACEOF
17234
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017235 have_prototypes=yes
17236
Guido van Rossumf78abae1997-01-21 22:02:36 +000017237else
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017239sed 's/^/| /' conftest.$ac_ext >&5
17240
Guido van Rossum7f43da71994-08-01 12:15:30 +000017241fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017243echo "$as_me:$LINENO: result: $have_prototypes" >&5
17244echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017245
Guido van Rossumda88dad1995-01-26 00:46:29 +000017246works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017247echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17248echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017250/* confdefs.h. */
17251_ACEOF
17252cat confdefs.h >>conftest.$ac_ext
17253cat >>conftest.$ac_ext <<_ACEOF
17254/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017255
17256#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017257int foo(int x, ...) {
17258 va_list va;
17259 va_start(va, x);
17260 va_arg(va, int);
17261 va_arg(va, char *);
17262 va_arg(va, double);
17263 return 0;
17264}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017265
Martin v. Löwis11437992002-04-12 09:54:03 +000017266int
17267main ()
17268{
Guido van Rossum90eea071996-08-30 20:58:57 +000017269return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017270 ;
17271 return 0;
17272}
17273_ACEOF
17274rm -f conftest.$ac_objext
17275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017276 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017278 grep -v '^ *+' conftest.er1 >conftest.err
17279 rm -f conftest.er1
17280 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17282 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017283 { ac_try='test -z "$ac_c_werror_flag"
17284 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17286 (eval $ac_try) 2>&5
17287 ac_status=$?
17288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289 (exit $ac_status); }; } &&
17290 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17292 (eval $ac_try) 2>&5
17293 ac_status=$?
17294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17295 (exit $ac_status); }; }; then
17296
17297
17298cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017299#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017300_ACEOF
17301
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017302 works=yes
17303
Guido van Rossumf78abae1997-01-21 22:02:36 +000017304else
Martin v. Löwis11437992002-04-12 09:54:03 +000017305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017306sed 's/^/| /' conftest.$ac_ext >&5
17307
Guido van Rossum627b2d71993-12-24 10:39:16 +000017308fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017309rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017310echo "$as_me:$LINENO: result: $works" >&5
17311echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017312
Martin v. Löwisd6320502004-08-12 13:45:08 +000017313# check for socketpair
17314echo "$as_me:$LINENO: checking for socketpair" >&5
17315echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17316cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017317/* confdefs.h. */
17318_ACEOF
17319cat confdefs.h >>conftest.$ac_ext
17320cat >>conftest.$ac_ext <<_ACEOF
17321/* end confdefs.h. */
17322
17323#include <sys/types.h>
17324#include <sys/socket.h>
17325
17326int
17327main ()
17328{
17329void *x=socketpair
17330 ;
17331 return 0;
17332}
17333_ACEOF
17334rm -f conftest.$ac_objext
17335if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017336 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017338 grep -v '^ *+' conftest.er1 >conftest.err
17339 rm -f conftest.er1
17340 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17342 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017343 { ac_try='test -z "$ac_c_werror_flag"
17344 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17346 (eval $ac_try) 2>&5
17347 ac_status=$?
17348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349 (exit $ac_status); }; } &&
17350 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17352 (eval $ac_try) 2>&5
17353 ac_status=$?
17354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17355 (exit $ac_status); }; }; then
17356
17357cat >>confdefs.h <<\_ACEOF
17358#define HAVE_SOCKETPAIR 1
17359_ACEOF
17360
17361 echo "$as_me:$LINENO: result: yes" >&5
17362echo "${ECHO_T}yes" >&6
17363else
17364 echo "$as_me: failed program was:" >&5
17365sed 's/^/| /' conftest.$ac_ext >&5
17366
17367echo "$as_me:$LINENO: result: no" >&5
17368echo "${ECHO_T}no" >&6
17369
17370fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017371rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017372
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017373# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017374echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17375echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17376cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017377/* confdefs.h. */
17378_ACEOF
17379cat confdefs.h >>conftest.$ac_ext
17380cat >>conftest.$ac_ext <<_ACEOF
17381/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017382#include <sys/types.h>
17383#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017384int
17385main ()
17386{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017387struct sockaddr x;
17388x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 ;
17390 return 0;
17391}
17392_ACEOF
17393rm -f conftest.$ac_objext
17394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017395 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017397 grep -v '^ *+' conftest.er1 >conftest.err
17398 rm -f conftest.er1
17399 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17401 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017402 { ac_try='test -z "$ac_c_werror_flag"
17403 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17405 (eval $ac_try) 2>&5
17406 ac_status=$?
17407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17408 (exit $ac_status); }; } &&
17409 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411 (eval $ac_try) 2>&5
17412 ac_status=$?
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); }; }; then
17415 echo "$as_me:$LINENO: result: yes" >&5
17416echo "${ECHO_T}yes" >&6
17417
17418cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017419#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017420_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017421
17422else
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017424sed 's/^/| /' conftest.$ac_ext >&5
17425
Martin v. Löwis11437992002-04-12 09:54:03 +000017426echo "$as_me:$LINENO: result: no" >&5
17427echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017428fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017430
Guido van Rossumda88dad1995-01-26 00:46:29 +000017431va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017432echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17433echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017440
17441#ifdef HAVE_STDARG_PROTOTYPES
17442#include <stdarg.h>
17443#else
17444#include <varargs.h>
17445#endif
17446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447int
17448main ()
17449{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017450va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 ;
17452 return 0;
17453}
17454_ACEOF
17455rm -f conftest.$ac_objext
17456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017459 grep -v '^ *+' conftest.er1 >conftest.err
17460 rm -f conftest.er1
17461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17463 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017464 { ac_try='test -z "$ac_c_werror_flag"
17465 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17467 (eval $ac_try) 2>&5
17468 ac_status=$?
17469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17470 (exit $ac_status); }; } &&
17471 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17473 (eval $ac_try) 2>&5
17474 ac_status=$?
17475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17476 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017477 :
17478else
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017480sed 's/^/| /' conftest.$ac_ext >&5
17481
Martin v. Löwis11437992002-04-12 09:54:03 +000017482
17483
17484cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017485#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017486_ACEOF
17487
Guido van Rossumda88dad1995-01-26 00:46:29 +000017488 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017492echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17493echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017495# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
17497
17498
17499echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17500echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17501if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017503else
Martin v. Löwis11437992002-04-12 09:54:03 +000017504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017505/* confdefs.h. */
17506_ACEOF
17507cat confdefs.h >>conftest.$ac_ext
17508cat >>conftest.$ac_ext <<_ACEOF
17509/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017510/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017511 which can conflict with char gethostbyname_r (); below.
17512 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017513 <limits.h> exists even on freestanding compilers. Under hpux,
17514 including <limits.h> includes <sys/time.h> and causes problems
17515 checking for functions defined therein. */
17516#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017517# include <limits.h>
17518#else
17519# include <assert.h>
17520#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017521/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017522#ifdef __cplusplus
17523extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017524{
Martin v. Löwis11437992002-04-12 09:54:03 +000017525#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017526/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 builtin and then its argument prototype would still apply. */
17528char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017529/* The GNU C library defines this for functions which it implements
17530 to always fail with ENOSYS. Some functions are actually named
17531 something starting with __ and the normal name is an alias. */
17532#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17533choke me
17534#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017535char (*f) () = gethostbyname_r;
17536#endif
17537#ifdef __cplusplus
17538}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017539#endif
17540
Skip Montanaro6dead952003-09-25 14:50:04 +000017541int
17542main ()
17543{
17544return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 ;
17546 return 0;
17547}
17548_ACEOF
17549rm -f conftest.$ac_objext conftest$ac_exeext
17550if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 grep -v '^ *+' conftest.er1 >conftest.err
17554 rm -f conftest.er1
17555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017558 { ac_try='test -z "$ac_c_werror_flag"
17559 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17561 (eval $ac_try) 2>&5
17562 ac_status=$?
17563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17564 (exit $ac_status); }; } &&
17565 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17567 (eval $ac_try) 2>&5
17568 ac_status=$?
17569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17570 (exit $ac_status); }; }; then
17571 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017572else
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017574sed 's/^/| /' conftest.$ac_ext >&5
17575
Martin v. Löwis11437992002-04-12 09:54:03 +000017576ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017577fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017578rm -f conftest.err conftest.$ac_objext \
17579 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017580fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017581echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17582echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17583if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017584
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017586#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017587_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017588
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17590echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017591 OLD_CFLAGS=$CFLAGS
17592 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017594/* confdefs.h. */
17595_ACEOF
17596cat confdefs.h >>conftest.$ac_ext
17597cat >>conftest.$ac_ext <<_ACEOF
17598/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017599
17600# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
Martin v. Löwis11437992002-04-12 09:54:03 +000017602int
17603main ()
17604{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017605
17606 char *name;
17607 struct hostent *he, *res;
17608 char buffer[2048];
17609 int buflen = 2048;
17610 int h_errnop;
17611
17612 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017613
17614 ;
17615 return 0;
17616}
17617_ACEOF
17618rm -f conftest.$ac_objext
17619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017620 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017622 grep -v '^ *+' conftest.er1 >conftest.err
17623 rm -f conftest.er1
17624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17626 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017627 { ac_try='test -z "$ac_c_werror_flag"
17628 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17630 (eval $ac_try) 2>&5
17631 ac_status=$?
17632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17633 (exit $ac_status); }; } &&
17634 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17636 (eval $ac_try) 2>&5
17637 ac_status=$?
17638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17639 (exit $ac_status); }; }; then
17640
17641 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017642#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017643_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017644
Martin v. Löwis11437992002-04-12 09:54:03 +000017645
17646cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017647#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017648_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017649
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 echo "$as_me:$LINENO: result: yes" >&5
17651echo "${ECHO_T}yes" >&6
17652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017653else
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017655sed 's/^/| /' conftest.$ac_ext >&5
17656
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
17658 echo "$as_me:$LINENO: result: no" >&5
17659echo "${ECHO_T}no" >&6
17660 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17661echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017663/* confdefs.h. */
17664_ACEOF
17665cat confdefs.h >>conftest.$ac_ext
17666cat >>conftest.$ac_ext <<_ACEOF
17667/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017668
17669# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
Martin v. Löwis11437992002-04-12 09:54:03 +000017671int
17672main ()
17673{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017674
17675 char *name;
17676 struct hostent *he;
17677 char buffer[2048];
17678 int buflen = 2048;
17679 int h_errnop;
17680
17681 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017682
17683 ;
17684 return 0;
17685}
17686_ACEOF
17687rm -f conftest.$ac_objext
17688if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017689 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017691 grep -v '^ *+' conftest.er1 >conftest.err
17692 rm -f conftest.er1
17693 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17695 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017696 { ac_try='test -z "$ac_c_werror_flag"
17697 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017698 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17699 (eval $ac_try) 2>&5
17700 ac_status=$?
17701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17702 (exit $ac_status); }; } &&
17703 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17705 (eval $ac_try) 2>&5
17706 ac_status=$?
17707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708 (exit $ac_status); }; }; then
17709
17710 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017711#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017712_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017713
Martin v. Löwis11437992002-04-12 09:54:03 +000017714
17715cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017716#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017717_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017718
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 echo "$as_me:$LINENO: result: yes" >&5
17720echo "${ECHO_T}yes" >&6
17721
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017722else
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017724sed 's/^/| /' conftest.$ac_ext >&5
17725
Martin v. Löwis11437992002-04-12 09:54:03 +000017726
17727 echo "$as_me:$LINENO: result: no" >&5
17728echo "${ECHO_T}no" >&6
17729 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17730echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017732/* confdefs.h. */
17733_ACEOF
17734cat confdefs.h >>conftest.$ac_ext
17735cat >>conftest.$ac_ext <<_ACEOF
17736/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017737
17738# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017739
Martin v. Löwis11437992002-04-12 09:54:03 +000017740int
17741main ()
17742{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017743
17744 char *name;
17745 struct hostent *he;
17746 struct hostent_data data;
17747
17748 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017749
17750 ;
17751 return 0;
17752}
17753_ACEOF
17754rm -f conftest.$ac_objext
17755if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017756 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017758 grep -v '^ *+' conftest.er1 >conftest.err
17759 rm -f conftest.er1
17760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17762 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017763 { ac_try='test -z "$ac_c_werror_flag"
17764 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17766 (eval $ac_try) 2>&5
17767 ac_status=$?
17768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769 (exit $ac_status); }; } &&
17770 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17772 (eval $ac_try) 2>&5
17773 ac_status=$?
17774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775 (exit $ac_status); }; }; then
17776
17777 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017778#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017779_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017780
Martin v. Löwis11437992002-04-12 09:54:03 +000017781
17782cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017783#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017784_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017785
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 echo "$as_me:$LINENO: result: yes" >&5
17787echo "${ECHO_T}yes" >&6
17788
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017789else
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017791sed 's/^/| /' conftest.$ac_ext >&5
17792
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
17794 echo "$as_me:$LINENO: result: no" >&5
17795echo "${ECHO_T}no" >&6
17796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017797fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017798rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017799
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017800fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017801rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017805 CFLAGS=$OLD_CFLAGS
17806
17807else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017808
Martin v. Löwis11437992002-04-12 09:54:03 +000017809
17810for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017811do
Martin v. Löwis11437992002-04-12 09:54:03 +000017812as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17813echo "$as_me:$LINENO: checking for $ac_func" >&5
17814echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17815if eval "test \"\${$as_ac_var+set}\" = set"; then
17816 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017817else
Martin v. Löwis11437992002-04-12 09:54:03 +000017818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017819/* confdefs.h. */
17820_ACEOF
17821cat confdefs.h >>conftest.$ac_ext
17822cat >>conftest.$ac_ext <<_ACEOF
17823/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017824/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017825 which can conflict with char $ac_func (); below.
17826 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017827 <limits.h> exists even on freestanding compilers. Under hpux,
17828 including <limits.h> includes <sys/time.h> and causes problems
17829 checking for functions defined therein. */
17830#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017831# include <limits.h>
17832#else
17833# include <assert.h>
17834#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017835/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017836#ifdef __cplusplus
17837extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017838{
Martin v. Löwis11437992002-04-12 09:54:03 +000017839#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017841 builtin and then its argument prototype would still apply. */
17842char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017843/* The GNU C library defines this for functions which it implements
17844 to always fail with ENOSYS. Some functions are actually named
17845 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017846#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017847choke me
17848#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017849char (*f) () = $ac_func;
17850#endif
17851#ifdef __cplusplus
17852}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017853#endif
17854
Skip Montanaro6dead952003-09-25 14:50:04 +000017855int
17856main ()
17857{
17858return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 ;
17860 return 0;
17861}
17862_ACEOF
17863rm -f conftest.$ac_objext conftest$ac_exeext
17864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017865 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867 grep -v '^ *+' conftest.er1 >conftest.err
17868 rm -f conftest.er1
17869 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17871 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017872 { ac_try='test -z "$ac_c_werror_flag"
17873 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17875 (eval $ac_try) 2>&5
17876 ac_status=$?
17877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17878 (exit $ac_status); }; } &&
17879 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17881 (eval $ac_try) 2>&5
17882 ac_status=$?
17883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17884 (exit $ac_status); }; }; then
17885 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017886else
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017888sed 's/^/| /' conftest.$ac_ext >&5
17889
Martin v. Löwis11437992002-04-12 09:54:03 +000017890eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017891fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017892rm -f conftest.err conftest.$ac_objext \
17893 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017894fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017895echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17896echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17897if test `eval echo '${'$as_ac_var'}'` = yes; then
17898 cat >>confdefs.h <<_ACEOF
17899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17900_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017901
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017902fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017903done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017904
Michael W. Hudson54241132001-12-07 15:38:26 +000017905
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017906fi
17907
Michael W. Hudson54241132001-12-07 15:38:26 +000017908
17909
17910
17911
17912
17913
Guido van Rossum627b2d71993-12-24 10:39:16 +000017914# checks for system services
17915# (none yet)
17916
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017917# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017918echo "$as_me:$LINENO: checking for __fpu_control" >&5
17919echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17920if test "${ac_cv_func___fpu_control+set}" = set; then
17921 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017922else
Martin v. Löwis11437992002-04-12 09:54:03 +000017923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017924/* confdefs.h. */
17925_ACEOF
17926cat confdefs.h >>conftest.$ac_ext
17927cat >>conftest.$ac_ext <<_ACEOF
17928/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017930 which can conflict with char __fpu_control (); below.
17931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017932 <limits.h> exists even on freestanding compilers. Under hpux,
17933 including <limits.h> includes <sys/time.h> and causes problems
17934 checking for functions defined therein. */
17935#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017936# include <limits.h>
17937#else
17938# include <assert.h>
17939#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017940/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017941#ifdef __cplusplus
17942extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017943{
Martin v. Löwis11437992002-04-12 09:54:03 +000017944#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017945/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 builtin and then its argument prototype would still apply. */
17947char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017948/* The GNU C library defines this for functions which it implements
17949 to always fail with ENOSYS. Some functions are actually named
17950 something starting with __ and the normal name is an alias. */
17951#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17952choke me
17953#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017954char (*f) () = __fpu_control;
17955#endif
17956#ifdef __cplusplus
17957}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017958#endif
17959
Skip Montanaro6dead952003-09-25 14:50:04 +000017960int
17961main ()
17962{
17963return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext conftest$ac_exeext
17969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017970 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017972 grep -v '^ *+' conftest.er1 >conftest.err
17973 rm -f conftest.er1
17974 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17976 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017977 { ac_try='test -z "$ac_c_werror_flag"
17978 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017979 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17980 (eval $ac_try) 2>&5
17981 ac_status=$?
17982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17983 (exit $ac_status); }; } &&
17984 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17986 (eval $ac_try) 2>&5
17987 ac_status=$?
17988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17989 (exit $ac_status); }; }; then
17990 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017991else
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017993sed 's/^/| /' conftest.$ac_ext >&5
17994
Martin v. Löwis11437992002-04-12 09:54:03 +000017995ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017996fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017997rm -f conftest.err conftest.$ac_objext \
17998 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017999fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018000echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
18001echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
18002if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018003 :
18004else
Martin v. Löwis11437992002-04-12 09:54:03 +000018005
18006echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
18007echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
18008if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
18009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018010else
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018012LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018014/* confdefs.h. */
18015_ACEOF
18016cat confdefs.h >>conftest.$ac_ext
18017cat >>conftest.$ac_ext <<_ACEOF
18018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018020/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018021#ifdef __cplusplus
18022extern "C"
18023#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018024/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018025 builtin and then its argument prototype would still apply. */
18026char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018027int
18028main ()
18029{
18030__fpu_control ();
18031 ;
18032 return 0;
18033}
18034_ACEOF
18035rm -f conftest.$ac_objext conftest$ac_exeext
18036if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018037 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018039 grep -v '^ *+' conftest.er1 >conftest.err
18040 rm -f conftest.er1
18041 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18043 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018044 { ac_try='test -z "$ac_c_werror_flag"
18045 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18047 (eval $ac_try) 2>&5
18048 ac_status=$?
18049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18050 (exit $ac_status); }; } &&
18051 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18053 (eval $ac_try) 2>&5
18054 ac_status=$?
18055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18056 (exit $ac_status); }; }; then
18057 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018058else
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018060sed 's/^/| /' conftest.$ac_ext >&5
18061
Martin v. Löwis11437992002-04-12 09:54:03 +000018062ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018063fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018064rm -f conftest.err conftest.$ac_objext \
18065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018066LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018067fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018068echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
18069echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
18070if test $ac_cv_lib_ieee___fpu_control = yes; then
18071 cat >>confdefs.h <<_ACEOF
18072#define HAVE_LIBIEEE 1
18073_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018074
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018075 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018076
Guido van Rossum627b2d71993-12-24 10:39:16 +000018077fi
18078
Michael W. Hudson54241132001-12-07 15:38:26 +000018079
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000018080fi
18081
Michael W. Hudson54241132001-12-07 15:38:26 +000018082
Guido van Rossum7f253911997-05-09 02:42:48 +000018083# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000018084echo "$as_me:$LINENO: checking for --with-fpectl" >&5
18085echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
18086
Guido van Rossum7f253911997-05-09 02:42:48 +000018087# Check whether --with-fpectl or --without-fpectl was given.
18088if test "${with_fpectl+set}" = set; then
18089 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000018090
Guido van Rossum7f253911997-05-09 02:42:48 +000018091if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018092then
18093
18094cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000018095#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018096_ACEOF
18097
18098 echo "$as_me:$LINENO: result: yes" >&5
18099echo "${ECHO_T}yes" >&6
18100else echo "$as_me:$LINENO: result: no" >&5
18101echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018102fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018103else
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 echo "$as_me:$LINENO: result: no" >&5
18105echo "${ECHO_T}no" >&6
18106fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000018107
Guido van Rossum7f43da71994-08-01 12:15:30 +000018108# check for --with-libm=...
18109
Guido van Rossum563e7081996-09-10 18:20:48 +000018110case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000018111Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000018112BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000018113*) LIBM=-lm
18114esac
Martin v. Löwis11437992002-04-12 09:54:03 +000018115echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
18116echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
18117
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018118# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018119if test "${with_libm+set}" = set; then
18120 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000018121
Guido van Rossum7f253911997-05-09 02:42:48 +000018122if test "$withval" = no
18123then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 echo "$as_me:$LINENO: result: force LIBM empty" >&5
18125echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018126elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018127then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018128 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
18129echo "${ECHO_T}set LIBM=\"$withval\"" >&6
18130else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
18131echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
18132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018133fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018134else
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
18136echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
18137fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018138
18139# check for --with-libc=...
18140
Martin v. Löwis11437992002-04-12 09:54:03 +000018141echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18142echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18143
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018144# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018145if test "${with_libc+set}" = set; then
18146 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018147
Guido van Rossum7f253911997-05-09 02:42:48 +000018148if test "$withval" = no
18149then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018150 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18151echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018152elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018153then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18155echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18156else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18157echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18158 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018159fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018160else
Martin v. Löwis11437992002-04-12 09:54:03 +000018161 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18162echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18163fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018164
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018165# check for hypot() in math library
18166LIBS_SAVE=$LIBS
18167LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018168
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018169for ac_func in hypot
18170do
Martin v. Löwis11437992002-04-12 09:54:03 +000018171as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18172echo "$as_me:$LINENO: checking for $ac_func" >&5
18173echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18174if eval "test \"\${$as_ac_var+set}\" = set"; then
18175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018176else
Martin v. Löwis11437992002-04-12 09:54:03 +000018177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018183/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018184 which can conflict with char $ac_func (); below.
18185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018186 <limits.h> exists even on freestanding compilers. Under hpux,
18187 including <limits.h> includes <sys/time.h> and causes problems
18188 checking for functions defined therein. */
18189#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018190# include <limits.h>
18191#else
18192# include <assert.h>
18193#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018194/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018195#ifdef __cplusplus
18196extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018197{
Martin v. Löwis11437992002-04-12 09:54:03 +000018198#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018199/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 builtin and then its argument prototype would still apply. */
18201char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018202/* The GNU C library defines this for functions which it implements
18203 to always fail with ENOSYS. Some functions are actually named
18204 something starting with __ and the normal name is an alias. */
18205#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18206choke me
18207#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018208char (*f) () = $ac_func;
18209#endif
18210#ifdef __cplusplus
18211}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018212#endif
18213
Skip Montanaro6dead952003-09-25 14:50:04 +000018214int
18215main ()
18216{
18217return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018218 ;
18219 return 0;
18220}
18221_ACEOF
18222rm -f conftest.$ac_objext conftest$ac_exeext
18223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018224 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018226 grep -v '^ *+' conftest.er1 >conftest.err
18227 rm -f conftest.er1
18228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18230 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018231 { ac_try='test -z "$ac_c_werror_flag"
18232 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18234 (eval $ac_try) 2>&5
18235 ac_status=$?
18236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18237 (exit $ac_status); }; } &&
18238 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018239 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18240 (eval $ac_try) 2>&5
18241 ac_status=$?
18242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18243 (exit $ac_status); }; }; then
18244 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018245else
Martin v. Löwis11437992002-04-12 09:54:03 +000018246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018247sed 's/^/| /' conftest.$ac_ext >&5
18248
Martin v. Löwis11437992002-04-12 09:54:03 +000018249eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018250fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018251rm -f conftest.err conftest.$ac_objext \
18252 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018253fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018254echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18255echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18256if test `eval echo '${'$as_ac_var'}'` = yes; then
18257 cat >>confdefs.h <<_ACEOF
18258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18259_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018260
Michael W. Hudson54241132001-12-07 15:38:26 +000018261else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018262 case $LIBOBJS in
18263 "$ac_func.$ac_objext" | \
18264 *" $ac_func.$ac_objext" | \
18265 "$ac_func.$ac_objext "* | \
18266 *" $ac_func.$ac_objext "* ) ;;
18267 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18268esac
18269
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018270fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018271done
18272
Michael W. Hudson54241132001-12-07 15:38:26 +000018273
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018274LIBS=$LIBS_SAVE
18275
Guido van Rossumef2255b2000-03-10 22:30:29 +000018276# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018277if test "${ac_cv_header_wchar_h+set}" = set; then
18278 echo "$as_me:$LINENO: checking for wchar.h" >&5
18279echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18280if test "${ac_cv_header_wchar_h+set}" = set; then
18281 echo $ECHO_N "(cached) $ECHO_C" >&6
18282fi
18283echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18284echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018285else
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 # Is the header compilable?
18287echo "$as_me:$LINENO: checking wchar.h usability" >&5
18288echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018290/* confdefs.h. */
18291_ACEOF
18292cat confdefs.h >>conftest.$ac_ext
18293cat >>conftest.$ac_ext <<_ACEOF
18294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018295$ac_includes_default
18296#include <wchar.h>
18297_ACEOF
18298rm -f conftest.$ac_objext
18299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018300 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018302 grep -v '^ *+' conftest.er1 >conftest.err
18303 rm -f conftest.er1
18304 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18306 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018307 { ac_try='test -z "$ac_c_werror_flag"
18308 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18310 (eval $ac_try) 2>&5
18311 ac_status=$?
18312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18313 (exit $ac_status); }; } &&
18314 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18316 (eval $ac_try) 2>&5
18317 ac_status=$?
18318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18319 (exit $ac_status); }; }; then
18320 ac_header_compiler=yes
18321else
18322 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018323sed 's/^/| /' conftest.$ac_ext >&5
18324
Martin v. Löwis11437992002-04-12 09:54:03 +000018325ac_header_compiler=no
18326fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018327rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018328echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18329echo "${ECHO_T}$ac_header_compiler" >&6
18330
18331# Is the header present?
18332echo "$as_me:$LINENO: checking wchar.h presence" >&5
18333echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018335/* confdefs.h. */
18336_ACEOF
18337cat confdefs.h >>conftest.$ac_ext
18338cat >>conftest.$ac_ext <<_ACEOF
18339/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018340#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018341_ACEOF
18342if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18344 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018345 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018346 rm -f conftest.er1
18347 cat conftest.err >&5
18348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18349 (exit $ac_status); } >/dev/null; then
18350 if test -s conftest.err; then
18351 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018352 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018353 else
18354 ac_cpp_err=
18355 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018356else
Martin v. Löwis11437992002-04-12 09:54:03 +000018357 ac_cpp_err=yes
18358fi
18359if test -z "$ac_cpp_err"; then
18360 ac_header_preproc=yes
18361else
18362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018363sed 's/^/| /' conftest.$ac_ext >&5
18364
Martin v. Löwis11437992002-04-12 09:54:03 +000018365 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018367rm -f conftest.err conftest.$ac_ext
18368echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18369echo "${ECHO_T}$ac_header_preproc" >&6
18370
18371# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018372case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18373 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18375echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018376 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18377echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18378 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018379 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018380 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018381 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18382echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018383 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18384echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18385 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18386echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18387 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18388echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018389 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18390echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018391 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18392echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018393 (
18394 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000018395## ------------------------------------------------ ##
18396## Report this to http://www.python.org/python-bugs ##
18397## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018398_ASBOX
18399 ) |
18400 sed "s/^/$as_me: WARNING: /" >&2
18401 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018402esac
18403echo "$as_me:$LINENO: checking for wchar.h" >&5
18404echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18405if test "${ac_cv_header_wchar_h+set}" = set; then
18406 echo $ECHO_N "(cached) $ECHO_C" >&6
18407else
18408 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018409fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018410echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18411echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18412
18413fi
18414if test $ac_cv_header_wchar_h = yes; then
18415
18416
18417cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018418#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018419_ACEOF
18420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018421 wchar_h="yes"
18422
Guido van Rossumef2255b2000-03-10 22:30:29 +000018423else
Martin v. Löwis11437992002-04-12 09:54:03 +000018424 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018425
18426fi
18427
Michael W. Hudson54241132001-12-07 15:38:26 +000018428
Martin v. Löwis11437992002-04-12 09:54:03 +000018429
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018430# determine wchar_t size
18431if test "$wchar_h" = yes
18432then
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 echo "$as_me:$LINENO: checking for wchar_t" >&5
18434echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18435if test "${ac_cv_type_wchar_t+set}" = set; then
18436 echo $ECHO_N "(cached) $ECHO_C" >&6
18437else
18438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018439/* confdefs.h. */
18440_ACEOF
18441cat confdefs.h >>conftest.$ac_ext
18442cat >>conftest.$ac_ext <<_ACEOF
18443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018444#include <wchar.h>
18445
Martin v. Löwis11437992002-04-12 09:54:03 +000018446int
18447main ()
18448{
18449if ((wchar_t *) 0)
18450 return 0;
18451if (sizeof (wchar_t))
18452 return 0;
18453 ;
18454 return 0;
18455}
18456_ACEOF
18457rm -f conftest.$ac_objext
18458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018459 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018461 grep -v '^ *+' conftest.er1 >conftest.err
18462 rm -f conftest.er1
18463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018466 { ac_try='test -z "$ac_c_werror_flag"
18467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18469 (eval $ac_try) 2>&5
18470 ac_status=$?
18471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18472 (exit $ac_status); }; } &&
18473 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18475 (eval $ac_try) 2>&5
18476 ac_status=$?
18477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478 (exit $ac_status); }; }; then
18479 ac_cv_type_wchar_t=yes
18480else
18481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018482sed 's/^/| /' conftest.$ac_ext >&5
18483
Martin v. Löwis11437992002-04-12 09:54:03 +000018484ac_cv_type_wchar_t=no
18485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018487fi
18488echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18489echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18490
18491echo "$as_me:$LINENO: checking size of wchar_t" >&5
18492echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18493if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18494 echo $ECHO_N "(cached) $ECHO_C" >&6
18495else
18496 if test "$ac_cv_type_wchar_t" = yes; then
18497 # The cast to unsigned long works around a bug in the HP C Compiler
18498 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18499 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18500 # This bug is HP SR number 8606223364.
18501 if test "$cross_compiling" = yes; then
18502 # Depending upon the size, compute the lo and hi bounds.
18503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018504/* confdefs.h. */
18505_ACEOF
18506cat confdefs.h >>conftest.$ac_ext
18507cat >>conftest.$ac_ext <<_ACEOF
18508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018509#include <wchar.h>
18510
Martin v. Löwis11437992002-04-12 09:54:03 +000018511int
18512main ()
18513{
18514static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18515test_array [0] = 0
18516
18517 ;
18518 return 0;
18519}
18520_ACEOF
18521rm -f conftest.$ac_objext
18522if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018523 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018525 grep -v '^ *+' conftest.er1 >conftest.err
18526 rm -f conftest.er1
18527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18529 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018530 { ac_try='test -z "$ac_c_werror_flag"
18531 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18533 (eval $ac_try) 2>&5
18534 ac_status=$?
18535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18536 (exit $ac_status); }; } &&
18537 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18539 (eval $ac_try) 2>&5
18540 ac_status=$?
18541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18542 (exit $ac_status); }; }; then
18543 ac_lo=0 ac_mid=0
18544 while :; do
18545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018546/* confdefs.h. */
18547_ACEOF
18548cat confdefs.h >>conftest.$ac_ext
18549cat >>conftest.$ac_ext <<_ACEOF
18550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018551#include <wchar.h>
18552
Martin v. Löwis11437992002-04-12 09:54:03 +000018553int
18554main ()
18555{
18556static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18557test_array [0] = 0
18558
18559 ;
18560 return 0;
18561}
18562_ACEOF
18563rm -f conftest.$ac_objext
18564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018567 grep -v '^ *+' conftest.er1 >conftest.err
18568 rm -f conftest.er1
18569 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18571 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018572 { ac_try='test -z "$ac_c_werror_flag"
18573 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18575 (eval $ac_try) 2>&5
18576 ac_status=$?
18577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18578 (exit $ac_status); }; } &&
18579 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18581 (eval $ac_try) 2>&5
18582 ac_status=$?
18583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18584 (exit $ac_status); }; }; then
18585 ac_hi=$ac_mid; break
18586else
18587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018588sed 's/^/| /' conftest.$ac_ext >&5
18589
Martin v. Löwis11437992002-04-12 09:54:03 +000018590ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018591 if test $ac_lo -le $ac_mid; then
18592 ac_lo= ac_hi=
18593 break
18594 fi
18595 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018596fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018597rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018598 done
18599else
18600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018601sed 's/^/| /' conftest.$ac_ext >&5
18602
Martin v. Löwis11437992002-04-12 09:54:03 +000018603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018604/* confdefs.h. */
18605_ACEOF
18606cat confdefs.h >>conftest.$ac_ext
18607cat >>conftest.$ac_ext <<_ACEOF
18608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018609#include <wchar.h>
18610
Martin v. Löwis11437992002-04-12 09:54:03 +000018611int
18612main ()
18613{
18614static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18615test_array [0] = 0
18616
18617 ;
18618 return 0;
18619}
18620_ACEOF
18621rm -f conftest.$ac_objext
18622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018623 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018625 grep -v '^ *+' conftest.er1 >conftest.err
18626 rm -f conftest.er1
18627 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18629 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018630 { ac_try='test -z "$ac_c_werror_flag"
18631 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18633 (eval $ac_try) 2>&5
18634 ac_status=$?
18635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18636 (exit $ac_status); }; } &&
18637 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18639 (eval $ac_try) 2>&5
18640 ac_status=$?
18641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18642 (exit $ac_status); }; }; then
18643 ac_hi=-1 ac_mid=-1
18644 while :; do
18645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018646/* confdefs.h. */
18647_ACEOF
18648cat confdefs.h >>conftest.$ac_ext
18649cat >>conftest.$ac_ext <<_ACEOF
18650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018651#include <wchar.h>
18652
Martin v. Löwis11437992002-04-12 09:54:03 +000018653int
18654main ()
18655{
18656static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18657test_array [0] = 0
18658
18659 ;
18660 return 0;
18661}
18662_ACEOF
18663rm -f conftest.$ac_objext
18664if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018665 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18671 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018672 { ac_try='test -z "$ac_c_werror_flag"
18673 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18675 (eval $ac_try) 2>&5
18676 ac_status=$?
18677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18678 (exit $ac_status); }; } &&
18679 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18681 (eval $ac_try) 2>&5
18682 ac_status=$?
18683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18684 (exit $ac_status); }; }; then
18685 ac_lo=$ac_mid; break
18686else
18687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018688sed 's/^/| /' conftest.$ac_ext >&5
18689
Martin v. Löwis11437992002-04-12 09:54:03 +000018690ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018691 if test $ac_mid -le $ac_hi; then
18692 ac_lo= ac_hi=
18693 break
18694 fi
18695 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018696fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018697rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018698 done
18699else
18700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018701sed 's/^/| /' conftest.$ac_ext >&5
18702
Martin v. Löwis11437992002-04-12 09:54:03 +000018703ac_lo= ac_hi=
18704fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018706fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018708# Binary search between lo and hi bounds.
18709while test "x$ac_lo" != "x$ac_hi"; do
18710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018712/* confdefs.h. */
18713_ACEOF
18714cat confdefs.h >>conftest.$ac_ext
18715cat >>conftest.$ac_ext <<_ACEOF
18716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018717#include <wchar.h>
18718
Martin v. Löwis11437992002-04-12 09:54:03 +000018719int
18720main ()
18721{
18722static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18723test_array [0] = 0
18724
18725 ;
18726 return 0;
18727}
18728_ACEOF
18729rm -f conftest.$ac_objext
18730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018733 grep -v '^ *+' conftest.er1 >conftest.err
18734 rm -f conftest.er1
18735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18737 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018738 { ac_try='test -z "$ac_c_werror_flag"
18739 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18741 (eval $ac_try) 2>&5
18742 ac_status=$?
18743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18744 (exit $ac_status); }; } &&
18745 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18747 (eval $ac_try) 2>&5
18748 ac_status=$?
18749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18750 (exit $ac_status); }; }; then
18751 ac_hi=$ac_mid
18752else
18753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018754sed 's/^/| /' conftest.$ac_ext >&5
18755
Martin v. Löwis11437992002-04-12 09:54:03 +000018756ac_lo=`expr '(' $ac_mid ')' + 1`
18757fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018759done
18760case $ac_lo in
18761?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018762'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18763See \`config.log' for more details." >&5
18764echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18765See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018766 { (exit 1); exit 1; }; } ;;
18767esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018768else
18769 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000018770 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18771See \`config.log' for more details." >&5
18772echo "$as_me: error: cannot run test program while cross compiling
18773See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018775else
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018777/* confdefs.h. */
18778_ACEOF
18779cat confdefs.h >>conftest.$ac_ext
18780cat >>conftest.$ac_ext <<_ACEOF
18781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018782#include <wchar.h>
18783
18784long longval () { return (long) (sizeof (wchar_t)); }
18785unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018787#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018788int
18789main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018790{
Martin v. Löwis11437992002-04-12 09:54:03 +000018791
18792 FILE *f = fopen ("conftest.val", "w");
18793 if (! f)
18794 exit (1);
18795 if (((long) (sizeof (wchar_t))) < 0)
18796 {
18797 long i = longval ();
18798 if (i != ((long) (sizeof (wchar_t))))
18799 exit (1);
18800 fprintf (f, "%ld\n", i);
18801 }
18802 else
18803 {
18804 unsigned long i = ulongval ();
18805 if (i != ((long) (sizeof (wchar_t))))
18806 exit (1);
18807 fprintf (f, "%lu\n", i);
18808 }
18809 exit (ferror (f) || fclose (f) != 0);
18810
18811 ;
18812 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018813}
Martin v. Löwis11437992002-04-12 09:54:03 +000018814_ACEOF
18815rm -f conftest$ac_exeext
18816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18817 (eval $ac_link) 2>&5
18818 ac_status=$?
18819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18820 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18822 (eval $ac_try) 2>&5
18823 ac_status=$?
18824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18825 (exit $ac_status); }; }; then
18826 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018827else
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 echo "$as_me: program exited with status $ac_status" >&5
18829echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018830sed 's/^/| /' conftest.$ac_ext >&5
18831
Martin v. Löwis11437992002-04-12 09:54:03 +000018832( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018833{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18834See \`config.log' for more details." >&5
18835echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18836See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018837 { (exit 1); exit 1; }; }
18838fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018839rm -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 +000018840fi
18841fi
18842rm -f conftest.val
18843else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018844 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018845fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018847echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18848echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18849cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018850#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018851_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018852
Michael W. Hudson54241132001-12-07 15:38:26 +000018853
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018854fi
18855
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018856echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18857echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18858have_ucs4_tcl=no
18859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018860/* confdefs.h. */
18861_ACEOF
18862cat confdefs.h >>conftest.$ac_ext
18863cat >>conftest.$ac_ext <<_ACEOF
18864/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018865
18866#include <tcl.h>
18867#if TCL_UTF_MAX != 6
18868# error "NOT UCS4_TCL"
18869#endif
18870int
18871main ()
18872{
18873
18874 ;
18875 return 0;
18876}
18877_ACEOF
18878rm -f conftest.$ac_objext
18879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018880 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18886 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018887 { ac_try='test -z "$ac_c_werror_flag"
18888 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18890 (eval $ac_try) 2>&5
18891 ac_status=$?
18892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18893 (exit $ac_status); }; } &&
18894 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18896 (eval $ac_try) 2>&5
18897 ac_status=$?
18898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18899 (exit $ac_status); }; }; then
18900
18901
18902cat >>confdefs.h <<\_ACEOF
18903#define HAVE_UCS4_TCL 1
18904_ACEOF
18905
18906 have_ucs4_tcl=yes
18907
18908else
18909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018910sed 's/^/| /' conftest.$ac_ext >&5
18911
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018912fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018913rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018914echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18915echo "${ECHO_T}$have_ucs4_tcl" >&6
18916
Skip Montanaro6dead952003-09-25 14:50:04 +000018917# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018918if test "$wchar_h" = yes
18919then
18920 # check whether wchar_t is signed or not
18921 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18922echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18923 if test "${ac_cv_wchar_t_signed+set}" = set; then
18924 echo $ECHO_N "(cached) $ECHO_C" >&6
18925else
18926
18927 if test "$cross_compiling" = yes; then
18928 ac_cv_wchar_t_signed=yes
18929else
18930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018936
18937 #include <wchar.h>
18938 int main()
18939 {
18940 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18941 }
18942
18943_ACEOF
18944rm -f conftest$ac_exeext
18945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18946 (eval $ac_link) 2>&5
18947 ac_status=$?
18948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18951 (eval $ac_try) 2>&5
18952 ac_status=$?
18953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18954 (exit $ac_status); }; }; then
18955 ac_cv_wchar_t_signed=yes
18956else
18957 echo "$as_me: program exited with status $ac_status" >&5
18958echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018959sed 's/^/| /' conftest.$ac_ext >&5
18960
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018961( exit $ac_status )
18962ac_cv_wchar_t_signed=no
18963fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018964rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018965fi
18966fi
18967
18968 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18969echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18970fi
18971
Martin v. Löwis11437992002-04-12 09:54:03 +000018972echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18973echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018974# Check whether --enable-unicode or --disable-unicode was given.
18975if test "${enable_unicode+set}" = set; then
18976 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018977
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018978else
18979 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018980fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018981
18982if test $enable_unicode = yes
18983then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018984 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018985 case "$have_ucs4_tcl" in
18986 yes) enable_unicode="ucs4"
18987 ;;
18988 *) enable_unicode="ucs2"
18989 ;;
18990 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018991fi
18992
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018993
18994
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018995case "$enable_unicode" in
18996ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018998#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018999_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019000
19001 ;;
19002ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000019003 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019004#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000019005_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019006
19007 ;;
19008esac
19009
Michael W. Hudson54241132001-12-07 15:38:26 +000019010
Martin v. Löwis11437992002-04-12 09:54:03 +000019011
19012
Martin v. Löwis0036cba2002-04-12 09:58:45 +000019013
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019014if test "$enable_unicode" = "no"
19015then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019016 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000019017 echo "$as_me:$LINENO: result: not used" >&5
19018echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019019else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000019020 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000019021
19022cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019023#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019024_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019025
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000019026
19027 # wchar_t is only usable if it maps to an unsigned type
19028 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000019029 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019030 then
19031 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019032
Martin v. Löwis11437992002-04-12 09:54:03 +000019033cat >>confdefs.h <<\_ACEOF
19034#define HAVE_USABLE_WCHAR_T 1
19035_ACEOF
19036
19037 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019038#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000019039_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019040
19041 elif test "$ac_cv_sizeof_short" = "$unicode_size"
19042 then
19043 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019045#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000019046_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019047
19048 elif test "$ac_cv_sizeof_long" = "$unicode_size"
19049 then
19050 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019052#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000019053_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019054
19055 else
19056 PY_UNICODE_TYPE="no type found"
19057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019058 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
19059echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019060fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019061
19062# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019063echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
19064echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
19065if test "${ac_cv_c_bigendian+set}" = set; then
19066 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019067else
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 # See if sys/param.h defines the BYTE_ORDER macro.
19069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019070/* confdefs.h. */
19071_ACEOF
19072cat confdefs.h >>conftest.$ac_ext
19073cat >>conftest.$ac_ext <<_ACEOF
19074/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019075#include <sys/types.h>
19076#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019077
Martin v. Löwis11437992002-04-12 09:54:03 +000019078int
19079main ()
19080{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019081#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
19082 bogus endian macros
19083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019084
19085 ;
19086 return 0;
19087}
19088_ACEOF
19089rm -f conftest.$ac_objext
19090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019091 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019093 grep -v '^ *+' conftest.er1 >conftest.err
19094 rm -f conftest.er1
19095 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19097 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019098 { ac_try='test -z "$ac_c_werror_flag"
19099 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19101 (eval $ac_try) 2>&5
19102 ac_status=$?
19103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19104 (exit $ac_status); }; } &&
19105 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19107 (eval $ac_try) 2>&5
19108 ac_status=$?
19109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019111 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000019112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019113/* confdefs.h. */
19114_ACEOF
19115cat confdefs.h >>conftest.$ac_ext
19116cat >>conftest.$ac_ext <<_ACEOF
19117/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019118#include <sys/types.h>
19119#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000019120
Martin v. Löwis11437992002-04-12 09:54:03 +000019121int
19122main ()
19123{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019124#if BYTE_ORDER != BIG_ENDIAN
19125 not big endian
19126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019127
19128 ;
19129 return 0;
19130}
19131_ACEOF
19132rm -f conftest.$ac_objext
19133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019136 grep -v '^ *+' conftest.er1 >conftest.err
19137 rm -f conftest.er1
19138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019141 { ac_try='test -z "$ac_c_werror_flag"
19142 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19144 (eval $ac_try) 2>&5
19145 ac_status=$?
19146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19147 (exit $ac_status); }; } &&
19148 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19150 (eval $ac_try) 2>&5
19151 ac_status=$?
19152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19153 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019154 ac_cv_c_bigendian=yes
19155else
Martin v. Löwis11437992002-04-12 09:54:03 +000019156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019157sed 's/^/| /' conftest.$ac_ext >&5
19158
Martin v. Löwis11437992002-04-12 09:54:03 +000019159ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019160fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019162else
Martin v. Löwis11437992002-04-12 09:54:03 +000019163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019164sed 's/^/| /' conftest.$ac_ext >&5
19165
Martin v. Löwis11437992002-04-12 09:54:03 +000019166# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019167if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019168 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019169 ac_cv_c_bigendian=unknown
19170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019171/* confdefs.h. */
19172_ACEOF
19173cat confdefs.h >>conftest.$ac_ext
19174cat >>conftest.$ac_ext <<_ACEOF
19175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019176short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19177short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19178void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19179short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19180short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19181void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019182int
19183main ()
19184{
19185 _ascii (); _ebcdic ();
19186 ;
19187 return 0;
19188}
19189_ACEOF
19190rm -f conftest.$ac_objext
19191if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019192 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019194 grep -v '^ *+' conftest.er1 >conftest.err
19195 rm -f conftest.er1
19196 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19198 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019199 { ac_try='test -z "$ac_c_werror_flag"
19200 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19202 (eval $ac_try) 2>&5
19203 ac_status=$?
19204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19205 (exit $ac_status); }; } &&
19206 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19208 (eval $ac_try) 2>&5
19209 ac_status=$?
19210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19211 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019212 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019213 ac_cv_c_bigendian=yes
19214fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019215if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019216 if test "$ac_cv_c_bigendian" = unknown; then
19217 ac_cv_c_bigendian=no
19218 else
19219 # finding both strings is unlikely to happen, but who knows?
19220 ac_cv_c_bigendian=unknown
19221 fi
19222fi
19223else
19224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019225sed 's/^/| /' conftest.$ac_ext >&5
19226
Martin v. Löwis11437992002-04-12 09:54:03 +000019227fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019228rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019229else
19230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019236int
19237main ()
19238{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019239 /* Are we little or big endian? From Harbison&Steele. */
19240 union
19241 {
19242 long l;
19243 char c[sizeof (long)];
19244 } u;
19245 u.l = 1;
19246 exit (u.c[sizeof (long) - 1] == 1);
19247}
Martin v. Löwis11437992002-04-12 09:54:03 +000019248_ACEOF
19249rm -f conftest$ac_exeext
19250if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19251 (eval $ac_link) 2>&5
19252 ac_status=$?
19253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19256 (eval $ac_try) 2>&5
19257 ac_status=$?
19258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19259 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019260 ac_cv_c_bigendian=no
19261else
Martin v. Löwis11437992002-04-12 09:54:03 +000019262 echo "$as_me: program exited with status $ac_status" >&5
19263echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019264sed 's/^/| /' conftest.$ac_ext >&5
19265
Martin v. Löwis11437992002-04-12 09:54:03 +000019266( exit $ac_status )
19267ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019268fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019269rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019271fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019272rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019273fi
19274echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19275echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19276case $ac_cv_c_bigendian in
19277 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019278
Martin v. Löwis11437992002-04-12 09:54:03 +000019279cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019280#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019281_ACEOF
19282 ;;
19283 no)
19284 ;;
19285 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019286 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019287presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019288echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019289presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19290 { (exit 1); exit 1; }; } ;;
19291esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019292
Michael W. Hudson54241132001-12-07 15:38:26 +000019293
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019294# Check whether right shifting a negative integer extends the sign bit
19295# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019296echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19297echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19298if test "${ac_cv_rshift_extends_sign+set}" = set; then
19299 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019300else
Martin v. Löwis11437992002-04-12 09:54:03 +000019301
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019302if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019303 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019304else
Martin v. Löwis11437992002-04-12 09:54:03 +000019305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019306/* confdefs.h. */
19307_ACEOF
19308cat confdefs.h >>conftest.$ac_ext
19309cat >>conftest.$ac_ext <<_ACEOF
19310/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019311
19312int main()
19313{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019314 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019315}
19316
Martin v. Löwis11437992002-04-12 09:54:03 +000019317_ACEOF
19318rm -f conftest$ac_exeext
19319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19320 (eval $ac_link) 2>&5
19321 ac_status=$?
19322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19325 (eval $ac_try) 2>&5
19326 ac_status=$?
19327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19328 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019329 ac_cv_rshift_extends_sign=yes
19330else
Martin v. Löwis11437992002-04-12 09:54:03 +000019331 echo "$as_me: program exited with status $ac_status" >&5
19332echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019333sed 's/^/| /' conftest.$ac_ext >&5
19334
Martin v. Löwis11437992002-04-12 09:54:03 +000019335( exit $ac_status )
19336ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019337fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019338rm -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 +000019339fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019340fi
19341
Martin v. Löwis11437992002-04-12 09:54:03 +000019342echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19343echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019344if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019345then
Martin v. Löwis11437992002-04-12 09:54:03 +000019346
19347cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019348#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019349_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019350
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019351fi
19352
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019353# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019354echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19355echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19356if test "${ac_cv_have_getc_unlocked+set}" = set; then
19357 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019358else
Martin v. Löwis11437992002-04-12 09:54:03 +000019359
19360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019361/* confdefs.h. */
19362_ACEOF
19363cat confdefs.h >>conftest.$ac_ext
19364cat >>conftest.$ac_ext <<_ACEOF
19365/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019366#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019367int
19368main ()
19369{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019370
19371 FILE *f = fopen("/dev/null", "r");
19372 flockfile(f);
19373 getc_unlocked(f);
19374 funlockfile(f);
19375
Martin v. Löwis11437992002-04-12 09:54:03 +000019376 ;
19377 return 0;
19378}
19379_ACEOF
19380rm -f conftest.$ac_objext conftest$ac_exeext
19381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019382 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019384 grep -v '^ *+' conftest.er1 >conftest.err
19385 rm -f conftest.er1
19386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19388 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019389 { ac_try='test -z "$ac_c_werror_flag"
19390 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19392 (eval $ac_try) 2>&5
19393 ac_status=$?
19394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19395 (exit $ac_status); }; } &&
19396 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19398 (eval $ac_try) 2>&5
19399 ac_status=$?
19400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19401 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019402 ac_cv_have_getc_unlocked=yes
19403else
Martin v. Löwis11437992002-04-12 09:54:03 +000019404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019405sed 's/^/| /' conftest.$ac_ext >&5
19406
Martin v. Löwis11437992002-04-12 09:54:03 +000019407ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019408fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019409rm -f conftest.err conftest.$ac_objext \
19410 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019411fi
19412
Martin v. Löwis11437992002-04-12 09:54:03 +000019413echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19414echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019415if test "$ac_cv_have_getc_unlocked" = yes
19416then
Martin v. Löwis11437992002-04-12 09:54:03 +000019417
19418cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019419#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019420_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019421
19422fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019423
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019424# check for readline 2.1
19425echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19426echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19427if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19428 echo $ECHO_N "(cached) $ECHO_C" >&6
19429else
19430 ac_check_lib_save_LIBS=$LIBS
19431LIBS="-lreadline -ltermcap $LIBS"
19432cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019433/* confdefs.h. */
19434_ACEOF
19435cat confdefs.h >>conftest.$ac_ext
19436cat >>conftest.$ac_ext <<_ACEOF
19437/* end confdefs.h. */
19438
19439/* Override any gcc2 internal prototype to avoid an error. */
19440#ifdef __cplusplus
19441extern "C"
19442#endif
19443/* We use char because int might match the return type of a gcc2
19444 builtin and then its argument prototype would still apply. */
19445char rl_callback_handler_install ();
19446int
19447main ()
19448{
19449rl_callback_handler_install ();
19450 ;
19451 return 0;
19452}
19453_ACEOF
19454rm -f conftest.$ac_objext conftest$ac_exeext
19455if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019456 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019458 grep -v '^ *+' conftest.er1 >conftest.err
19459 rm -f conftest.er1
19460 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19462 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019463 { ac_try='test -z "$ac_c_werror_flag"
19464 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19466 (eval $ac_try) 2>&5
19467 ac_status=$?
19468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19469 (exit $ac_status); }; } &&
19470 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19472 (eval $ac_try) 2>&5
19473 ac_status=$?
19474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19475 (exit $ac_status); }; }; then
19476 ac_cv_lib_readline_rl_callback_handler_install=yes
19477else
19478 echo "$as_me: failed program was:" >&5
19479sed 's/^/| /' conftest.$ac_ext >&5
19480
19481ac_cv_lib_readline_rl_callback_handler_install=no
19482fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019483rm -f conftest.err conftest.$ac_objext \
19484 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019485LIBS=$ac_check_lib_save_LIBS
19486fi
19487echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19488echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19489if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19490
19491cat >>confdefs.h <<\_ACEOF
19492#define HAVE_RL_CALLBACK 1
19493_ACEOF
19494
19495fi
19496
19497
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019498# check for readline 2.2
19499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019505#include <readline/readline.h>
19506_ACEOF
19507if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19508 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19509 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019510 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019511 rm -f conftest.er1
19512 cat conftest.err >&5
19513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19514 (exit $ac_status); } >/dev/null; then
19515 if test -s conftest.err; then
19516 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019517 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019518 else
19519 ac_cpp_err=
19520 fi
19521else
19522 ac_cpp_err=yes
19523fi
19524if test -z "$ac_cpp_err"; then
19525 have_readline=yes
19526else
19527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019528sed 's/^/| /' conftest.$ac_ext >&5
19529
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019530 have_readline=no
19531fi
19532rm -f conftest.err conftest.$ac_ext
19533if test $have_readline = yes
19534then
19535 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019536/* confdefs.h. */
19537_ACEOF
19538cat confdefs.h >>conftest.$ac_ext
19539cat >>conftest.$ac_ext <<_ACEOF
19540/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019541#include <readline/readline.h>
19542
19543_ACEOF
19544if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019545 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019546
19547cat >>confdefs.h <<\_ACEOF
19548#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19549_ACEOF
19550
19551fi
19552rm -f conftest*
19553
19554fi
19555
Martin v. Löwis0daad592001-09-30 21:09:59 +000019556# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019557echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19558echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19559if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019561else
Martin v. Löwis11437992002-04-12 09:54:03 +000019562 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019563LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019564cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019565/* confdefs.h. */
19566_ACEOF
19567cat confdefs.h >>conftest.$ac_ext
19568cat >>conftest.$ac_ext <<_ACEOF
19569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019570
Guido van Rossum353ae582001-07-10 16:45:32 +000019571/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019572#ifdef __cplusplus
19573extern "C"
19574#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019575/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019576 builtin and then its argument prototype would still apply. */
19577char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019578int
19579main ()
19580{
19581rl_pre_input_hook ();
19582 ;
19583 return 0;
19584}
19585_ACEOF
19586rm -f conftest.$ac_objext conftest$ac_exeext
19587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019588 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019590 grep -v '^ *+' conftest.er1 >conftest.err
19591 rm -f conftest.er1
19592 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19594 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019595 { ac_try='test -z "$ac_c_werror_flag"
19596 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19598 (eval $ac_try) 2>&5
19599 ac_status=$?
19600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19601 (exit $ac_status); }; } &&
19602 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19604 (eval $ac_try) 2>&5
19605 ac_status=$?
19606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19607 (exit $ac_status); }; }; then
19608 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019609else
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019611sed 's/^/| /' conftest.$ac_ext >&5
19612
Martin v. Löwis11437992002-04-12 09:54:03 +000019613ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019614fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019615rm -f conftest.err conftest.$ac_objext \
19616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019617LIBS=$ac_check_lib_save_LIBS
19618fi
19619echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19620echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19621if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019622
Martin v. Löwis11437992002-04-12 09:54:03 +000019623cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019624#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019625_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019626
Martin v. Löwis0daad592001-09-30 21:09:59 +000019627fi
19628
Michael W. Hudson54241132001-12-07 15:38:26 +000019629
Martin v. Löwis0daad592001-09-30 21:09:59 +000019630# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019631echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19632echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19633if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19634 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019635else
Martin v. Löwis11437992002-04-12 09:54:03 +000019636 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019637LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019639/* confdefs.h. */
19640_ACEOF
19641cat confdefs.h >>conftest.$ac_ext
19642cat >>conftest.$ac_ext <<_ACEOF
19643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019644
Martin v. Löwis0daad592001-09-30 21:09:59 +000019645/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019646#ifdef __cplusplus
19647extern "C"
19648#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019649/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019650 builtin and then its argument prototype would still apply. */
19651char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019652int
19653main ()
19654{
19655rl_completion_matches ();
19656 ;
19657 return 0;
19658}
19659_ACEOF
19660rm -f conftest.$ac_objext conftest$ac_exeext
19661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019662 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019664 grep -v '^ *+' conftest.er1 >conftest.err
19665 rm -f conftest.er1
19666 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19668 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019669 { ac_try='test -z "$ac_c_werror_flag"
19670 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19672 (eval $ac_try) 2>&5
19673 ac_status=$?
19674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19675 (exit $ac_status); }; } &&
19676 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19678 (eval $ac_try) 2>&5
19679 ac_status=$?
19680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19681 (exit $ac_status); }; }; then
19682 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019683else
Martin v. Löwis11437992002-04-12 09:54:03 +000019684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019685sed 's/^/| /' conftest.$ac_ext >&5
19686
Martin v. Löwis11437992002-04-12 09:54:03 +000019687ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019688fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019689rm -f conftest.err conftest.$ac_objext \
19690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019691LIBS=$ac_check_lib_save_LIBS
19692fi
19693echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19694echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19695if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019696
Martin v. Löwis11437992002-04-12 09:54:03 +000019697cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019698#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019699_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019700
Guido van Rossum353ae582001-07-10 16:45:32 +000019701fi
19702
Jack Jansendd19cf82001-12-06 22:36:17 +000019703
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019704# also in readline 4.2
19705cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
19711#include <readline/readline.h>
19712_ACEOF
19713if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19714 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19715 ac_status=$?
19716 grep -v '^ *+' conftest.er1 >conftest.err
19717 rm -f conftest.er1
19718 cat conftest.err >&5
19719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19720 (exit $ac_status); } >/dev/null; then
19721 if test -s conftest.err; then
19722 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019723 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019724 else
19725 ac_cpp_err=
19726 fi
19727else
19728 ac_cpp_err=yes
19729fi
19730if test -z "$ac_cpp_err"; then
19731 have_readline=yes
19732else
19733 echo "$as_me: failed program was:" >&5
19734sed 's/^/| /' conftest.$ac_ext >&5
19735
19736 have_readline=no
19737fi
19738rm -f conftest.err conftest.$ac_ext
19739if test $have_readline = yes
19740then
19741 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019742/* confdefs.h. */
19743_ACEOF
19744cat confdefs.h >>conftest.$ac_ext
19745cat >>conftest.$ac_ext <<_ACEOF
19746/* end confdefs.h. */
19747#include <readline/readline.h>
19748
19749_ACEOF
19750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19751 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19752
19753cat >>confdefs.h <<\_ACEOF
19754#define HAVE_RL_CATCH_SIGNAL 1
19755_ACEOF
19756
19757fi
19758rm -f conftest*
19759
19760fi
19761
Martin v. Löwis11437992002-04-12 09:54:03 +000019762echo "$as_me:$LINENO: checking for broken nice()" >&5
19763echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19764if test "${ac_cv_broken_nice+set}" = set; then
19765 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019766else
Martin v. Löwis11437992002-04-12 09:54:03 +000019767
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019768if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019769 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019770else
Martin v. Löwis11437992002-04-12 09:54:03 +000019771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019772/* confdefs.h. */
19773_ACEOF
19774cat confdefs.h >>conftest.$ac_ext
19775cat >>conftest.$ac_ext <<_ACEOF
19776/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019777
19778int main()
19779{
19780 int val1 = nice(1);
19781 if (val1 != -1 && val1 == nice(2))
19782 exit(0);
19783 exit(1);
19784}
19785
Martin v. Löwis11437992002-04-12 09:54:03 +000019786_ACEOF
19787rm -f conftest$ac_exeext
19788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19789 (eval $ac_link) 2>&5
19790 ac_status=$?
19791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19794 (eval $ac_try) 2>&5
19795 ac_status=$?
19796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19797 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019798 ac_cv_broken_nice=yes
19799else
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 echo "$as_me: program exited with status $ac_status" >&5
19801echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019802sed 's/^/| /' conftest.$ac_ext >&5
19803
Martin v. Löwis11437992002-04-12 09:54:03 +000019804( exit $ac_status )
19805ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019806fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019807rm -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 +000019808fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019809fi
19810
Martin v. Löwis11437992002-04-12 09:54:03 +000019811echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19812echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019813if test "$ac_cv_broken_nice" = yes
19814then
Martin v. Löwis11437992002-04-12 09:54:03 +000019815
19816cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019817#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019818_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019819
19820fi
19821
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019822echo "$as_me:$LINENO: checking for broken poll()" >&5
19823echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19824if test "$cross_compiling" = yes; then
19825 ac_cv_broken_poll=no
19826else
19827 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019828/* confdefs.h. */
19829_ACEOF
19830cat confdefs.h >>conftest.$ac_ext
19831cat >>conftest.$ac_ext <<_ACEOF
19832/* end confdefs.h. */
19833
19834#include <poll.h>
19835
19836int main (void)
19837 {
19838 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19839
19840 close (42);
19841
19842 int poll_test = poll (&poll_struct, 1, 0);
19843
19844 if (poll_test < 0)
19845 {
19846 exit(0);
19847 }
19848 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19849 {
19850 exit(0);
19851 }
19852 else
19853 {
19854 exit(1);
19855 }
19856 }
19857
19858_ACEOF
19859rm -f conftest$ac_exeext
19860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19861 (eval $ac_link) 2>&5
19862 ac_status=$?
19863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19864 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19866 (eval $ac_try) 2>&5
19867 ac_status=$?
19868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19869 (exit $ac_status); }; }; then
19870 ac_cv_broken_poll=yes
19871else
19872 echo "$as_me: program exited with status $ac_status" >&5
19873echo "$as_me: failed program was:" >&5
19874sed 's/^/| /' conftest.$ac_ext >&5
19875
19876( exit $ac_status )
19877ac_cv_broken_poll=no
19878fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019879rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019880fi
19881echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19882echo "${ECHO_T}$ac_cv_broken_poll" >&6
19883if test "$ac_cv_broken_poll" = yes
19884then
19885
19886cat >>confdefs.h <<\_ACEOF
19887#define HAVE_BROKEN_POLL 1
19888_ACEOF
19889
19890fi
19891
Brett Cannon43802422005-02-10 20:48:03 +000019892# 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 +000019893# (which is not required by ISO C or UNIX spec) and/or if we support
19894# tzname[]
Brett Cannon43802422005-02-10 20:48:03 +000019895echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19896echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19897if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19898 echo $ECHO_N "(cached) $ECHO_C" >&6
19899else
19900 cat >conftest.$ac_ext <<_ACEOF
19901/* confdefs.h. */
19902_ACEOF
19903cat confdefs.h >>conftest.$ac_ext
19904cat >>conftest.$ac_ext <<_ACEOF
19905/* end confdefs.h. */
19906#include <sys/types.h>
19907#include <$ac_cv_struct_tm>
19908
19909
19910int
19911main ()
19912{
19913static struct tm ac_aggr;
19914if (ac_aggr.tm_zone)
19915return 0;
19916 ;
19917 return 0;
19918}
19919_ACEOF
19920rm -f conftest.$ac_objext
19921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19922 (eval $ac_compile) 2>conftest.er1
19923 ac_status=$?
19924 grep -v '^ *+' conftest.er1 >conftest.err
19925 rm -f conftest.er1
19926 cat conftest.err >&5
19927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19928 (exit $ac_status); } &&
19929 { ac_try='test -z "$ac_c_werror_flag"
19930 || test ! -s conftest.err'
19931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19932 (eval $ac_try) 2>&5
19933 ac_status=$?
19934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19935 (exit $ac_status); }; } &&
19936 { ac_try='test -s conftest.$ac_objext'
19937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19938 (eval $ac_try) 2>&5
19939 ac_status=$?
19940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19941 (exit $ac_status); }; }; then
19942 ac_cv_member_struct_tm_tm_zone=yes
19943else
19944 echo "$as_me: failed program was:" >&5
19945sed 's/^/| /' conftest.$ac_ext >&5
19946
19947cat >conftest.$ac_ext <<_ACEOF
19948/* confdefs.h. */
19949_ACEOF
19950cat confdefs.h >>conftest.$ac_ext
19951cat >>conftest.$ac_ext <<_ACEOF
19952/* end confdefs.h. */
19953#include <sys/types.h>
19954#include <$ac_cv_struct_tm>
19955
19956
19957int
19958main ()
19959{
19960static struct tm ac_aggr;
19961if (sizeof ac_aggr.tm_zone)
19962return 0;
19963 ;
19964 return 0;
19965}
19966_ACEOF
19967rm -f conftest.$ac_objext
19968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19969 (eval $ac_compile) 2>conftest.er1
19970 ac_status=$?
19971 grep -v '^ *+' conftest.er1 >conftest.err
19972 rm -f conftest.er1
19973 cat conftest.err >&5
19974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19975 (exit $ac_status); } &&
19976 { ac_try='test -z "$ac_c_werror_flag"
19977 || test ! -s conftest.err'
19978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19979 (eval $ac_try) 2>&5
19980 ac_status=$?
19981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19982 (exit $ac_status); }; } &&
19983 { ac_try='test -s conftest.$ac_objext'
19984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19985 (eval $ac_try) 2>&5
19986 ac_status=$?
19987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19988 (exit $ac_status); }; }; then
19989 ac_cv_member_struct_tm_tm_zone=yes
19990else
19991 echo "$as_me: failed program was:" >&5
19992sed 's/^/| /' conftest.$ac_ext >&5
19993
19994ac_cv_member_struct_tm_tm_zone=no
19995fi
19996rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19997fi
19998rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19999fi
20000echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20001echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
20002if test $ac_cv_member_struct_tm_tm_zone = yes; then
20003
20004cat >>confdefs.h <<_ACEOF
20005#define HAVE_STRUCT_TM_TM_ZONE 1
20006_ACEOF
20007
20008
20009fi
20010
20011if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20012
20013cat >>confdefs.h <<\_ACEOF
20014#define HAVE_TM_ZONE 1
20015_ACEOF
20016
20017else
20018 echo "$as_me:$LINENO: checking for tzname" >&5
20019echo $ECHO_N "checking for tzname... $ECHO_C" >&6
20020if test "${ac_cv_var_tzname+set}" = set; then
20021 echo $ECHO_N "(cached) $ECHO_C" >&6
20022else
20023 cat >conftest.$ac_ext <<_ACEOF
20024/* confdefs.h. */
20025_ACEOF
20026cat confdefs.h >>conftest.$ac_ext
20027cat >>conftest.$ac_ext <<_ACEOF
20028/* end confdefs.h. */
20029#include <time.h>
20030#ifndef tzname /* For SGI. */
20031extern char *tzname[]; /* RS6000 and others reject char **tzname. */
20032#endif
20033
20034int
20035main ()
20036{
20037atoi(*tzname);
20038 ;
20039 return 0;
20040}
20041_ACEOF
20042rm -f conftest.$ac_objext conftest$ac_exeext
20043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20044 (eval $ac_link) 2>conftest.er1
20045 ac_status=$?
20046 grep -v '^ *+' conftest.er1 >conftest.err
20047 rm -f conftest.er1
20048 cat conftest.err >&5
20049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20050 (exit $ac_status); } &&
20051 { ac_try='test -z "$ac_c_werror_flag"
20052 || test ! -s conftest.err'
20053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20054 (eval $ac_try) 2>&5
20055 ac_status=$?
20056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057 (exit $ac_status); }; } &&
20058 { ac_try='test -s conftest$ac_exeext'
20059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20060 (eval $ac_try) 2>&5
20061 ac_status=$?
20062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20063 (exit $ac_status); }; }; then
20064 ac_cv_var_tzname=yes
20065else
20066 echo "$as_me: failed program was:" >&5
20067sed 's/^/| /' conftest.$ac_ext >&5
20068
20069ac_cv_var_tzname=no
20070fi
20071rm -f conftest.err conftest.$ac_objext \
20072 conftest$ac_exeext conftest.$ac_ext
20073fi
20074echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20075echo "${ECHO_T}$ac_cv_var_tzname" >&6
20076 if test $ac_cv_var_tzname = yes; then
20077
20078cat >>confdefs.h <<\_ACEOF
20079#define HAVE_TZNAME 1
20080_ACEOF
20081
20082 fi
20083fi
20084
Nicholas Bastine62c5c82004-03-21 23:45:42 +000020085
Martin v. Löwis1d459062005-03-14 21:23:33 +000020086# check tzset(3) exists and works like we expect it to
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020087echo "$as_me:$LINENO: checking for working tzset()" >&5
20088echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
20089if test "${ac_cv_working_tzset+set}" = set; then
20090 echo $ECHO_N "(cached) $ECHO_C" >&6
20091else
20092
20093if test "$cross_compiling" = yes; then
20094 ac_cv_working_tzset=no
20095else
20096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020097/* confdefs.h. */
20098_ACEOF
20099cat confdefs.h >>conftest.$ac_ext
20100cat >>conftest.$ac_ext <<_ACEOF
20101/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020102
20103#include <stdlib.h>
20104#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000020105#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000020106
20107#if HAVE_TZNAME
20108extern char *tzname[];
20109#endif
20110
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020111int main()
20112{
Brett Cannon18367812003-09-19 00:59:16 +000020113 /* Note that we need to ensure that not only does tzset(3)
20114 do 'something' with localtime, but it works as documented
20115 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000020116 This includes making sure that tzname is set properly if
20117 tm->tm_zone does not exist since it is the alternative way
20118 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000020119
20120 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000020121 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000020122 */
20123
Martin v. Löwis1d459062005-03-14 21:23:33 +000020124 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000020125 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
20126
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020127 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020128 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020129 if (localtime(&groundhogday)->tm_hour != 0)
20130 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020131#if HAVE_TZNAME
20132 /* For UTC, tzname[1] is sometimes "", sometimes " " */
20133 if (strcmp(tzname[0], "UTC") ||
20134 (tzname[1][0] != 0 && tzname[1][0] != ' '))
20135 exit(1);
20136#endif
Brett Cannon18367812003-09-19 00:59:16 +000020137
Neal Norwitz7f2588c2003-04-11 15:35:53 +000020138 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020139 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000020140 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020141 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020142#if HAVE_TZNAME
20143 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20144 exit(1);
20145#endif
Brett Cannon18367812003-09-19 00:59:16 +000020146
20147 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20148 tzset();
20149 if (localtime(&groundhogday)->tm_hour != 11)
20150 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020151#if HAVE_TZNAME
20152 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20153 exit(1);
20154#endif
20155
20156#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020157 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20158 exit(1);
20159 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20160 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020161#endif
Brett Cannon18367812003-09-19 00:59:16 +000020162
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020163 exit(0);
20164}
20165
20166_ACEOF
20167rm -f conftest$ac_exeext
20168if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20169 (eval $ac_link) 2>&5
20170 ac_status=$?
20171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20173 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20174 (eval $ac_try) 2>&5
20175 ac_status=$?
20176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20177 (exit $ac_status); }; }; then
20178 ac_cv_working_tzset=yes
20179else
20180 echo "$as_me: program exited with status $ac_status" >&5
20181echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020182sed 's/^/| /' conftest.$ac_ext >&5
20183
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020184( exit $ac_status )
20185ac_cv_working_tzset=no
20186fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020187rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020188fi
20189fi
20190
20191echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20192echo "${ECHO_T}$ac_cv_working_tzset" >&6
20193if test "$ac_cv_working_tzset" = yes
20194then
20195
20196cat >>confdefs.h <<\_ACEOF
20197#define HAVE_WORKING_TZSET 1
20198_ACEOF
20199
20200fi
20201
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020202# Look for subsecond timestamps in struct stat
20203echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20204echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20205if test "${ac_cv_stat_tv_nsec+set}" = set; then
20206 echo $ECHO_N "(cached) $ECHO_C" >&6
20207else
20208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020209/* confdefs.h. */
20210_ACEOF
20211cat confdefs.h >>conftest.$ac_ext
20212cat >>conftest.$ac_ext <<_ACEOF
20213/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020214#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020215int
20216main ()
20217{
20218
20219struct stat st;
20220st.st_mtim.tv_nsec = 1;
20221
20222 ;
20223 return 0;
20224}
20225_ACEOF
20226rm -f conftest.$ac_objext
20227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020228 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020230 grep -v '^ *+' conftest.er1 >conftest.err
20231 rm -f conftest.er1
20232 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20234 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020235 { ac_try='test -z "$ac_c_werror_flag"
20236 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20238 (eval $ac_try) 2>&5
20239 ac_status=$?
20240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20241 (exit $ac_status); }; } &&
20242 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20244 (eval $ac_try) 2>&5
20245 ac_status=$?
20246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20247 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020248 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020249else
20250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020251sed 's/^/| /' conftest.$ac_ext >&5
20252
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020253ac_cv_stat_tv_nsec=no
20254fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020255rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020256fi
20257
20258echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20259echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20260if test "$ac_cv_stat_tv_nsec" = yes
20261then
20262
20263cat >>confdefs.h <<\_ACEOF
20264#define HAVE_STAT_TV_NSEC 1
20265_ACEOF
20266
20267fi
20268
Jack Jansen666b1e72001-10-31 12:11:48 +000020269# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020270echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20271echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20272if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20273 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020274else
Martin v. Löwis11437992002-04-12 09:54:03 +000020275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020276/* confdefs.h. */
20277_ACEOF
20278cat confdefs.h >>conftest.$ac_ext
20279cat >>conftest.$ac_ext <<_ACEOF
20280/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020281#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020282int
20283main ()
20284{
Jack Jansen666b1e72001-10-31 12:11:48 +000020285
20286 int rtn;
20287 rtn = mvwdelch(0,0,0);
20288
Martin v. Löwis11437992002-04-12 09:54:03 +000020289 ;
20290 return 0;
20291}
20292_ACEOF
20293rm -f conftest.$ac_objext
20294if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020295 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020297 grep -v '^ *+' conftest.er1 >conftest.err
20298 rm -f conftest.er1
20299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020302 { ac_try='test -z "$ac_c_werror_flag"
20303 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20305 (eval $ac_try) 2>&5
20306 ac_status=$?
20307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20308 (exit $ac_status); }; } &&
20309 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20311 (eval $ac_try) 2>&5
20312 ac_status=$?
20313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20314 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020315 ac_cv_mvwdelch_is_expression=yes
20316else
Martin v. Löwis11437992002-04-12 09:54:03 +000020317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020318sed 's/^/| /' conftest.$ac_ext >&5
20319
Martin v. Löwis11437992002-04-12 09:54:03 +000020320ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020321fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020322rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020323fi
20324
Martin v. Löwis11437992002-04-12 09:54:03 +000020325echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20326echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020327
20328if test "$ac_cv_mvwdelch_is_expression" = yes
20329then
Martin v. Löwis11437992002-04-12 09:54:03 +000020330
20331cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020332#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020333_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020334
20335fi
20336
Martin v. Löwis11437992002-04-12 09:54:03 +000020337echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20338echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20339if test "${ac_cv_window_has_flags+set}" = set; then
20340 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020341else
Martin v. Löwis11437992002-04-12 09:54:03 +000020342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020343/* confdefs.h. */
20344_ACEOF
20345cat confdefs.h >>conftest.$ac_ext
20346cat >>conftest.$ac_ext <<_ACEOF
20347/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020348#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020349int
20350main ()
20351{
Jack Jansen666b1e72001-10-31 12:11:48 +000020352
20353 WINDOW *w;
20354 w->_flags = 0;
20355
Martin v. Löwis11437992002-04-12 09:54:03 +000020356 ;
20357 return 0;
20358}
20359_ACEOF
20360rm -f conftest.$ac_objext
20361if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020362 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020364 grep -v '^ *+' conftest.er1 >conftest.err
20365 rm -f conftest.er1
20366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20368 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020369 { ac_try='test -z "$ac_c_werror_flag"
20370 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20372 (eval $ac_try) 2>&5
20373 ac_status=$?
20374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20375 (exit $ac_status); }; } &&
20376 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020377 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20378 (eval $ac_try) 2>&5
20379 ac_status=$?
20380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20381 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020382 ac_cv_window_has_flags=yes
20383else
Martin v. Löwis11437992002-04-12 09:54:03 +000020384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020385sed 's/^/| /' conftest.$ac_ext >&5
20386
Martin v. Löwis11437992002-04-12 09:54:03 +000020387ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020388fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020389rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020390fi
20391
Martin v. Löwis11437992002-04-12 09:54:03 +000020392echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20393echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020394
Jack Jansen666b1e72001-10-31 12:11:48 +000020395
20396if test "$ac_cv_window_has_flags" = yes
20397then
Martin v. Löwis11437992002-04-12 09:54:03 +000020398
20399cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020400#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020401_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020402
20403fi
20404
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020405echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20406echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20407
20408if test -e /dev/ptmx
20409then
20410 echo "$as_me:$LINENO: result: yes" >&5
20411echo "${ECHO_T}yes" >&6
20412
20413cat >>confdefs.h <<\_ACEOF
20414#define HAVE_DEV_PTMX 1
20415_ACEOF
20416
20417else
20418 echo "$as_me:$LINENO: result: no" >&5
20419echo "${ECHO_T}no" >&6
20420fi
20421
Neal Norwitz865400f2003-03-21 01:42:58 +000020422echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20423echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20424
20425if test -e /dev/ptc
20426then
20427 echo "$as_me:$LINENO: result: yes" >&5
20428echo "${ECHO_T}yes" >&6
20429
20430cat >>confdefs.h <<\_ACEOF
20431#define HAVE_DEV_PTC 1
20432_ACEOF
20433
20434else
20435 echo "$as_me:$LINENO: result: no" >&5
20436echo "${ECHO_T}no" >&6
20437fi
20438
Martin v. Löwis11437992002-04-12 09:54:03 +000020439echo "$as_me:$LINENO: checking for socklen_t" >&5
20440echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20441if test "${ac_cv_type_socklen_t+set}" = set; then
20442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020443else
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020445/* confdefs.h. */
20446_ACEOF
20447cat confdefs.h >>conftest.$ac_ext
20448cat >>conftest.$ac_ext <<_ACEOF
20449/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020450
20451#ifdef HAVE_SYS_TYPES_H
20452#include <sys/types.h>
20453#endif
20454#ifdef HAVE_SYS_SOCKET_H
20455#include <sys/socket.h>
20456#endif
20457
20458
Martin v. Löwis11437992002-04-12 09:54:03 +000020459int
20460main ()
20461{
20462if ((socklen_t *) 0)
20463 return 0;
20464if (sizeof (socklen_t))
20465 return 0;
20466 ;
20467 return 0;
20468}
20469_ACEOF
20470rm -f conftest.$ac_objext
20471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020472 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020474 grep -v '^ *+' conftest.er1 >conftest.err
20475 rm -f conftest.er1
20476 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20478 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020479 { ac_try='test -z "$ac_c_werror_flag"
20480 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20482 (eval $ac_try) 2>&5
20483 ac_status=$?
20484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20485 (exit $ac_status); }; } &&
20486 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20488 (eval $ac_try) 2>&5
20489 ac_status=$?
20490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20491 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020492 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020493else
Martin v. Löwis11437992002-04-12 09:54:03 +000020494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020495sed 's/^/| /' conftest.$ac_ext >&5
20496
Martin v. Löwis11437992002-04-12 09:54:03 +000020497ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020498fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020500fi
20501echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20502echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20503if test $ac_cv_type_socklen_t = yes; then
20504 :
20505else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020506
Martin v. Löwis01c04012002-11-11 14:58:44 +000020507cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020508#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020509_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020510
20511fi
20512
Michael W. Hudson54241132001-12-07 15:38:26 +000020513
Michael W. Hudson54241132001-12-07 15:38:26 +000020514
20515
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020516for h in `(cd $srcdir;echo Python/thread_*.h)`
20517do
20518 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20519done
20520
Michael W. Hudson54241132001-12-07 15:38:26 +000020521
Jack Jansen0b06be72002-06-21 14:48:38 +000020522SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020523echo "$as_me:$LINENO: checking for build directories" >&5
20524echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020525for dir in $SRCDIRS; do
20526 if test ! -d $dir; then
20527 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020528 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020529done
Martin v. Löwis11437992002-04-12 09:54:03 +000020530echo "$as_me:$LINENO: result: done" >&5
20531echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020532
Guido van Rossum627b2d71993-12-24 10:39:16 +000020533# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020534 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020535
Martin v. Löwis11437992002-04-12 09:54:03 +000020536cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020537# This file is a shell script that caches the results of configure
20538# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020539# scripts and configure runs, see configure's option --config-cache.
20540# It is not useful on other systems. If it contains results you don't
20541# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020542#
Martin v. Löwis11437992002-04-12 09:54:03 +000020543# config.status only pays attention to the cache file if you give it
20544# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020545#
Skip Montanaro6dead952003-09-25 14:50:04 +000020546# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020547# loading this file, other *unset* `ac_cv_foo' will be assigned the
20548# following values.
20549
20550_ACEOF
20551
Guido van Rossumf78abae1997-01-21 22:02:36 +000020552# The following way of writing the cache mishandles newlines in values,
20553# but we know of no workaround that is simple, portable, and efficient.
20554# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020555# Ultrix sh set writes to stderr and can't be redirected directly,
20556# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020557{
20558 (set) 2>&1 |
20559 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20560 *ac_space=\ *)
20561 # `set' does not quote correctly, so add quotes (double-quote
20562 # substitution turns \\\\ into \\, and sed turns \\ into \).
20563 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020564 "s/'/'\\\\''/g;
20565 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 ;;
20567 *)
20568 # `set' quotes correctly as required by POSIX, so do not add quotes.
20569 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020570 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020571 ;;
20572 esac;
20573} |
20574 sed '
20575 t clear
20576 : clear
20577 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20578 t end
20579 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20580 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020581if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020582 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020583 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20584 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020585 else
20586 echo "not updating unwritable cache $cache_file"
20587 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020588fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020589rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020590
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020591test "x$prefix" = xNONE && prefix=$ac_default_prefix
20592# Let make expand exec_prefix.
20593test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020594
Martin v. Löwis11437992002-04-12 09:54:03 +000020595# VPATH may cause trouble with some makes, so we remove $(srcdir),
20596# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20597# trailing colons and then remove the whole line if VPATH becomes empty
20598# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020599if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020600 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020601s/:*\$(srcdir):*/:/;
20602s/:*\${srcdir}:*/:/;
20603s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020604s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020605s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020606s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020607}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020608fi
20609
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020610DEFS=-DHAVE_CONFIG_H
20611
Skip Montanaro6dead952003-09-25 14:50:04 +000020612ac_libobjs=
20613ac_ltlibobjs=
20614for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20615 # 1. Remove the extension, and $U if already installed.
20616 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020617 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020618 # 2. Add them.
20619 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20620 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20621done
20622LIBOBJS=$ac_libobjs
20623
20624LTLIBOBJS=$ac_ltlibobjs
20625
20626
Martin v. Löwis11437992002-04-12 09:54:03 +000020627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020628: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020629ac_clean_files_save=$ac_clean_files
20630ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20631{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20632echo "$as_me: creating $CONFIG_STATUS" >&6;}
20633cat >$CONFIG_STATUS <<_ACEOF
20634#! $SHELL
20635# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020636# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020637# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020638# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020639
Martin v. Löwis11437992002-04-12 09:54:03 +000020640debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020641ac_cs_recheck=false
20642ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020643SHELL=\${CONFIG_SHELL-$SHELL}
20644_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020645
Martin v. Löwis11437992002-04-12 09:54:03 +000020646cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020647## --------------------- ##
20648## M4sh Initialization. ##
20649## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020650
Martin v. Löwis11437992002-04-12 09:54:03 +000020651# Be Bourne compatible
20652if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20653 emulate sh
20654 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020655 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20656 # is contrary to our usage. Disable this feature.
20657 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020658elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20659 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020660fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020661DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020662
Martin v. Löwis11437992002-04-12 09:54:03 +000020663# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020664if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 as_unset=unset
20666else
20667 as_unset=false
20668fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020669
Skip Montanaro6dead952003-09-25 14:50:04 +000020670
20671# Work around bugs in pre-3.0 UWIN ksh.
20672$as_unset ENV MAIL MAILPATH
20673PS1='$ '
20674PS2='> '
20675PS4='+ '
20676
20677# NLS nuisances.
20678for as_var in \
20679 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20680 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20681 LC_TELEPHONE LC_TIME
20682do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020684 eval $as_var=C; export $as_var
20685 else
20686 $as_unset $as_var
20687 fi
20688done
20689
20690# Required to use basename.
20691if expr a : '\(a\)' >/dev/null 2>&1; then
20692 as_expr=expr
20693else
20694 as_expr=false
20695fi
20696
20697if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20698 as_basename=basename
20699else
20700 as_basename=false
20701fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020702
20703
20704# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020705as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020706$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20707 X"$0" : 'X\(//\)$' \| \
20708 X"$0" : 'X\(/\)$' \| \
20709 . : '\(.\)' 2>/dev/null ||
20710echo X/"$0" |
20711 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20712 /^X\/\(\/\/\)$/{ s//\1/; q; }
20713 /^X\/\(\/\).*/{ s//\1/; q; }
20714 s/.*/./; q'`
20715
Skip Montanaro6dead952003-09-25 14:50:04 +000020716
Martin v. Löwis11437992002-04-12 09:54:03 +000020717# PATH needs CR, and LINENO needs CR and PATH.
20718# Avoid depending upon Character Ranges.
20719as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20720as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20721as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20722as_cr_digits='0123456789'
20723as_cr_alnum=$as_cr_Letters$as_cr_digits
20724
20725# The user is always right.
20726if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020727 echo "#! /bin/sh" >conf$$.sh
20728 echo "exit 0" >>conf$$.sh
20729 chmod +x conf$$.sh
20730 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 PATH_SEPARATOR=';'
20732 else
20733 PATH_SEPARATOR=:
20734 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020735 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020736fi
20737
20738
20739 as_lineno_1=$LINENO
20740 as_lineno_2=$LINENO
20741 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20742 test "x$as_lineno_1" != "x$as_lineno_2" &&
20743 test "x$as_lineno_3" = "x$as_lineno_2" || {
20744 # Find who we are. Look in the path if we contain no path at all
20745 # relative or not.
20746 case $0 in
20747 *[\\/]* ) as_myself=$0 ;;
20748 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20749for as_dir in $PATH
20750do
20751 IFS=$as_save_IFS
20752 test -z "$as_dir" && as_dir=.
20753 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20754done
20755
20756 ;;
20757 esac
20758 # We did not find ourselves, most probably we were run as `sh COMMAND'
20759 # in which case we are not to be found in the path.
20760 if test "x$as_myself" = x; then
20761 as_myself=$0
20762 fi
20763 if test ! -f "$as_myself"; then
20764 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20765echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20766 { (exit 1); exit 1; }; }
20767 fi
20768 case $CONFIG_SHELL in
20769 '')
20770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20771for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20772do
20773 IFS=$as_save_IFS
20774 test -z "$as_dir" && as_dir=.
20775 for as_base in sh bash ksh sh5; do
20776 case $as_dir in
20777 /*)
20778 if ("$as_dir/$as_base" -c '
20779 as_lineno_1=$LINENO
20780 as_lineno_2=$LINENO
20781 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20782 test "x$as_lineno_1" != "x$as_lineno_2" &&
20783 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020784 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20785 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 CONFIG_SHELL=$as_dir/$as_base
20787 export CONFIG_SHELL
20788 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20789 fi;;
20790 esac
20791 done
20792done
20793;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020794 esac
20795
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20797 # uniformly replaced by the line number. The first 'sed' inserts a
20798 # line-number line before each line; the second 'sed' does the real
20799 # work. The second script uses 'N' to pair each line-number line
20800 # with the numbered line, and appends trailing '-' during
20801 # substitution so that $LINENO is not a special case at line end.
20802 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20803 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20804 sed '=' <$as_myself |
20805 sed '
20806 N
20807 s,$,-,
20808 : loop
20809 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20810 t loop
20811 s,-$,,
20812 s,^['$as_cr_digits']*\n,,
20813 ' >$as_me.lineno &&
20814 chmod +x $as_me.lineno ||
20815 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20816echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20817 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020818
Martin v. Löwis11437992002-04-12 09:54:03 +000020819 # Don't try to exec as it changes $[0], causing all sort of problems
20820 # (the dirname of $[0] is not the place where we might find the
20821 # original and so on. Autoconf is especially sensible to this).
20822 . ./$as_me.lineno
20823 # Exit status is that of the last command.
20824 exit
20825}
20826
20827
20828case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20829 *c*,-n*) ECHO_N= ECHO_C='
20830' ECHO_T=' ' ;;
20831 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20832 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20833esac
20834
20835if expr a : '\(a\)' >/dev/null 2>&1; then
20836 as_expr=expr
20837else
20838 as_expr=false
20839fi
20840
20841rm -f conf$$ conf$$.exe conf$$.file
20842echo >conf$$.file
20843if ln -s conf$$.file conf$$ 2>/dev/null; then
20844 # We could just check for DJGPP; but this test a) works b) is more generic
20845 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20846 if test -f conf$$.exe; then
20847 # Don't use ln at all; we don't have any links
20848 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 as_ln_s='ln -s'
20851 fi
20852elif ln conf$$.file conf$$ 2>/dev/null; then
20853 as_ln_s=ln
20854else
20855 as_ln_s='cp -p'
20856fi
20857rm -f conf$$ conf$$.exe conf$$.file
20858
Skip Montanaro6dead952003-09-25 14:50:04 +000020859if mkdir -p . 2>/dev/null; then
20860 as_mkdir_p=:
20861else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020862 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020863 as_mkdir_p=false
20864fi
20865
Martin v. Löwis11437992002-04-12 09:54:03 +000020866as_executable_p="test -f"
20867
20868# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020869as_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 +000020870
20871# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020872as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020873
20874
20875# IFS
20876# We need space, tab and new line, in precisely that order.
20877as_nl='
20878'
20879IFS=" $as_nl"
20880
20881# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020882$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020883
20884exec 6>&1
20885
20886# Open the log real soon, to keep \$[0] and so on meaningful, and to
20887# report actual input values of CONFIG_FILES etc. instead of their
20888# values after options handling. Logging --version etc. is OK.
20889exec 5>>config.log
20890{
20891 echo
20892 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20893## Running $as_me. ##
20894_ASBOX
20895} >&5
20896cat >&5 <<_CSEOF
20897
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020898This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020899generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020900
20901 CONFIG_FILES = $CONFIG_FILES
20902 CONFIG_HEADERS = $CONFIG_HEADERS
20903 CONFIG_LINKS = $CONFIG_LINKS
20904 CONFIG_COMMANDS = $CONFIG_COMMANDS
20905 $ $0 $@
20906
20907_CSEOF
20908echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20909echo >&5
20910_ACEOF
20911
20912# Files that config.status was made for.
20913if test -n "$ac_config_files"; then
20914 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20915fi
20916
20917if test -n "$ac_config_headers"; then
20918 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20919fi
20920
20921if test -n "$ac_config_links"; then
20922 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20923fi
20924
20925if test -n "$ac_config_commands"; then
20926 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20927fi
20928
20929cat >>$CONFIG_STATUS <<\_ACEOF
20930
20931ac_cs_usage="\
20932\`$as_me' instantiates files from templates according to the
20933current configuration.
20934
20935Usage: $0 [OPTIONS] [FILE]...
20936
20937 -h, --help print this help, then exit
20938 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020939 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 -d, --debug don't remove temporary files
20941 --recheck update $as_me by reconfiguring in the same conditions
20942 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020943 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020944 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020945 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020946
20947Configuration files:
20948$config_files
20949
20950Configuration headers:
20951$config_headers
20952
20953Report bugs to <bug-autoconf@gnu.org>."
20954_ACEOF
20955
20956cat >>$CONFIG_STATUS <<_ACEOF
20957ac_cs_version="\\
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +000020958python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020959configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020960 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20961
Skip Montanarof0d5f792004-08-15 14:08:23 +000020962Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020963This config.status script is free software; the Free Software Foundation
20964gives unlimited permission to copy, distribute and modify it."
20965srcdir=$srcdir
20966INSTALL="$INSTALL"
20967_ACEOF
20968
20969cat >>$CONFIG_STATUS <<\_ACEOF
20970# If no file are specified by the user, then we need to provide default
20971# value. By we need to know if files were specified by the user.
20972ac_need_defaults=:
20973while test $# != 0
20974do
20975 case $1 in
20976 --*=*)
20977 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20978 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020979 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020981 -*)
20982 ac_option=$1
20983 ac_optarg=$2
20984 ac_shift=shift
20985 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020986 *) # This is not an option, so the user has probably given explicit
20987 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020988 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 ac_need_defaults=false;;
20990 esac
20991
Skip Montanaro6dead952003-09-25 14:50:04 +000020992 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020993 # Handling of the options.
20994_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020995cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020996 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20997 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020998 --version | --vers* | -V )
20999 echo "$ac_cs_version"; exit 0 ;;
21000 --he | --h)
21001 # Conflict between --help and --header
21002 { { echo "$as_me:$LINENO: error: ambiguous option: $1
21003Try \`$0 --help' for more information." >&5
21004echo "$as_me: error: ambiguous option: $1
21005Try \`$0 --help' for more information." >&2;}
21006 { (exit 1); exit 1; }; };;
21007 --help | --hel | -h )
21008 echo "$ac_cs_usage"; exit 0 ;;
21009 --debug | --d* | -d )
21010 debug=: ;;
21011 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000021012 $ac_shift
21013 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021014 ac_need_defaults=false;;
21015 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000021016 $ac_shift
21017 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000021018 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000021019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21020 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21021 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021022
21023 # This is an error.
21024 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
21025Try \`$0 --help' for more information." >&5
21026echo "$as_me: error: unrecognized option: $1
21027Try \`$0 --help' for more information." >&2;}
21028 { (exit 1); exit 1; }; } ;;
21029
21030 *) ac_config_targets="$ac_config_targets $1" ;;
21031
21032 esac
21033 shift
21034done
21035
Skip Montanaro6dead952003-09-25 14:50:04 +000021036ac_configure_extra_args=
21037
21038if $ac_cs_silent; then
21039 exec 6>/dev/null
21040 ac_configure_extra_args="$ac_configure_extra_args --silent"
21041fi
21042
21043_ACEOF
21044cat >>$CONFIG_STATUS <<_ACEOF
21045if \$ac_cs_recheck; then
21046 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21047 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21048fi
21049
Martin v. Löwis11437992002-04-12 09:54:03 +000021050_ACEOF
21051
21052
21053
21054
21055
21056cat >>$CONFIG_STATUS <<\_ACEOF
21057for ac_config_target in $ac_config_targets
21058do
21059 case "$ac_config_target" in
21060 # Handling of arguments.
21061 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
21062 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
21063 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
21064 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21065echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21066 { (exit 1); exit 1; }; };;
21067 esac
21068done
21069
21070# If the user did not use the arguments to specify the items to instantiate,
21071# then the envvar interface is used. Set only those that are not.
21072# We use the long form for the default assignment because of an extremely
21073# bizarre bug on SunOS 4.1.3.
21074if $ac_need_defaults; then
21075 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21076 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21077fi
21078
Skip Montanaro6dead952003-09-25 14:50:04 +000021079# Have a temporary directory for convenience. Make it in the build tree
21080# simply because there is no reason to put it here, and in addition,
21081# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000021082# Create a temporary directory, and hook for its removal unless debugging.
21083$debug ||
21084{
21085 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21086 trap '{ (exit 1); exit 1; }' 1 2 13 15
21087}
21088
21089# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000021090
Martin v. Löwis11437992002-04-12 09:54:03 +000021091{
Skip Montanaro6dead952003-09-25 14:50:04 +000021092 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000021093 test -n "$tmp" && test -d "$tmp"
21094} ||
21095{
Skip Montanaro6dead952003-09-25 14:50:04 +000021096 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000021097 (umask 077 && mkdir $tmp)
21098} ||
21099{
Skip Montanaro6dead952003-09-25 14:50:04 +000021100 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000021101 { (exit 1); exit 1; }
21102}
21103
21104_ACEOF
21105
21106cat >>$CONFIG_STATUS <<_ACEOF
21107
21108#
21109# CONFIG_FILES section.
21110#
21111
21112# No need to generate the scripts if there are no CONFIG_FILES.
21113# This happens for instance when ./config.status config.h
21114if test -n "\$CONFIG_FILES"; then
21115 # Protect against being on the right side of a sed subst in config.status.
21116 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21117 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21118s,@SHELL@,$SHELL,;t t
21119s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21120s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21121s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21122s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21123s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21124s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21125s,@exec_prefix@,$exec_prefix,;t t
21126s,@prefix@,$prefix,;t t
21127s,@program_transform_name@,$program_transform_name,;t t
21128s,@bindir@,$bindir,;t t
21129s,@sbindir@,$sbindir,;t t
21130s,@libexecdir@,$libexecdir,;t t
21131s,@datadir@,$datadir,;t t
21132s,@sysconfdir@,$sysconfdir,;t t
21133s,@sharedstatedir@,$sharedstatedir,;t t
21134s,@localstatedir@,$localstatedir,;t t
21135s,@libdir@,$libdir,;t t
21136s,@includedir@,$includedir,;t t
21137s,@oldincludedir@,$oldincludedir,;t t
21138s,@infodir@,$infodir,;t t
21139s,@mandir@,$mandir,;t t
21140s,@build_alias@,$build_alias,;t t
21141s,@host_alias@,$host_alias,;t t
21142s,@target_alias@,$target_alias,;t t
21143s,@DEFS@,$DEFS,;t t
21144s,@ECHO_C@,$ECHO_C,;t t
21145s,@ECHO_N@,$ECHO_N,;t t
21146s,@ECHO_T@,$ECHO_T,;t t
21147s,@LIBS@,$LIBS,;t t
21148s,@VERSION@,$VERSION,;t t
21149s,@SOVERSION@,$SOVERSION,;t t
21150s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21151s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21152s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21153s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21154s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21155s,@MACHDEP@,$MACHDEP,;t t
21156s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021157s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021158s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021159s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021160s,@CXX@,$CXX,;t t
21161s,@MAINOBJ@,$MAINOBJ,;t t
21162s,@EXEEXT@,$EXEEXT,;t t
21163s,@CC@,$CC,;t t
21164s,@CFLAGS@,$CFLAGS,;t t
21165s,@LDFLAGS@,$LDFLAGS,;t t
21166s,@CPPFLAGS@,$CPPFLAGS,;t t
21167s,@ac_ct_CC@,$ac_ct_CC,;t t
21168s,@OBJEXT@,$OBJEXT,;t t
21169s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021170s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021171s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21172s,@LIBRARY@,$LIBRARY,;t t
21173s,@LDLIBRARY@,$LDLIBRARY,;t t
21174s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21175s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21176s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21177s,@INSTSONAME@,$INSTSONAME,;t t
21178s,@RUNSHARED@,$RUNSHARED,;t t
21179s,@LINKCC@,$LINKCC,;t t
21180s,@RANLIB@,$RANLIB,;t t
21181s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21182s,@AR@,$AR,;t t
21183s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21184s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21185s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21186s,@LN@,$LN,;t t
21187s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021188s,@BASECFLAGS@,$BASECFLAGS,;t t
Bob Ippolito7026a0a2005-03-28 23:23:47 +000021189s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021190s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21191s,@SO@,$SO,;t t
21192s,@LDSHARED@,$LDSHARED,;t t
21193s,@BLDSHARED@,$BLDSHARED,;t t
21194s,@CCSHARED@,$CCSHARED,;t t
21195s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21196s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021197s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021198s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21199s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21200s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21201s,@LDLAST@,$LDLAST,;t t
21202s,@THREADOBJ@,$THREADOBJ,;t t
21203s,@DLINCLDIR@,$DLINCLDIR,;t t
21204s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21205s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021206s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021207s,@LIBOBJS@,$LIBOBJS,;t t
21208s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21209s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21210s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21211s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21212s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21213s,@LIBM@,$LIBM,;t t
21214s,@LIBC@,$LIBC,;t t
21215s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21216s,@THREADHEADERS@,$THREADHEADERS,;t t
21217s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021218s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021219CEOF
21220
21221_ACEOF
21222
21223 cat >>$CONFIG_STATUS <<\_ACEOF
21224 # Split the substitutions into bite-sized pieces for seds with
21225 # small command number limits, like on Digital OSF/1 and HP-UX.
21226 ac_max_sed_lines=48
21227 ac_sed_frag=1 # Number of current file.
21228 ac_beg=1 # First line for current file.
21229 ac_end=$ac_max_sed_lines # Line after last line for current file.
21230 ac_more_lines=:
21231 ac_sed_cmds=
21232 while $ac_more_lines; do
21233 if test $ac_beg -gt 1; then
21234 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21235 else
21236 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21237 fi
21238 if test ! -s $tmp/subs.frag; then
21239 ac_more_lines=false
21240 else
21241 # The purpose of the label and of the branching condition is to
21242 # speed up the sed processing (if there are no `@' at all, there
21243 # is no need to browse any of the substitutions).
21244 # These are the two extra sed commands mentioned above.
21245 (echo ':t
21246 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21247 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021248 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021249 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021250 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021251 fi
21252 ac_sed_frag=`expr $ac_sed_frag + 1`
21253 ac_beg=$ac_end
21254 ac_end=`expr $ac_end + $ac_max_sed_lines`
21255 fi
21256 done
21257 if test -z "$ac_sed_cmds"; then
21258 ac_sed_cmds=cat
21259 fi
21260fi # test -n "$CONFIG_FILES"
21261
21262_ACEOF
21263cat >>$CONFIG_STATUS <<\_ACEOF
21264for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21265 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21266 case $ac_file in
21267 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021268 cat >$tmp/stdin
21269 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21270 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021271 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021272 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 * ) ac_file_in=$ac_file.in ;;
21274 esac
21275
21276 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21277 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21278$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021279 X"$ac_file" : 'X\(//\)[^/]' \| \
21280 X"$ac_file" : 'X\(//\)$' \| \
21281 X"$ac_file" : 'X\(/\)' \| \
21282 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021283echo X"$ac_file" |
21284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21285 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21286 /^X\(\/\/\)$/{ s//\1/; q; }
21287 /^X\(\/\).*/{ s//\1/; q; }
21288 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021289 { if $as_mkdir_p; then
21290 mkdir -p "$ac_dir"
21291 else
21292 as_dir="$ac_dir"
21293 as_dirs=
21294 while test ! -d "$as_dir"; do
21295 as_dirs="$as_dir $as_dirs"
21296 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021298 X"$as_dir" : 'X\(//\)[^/]' \| \
21299 X"$as_dir" : 'X\(//\)$' \| \
21300 X"$as_dir" : 'X\(/\)' \| \
21301 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021302echo X"$as_dir" |
21303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21304 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21305 /^X\(\/\/\)$/{ s//\1/; q; }
21306 /^X\(\/\).*/{ s//\1/; q; }
21307 s/.*/./; q'`
21308 done
21309 test ! -n "$as_dirs" || mkdir $as_dirs
21310 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21311echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21312 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021313
21314 ac_builddir=.
21315
21316if test "$ac_dir" != .; then
21317 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21318 # A "../" for each directory in $ac_dir_suffix.
21319 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21320else
21321 ac_dir_suffix= ac_top_builddir=
21322fi
21323
21324case $srcdir in
21325 .) # No --srcdir option. We are building in place.
21326 ac_srcdir=.
21327 if test -z "$ac_top_builddir"; then
21328 ac_top_srcdir=.
21329 else
21330 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21331 fi ;;
21332 [\\/]* | ?:[\\/]* ) # Absolute path.
21333 ac_srcdir=$srcdir$ac_dir_suffix;
21334 ac_top_srcdir=$srcdir ;;
21335 *) # Relative path.
21336 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21337 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21338esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021339
21340# Do not use `cd foo && pwd` to compute absolute paths, because
21341# the directories may not exist.
21342case `pwd` in
21343.) ac_abs_builddir="$ac_dir";;
21344*)
21345 case "$ac_dir" in
21346 .) ac_abs_builddir=`pwd`;;
21347 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21348 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21349 esac;;
21350esac
21351case $ac_abs_builddir in
21352.) ac_abs_top_builddir=${ac_top_builddir}.;;
21353*)
21354 case ${ac_top_builddir}. in
21355 .) ac_abs_top_builddir=$ac_abs_builddir;;
21356 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21357 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21358 esac;;
21359esac
21360case $ac_abs_builddir in
21361.) ac_abs_srcdir=$ac_srcdir;;
21362*)
21363 case $ac_srcdir in
21364 .) ac_abs_srcdir=$ac_abs_builddir;;
21365 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21366 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21367 esac;;
21368esac
21369case $ac_abs_builddir in
21370.) ac_abs_top_srcdir=$ac_top_srcdir;;
21371*)
21372 case $ac_top_srcdir in
21373 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21374 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21375 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21376 esac;;
21377esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021378
21379
21380 case $INSTALL in
21381 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21382 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21383 esac
21384
Brett Cannon43802422005-02-10 20:48:03 +000021385 if test x"$ac_file" != x-; then
21386 { echo "$as_me:$LINENO: creating $ac_file" >&5
21387echo "$as_me: creating $ac_file" >&6;}
21388 rm -f "$ac_file"
21389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 # Let's still pretend it is `configure' which instantiates (i.e., don't
21391 # use $as_me), people would be surprised to read:
21392 # /* config.h. Generated by config.status. */
21393 if test x"$ac_file" = x-; then
21394 configure_input=
21395 else
21396 configure_input="$ac_file. "
21397 fi
21398 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021399 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021400
21401 # First look for the input files in the build tree, otherwise in the
21402 # src tree.
21403 ac_file_inputs=`IFS=:
21404 for f in $ac_file_in; do
21405 case $f in
21406 -) echo $tmp/stdin ;;
21407 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021408 # Absolute (can't be DOS-style, as IFS=:)
21409 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021410echo "$as_me: error: cannot find input file: $f" >&2;}
21411 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021412 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021413 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021414 if test -f "$f"; then
21415 # Build tree
21416 echo "$f"
21417 elif test -f "$srcdir/$f"; then
21418 # Source tree
21419 echo "$srcdir/$f"
21420 else
21421 # /dev/null tree
21422 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021423echo "$as_me: error: cannot find input file: $f" >&2;}
21424 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021425 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021426 esac
21427 done` || { (exit 1); exit 1; }
21428_ACEOF
21429cat >>$CONFIG_STATUS <<_ACEOF
21430 sed "$ac_vpsub
21431$extrasub
21432_ACEOF
21433cat >>$CONFIG_STATUS <<\_ACEOF
21434:t
21435/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21436s,@configure_input@,$configure_input,;t t
21437s,@srcdir@,$ac_srcdir,;t t
21438s,@abs_srcdir@,$ac_abs_srcdir,;t t
21439s,@top_srcdir@,$ac_top_srcdir,;t t
21440s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21441s,@builddir@,$ac_builddir,;t t
21442s,@abs_builddir@,$ac_abs_builddir,;t t
21443s,@top_builddir@,$ac_top_builddir,;t t
21444s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21445s,@INSTALL@,$ac_INSTALL,;t t
21446" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21447 rm -f $tmp/stdin
21448 if test x"$ac_file" != x-; then
21449 mv $tmp/out $ac_file
21450 else
21451 cat $tmp/out
21452 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021453 fi
21454
Martin v. Löwis11437992002-04-12 09:54:03 +000021455done
21456_ACEOF
21457cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021458
Martin v. Löwis11437992002-04-12 09:54:03 +000021459#
21460# CONFIG_HEADER section.
21461#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021463# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21464# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021465#
21466# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021467ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21468ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021469ac_dC=' '
21470ac_dD=',;t'
21471# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021472ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021473ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021474ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021475ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021476
Martin v. Löwis11437992002-04-12 09:54:03 +000021477for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021478 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021479 case $ac_file in
21480 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021481 cat >$tmp/stdin
21482 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21483 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021485 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021486 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021487 esac
21488
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21490echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021491
Martin v. Löwis11437992002-04-12 09:54:03 +000021492 # First look for the input files in the build tree, otherwise in the
21493 # src tree.
21494 ac_file_inputs=`IFS=:
21495 for f in $ac_file_in; do
21496 case $f in
21497 -) echo $tmp/stdin ;;
21498 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021499 # Absolute (can't be DOS-style, as IFS=:)
21500 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021501echo "$as_me: error: cannot find input file: $f" >&2;}
21502 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021503 # Do quote $f, to prevent DOS paths from being IFS'd.
21504 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021505 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021506 if test -f "$f"; then
21507 # Build tree
21508 echo "$f"
21509 elif test -f "$srcdir/$f"; then
21510 # Source tree
21511 echo "$srcdir/$f"
21512 else
21513 # /dev/null tree
21514 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021515echo "$as_me: error: cannot find input file: $f" >&2;}
21516 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021517 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 esac
21519 done` || { (exit 1); exit 1; }
21520 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021521 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021522
Martin v. Löwis11437992002-04-12 09:54:03 +000021523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021524
Martin v. Löwis11437992002-04-12 09:54:03 +000021525# Transform confdefs.h into two sed scripts, `conftest.defines' and
21526# `conftest.undefs', that substitutes the proper values into
21527# config.h.in to produce config.h. The first handles `#define'
21528# templates, and the second `#undef' templates.
21529# And first: Protect against being on the right side of a sed subst in
21530# config.status. Protect against being in an unquoted here document
21531# in config.status.
21532rm -f conftest.defines conftest.undefs
21533# Using a here document instead of a string reduces the quoting nightmare.
21534# Putting comments in sed scripts is not portable.
21535#
21536# `end' is used to avoid that the second main sed command (meant for
21537# 0-ary CPP macros) applies to n-ary macro definitions.
21538# See the Autoconf documentation for `clear'.
21539cat >confdef2sed.sed <<\_ACEOF
21540s/[\\&,]/\\&/g
21541s,[\\$`],\\&,g
21542t clear
21543: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021544s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021545t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021546s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021547: end
21548_ACEOF
21549# If some macros were called several times there might be several times
21550# the same #defines, which is useless. Nevertheless, we may not want to
21551# sort them, since we want the *last* AC-DEFINE to be honored.
21552uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21553sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21554rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021555
21556# This sed command replaces #undef with comments. This is necessary, for
21557# example, in the case of _POSIX_SOURCE, which is predefined and required
21558# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021559cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021560s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021561_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021562
Martin v. Löwis11437992002-04-12 09:54:03 +000021563# Break up conftest.defines because some shells have a limit on the size
21564# of here documents, and old seds have small limits too (100 cmds).
21565echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021566echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021567echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21568echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021569rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021570while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021571do
Martin v. Löwis11437992002-04-12 09:54:03 +000021572 # Write a limited-size here document to $tmp/defines.sed.
21573 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21574 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021575 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 # Work around the forget-to-reset-the-flag bug.
21577 echo 't clr' >>$CONFIG_STATUS
21578 echo ': clr' >>$CONFIG_STATUS
21579 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021580 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021581 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21582 rm -f $tmp/in
21583 mv $tmp/out $tmp/in
21584' >>$CONFIG_STATUS
21585 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21586 rm -f conftest.defines
21587 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021588done
Martin v. Löwis11437992002-04-12 09:54:03 +000021589rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021590echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021591echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021592
Martin v. Löwis11437992002-04-12 09:54:03 +000021593# Break up conftest.undefs because some shells have a limit on the size
21594# of here documents, and old seds have small limits too (100 cmds).
21595echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21596rm -f conftest.tail
21597while grep . conftest.undefs >/dev/null
21598do
21599 # Write a limited-size here document to $tmp/undefs.sed.
21600 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21601 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021602 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021603 # Work around the forget-to-reset-the-flag bug.
21604 echo 't clr' >>$CONFIG_STATUS
21605 echo ': clr' >>$CONFIG_STATUS
21606 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21607 echo 'CEOF
21608 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21609 rm -f $tmp/in
21610 mv $tmp/out $tmp/in
21611' >>$CONFIG_STATUS
21612 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21613 rm -f conftest.undefs
21614 mv conftest.tail conftest.undefs
21615done
21616rm -f conftest.undefs
21617
21618cat >>$CONFIG_STATUS <<\_ACEOF
21619 # Let's still pretend it is `configure' which instantiates (i.e., don't
21620 # use $as_me), people would be surprised to read:
21621 # /* config.h. Generated by config.status. */
21622 if test x"$ac_file" = x-; then
21623 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021624 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021625 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 cat $tmp/in >>$tmp/config.h
21628 rm -f $tmp/in
21629 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021630 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21632echo "$as_me: $ac_file is unchanged" >&6;}
21633 else
21634 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21635$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021636 X"$ac_file" : 'X\(//\)[^/]' \| \
21637 X"$ac_file" : 'X\(//\)$' \| \
21638 X"$ac_file" : 'X\(/\)' \| \
21639 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021640echo X"$ac_file" |
21641 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21642 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21643 /^X\(\/\/\)$/{ s//\1/; q; }
21644 /^X\(\/\).*/{ s//\1/; q; }
21645 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021646 { if $as_mkdir_p; then
21647 mkdir -p "$ac_dir"
21648 else
21649 as_dir="$ac_dir"
21650 as_dirs=
21651 while test ! -d "$as_dir"; do
21652 as_dirs="$as_dir $as_dirs"
21653 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21654$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021655 X"$as_dir" : 'X\(//\)[^/]' \| \
21656 X"$as_dir" : 'X\(//\)$' \| \
21657 X"$as_dir" : 'X\(/\)' \| \
21658 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021659echo X"$as_dir" |
21660 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21661 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21662 /^X\(\/\/\)$/{ s//\1/; q; }
21663 /^X\(\/\).*/{ s//\1/; q; }
21664 s/.*/./; q'`
21665 done
21666 test ! -n "$as_dirs" || mkdir $as_dirs
21667 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21668echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21669 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021670
Martin v. Löwis11437992002-04-12 09:54:03 +000021671 rm -f $ac_file
21672 mv $tmp/config.h $ac_file
21673 fi
21674 else
21675 cat $tmp/config.h
21676 rm -f $tmp/config.h
21677 fi
21678done
21679_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021680
Martin v. Löwis11437992002-04-12 09:54:03 +000021681cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021682
Martin v. Löwis11437992002-04-12 09:54:03 +000021683{ (exit 0); exit 0; }
21684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021685chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021686ac_clean_files=$ac_clean_files_save
21687
21688
21689# configure is writing to config.log, and then calls config.status.
21690# config.status does its own redirection, appending to config.log.
21691# Unfortunately, on DOS this fails, as config.log is still kept open
21692# by configure, so config.status won't be able to write to it; its
21693# output is simply discarded. So we exec the FD to /dev/null,
21694# effectively closing config.log, so it can be properly (re)opened and
21695# appended to by config.status. When coming back to configure, we
21696# need to make the FD available again.
21697if test "$no_create" != yes; then
21698 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021699 ac_config_status_args=
21700 test "$silent" = yes &&
21701 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021703 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021704 exec 5>>config.log
21705 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21706 # would make configure fail if this is the last instruction.
21707 $ac_cs_success || { (exit 1); exit 1; }
21708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021709
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021710
21711echo "creating Setup"
21712if test ! -f Modules/Setup
21713then
21714 cp $srcdir/Modules/Setup.dist Modules/Setup
21715fi
21716
21717echo "creating Setup.local"
21718if test ! -f Modules/Setup.local
21719then
21720 echo "# Edit this file for local setup changes" >Modules/Setup.local
21721fi
21722
21723echo "creating Makefile"
21724$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21725 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021726 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021727mv config.c Modules